Skip to content

Instantly share code, notes, and snippets.

@shanac
shanac / dayone-reporter.py
Created February 24, 2016 06:40
reporter to dayone script for Pythonista
# -*- coding: utf-8 -*-
import console, datetime, json, os, sys, urllib, webbrowser
selected = "no"
console.clear()
# I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder
sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')]
import dropboxlogin # this code can be found here https://gist.github.com/4034526
# API app needs to be set up as root; set access_type to "dropbox".
dropbox_client = dropboxlogin.get_client() # auth
todayString=datetime.date.today().strftime('%Y-%m-%d')
@zacwasielewski
zacwasielewski / dayone-launchcenterpro-foodlog
Created June 18, 2014 15:55
Day One + Launch Center Pro Food Log
dayone://post?entry=Food Log
|Food Log||
|:---|:---|
|Meal|[list: Which meal?|Breakfast|Lunch|Dinner|Snack]|
|Foods|[prompt:What did you eat?]|
|Notes|[prompt:Extra thoughts?]|
#food #log
@mickaellegal
mickaellegal / dayone_lcp
Last active February 6, 2017 05:23
Day One and Launch Center Pro Workflow
dayone://post?entry=My Daily Review
|Daily Review||
|:---|:---|
|Summary|[prompt: Today's one word summary]|
|Did I work?|[list: Did I work today?|Yes|No]|
|Did I relax?|[list: Did I relax today?|Yes|No]|
|Physical Exercise|[list: Did I workout today?|Yes|No]|
|Satisfaction|[list: Am I happy with what I did today?|Yes|No]|
|Goals|[list:Any progress toward my goals?|Yes|No]|
var DayOne = require('dayone').DayOne;
var DayOneEntry = require('dayone').DayOneEntry;
var dayone = new DayOne();
dayone.list({'tags': ['randomidea']}, function(err, entries) {
var new_entries = entries.sort(function(a, b) {
if (a.creationDate > b.creationDate)
return 1;
if (a.creationDate < b.creationDate)
return -1;
@Zettt
Zettt / Daily Diary.py
Created November 19, 2012 19:28
Daily Diary in Python for Pythonista ( Original post: http://tmblr.co/ZFavEyXHGqSe )
import webbrowser
import urllib
dayone_url = "dayone://post?entry="
feeling_question = "How do you feel today?"
achievement_question = "What are you trying to achieve today?"
thought_question = "Is there a negative thought or positive on your mind you want to get out?"
tag = "#diary"
# input
@statonjr
statonjr / logtodayone.rb
Created August 4, 2012 21:01
Log to Day One
#!/usr/bin/env ruby
# logtodayone.rb
# Brett Terpstra (http://brettterpstra.com)
# Larry Staton Jr. (https://github.com/statonjr)
# Use and modify freely, attribution appreciated
#
# This script works with the Day One[1] command line utility
# It parses an input string for an exclamation point prefix to mark starred
# and/or a [date string] at the beginning to parse natural language dates