Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

A working build except for the green screen.

  • Loading branch information...
commit ae4e9d165dd2a7fd56e0d8b5fdd3dd125e55fd0f 1 parent df41c33
@mattgorecki authored
View
12 etc/photopops.cfg
@@ -1,16 +1,16 @@
{
- "photopops_fb_album_id": "279860852073279",
+ "notify_on_twitter": "False",
"upload_to_clients_fb": "False",
"client_fb_album_id": "",
- "title": "This is a prototype",
- "send_to_printer": "True",
+ "title": "Helena Bridal Fair 2012",
+ "send_to_printer": "False",
"greenscreen": "True",
"send_to_usbstick": "False",
- "notify_on_twitter": "False",
+ "photopops_fb_album_id": "",
"last_modified": "",
"number_up": 1,
"client_fb_album_url": "",
- "shortname": "prototyping",
+ "shortname": "bridalfair2012",
"upload_to_photopops_fb": "True",
"photopops_fb_album_url": "http://myphotopops.com"
-}
+}
View
BIN  qrjpeg.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
11 qrtest.py
@@ -0,0 +1,11 @@
+from lib.pyQR import *
+import Image
+
+
+qr = QRCode(4, QRErrorCorrectLevel.L)
+#TODO: Generate album URL for QR Code if it doesn't exist
+qr.addData("http://asdfij.com/asdiuasdfkjhqw34io5ubasdklfubgaljsbtfo3nsadf/asdf9n3215ui")
+qr.make()
+qr_im = qr.makeImage()
+qr_im = qr_im.resize((175,175), Image.NEAREST)
+qr_im.save("qrjpeg.jpg", "JPEG", quality=90)
View
6 web/popbottle.py
@@ -1,9 +1,13 @@
import sys
+import time
sys.path.append("/opt/photopops/lib")
-from bottle import route, run, static_file, template, view, install
+from bottle import route, run, static_file, template, view, install, response
@route('/static/<filename:path>')
def send_static(filename):
+ response.set_header('cache-control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0')
+ response.set_header('pragma', 'no-cache')
+ response.set_header('expires', time.strftime('%a, %d %b %Y %H:%M:%S GMT', time.gmtime()))
return static_file(filename, root='/opt/photopops/web')
@route('/tv')
View
21 worker-printing.py
@@ -1,21 +0,0 @@
-'''
-worker-printing.py
-RabbitMQ worker process
-
-Printing queue is only for printing the final processed photo.
-'''
-
-#import pp_actions
-import pp_rabbitmq
-import time
-
-QUEUE='printing'
-
-def callback(ch, method, properties, body):
- print " [x] Received %r" % (body)
- ch.basic_ack(delivery_tag = method.delivery_tag)
-
-print ' [*] Waiting for messages. To exit press CTRL+C'
-pp_rabbitmq.channel.basic_qos(prefetch_count=1)
-pp_rabbitmq.channel.basic_consume(callback, queue=QUEUE)
-pp_rabbitmq.channel.start_consuming()
View
22 worker-processing.py
@@ -1,22 +0,0 @@
-'''
-worker-processing.py
-
-RabbitMQ worker process
-
-Processing includes greenscreen removal, thumbnail generation, moving to usb.
-'''
-
-#import pp_actions
-import pp_rabbitmq
-import time
-
-QUEUE='processing'
-
-def callback(ch, method, properties, body):
- print " [x] Received %r" % (body)
- ch.basic_ack(delivery_tag = method.delivery_tag)
-
-print ' [*] Waiting for messages. To exit press CTRL+C'
-pp_rabbitmq.channel.basic_qos(prefetch_count=1)
-pp_rabbitmq.channel.basic_consume(callback, queue=QUEUE)
-pp_rabbitmq.channel.start_consuming()
View
44 worker-uploading.py
@@ -1,44 +0,0 @@
-'''
-worker-uploading.py
-RabbitMQ worker process
-
-Uploading queue is for sending to Facebook, website, Flickr, Google+, etc.
-'''
-
-from pp_helpers import loadconfig,saveconfig
-import etc.settings
-import pp_rabbitmq
-import time
-import facebook
-
-QUEUE='uploading'
-
-def fb_upload():
- cfg = loadconfig()
- print cfg
-
- graph = facebook.GraphAPI(settings.FB_APP_TOKEN)
-
- if len(cfg['photopops_fb_album_id']) == 0:
- print "no album"
- fb_res = graph.put_object(settings.FB_PHOTOPOPS_PAGE_ID, "albums", name=cfg['title'], message=cfg['title'])
- cfg['photopops_fb_album_id'] = fb_res['id']
- else:
- album_id = cfg['photopops_fb_album_id']
-
- print album_id
- fb_photo = open(fn, "rb")
- fb_res = graph.put_photo(fb_photo,album_id,fn)
- fb_photo.close()
-
- del album_id
-
-def callback(ch, method, properties, body):
- print " [x] Received %r" % body
- fb_upload()
- ch.basic_ack(delivery_tag = method.delivery_tag)
-
-print ' [*] Waiting for messages. To exit press CTRL+C'
-pp_rabbitmq.channel.basic_qos(prefetch_count=1)
-pp_rabbitmq.channel.basic_consume(callback, queue=QUEUE)
-pp_rabbitmq.channel.start_consuming()
View
5 worker.py
@@ -39,7 +39,8 @@ def greenscreen(cfg, fn, background='random'):
result.save("%s/%s" % (EV_PROC_DIR, fn))
def build_1_up(cfg,photo_list):
- print cfg,photo_list
+ print "Building final photo"
+ print photo_list
im = Image.new("RGB", (1200, 1800), "white")
# TODO: Make sure the file exists
@@ -56,7 +57,7 @@ def build_1_up(cfg,photo_list):
im.paste(thumb, (83,27))
- qr = QRCode(5, QRErrorCorrectLevel.Q)
+ qr = QRCode(4, QRErrorCorrectLevel.L)
#TODO: Generate album URL for QR Code if it doesn't exist
print cfg['photopops_fb_album_url']
qr.addData("%s" % cfg['photopops_fb_album_url'])
Please sign in to comment.
Something went wrong with that request. Please try again.