snose

Timeline
Login

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

48 check-ins

2019-03-10
01:51
Typo, should have been file not filename Leaf check-in: 44025db081 user: atomicules tags: master, trunk
2018-11-17
10:59
Break many more common bits out into methods:

- snitems (iterating through items)
- snwrite (writing a file from disk)
- snread (reading a file from disk)
- snremote (getting a remote note from Simplenote)+def snitems(snose): check-in: 3ee3b5e7a8 user: atomicules tags: master, trunk

2018-11-16
17:46
Move some move common bits out to a method check-in: 20b98bc9de user: atomicules tags: master, trunk
14:59
Add a write_index method, avoid repetition check-in: 410d185b80 user: simon tags: master, trunk
14:46
Minor formatting changes check-in: bf33015cce user: simon tags: master, trunk
13:37
Add a load_or_new() method

Haven't really touched this in years so could do with starting to tidy this up
a bit. Lots of repetitive code. check-in: d217d13956 user: simon tags: master, trunk

2018-10-28
12:20
Those exits should have been sys.exit(). Whoops./ check-in: 3735e6b8ec user: simon tags: master, trunk
2018-10-18
20:13
Update README to reflect --file and other recent changes. check-in: 36abba8d1a user: simon tags: master, trunk
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: master, trunk

19:32
Tweak command line args more to suit --file check-in: bdaac3057a user: simon tags: master, trunk
2018-10-13
12:26
Improve regex for filename matching and exit properly if none found check-in: cf115f6116 user: simon tags: master, trunk
12:03
Fixes from 1fe8adea90

Blindly copy/pasted. Some were name not filename check-in: 2f57297d12 user: simon tags: master, trunk

10:57
I give in - switch to spaces instead of tabs check-in: 5dee798315 user: simon tags: master, trunk
10:40
More Python 3 and 2 compatibility - UTF-8 write files

I suspect I didn't get everything quite as good as I could in simplenote.py I
wish Python 2 would go away - it's so messy trying to do both. check-in: 1fe8adea90 user: simon tags: master, trunk

2018-10-11
10:25
Add ability to determine filename from first few lines of a file

Wanted to do this for awhile, but was too lazy until now.

Most of my snose files have the filepath as the first or second line in the
file (in a comment). This makes it easier to sneeze files out. check-in: ba8e456fb6 user: simon tags: master, trunk

07:54
Merge in Python3 stuff check-in: 5d0589b3be user: simon tags: master, trunk
2018-10-06
17:56
Python3 compatibility - iteritems vs items

I think that might be all that's needed. This was never super duper advanced
code. Leaf check-in: 7dedaed4cc user: atomicules tags: python3

16:41
Start of Python3 compatibility

It's about time... print statements are the easy ones. check-in: d20f7e7998 user: atomicules tags: python3

16:28
Simperium compatibility

Use version instead of syncnum (since I _think_) with Simperium version does
what both of these did: I.e. version will increment whether content or metadata
changes.

Some import tweaks.

(Gah! This code is horrible, but still works) check-in: f66d33d3c7 user: atomicules tags: master, trunk

2018-03-24
10:25
Remove extraneous quote check-in: f2c2d16206 user: noreply@github.com tags: master, trunk
10:23
Markdown formatting check-in: ea5e442e42 user: noreply@github.com tags: master, trunk
2014-04-06
10:14
WIP on master: 4d13cca Merge branch 'master' of github.com:atomicules/snose Leaf check-in: 557b21d630 user: base@atomicules.co.uk tags: refs/stash, trunk
10:14
index on master: 4d13cca Merge branch 'master' of github.com:atomicules/snose check-in: 9fecfecb39 user: base@atomicules.co.uk tags: refs/stash, trunk
2014-02-11
12:20
Re-license as BSD 2-Clause check-in: c2dcf75092 user: atomicules@users.noreply.github.com tags: master, trunk
2013-11-15
00:01
Merge branch 'master' of github.com:atomicules/snose

Pull in license changes added directly on Github Leaf check-in: 5e442de3d4 user: base@atomicules.co.uk tags: origin/master, trunk

2013-11-14
23:59
Add rollback version functionality

Adds `blow` command that roles back local and remote note exactly one
version. Just handier than restoring via the web interface. Just
occasionally I've synched stuff after deleting bits by accident, etc.
This just gives me a way to revert the mistake. check-in: 50c4f640fd user: base@atomicules.co.uk tags: origin/master, trunk

2013-07-16
11:44
Create LICENSE check-in: d110cbb8df user: atomicules@lavabit.com tags: origin/master, trunk
2012-09-12
20:54
Add usage suggestion to README check-in: 592236f3a7 user: atomicules@lavabit.com tags: origin/master, trunk
2012-08-31
11:31
Use .netrc for stored credentials instead of own custom file check-in: 55c66b9481 user: atomicules@lavabit.com tags: origin/master, trunk
2012-06-20
22:50
Merge branch 'master' of ssh.github.com:atomicules/snose check-in: 1c2280f416 user: atomicules@lavabit.com tags: origin/master, trunk
22:45
Don't display deleted notes when listing

As well as checking for the "snose" tag also need to check the deleted
status of the note.

Also, minor fix, use tab characters to better align the list output
columns. check-in: acd32bf17c user: atomicules@lavabit.com tags: origin/master, trunk

