swestdijk / nvpy

Simplenote syncing note-taking application, inspired by Notational Velocity and ResophNotes, but uglier and cross-platformerer.
Other
1 stars 1 forks source link

Get Note Title from Filename #2

Open fny opened 12 years ago

fny commented 12 years ago

nvpy currently uses the first line for the title when importing notes which doesn't play nicely with Notational Velocity's setup.

swestdijk commented 12 years ago

Can you give more details on how Notational Velocity get the note title. I don't use Notational Velocity myself, but if it works the same as ResophNotes i understand what happens

ilesm commented 12 years ago

It keeps the note titles in a binary plist file called 'Notes & Settings' in the same directory as the text files. It also seems to store other stuff there like app preferences and other non-markdown formatting. For example in NV you can bold a piece of text in a note and it preserves that formatting, even though the bolding isn't stored in the text file itself.

fny commented 12 years ago

The plists are used for "auxiliary features" (e.g. format preservation, conflicts, interim changes, application settings). I'm only suggesting that the title should be read/stored from filenames as opposed to necessarily using the first line (perhaps alongside h1). When trying to import my notes from Notational Velocity nvPy attempted to rewrite all of the filenames based on the first line of the textfile, which nvAlt does not intend to be the title. One conflict that resulted repeatedly was that nvPy would save the imported files using the first line of text resulting in filename length errors.

Currently nvPy relies on the first line of the file to edit the title, just like Resophnotes. nvAlt instead allows direct editing of the title from the pane that lists all notes. However, Resophnotes still uses a "# Top Level Heading" in the rendered text that it stores as the filename (I can't quite remember the precise behavior). For instance a note with title "# Note Title" would be saved as "Note_Title.ext". Right now that note would be saved as "#_Note_Title.ext".

General warning: be sure to have a backup before importing textfiles; the resultant crashes caused a lot of things to disappear.

On Mon, Sep 10, 2012 at 1:04 PM, ilesm notifications@github.com wrote:

It keeps the note titles in a binary plist file called 'Notes & Settings' in the same directory as the text files. It also seems to store other stuff there like app preferences and other non-markdown formatting. For example in NV you can bold a piece of text in a note and it preserves that formatting, even though the bolding isn't stored in the text file itself.

— Reply to this email directly or view it on GitHubhttps://github.com/swestdijk/nvpy/issues/2#issuecomment-8430044.

swestdijk commented 12 years ago

Storing the notes an other way is one of the ideas for later. For now i have changed the the title creation. The text file name is inserted as title in the new created note (The same ResophNotes do the job)