snose

Check-in [bdaac3057a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Tweak command line args more to suit --file
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | master
Files: files | file ages | folders
SHA3-256: bdaac3057a03eb7158b60cf3cc92ec54dd551f9c3bfd56507610f9b2f0b43335
User & Date: simon 2018-10-18 19:32:10
Context
2018-10-18
19:58
Explicitly set snose tag during sync

Because otherwise it gets removed - this is due to Simperium changes that
require everything to be set and since we don't set it here the tags get set to
a default of empty in simplenote.py now.

It would be nicer to not remove other tags if set, but I can live with this
just setting "snose". check-in: f26f676e5d user: simon tags: trunk, master

19:32
Tweak command line args more to suit --file check-in: bdaac3057a user: simon tags: trunk, master
2018-10-13
12:26
Improve regex for filename matching and exit properly if none found check-in: cf115f6116 user: simon tags: trunk, master
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to snose.py.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os.path, time
from optparse import OptionParser
import netrc
import re

def main():
    parser = OptionParser()
    parser.add_option("--snort", action="store", type="string", help="Import a new file SNORT to Simplenote")
    parser.add_option("--sniff", action="store", nargs=1, type="string", help="Link a file with an already existing note in  Simplenote", metavar="<key> <filename>")
    parser.add_option("--sneeze", action="store", nargs=1, type="string", help="Export an existing file from Simplenote", metavar="<key> <filename>")
    parser.add_option("--blow", action="store", type="string", help="Roll back note of key BLOW to previous version")
    parser.add_option("--sync", help="Sync files in index", default=False, action='store_true')
    parser.add_option("--hanky", help="Use with --sync to perform a dry run", default=False, action='store_true')
    parser.add_option("--snot", help="List notes available for export (tagged snose)", default=False, action='store_true')
    parser.add_option("--file", help="Filename for snort, sniff, sneeze", default=None, action='store')
    parser.add_option("--username", action="store", type="string", help="Your Simplenote email address")
    parser.add_option("--password", action="store", type="string", help="Your Simplenote password")
    (options, args) = parser.parse_args()







|
|
|
|







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os.path, time
from optparse import OptionParser
import netrc
import re

def main():
    parser = OptionParser()
    parser.add_option("--snort", action="store_true", default=False, help="Import a new file to Simplenote")
    parser.add_option("--sniff", action="store", nargs=1, type="string", help="Link a file with an already existing note in Simplenote", metavar="<key>")
    parser.add_option("--sneeze", action="store", nargs=1, type="string", help="Export an existing file from Simplenote", metavar="<key>")
    parser.add_option("--blow", action="store", type="string", help="Roll back note key to previous version", metavar="<key>")
    parser.add_option("--sync", help="Sync files in index", default=False, action='store_true')
    parser.add_option("--hanky", help="Use with --sync to perform a dry run", default=False, action='store_true')
    parser.add_option("--snot", help="List notes available for export (tagged snose)", default=False, action='store_true')
    parser.add_option("--file", help="Filename for snort, sniff, sneeze", default=None, action='store')
    parser.add_option("--username", action="store", type="string", help="Your Simplenote email address")
    parser.add_option("--password", action="store", type="string", help="Your Simplenote password")
    (options, args) = parser.parse_args()