{"id":13433378,"url":"https://github.com/scil/mdsplit-js","last_synced_at":"2026-01-17T08:22:34.293Z","repository":{"id":213554488,"uuid":"734402511","full_name":"scil/mdsplit-js","owner":"scil","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-23T11:10:23.000Z","size":146,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-23T12:20:01.721Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scil.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":["https://yanhaijing.com/mywallet/"]}},"created_at":"2023-12-21T15:35:57.000Z","updated_at":"2024-02-08T08:27:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"3773590b-d24c-416a-b7f1-9747c2dfedc1","html_url":"https://github.com/scil/mdsplit-js","commit_stats":null,"previous_names":["scil/mdsplit-js"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scil%2Fmdsplit-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scil%2Fmdsplit-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scil%2Fmdsplit-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scil%2Fmdsplit-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scil","download_url":"https://codeload.github.com/scil/mdsplit-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244033799,"owners_count":20387003,"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":[],"created_at":"2024-07-31T02:01:24.941Z","updated_at":"2026-01-17T08:22:34.244Z","avatar_url":"https://github.com/scil.png","language":"JavaScript","readme":"# [mdsplit-js](https://github.com/scil/mdsplit-js)\n[![](https://img.shields.io/badge/Powered%20by-jslib%20base-brightgreen.svg)](https://github.com/yanhaijing/jslib-base)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/scil/mdsplit-js/blob/master/LICENSE)\n[![CI](https://github.com/scil/mdsplit-js/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/scil/mdsplit-js/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/badge/npm-0.1.0-orange.svg)](https://www.npmjs.com/package/mdsplit-js)\n[![NPM downloads](http://img.shields.io/npm/dm/mdsplit-js.svg?style=flat-square)](http://www.npmtrends.com/mdsplit-js)\n[![Percentage of issues still open](http://isitmaintained.com/badge/open/scil/mdsplit-js.svg)](http://isitmaintained.com/project/scil/mdsplit-js \"Percentage of issues still open\")\n\njs port of python [markusstraub/mdsplit](https://github.com/markusstraub/mdsplit)\n\n## Extra Features\n\n1. customize the file name for each chapter (each head represents a chapter). Index can be added to file name\n```bash\n-cf \"return `${chapter.index}-${( chapter.heading?  chapter.heading.headingTitle:  fallback )}`  \" -o output_dir  \"big.md\" \n ```\n\n2. new treatment method for the text contents under a header which has sub headers\n```markdown\n# h1\n\nhistory\n\n## h2\n```\nby default, this markdown file would be split into \n```\n- h1.md\n- h1\n  - h2.md\n```\nbut with the extra cli option `-eq`, the output is\n```\n- h1\n  - h1.md\n  - h2.md\n```\nwith both options `-eq` and `-cf` \n```bash\n-eq -cf \"return `${chapter.index}-${( chapter.heading?  chapter.heading.headingTitle:  fallback )}`  \"  -l 2 -o output_dir \"big.md\" \n```\nthe output could be\n```\n- 0-h1\n  - 0-h1.md\n  - 1-h2.md\n```\n","funding_links":["https://yanhaijing.com/mywallet/"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscil%2Fmdsplit-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscil%2Fmdsplit-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscil%2Fmdsplit-js/lists"}