Skip to content

andreoliwa/logseq-doctor

Folders and files

NameName
Last commit message
Last commit date
Feb 27, 2025
Feb 27, 2025
Mar 3, 2025
Mar 3, 2025
Mar 6, 2025
Mar 3, 2025
Feb 27, 2025
Feb 13, 2025
Feb 1, 2024
Feb 27, 2025
Mar 20, 2022
Feb 27, 2025
Jan 4, 2025
Feb 1, 2024
Mar 1, 2025
Jan 4, 2025
Feb 13, 2025
Feb 27, 2025
Mar 3, 2025
Nov 6, 2022
Dec 28, 2024
Feb 1, 2024
Feb 1, 2024
Mar 20, 2022
Feb 11, 2025
Feb 16, 2025
Mar 20, 2022
Feb 13, 2025
Feb 1, 2024
Dec 23, 2024
Mar 3, 2025
Feb 27, 2025
Feb 27, 2025
Feb 27, 2025
Feb 27, 2025
Feb 27, 2025
Dec 27, 2024
Dec 31, 2024

Repository files navigation

Overview

docs Documentation Status
tests Go Build Status Tox Build Status Coverage Status
package PyPI Package latest release PyPI Wheel Supported versions Supported implementations Commits since latest release

Logseq Doctor: heal your flat old Markdown files before importing them.

Note

This project is still alpha, so it's very rough on the edges (documentation and feature-wise).

At the moment, it has both a Python and Go CLI.

The long-term plan is to convert it to Go and slowly remove Python. New features will be added to the Go CLI only.

Installation

Python executable

The recommended way is to install logseq-doctor globally with pipx:

pipx install logseq-doctor

You can also install the development version with:

pipx install git+https://github.com/andreoliwa/logseq-doctor

You will then have the lsdpy command available globally in your system.

Go binary executable

The recommended way for macOS and Linux is to install with Homebrew:

brew install andreoliwa/formulae/logseq-doctor

Or you can install manually:

go install github.com/andreoliwa/logseq-doctor@latest

Confirm if it's in your path:

which lsd
# or
ls -l $(go env GOPATH)/bin/lsd

Build from source

To build and install from the source (both Python and Go executables), clone the repository and run:

make install

Quick start

Type lsdpy without arguments to check the current commands and options:

Usage: lsdpy [OPTIONS] COMMAND [ARGS]...

Logseq Doctor: heal your flat old Markdown files before importing them.

Options:
-g, --graph DIRECTORY           Logseq graph  [env var: LOGSEQ_GRAPH_PATH;
required]
--install-completion [bash|zsh|fish|powershell|pwsh]
Install completion for the specified shell.
--show-completion [bash|zsh|fish|powershell|pwsh]
Show completion for the specified shell, to
copy it or customize the installation.
--help                          Show this message and exit.

Commands:
outline  Convert flat Markdown to outline.
tasks    List tasks in Logseq.

Type lsd (the Go executable) without arguments to check the current commands and options:

Logseq Doctor (Go) heals your Markdown files for Logseq.

Convert flat Markdown to Logseq outline, clean up Markdown,
prevent invalid content, and more stuff to come.

"lsdpy"" is the CLI tool originally written in Python; "lsd"" is the Go version.
The intention is to slowly convert everything to Go.

Usage:
lsd [command]

Available Commands:
completion  Generate the autocompletion script for the specified shell
content     Append raw Markdown content to Logseq
help        Help about any command
tidy-up     Tidy up your Markdown files.

Flags:
-h, --help   help for lsd

Use "lsd [command] --help" for more information about a command.

Development

To set up local development:

make setup

Run this to see help on all available targets:

make

To run all the tests run:

tox

Note, to combine the coverage data from all the tox environments run:

OS
Windows set PYTEST_ADDOPTS=--cov-append tox
Other PYTEST_ADDOPTS=--cov-append tox