AntonyCorbett / JWLMerge

Utility to merge jwlibrary backup files
MIT License
194 stars 33 forks source link

Import personal notes #11

Closed temporarium closed 5 years ago

temporarium commented 5 years ago

Cool idea.

What possibility is there of a similar project where one can import personal notes? Here is what I mean:

I have hundreds of Bible notes (with exact verse, phrase and comment) that are in text files. I would love to have them in the JW Library app, but redoing them one by one would be soooo tedious. I need a tool to import them automatically at the appropriate verse. Is something like that possible?

AntonyCorbett commented 5 years ago

@temporarium I already have something similar but it requires the input (at least the verse reference) to be in a strict format, i.e. if my note is on Gen 3:15 the key is "1:3:15" (book : chapter : verse). And if my note is about a particular word or phrase in a verse (e.g. "enmity" in Gen 3:15 the key would be "1:3:15:4:4:0" (book : chapter : verse : startWord : endWord : colourIndex)

temporarium commented 5 years ago

I can definitely put the scriptures into that numbering format. The word-count for the phrase might be complicated, but it's probably better just to point to the whole text anyway, since I'm on the Spanish Reference Bible, and when we receive the revised version, they might/will not coincide anyway.

A couple of questions:

  1. Can the notes handle RTF, especially bold and italic? If so, how do they need to be formatted?
  2. If the notes are imported again, will they over-write the previous one with the same key?
  3. Any way we can take this discussion off of github to personal email?
AntonyCorbett commented 5 years ago

@temporarium In answer to your questions:

  1. There is currently no support in JWL to display formatted text.
  2. As you know JWL user notes consist of two elements - a title and content. My importer checks for a matching note by comparing the keys (as described above) and the title. Thus you may have multiple notes on a single verse with each differentiated by its title. If a match is found it is updated (if the content has changed). If a match is not found a new note is inserted. Existing notes that do not have a matching entry in the import file are retained.
  3. Id prefer to keep the discussion open please. That way others can contribute too. I'd like to think about the possibility of including the function in JWLMerge.
temporarium commented 5 years ago
  1. So, no way to have notes like in the Bible itself, with italics and cross-linking (see image)? :-(
  2. Excellent!
  3. No problem.

I would love to try it out, if possible.

screenshot_20190207-111205

AntonyCorbett commented 5 years ago

So, no way to have notes like in the Bible itself, with italics and cross-linking (see image)? :-(

No - all text in JWL user notes is rendered as plain text - no markup (or markdown) is allowed.

I will move the code into JWL Merge and let you know when there's something available to test.

AntonyCorbett commented 5 years ago

Please see the latest pre-release. You can now import a text file of Bible notes into one of the jwlibrary backup files. Use the DETAILS page, import button (bottom left). Details of the required textual format will be in the wiki asap.