Ejemplo n.º 1
0
def save_notes():
	user = ''
	pw = ''
	note = []
	simple = Simplenote(user,pw)

	#Get auth
	token = simple.authenticate(user, pw)

	#Get list of notes
	print "Retrieving list"
	l = simple.get_note_list()
	length = len(l[0])
	print length
	count = 0
	print "Processing list.."
	while count < length:
		print count
		note += simple.get_note(l[0][count]['key'])
		count += 1
	filename = t + '.txt'
	file = open(filename, 'w')
	#To track progress
	for item in note:
		print >> file, item
	file.close()
	#Dump note object to pickle for use by other programs
	import pickle
	pickle.dump(note, open( t + '.pickle', 'wb'))
Ejemplo n.º 2
0
def save_notes():
    user = ''
    pw = ''
    note = []
    simple = Simplenote(user, pw)

    #Get auth
    token = simple.authenticate(user, pw)

    #Get list of notes
    print "Retrieving list"
    l = simple.get_note_list()
    length = len(l[0])
    print length
    count = 0
    print "Processing list.."
    while count < length:
        print count
        note += simple.get_note(l[0][count]['key'])
        count += 1
    filename = t + '.txt'
    file = open(filename, 'w')
    #To track progress
    for item in note:
        print >> file, item
    file.close()
    #Dump note object to pickle for use by other programs
    import pickle
    pickle.dump(note, open(t + '.pickle', 'wb'))
Ejemplo n.º 3
0
def add_note(note):
        simple = Simplenote(USER, PW)

        #Get auth
        token = simple.authenticate(USER, PW)
	t = simple.add_note(note)