Skip to content

Instantly share code, notes, and snippets.

@bentsai
Created March 8, 2013 05:19
Show Gist options
  • Save bentsai/5114369 to your computer and use it in GitHub Desktop.
Save bentsai/5114369 to your computer and use it in GitHub Desktop.
dayone
from plistlib import writePlistToString
from datetime import datetime
from uuid import uuid4
def create_dayone_dict(entry_text):
d = {
'Creation Date': datetime.now(),
'Entry Text': entry_text,
'UUID': str(uuid4()).translate(None, '-'),
'Time Zone': 'America/New_York'
}
return d
d1 = create_dayone_dict('test one two three')
print writePlistToString(d1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment