env RAILS_ENV="production"
- 12SQ / ticket 用 bin/runpdf.rb run sale_id
- wide 用 bundle_wide_pdf/runpdf.rb sale
[tw|cn]_[sale_id] - Qcard 用 bin/runpdf_remote_once.rb run sale_id
script/console
a = HypoOrder.find_by_sale_id xxxxx
b = a.to_book
b.save
記得
cd ../hypoQcard/
ls
nohup bin/pageserver.rb &
- 12SQ 用
./bin/BarcodeOverprinter.app/Contents/MacOS/BarcodeOverprinter input.pdf bookcloth BARCODE output.pdf
用 ./script/rails console 取得該頁 json:
o = HypoOrder.find_by_sale_id xxxxx
d = JSON.parse(o.data)
File.open(**json_path**, 'w') {|f| f.write(d[index].to_json) }
然後再跑 ./tools/CalendarTick.rb - **output_pdf_path** < **json_path**
注意進 console 後要用 ProductSource
t = ProductSource.find(:all, :conditions=>["sale_id = ?", 33406])
t.data