Converting / importing existing text and markdown notes into Logseq

  • I have two main formats (very loosely speaking) of personal knowledge management notes that date back to about when the term “personal knowledge managementwas coined, apparently.
    • 10,000 notes that started in the late, great Sbook5 by Simson L. Garfinkel and then grew for a good decade in Tomboy. They have all already been converted to Zim wiki using a command-line tool i have lost track of that did a key piece of work in getting them a lot of the way to what Logseq will want, replacing the hash note filenames with Example_Note.txt and crucially putting the cross-references into exactly the [[Note Title]] format. Overall the contents look like this:
      • Content-Type: text/x-zim-wiki
        Wiki-Format: zim 0.26
        Creation-Date: Not found
        Modification-Date: Not found
        ====== Example Note ======
        via Friend at [[Another Note Title]]
      • Zim wiki never worked out for me so these have remained pretty much static since then, found when i need them with fsearch and occasionally edited with a text editor. I am really excited about them becoming a living, breathing part of my brain again.
      • So i can happily throw out all the metadata at the top (including the title?), change the filenames to not have underscores, and (ideally i guess) convert the content’s paragraphs (double line breaks) to list items and be all set?
    • 3,000 notes that are all in markdown and Logseq is already pointing at the directory that contains them and, to Logseq’s credit, is not freaking out too much other than the occasional “Large block will not be editable or searchable to not slow down the app, please use another editor to edit this block.” message. (Poor Tomboy, if it had taken this approach i might still be able to use it today. The format here is more all over the place and there are probably not enough consistent interlinking of any kind to be worth trying to preserve, but i figure i should at least fix the note titles so i’m not making a bunch of references to [[example-organization]] when i should be using [[Example Organization]].
      • As close as there is to a typical one would have a filename like and contents that look like this:
        • # Example organization
          > We manufacture examples.
          [About Example Organization](
          123 Something Street
          Nowheresville, MA 12345
      • Another large number of these would be really cool to convert into journals. Probably not worth the effort, but in case anyone has quick code hands or recommendations, they all have titles like and then content that typically does not have a title or really any other formatting to speak of:
        • militant defenders appeared to be the key
          but possibly could have held off without arrests (only physical contact with police being shield wall for instance)
          An unjust economy built on genocide, theft, and exploitation so extreme it required the invention of racism has left thousands of people without housing
        • As with all of these, any formatting that it has would be standard markdown.
      • The important thing is these are all plain markdown files, but some have # Heading 1 titles and others have none at all.
      • A small matter, i have followed a format of c: 2019-01-17 for created date if that can easily be converted into some kind of useful metadata in Logseq but that’s really not important at all.
    • Tools for making text and markdown files more Logseq friendly:

Already posted above the scripts i found— off in the other resources category of the Awesome Logseq listing.

I could not find any documentation on importing except for this empty page which is presumably meant to document the Import feature in the three-dots menu. That, for its part, only has “Import existing notes” and promises “If they are in a JSON, EDN or Markdown format Logseq can work with them.” but only has these buttons:

  • RoamResearch Import a JSON Export of your Roam graph
  • EDN / JSON Import an EDN or a JSON Export of your Logseq graph
  • OPML Import OPML files

Nothing for plain text or plain markdown. And besides, as covered above, Logseq can already see my markdown files but i still need to improve the formatting and filenames.

Feature request to import from markdown that mentions the need to add bullets and to move assets to an assets directory and fix references to assets, which i realize now i have a small need for also:

But fixing up frontmatter and to some extent fixing filenames will continue to require customized scripts for random formats.

Other import questions from the forums:

There is clearly the need to have some conversion tools that people can modify to help them with getting their files formatted for Logseq.

1 Like