{"id":13783711,"url":"https://github.com/dundalek/longdown","last_synced_at":"2025-03-21T16:32:28.838Z","repository":{"id":153480260,"uuid":"629532324","full_name":"dundalek/longdown","owner":"dundalek","description":"Convert longform markdown files to outline format used by Logseq","archived":false,"fork":false,"pushed_at":"2024-04-13T20:23:36.000Z","size":19,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T10:53:23.292Z","etag":null,"topics":["logseq","longform","markdown","outliner"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dundalek.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-18T13:58:21.000Z","updated_at":"2024-05-16T03:14:01.217Z","dependencies_parsed_at":"2024-05-16T03:23:57.434Z","dependency_job_id":null,"html_url":"https://github.com/dundalek/longdown","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dundalek%2Flongdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dundalek%2Flongdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dundalek%2Flongdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dundalek%2Flongdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dundalek","download_url":"https://codeload.github.com/dundalek/longdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244829588,"owners_count":20517335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logseq","longform","markdown","outliner"],"created_at":"2024-08-03T19:00:29.046Z","updated_at":"2025-03-21T16:32:28.449Z","avatar_url":"https://github.com/dundalek.png","language":"Clojure","funding_links":[],"categories":["🔍 CLI Tools and Scripts"],"sub_categories":["Conversion CLI"],"readme":"# Longdown\n\nConvert longform markdown files to outline format used by Logseq.\n\n## Motivation\n\nI've been using text editor to write my notes as markdown files and rely on the headings structure to organize long notes.\n\nHowever, when I tried to move my markdown files to Logseq, I faced a problem: the structure wasn't preserved which resulted in a loss of meaning.\n\nThis tool helps with transition by converting existing longform markdown files to outline format that preserves the structure in a way that fits well for Logseq.\n\n## Example\n\nFor example:\n```\n# h1\n\nparagraph\n\n## h2\n\nnext paragraph\n\nanother paragraph\n```\n\nGets converted into:\n```\n- # h1\n  - paragraph\n  - ## h2\n    - next paragraph\n    - another paragraph\n```\n\n\n## Usage\n\nInstall with:\n\n```\nnpm install -g longdown\n```\n\n#### Converting files\n\nIt is a good idea to make a backup of the input files first before running the script!\n\nSpecify output directory with `-d` flag and pass input files:\n\n```\ncd my-notes\nlongdown -d ../out *.md\n```\n\nDouble-check the output, for example compare using the [Meld](https://meldmerge.org/) tool:\n```\ncd ..\nmeld my-notes out\n```\n\n#### Converting text snippets\n\nUse `longdown -` to read from standard input and print result to standard output.\n\nIt can be useful to converting text snippets from clipboard and pasting them directly to Logseq without needing to create intermediate files.\n\nFor example on Linux:\n```\nxclip -selection clipboard -out | longdown - | xclip -selection clipboard -in\n```\n\nOn macOS:\n```\npbpaste | longdown - | pbcopy\n```\n\n## License\n\n0BSD\n\n## Development\n\nInstall [Babashka](https://babashka.org/) to run development tasks.\n\nList available tasks:\n```\nbb tasks\n```\n\nRun the CLI locally:\n```\nbin/cli.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdundalek%2Flongdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdundalek%2Flongdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdundalek%2Flongdown/lists"}