diff --git a/README.md b/README.md index e9fe210..3c051fa 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ # Standard Notes to Evernote or Joplin -## Use - -Rename your exported file as notes.txt, then... +## Usage: ```bash -python3 standard-notes-to-enex.py notes.txt +python3 standard-notes-to-enex.py SN_Archive.txt ``` +If a name like `SN_Archive.txt` is not provided, the script will assume your file is called `notes.txt`. ## Tutorial diff --git a/standard-notes-to-enex.py b/standard-notes-to-enex.py index 43375ad..bf8151c 100755 --- a/standard-notes-to-enex.py +++ b/standard-notes-to-enex.py @@ -1,7 +1,10 @@ import json import html +from sys import argv -data = json.load(open('notes.txt')) +source = argv[1] if len(argv) > 1 else 'notes.txt' + +data = json.load(open(source)) def text_from_html(title, text):