docs | |
tests | |
package |
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.
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 lsd
command available globally in your system.
The recommended way for macOS and Linux is to install with Homebrew:
brew install andreoliwa/formulae/logseq-doctor
If you install manually, you need to rename the binary afterward:
go install github.com/andreoliwa/logseq-doctor@latest
mv "$(go env GOPATH)/bin/logseq-doctor" "$(go env GOPATH)/bin/lsdg"
Confirm if it's in your path:
which lsdg
# or
ls -l $(go env GOPATH)/bin/lsdg
To build and install from the source (both Python and Go executables), clone the repository and run:
make install
Type lsd
without arguments to check the current commands and options:
Usage: lsd [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 lsdg
(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.
"lsd"" is the CLI tool originally written in Python; "lsdg"" is the Go version.
The intention is to slowly convert everything to Go.
Usage:
lsdg [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 lsdg
Use "lsdg [command] --help" for more information about a command.
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 |