All Projects β†’ seth-brown β†’ Formd

seth-brown / Formd

Licence: mit
A Markdown formatting tool

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Formd

Marp Cli
A CLI interface for Marp and Marpit based converters
Stars: ✭ 606 (+329.79%)
Mutual labels:  cli, markdown
Glow
Render markdown on the CLI, with pizzazz! πŸ’…πŸ»
Stars: ✭ 7,596 (+5287.23%)
Mutual labels:  cli, markdown
Backslide
πŸ’¦ CLI tool for making HTML presentations with Remark.js using Markdown
Stars: ✭ 679 (+381.56%)
Mutual labels:  cli, markdown
J
❌ Multi-format spreadsheet CLI (now merged in http://github.com/sheetjs/js-xlsx )
Stars: ✭ 343 (+143.26%)
Mutual labels:  cli, markdown
Toc
🚩 TOC, zero configuration table of content generator for Markdown files, create table of contents from any Markdown file with ease.
Stars: ✭ 66 (-53.19%)
Mutual labels:  cli, markdown
Md To Pdf
Hackable CLI tool for converting Markdown files to PDF using Node.js and headless Chrome.
Stars: ✭ 374 (+165.25%)
Mutual labels:  cli, markdown
Friends
Spend time with the people you care about. Introvert-tested. Extrovert-approved.
Stars: ✭ 737 (+422.7%)
Mutual labels:  cli, markdown
Pydoc Markdown
Create Python API documentation in Markdown format.
Stars: ✭ 273 (+93.62%)
Mutual labels:  cli, markdown
Mkcli
Markdown command line interface definition
Stars: ✭ 56 (-60.28%)
Mutual labels:  cli, markdown
Termd
Render markdown in the terminal
Stars: ✭ 32 (-77.3%)
Mutual labels:  cli, markdown
Nb
CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning & syncing, Pandoc conversion, + more, in a single portable script.
Stars: ✭ 3,846 (+2627.66%)
Mutual labels:  cli, markdown
Cli
A tiny CLI for HedgeDoc
Stars: ✭ 94 (-33.33%)
Mutual labels:  cli, markdown
Markserv
🏁 serve markdown as html (GitHub style), index directories, live-reload as you edit
Stars: ✭ 304 (+115.6%)
Mutual labels:  cli, markdown
Mask
🎭 A CLI task runner defined by a simple markdown file
Stars: ✭ 495 (+251.06%)
Mutual labels:  cli, markdown
Tty Markdown
Convert a markdown document or text into a terminal friendly output.
Stars: ✭ 275 (+95.04%)
Mutual labels:  cli, markdown
Ok Mdx
Browser-based MDX editor
Stars: ✭ 681 (+382.98%)
Mutual labels:  cli, markdown
Go Termd
Package termd provides terminal markdown rendering, with code block syntax highlighting support.
Stars: ✭ 223 (+58.16%)
Mutual labels:  cli, markdown
Scaffdog
🐢 scaffdog is Markdown driven scaffolding tool.
Stars: ✭ 237 (+68.09%)
Mutual labels:  cli, markdown
Hint
ι‡ζž„εˆ° ---> https://github.com/hustcc/lint-md
Stars: ✭ 30 (-78.72%)
Mutual labels:  cli, markdown
Flybook
✈️ FlyBook is a simple utility to generate static website such as gh-pages, manual of you projects
Stars: ✭ 76 (-46.1%)
Mutual labels:  cli, markdown

formd: a markdown formatting tool

Build Status

formd is a CLI tool for (for)matting (m)ark(d)own that allows interconversion between the two styles of Markdown links, inline and referenced. The tool conforms to the Github Flavored Markdown spec.

Installation

npm install -g @seth-brown/formd

If the default location npm installs packages to isn't in your path, you may need to add it to your path. For example:

echo 'export PATH="$HOME/.node/bin:$PATH"' >> ~/.zshrc

Motivation

Inline 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:

The quick brown [fox](http://en.wikipedia.org/wiki/Fox) jumped over the lazy [dog](http://en.wikipedia.org/wiki/Dog).

Referenced 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:

The quick brown [fox][1] jumped over the lazy [dog][2].

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.

Usage

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:

For help:

formd -h

To generate referenced Markdown use the -r flag:

formd -r < <(echo "a line of text\na link with a [link]('www.foo.com')")

To generate inline Markdown use the -i flag:

cat my-markdown.md | formd -i

Usage with Text Editors

formd can be integrated with editors like Vim. The easiest option is to call it directly from within a Vim buffer. For example:

:%! formd -r

An easier approach is to use a function to execute formd and return the cursor back to it's original position within the buffer.

" a function to execute `formd` and return the cursor back
" to it's original position within the buffer. 
" This script assumes `formd` is in your path. 
function! Formd(option)
    :let save_view = winsaveview()
    :let flag = a:option
    :if flag == "-i"
        :%! formd -i
    :else
        :%! formd -r
    :endif
    :call winrestview(save_view)
endfunction
 
" formd mappings 
nmap <leader>fr :call Formd("-r")<CR>
nmap <leader>fi :call Formd("-i")<CR>

Usage with App Launchers

formd can be invoked with app launchers like Alfred. 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.

Release History

  • 1.0.0 Initial release
  • 2.0.0 Ported library to Typescript/Node
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].