{"id":16963810,"url":"https://github.com/hellt/markdown-footnote-sorter","last_synced_at":"2025-11-09T12:02:24.174Z","repository":{"id":255821338,"uuid":"853673685","full_name":"hellt/markdown-footnote-sorter","owner":"hellt","description":"A script to sort footnotes in a markdown file","archived":false,"fork":false,"pushed_at":"2024-12-02T09:21:30.000Z","size":46,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T00:42:37.163Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hellt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2024-09-07T07:52:03.000Z","updated_at":"2024-12-02T09:21:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"c5092742-f76f-41c0-8f8c-8e3e6e73e2f2","html_url":"https://github.com/hellt/markdown-footnote-sorter","commit_stats":null,"previous_names":["hellt/markdown-footnote-sorter"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellt%2Fmarkdown-footnote-sorter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellt%2Fmarkdown-footnote-sorter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellt%2Fmarkdown-footnote-sorter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellt%2Fmarkdown-footnote-sorter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellt","download_url":"https://codeload.github.com/hellt/markdown-footnote-sorter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886328,"owners_count":21177644,"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-10-13T23:26:14.772Z","updated_at":"2025-11-09T12:02:24.150Z","avatar_url":"https://github.com/hellt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# markdown-footnote-sorter\n\nA script to sort footnotes in a Markdown file.\n\nReads a Markdown file passed as the first argument and sorts footnotes.\nThe reference links will be numbered in\nthe order they appear in the text and placed at the bottom\nof the file.\n\nBased on \u003chttps://github.com/derdennis/sort-markdown-footnotes\u003e\n\nInspired by \u003chttp://www.leancrew.com/all-this/2012/09/tidying-markdown-reference-links/\u003e\n\n[Example video](https://github.com/user-attachments/assets/2ccb1782-1d85-499c-ba09-3be94c34a591)\n\n## How to use?\n\n1. You can use the container image provided:\n\n    ```bash\n    docker run --rm -v $(pwd):/work ghcr.io/hellt/markdown-footnote-sorter path/to/doc.md\n    ```\n\n1. Or download the script and put it in your `$PATH`:\n\n    ```bash\n    curl -sL \\\n    https://raw.githubusercontent.com/hellt/markdown-footnote-sorter/main/fnsort.py\\\n      \u003e ~/.local/bin/fnsort.py\n\n    fnsort.py path/to/doc.md\n    ```\n\n1. Or from the GitHub UI, run the container in a :sparkles:[Codespace](https://docs.github.com/en/codespaces/overview):\n   1. With the click of a button\n      * [![Launch in GitHub Codespaces](https://img.shields.io/badge/fnsort-Launch%20Codespace-238636?logo=github)](https://github.com/codespaces/new/hellt/markdown-footnote-sorter?devcontainer_path=.devcontainer%2Fdevcontainer.json)\n   1. Manual steps\n      * From this project's main page, click **Code**, then **Codespace**.\n      * Choose **Create codespace on \\\u003cbranch_name\\\u003e**\n\n         This [creates a codespace](https://docs.github.com/en/codespaces/developing-in-a-codespace/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)\n         with the default resources (currently 2 CPU, 8 GB RAM, 32 GB Storage).\n\n      * :rocket: Run fnsort on your Markdown file:\n\n         ```bash\n         /app/fnsort.py path/to/doc.md\n         ```\n\n\u003e [!IMPORTANT]\n\u003e Keep in mind there are\n\u003e [monthly limits measured in core hours](https://docs.github.com/en/billing/managing-billing-for-your-products/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#monthly-included-storage-and-core-hours-for-personal-accounts)\n\u003e and to [stop your codespace](https://docs.github.com/en/codespaces/developing-in-a-codespace/stopping-and-starting-a-codespace)\n\u003e :stop_sign: when you're not using it to conserve your monthly core hours\n\u003e allowance.\n\n## Command Line Arguments\n\n### --adjacent\n\nAdjacent inline references that are not separated by other characters become\nproblematic (by default).\nThis option adds spacing between those inline references so they are properly\nidentified during sorting.\n\n`fnsort.py path/to/doc.md --adjacent`\n\n### --keepnames\n\nRetain or keep inline reference and footnote names.\nThis prevents the default behavior of replacing the names with numbers.\nFootnotes at the end of the Markdown are **still sorted**.\n\n`fnsort.py path/to/doc.md --keepnames`\n\n## Contributing\n\nFor information about contributing to this project, see the\n[contributing guidelines](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellt%2Fmarkdown-footnote-sorter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellt%2Fmarkdown-footnote-sorter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellt%2Fmarkdown-footnote-sorter/lists"}