nvpy icon indicating copy to clipboard operation
nvpy copied to clipboard

Titles of notes are polluted if "notes_as_txt = 1"

Open habi opened this issue 12 years ago • 10 comments

I'm using nvpy on Scientific Linux 6.0 (Linux 2.6.32-279.14.1.el6.i686 i686) with KDE: 4.3.4 and would like to save my notes a .txt-Files (on our AFS-home). Whenever I have a note that has spaces in the title (like 'title with several words'), said note gets saved as 'title_with_several_words.txt' to disk. Subsequent syncs to simplenote then pollutes the title of the note with title_with_several_words' instead of leaving it alone...

habi avatar Jan 03 '13 15:01 habi

I don't know if this is related, but with the current version I'm using I also have the problem that with every sync I get duplicated notes. It's really cumbersome to weed those out using either Notational Velocity on my Mac or the web interface of SimpleNote...

habi avatar Jan 03 '13 16:01 habi

I am not sure I have the same issue: I run nvpy on linux at work, saving notes as text using this config:

,--------, | [nvpy] | simplenote_sync = 0 | notes_as_txt = 1 | txt_path = /home/tony/Dropbox/nv-notes --------

today I have installed nvpy on mac osx (snow leopard) at home so that I can edit my notes from home and work. It kind of works, but first line of each note (ie the title) got converted to the filename. Example:

note content: ,--------, | /a/b/c - def | | some text --------

filename: /home/tony/Dropbox/nv-notes/a b_c-_def.txt

after starting nvpy in mac the node, the note content changed to: ,--------, | a b_c-_def.txt | | /a/b/c - def | | some text --------

I also backup the notes hourly using version control (hg), so I did a revert and now things seem to work on mac fine just as on linux. However I am not sure what happens when I start nvpy on linux at work. Will keep you informed.

Tony2 avatar Jan 18 '13 22:01 Tony2

Hello!

Using nvPY with notes_as_txt (which is already experimental) to store notes on a syncing filesystem such as Dropbox is not supported. nvPY assumes that it's the only party writing to its notes database, whether this is txt or its native json. native json is a tad better, because it stores the filename in the note text, where it belongs.

That being said, I'm working on a new nvPY fork (altsync) which will have this as its only mode of operation: .txt files on a syncing filesystem. This will _not_support simplenote syncing, but will be the solution for people wanting to use their own sync layers, such as dropbox, gdrive, or anything else. It will probably also support live multi-directional updates (!!) so this is taking some time to implement correctly.

Until then, I would recommend using nvPY's native .json format, preferably not on a syncing filesystem. simplenote is there to take care of the syncing, also with other tools such as nvALT.

cpbotha avatar Jan 21 '13 08:01 cpbotha

Hello,

thank you for your reply and the decision for the new fork altsync. I am looking forward beta-testing it.

Tony2 avatar Jan 21 '13 20:01 Tony2

I'm using nvPY to save to notes_as_txt so I can access my notes on other systems. I work with an office computer which synchs with SimpleNote via nvPY, but want to have access to the notes from the lab, where I'm not allowed to install software, but have access to my drives. I was thinking that I can edit the txt-Files (in the lab) and then nvPY will synch that back to SimpleNote eventually (from the office PC). So that's a wrong assumption?

On Mon, Jan 21, 2013 at 9:29 PM, Tony2 [email protected] wrote:

Hello,

thank you for your reply and the decision for the new fork altsync. I am looking forward beta-testing it.

— Reply to this email directly or view it on GitHubhttps://github.com/cpbotha/nvpy/issues/58#issuecomment-12515995.

habi avatar Jan 22 '13 07:01 habi

@habi - what you're doing should work. The problem I sketched is when a third-party sync layer modifies .txt files whilst nvpy is running.

@swestdijk could you take a further look at @habi's original report at the top of this thread?

cpbotha avatar Jan 22 '13 20:01 cpbotha

@habi: Can you look into the nvpy.log file if the notes where detected as new. Then there is some message like 'New text note found .......'. This is the only situation where a title is injected into a note.

swestdijk avatar Jan 22 '13 21:01 swestdijk

I deleted the folder ~/.nvpy, doublechecked ~.nvpy.cfg and started nvPY. After I full sync I quit the program, edited a note on disk and started nvPY again.

Now I get the error below in the log-file:

2013-01-24 14:20:05,754 - DEBUG - nvpy logging initialized 2013-01-24 14:20:05,754 - DEBUG - config read from ['/afs/ psi.ch/user/h/haberthuer/.nvpy.cfg'] 2013-01-24 14:20:06,056 - DEBUG - Text note was changed: /afs/ psi.ch/user/h/haberthuer/.nvpy/c9c9c44055ba11e28 dd113e059b3312b.json 2013-01-24 14:20:06,056 - DEBUG - Text note was changed: /afs/ psi.ch/user/h/haberthuer/.nvpy/84ff898055ba11e28 e9f8b7eed97de10.json 2013-01-24 14:20:06,057 - DEBUG - Deleting note : /afs/ psi.ch/user/h/haberthuer/.nvpy/ed065f11608611e2a80cc3d7 96800519.json 2013-01-24 14:20:06,057 - ERROR - NotesDB_init: Error reading /afs/ psi.ch/user/h/haberthuer/.nvpy/ed08605c6086

11e2a4f4131d1f56068b.json: list.remove(x): x not in list

and nvPY does not start anymore. It complains about a sync error and tells me "Please check nvpy.log. Error reading note file". Sync can only be resumed with deleting ~/.nvpy again....

On Tue, Jan 22, 2013 at 10:05 PM, swestdijk [email protected]:

@habi https://github.com/habi: Can you look into the nvpy.log file if the notes where detected as new. Then there is some message like 'New text note found .......'. This is the only situation where a title is injected into a note.

— Reply to this email directly or view it on GitHubhttps://github.com/cpbotha/nvpy/issues/58#issuecomment-12566436.

habi avatar Jan 24 '13 13:01 habi

@habi: Please backup your textnote folder, remove the content from the .nvpy and the textnote folder and start again. You need to empty both folders. It looks like things are gone wrong probably when simplenote has problems again. So lets sync clean from start

swestdijk avatar Jan 25 '13 05:01 swestdijk

@swestdijk Backing up and deleting the notes folder, removing ~/.nvpy and starting again cured the troubles. Thanks for your help.

I don't know if the initial issue still remains, though. I'll keep an eye on that.

On Fri, Jan 25, 2013 at 6:56 AM, swestdijk [email protected] wrote:

@habi https://github.com/habi: Please backup your textnote folder, remove the content from the .nvpy and the textnote folder and start again. You need to empty both folders. It looks like things are gone wrong probably when simplenote has problems again. So lets sync clean from start

— Reply to this email directly or view it on GitHubhttps://github.com/cpbotha/nvpy/issues/58#issuecomment-12689140.

habi avatar Jan 28 '13 10:01 habi