Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Better "Created Date" when importing new notes #96

Merged
merged 1 commit into from

2 participants

@esplinr

Use the unix mtime as the created date. It isn't the real created date, but it is closer than the default (current) date and time.

It makes importing existing notes much more useful because the current dates are preserved.

Richard Esplin Better "Created Date" when importing new notes
Use the unix mtime as the created date. It isn't the real created date, but it
is closer than the default (current) date and time.
fba8592
@esplinr

Importing existing files are much more useful when the modification time is preserved as the Evernote creation time.

@VitaliyRodnenko

Commit accepted, thank you for supporting our project!

@VitaliyRodnenko VitaliyRodnenko merged commit c8a74e4 into VitaliyRodnenko:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 8, 2013
  1. Better "Created Date" when importing new notes

    Richard Esplin authored
    Use the unix mtime as the created date. It isn't the real created date, but it
    is closer than the default (current) date and time.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +2 −1  geeknote.py
  2. +2 −1  gnsync.py
View
3  geeknote.py
@@ -185,10 +185,11 @@ def loadNoteContent(self, note):
note.content = self.getNoteStore().getNoteContent(self.authToken, note.guid)
@EdamException
- def createNote(self, title, content, tags=None, notebook=None):
+ def createNote(self, title, content, tags=None, notebook=None, created=None):
note = Types.Note()
note.title = title
note.content = content
+ note.created = created
if tags:
note.tagNames = tags
View
3  gnsync.py
@@ -162,7 +162,8 @@ def _create_note(self, file_note):
result = GeekNote().createNote(
title=file_note['name'],
content=content,
- notebook=self.notebook_guid)
+ notebook=self.notebook_guid,
+ created=file_note['mtime'])
if result:
logger.info('Note "{0}" was created'.format(file_note['name']))
Something went wrong with that request. Please try again.