{"id":14007274,"url":"https://github.com/seth-brown/formd","last_synced_at":"2025-07-24T01:31:18.366Z","repository":{"id":57140193,"uuid":"3582576","full_name":"seth-brown/formd","owner":"seth-brown","description":"A Markdown formatting tool","archived":false,"fork":false,"pushed_at":"2020-05-15T20:58:19.000Z","size":111,"stargazers_count":144,"open_issues_count":1,"forks_count":19,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-04-26T01:34:50.021Z","etag":null,"topics":["cli","markdown","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/seth-brown.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-29T14:53:27.000Z","updated_at":"2024-04-14T00:32:43.000Z","dependencies_parsed_at":"2022-09-05T00:21:04.568Z","dependency_job_id":null,"html_url":"https://github.com/seth-brown/formd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seth-brown%2Fformd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seth-brown%2Fformd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seth-brown%2Fformd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seth-brown%2Fformd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seth-brown","download_url":"https://codeload.github.com/seth-brown/formd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":214780402,"owners_count":15783765,"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":["cli","markdown","nodejs","typescript"],"created_at":"2024-08-10T10:01:57.701Z","updated_at":"2024-08-10T10:04:09.702Z","avatar_url":"https://github.com/seth-brown.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"formd: a markdown formatting tool\n================================\n\n![Build Status](https://github.com/seth-brown/formd/workflows/Build%20Status/badge.svg)\n\n`formd` is a CLI tool for (for)matting (m)ark(d)own that allows interconversion between the [two styles](https://github.github.com/gfm/#links) of Markdown links, inline and referenced. The tool conforms to the Github Flavored Markdown [spec](https://github.github.com/gfm/).\n\nInstallation\n-------------\n\n``` bash\nnpm install -g @seth-brown/formd\n```\n\nIf the default location npm installs packages to isn't in your path, you may need to add it to your path. For example:\n\n``` bash\necho 'export PATH=\"$HOME/.node/bin:$PATH\"' \u003e\u003e ~/.zshrc\n```\n\nMotivation\n----------\n\nInline Markdown is difficult to read, but useful for writing and editing because the linked text and URLs are adjacent to the words you are writing. For example:\n\n``` markdown\nThe quick brown [fox](http://en.wikipedia.org/wiki/Fox) jumped over the lazy [dog](http://en.wikipedia.org/wiki/Dog).\n```\n\nReferenced Markdown is awkward while writing because it requires jumping between links within the text and the reference section of the document. However, referenced Markdown is the superior syntax for reading because URLs do not breakup the flow of words or sentences. For example:\n\n``` markdown\nThe quick brown [fox][1] jumped over the lazy [dog][2].\n```\n\n`formd` provides the best of both worlds by allowing users to quickly toggle Markdown formats between inline while writing and referenced while reading. `formd` reads and writes to standard streams, so it can be adapted to a wide-range of user workflows.\n\nUsage\n-----\n\n`formd` is a command line tool, but its primary use case is with text editors or in conjunction with system tools like snipper expanders or app launchers. From the command line formd can be used as follows:\n\nFor help:\n```\nformd -h\n```\n\nTo generate referenced Markdown use the -r flag:\n``` bash\nformd -r \u003c \u003c(echo \"a line of text\\na link with a [link]('www.foo.com')\")\n```\n\nTo generate inline Markdown use the -i flag:\n``` bash\ncat my-markdown.md | formd -i\n```\n\nUsage with Text Editors\n-----------------------\n\n`formd` can be integrated with editors like Vim. The easiest option is to call it\ndirectly from within a Vim buffer. For example:\n\n``` vim\n:%! formd -r\n```\n\nAn easier approach is to use a function to execute `formd` and return the cursor\nback to it's original position within the buffer. \n\n``` vim\n\" a function to execute `formd` and return the cursor back\n\" to it's original position within the buffer. \n\" This script assumes `formd` is in your path. \nfunction! Formd(option)\n    :let save_view = winsaveview()\n    :let flag = a:option\n    :if flag == \"-i\"\n        :%! formd -i\n    :else\n        :%! formd -r\n    :endif\n    :call winrestview(save_view)\nendfunction\n \n\" formd mappings \nnmap \u003cleader\u003efr :call Formd(\"-r\")\u003cCR\u003e\nnmap \u003cleader\u003efi :call Formd(\"-i\")\u003cCR\u003e\n```\n\nUsage with App Launchers\n------------------------\n\n`formd` can be invoked with app launchers like [Alfred](https://www.alfredapp.com). Two Alfred workflows are provided in the repo at `system/alfred/`. These workflows take the contents from the clipboard and covert them to either inline or reference markdown and then paste the converted text into the front most application.\n\nRelease History\n---------\n* 1.0.0 Initial release\n* 2.0.0 Ported library to Typescript/Node\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseth-brown%2Fformd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseth-brown%2Fformd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseth-brown%2Fformd/lists"}