From 79008eb9be229610367b52b30c82ca7b09d748c8 Mon Sep 17 00:00:00 2001 From: "Ryan P. C. McQuen" Date: Mon, 15 Oct 2018 20:00:20 -0700 Subject: [PATCH 1/2] Accept filename at command line. --- standard-notes-to-enex.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): -- 2.54.0 From e5eb541b88c2df4c4491e3cdda1611a2620969f7 Mon Sep 17 00:00:00 2001 From: "Ryan P. C. McQuen" Date: Mon, 15 Oct 2018 20:04:55 -0700 Subject: [PATCH 2/2] You can now pass any filename. --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.54.0