format_md_links

can convert from inline to referece style markdown links.

for example:

running

./format_md_links -i file_with_relative_links.md

converts

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

other text...

[1]: http://en.wikipedia.org/wiki/Fox
[2]: http://en.wikipedia.org/wiki/Dog

into

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

other text...

Calling with -r converts in the opposite direction (relative to inline).

Usage

USAGE: for_md [-i|-r|-h] <path/to/markdown/file>
               -i use inline style links
               -r use relative style links
               -h print this usage

Metadata:

Tags:

  • markdown
  • python