09:27
Updated README

I've tested the .snoseauth approach and it works fine
Also mention you can work with files in subdirectories. check-in: ec2d24c7d4 user: atomicules@lavabit.com tags: origin/master, trunk

2012-03-09
21:55
Make executing commands more obvious

...since won't be executable by default so should include `python`
prefix. check-in: f90a74828c user: atomicules@lavabit.com tags: origin/master, trunk

2012-02-17
11:00
Remove some Todos from the README check-in: bb6bb9624a user: atomicules@lavabit.com tags: origin/master, trunk
2012-02-16
13:11
Write file before index for Sneeze. Also use local mod dates

The Sneeze function wrote the index before writing the file, but
this makes no sense as means that can't used the local system
modifydate, have to use what Simplenote returns. Which is stupid
because when you run a sync it will immediately want to update
the remote with local changes (that didn't actually happen).

And on that note, for all functions we want to be making sure that
when the index gets updated it is the local system modifydate
that is being used as otherwise it will want to synchronise
files (even when there have beenno changes).)) check-in: 936bfb6b48 user: atomicules@lavabit.com tags: origin/master, trunk

2012-02-15
17:19
Minor comment addition to README regarding a TODO check-in: 5f2d374d17 user: atomicules@lavabit.com tags: origin/master, trunk
17:18
Mainly complete the exception handling

- Add try/except anywhere where there is local/remote IO
- Include output messages to explain the exceptions
- Also move to using nested try/except/else to control flow
I'm not sold on the readability of this nesting, but it seems
more sensible than including exit() statements at the end of
the except sections everytime you want to prevent the
programme from continuing.
- In the sync section, remove the use of "success" boolean
and use try/except/else to control the flow
- In the sync section, sending the modifydate when updating so
that the order is updated remotely
- In the sync section, also using local modifydate in the index
file, because
1) by not sending as above it somehow didn't get updated
remotely (I'm sure this used to happen?) and so would always
sync twice as it would read the remote value and get the old
modifydate. I don't know, this was odd.
2) But then when I did start sending the modify date there can be
a difference in accuracy between remote and local timestamps
which can result in the file always wanting to sync if you use
the remote modifydate in the index file. So always have to use
the last local one. check-in: 80242d1af5 user: atomicules@lavabit.com tags: origin/master, trunk

2012-02-10
13:45
Python-ise the print statements to use %s

Since that seems to be the done thing, rather than ""+thing check-in: 143792f107 user: atomicules@lavabit.com tags: origin/master, trunk

2012-02-08
22:44
Start adding better try/except. Lots still to do check-in: 957c91a363 user: atomicules@lavabit.com tags: origin/master, trunk
2012-02-04
11:54
Use OL instead of UL in README check-in: 097605f7e5 user: atomicules@lavabit.com tags: origin/master, trunk
11:52
Add sync command example to README check-in: 16474b7461 user: atomicules@lavabit.com tags: origin/master, trunk
11:48
Adding README file check-in: 638859c75e user: atomicules@lavabit.com tags: origin/master, trunk
2012-02-01
17:09
Support merging if local and remote have changed

- Just need to include version number when calling update_note()
- Then check if content is returned. If it is, it's been merged
so then need to update the local file.
- Only downside is that is is not possible to dry-run for merges,
at least as far as I can tell. The only way to truly tell if
merging has occured is to check for returned content. check-in: 685f56f9df user: atomicules@lavabit.com tags: origin/master, trunk

13:17
Merge branch 'master' of ssh.github.com:atomicules/snose

Conflicts:
snose.py check-in: b054aedd4d user: atomicules@lavabit.com tags: origin/master, trunk

12:48
Add dry-run functionality to sync

At least I think I've done that. It's not perfect but will give
you some idea of what will happen. I suppose strictly speaking the
dry run should still make remote calls (apart from remote updates)
and stash this info somewhere temporarily, but since the logic of
the sync is to check for local changes first and push these to
Simplenote and only after that pull in remote changes a file can't
(or shouldn't!) ever be updated in both directions in one sync.
Therefore the dry run just ignores files that appear in the
local changes section.)) check-in: 691510c797 user: atomicules@lavabit.com tags: origin/master, trunk

2012-01-31
23:20
Small fix to sync command

When updating a local file, the modify date in the index needs to
be set to the modify date from the local file, whereas before I
was setting it to the remote value. That was stupid because it
meant as soon as the local file was created/update on the next
sync it would appear as if these files had been modified and it
would copy back the files again to remote. check-in: d1f3087811 user: atomicules@lavabit.com tags: origin/master, trunk

2012-01-16
16:07
Add in remaining basic functionality:

- Sneeze: Write an existing file out
- Sniff: Import an existing file as mapping only (doesn't create
new note on Simplenote)
- Snot: Think long and dribbly. List of all existing snose synched
notes

Still lots of improvements to do, such as pulling out repeated
stuff into functions. Oh, and all the error handling.

But the basics are there.) check-in: 7029fa2d4a user: atomicules@lavabit.com tags: origin/master, trunk

2012-01-10
17:23
Initial commit

Basic functionality is there and works, but need to finish off the
error checking/handling, etc

- Then add in functionality to copy out an existing note
- And getting a list of notes, perhaps limit to a tag? check-in: 56b40d1fc9 user: atomicules@lavabit.com tags: origin/master, trunk