Socket
Book a DemoInstallSign in
Socket

urls-md

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

urls-md

Convert URLs to Markdown links and images: Extracts URLs from text → Gets their article title → Creates Markdown links

Source
npmnpm
Version
1.3.0
Version published
Weekly downloads
23
2200%
Maintainers
1
Weekly downloads
 
Created
Source

urls-md Build Status

Convert URLs to Markdown links and images

Extracts URLs from textGets their article title → Creates Markdown links and images

Useful for when you have a linkdump and want them in Markdown.

From
Lorem ipsum dolor sit amet
http://updates.html5rocks.com/2014/01/Yo-Polymer-A-Whirlwind-Tour-Of-Web-Component-Tooling
Magnis dis parturient montes.
Lorem http://codelittle.com/tag/yeoman/
https://github.global.ssl.fastly.net/images/modules/logos_page/GitHub-Mark.png
To
[Yo Polymer – A Whirlwind Tour Of Web Component Tooling](http://updates.html5rocks.com/2014/01/Yo-Polymer-A-Whirlwind-Tour-Of-Web-Component-Tooling)

[How To Use Yeoman](http://codelittle.com/tag/yeoman/)

![](https://github.global.ssl.fastly.net/images/modules/logos_page/GitHub-Mark.png)

CLI

$ npm install --global urls-md
$ urls-md --help

  Usage
    urls-md <file>
    cat <file> | urls-md

You can also easily run through multiple files using shell scripting. In this example using ZSH syntax:

# loops through all .txt files in the current directory and outputs the converted files with .md extension
for f (*.txt) { urls-md $f > $f.md }

API

$ npm install --save urls-md
urlsMd('Lorem ipsum http://codelittle.com/tag/yeoman/', function (err, data) {
    console.log(data);
    //=>  ['[How To Use Yeoman](http://codelittle.com/tag/yeoman/)']
});

License

MIT © Sindre Sorhus

Keywords

cli

FAQs

Package last updated on 29 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts