Comparing version 0.0.3 to 0.0.4
12
cli.js
@@ -5,2 +5,3 @@ #!/usr/bin/env node | ||
var clipboard = require('copy-paste'); | ||
var fn = require('./'); | ||
@@ -20,4 +21,11 @@ | ||
} | ||
console.log(link); | ||
process.exit(0); | ||
clipboard.copy(link, function(err) { | ||
if (err) { | ||
console.log(err.messsage); | ||
process.exit(1); | ||
} | ||
console.log('The following text is copied to clipboard!') | ||
console.log(link); | ||
process.exit(0); | ||
}); | ||
}); |
{ | ||
"name": "md-link", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A command like tool to generate a Markdown link from URL.", | ||
@@ -20,3 +20,6 @@ "bin": { | ||
}, | ||
"license": "MIT" | ||
"license": "MIT", | ||
"dependencies": { | ||
"copy-paste": "^1.1.4" | ||
} | ||
} |
# md-link | ||
A command like tool to generate a Markdown link from URL. | ||
A command like tool to generate a [Markdown link](https://daringfireball.net/projects/markdown/syntax#link) for the given URL. | ||
@@ -13,12 +13,16 @@ ## Install | ||
The `md-link` command takes a URL as first argument, and generates the Markdown link text. It also copies the same text to your clipboard, so you can paste it by `Ctrl + V`. | ||
``` | ||
$ md-link https://github.com/ | ||
The following text is copied to clipboard! | ||
[GitHub · Where software is built](https://github.com/) | ||
``` | ||
As you can see the link text is a title of website for a given URL. | ||
## Debugging | ||
To enable debug logging, launch the node process like `DEBUG=true md-link`. | ||
To enable debug logging, launch the node process with `DEBUG=true` followed by the command. | ||
``` | ||
$ DEBUG=true md-link | ||
``` |
4116
113
28
1
+ Addedcopy-paste@^1.1.4
+ Addedcopy-paste@1.5.3(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedsafer-buffer@2.1.2(transitive)