Giter VIP home page Giter VIP logo

logmark's Introduction

Logmark

What is this?

Logmark converts directory-organized markdown files for use with Logseq by adding the parent directories of each file as [[page]] references in the files.

Why?

This program eases transitioning to Logseq for those who have organized their notes in a hierarchical directory structure where the directories can serve as tags or topic references to the files they contain. It was created to move files from exported Joplin notes to Logseq using the notebooks as page references, but it will work with any similar collection of markdown files.

Features

  • reconstruct your notebook references in Logseq
  • add a list of custom page references at the commandline
  • avoid duplicating the filename as a heading if it is already used on the first line
  • choose which heading level is used for the page title

Usage

  • logmark.py --help

Example:

If you have a markdown file:

/home/user/notes/joplin-backup/webinars/journalism/investigative_journalism.md

And you run:

logmark.py -l 2 -i /home/user/notes/joplin-backup/ -o my-exported-notes/

Then the journalism.md file will be exported to my-exported-notes/ and edited with a title and page references like so:

## investigative_journalism
[[webinars]] [[journalism]]
original text...

/home/user/notes/joplin-backup is ignored as a source of page references because it is assumed that the first source directory provided on the commandline is the root of the notes directory. Therefore, anything higher up will start referencing data not related to the target set of files. If you want the root to become a tag (in this example joplin-backup) then just move the root to an empty directory and stop your source path with that empty directory. This will mean that all markdown files will have the root added as a page reference.

Requires

only needed when run from source files

  • python 3.5+
  • Python3 Tkinter
  • PySimpleGui

Current Issues and Limitations

  • does not currently preserve/convert image links
  • does not preserve/convert platform-specific tags
  • logmark is intended for use with markdown files only

logmark's People

Contributors

rockhazard avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.