Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import from RedNotebook - Dates not relateable #35

Open
ortwic opened this issue Feb 14, 2025 · 7 comments
Open

Import from RedNotebook - Dates not relateable #35

ortwic opened this issue Feb 14, 2025 · 7 comments
Labels
enhancement New feature or request rednotebook

Comments

@ortwic
Copy link

ortwic commented Feb 14, 2025

I'd like to migrate my rednotebook dairy to joplin or obsidian. Don't know yet which one is better for a diary. ('cuz missing a sync feature and android support in rednotebook)

However, how is that supposed to work anyways? Each day is a seperate md file like 17.md put in a folder each month like 2024-12.

I tried frontmatter, but the title is indeed 17 which doesn't seem to have any benefit. Better would be a filename like 2014-12-17. Is this possible to accomplish? It's just crazy to adjust the creation date for hundrets of files.

Other minor improvements

  • There are way to many linebreaks in the output files. It would be nice if they would be reduced at least to the factor of 2.
  • This "=== Title ===" should translate at least into this "# Title \n---"
@ortwic ortwic added the enhancement New feature or request label Feb 14, 2025
@marph91
Copy link
Owner

marph91 commented Feb 15, 2025

Thanks for the feedback!

I tried frontmatter, but the title is indeed 17 which doesn't seem to have any benefit. Better would be a filename like 2014-12-17. Is this possible to accomplish? It's just crazy to adjust the creation date for hundrets of files.

I didn't have a concept for the file structure, so I took it from another journal format (don't remember which one). The filenames can be easily adjusted in the code. Is a file structure like below suitable for your case?

2014
  11
    2024-11-01.md
  12
    2024-12-17.md
    2024-12-18.md
...

Other minor improvements

  • There are way to many linebreaks in the output files. It would be nice if they would be reduced at least to the factor of 2.
  • This "=== Title ===" should translate at least into this "# Title \n---"

Can you provide an example file for these issues? I can't reproduce at my test files:

Image

(left: rednotebook, right: markdown)

@ortwic
Copy link
Author

ortwic commented Feb 16, 2025

Should work better I guess...

Actual textfile. So I guess it's how RedNotebook stores its data itself. There are that many linebreaks, whyever I dunno know.

17:
  text: '=== Tagesziel ===

    Random text


    - list item1

    - list item2

    - list item3


    Lorem Ipsum


    === Zufriedenheit ===

    Another random text


    **Dankbarkeit**

    Nice day

RedNotebook 2.24 Rendering
Image

@marph91
Copy link
Owner

marph91 commented Feb 19, 2025

You can try the latest release (v0.0.49). This is how the example snippet looks like:

Image

NB: I omitted the folder structure, as the folder names only contain redundant information. The notes are exported in one single folder. So the user can decide how he wants to structure them.

@ortwic
Copy link
Author

ortwic commented Feb 20, 2025

Didn't work. Exactly the same output as before. Filenames and frontmatter are exactly the same.

I wasn't able to check the version with jimmy --version either. I tried the windows version since the linux version is incompatible with my older glib version.

@marph91
Copy link
Owner

marph91 commented Feb 20, 2025

Didn't work. Exactly the same output as before. Filenames and frontmatter are exactly the same.

Could you share the command that you are using and the output on the command line, if possible? The command should be something like jimmy-cli-linux ~/.rednotebook/data/ --format rednotebook (documentation).

I wasn't able to check the version with jimmy --version either. I tried the windows version since the linux version is incompatible with my older glib version.

There is another linux executable that supports glibc from 2.31 on. You might try that one. (I'm thinking of making this as the default download, but I need to understand the impact first.)

Side note: There is no --version flag. The version should be printed as the first line on stdout, like INFO Jimmy 0.0.49 (Pandoc 3.6.1).

@ortwic
Copy link
Author

ortwic commented Feb 20, 2025

I tried now that executable and filenames are correct now. But encodings for german ä, ö, ü are not correct. Don't know if this is a linux editor thingy. The other time before I used the windows version with --formatter all option.

Just a sidenote: I build a PDF Parser with C#. For that I used yaml files as config input. That file contained rules on how inputs should be converted. How about this idea? IMO === Headline === should be not a level 3 headline but more like this: # Headline\n---

@marph91
Copy link
Owner

marph91 commented Feb 21, 2025

I tried now that executable and filenames are correct now. But encodings for german ä, ö, ü are not correct. Don't know if this is a linux editor thingy. The other time before I used the windows version with --formatter all option.

Converting special characters should work in general. For example in this converted file the word Eingerücktes was converted without issues. However, I can test other examples if needed.

Just a sidenote: I build a PDF Parser with C#. For that I used yaml files as config input. That file contained rules on how inputs should be converted. How about this idea? IMO === Headline === should be not a level 3 headline but more like this: # Headline\n---

For the conversion from txt2tags (rednotebooks markup) to Markdown, Pandoc is used internally. According to the documentation:

  • = My Title = is a level 1 heading and corresponds to # My Title in Markdown
  • === My Title === is a level 3 heading and corresponds to ### My Title in Markdown

I think for other custom rules, a user-written script/regex is best suited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rednotebook
Projects
None yet
Development

No branches or pull requests

2 participants