3 # Copyright (C) 2012 FinalsClub Foundation
5 from celery.task import task
6 from karmaworld.apps.notes.gdrive import convert_with_google_drive
9 def process_document(note):
10 """ Process a file with Google Drive
11 populates and saves the Note.html, Note.text
13 :note: A `karmaworld.apps.notes.models.Note` instance associated, document or pdf file
14 :returns: True on success, else False
16 print "Processing document: %s -- %s" % (note.id, note.name)
18 convert_with_google_drive(note)
20 print "\terror processing doc: %s -- %s" % (note.id, note.name)