Last active
June 14, 2019 15:40
-
-
Save hugolpz/c25a9d513e2111f13f1e6015754fb919 to your computer and use it in GitHub Desktop.
Create groups structure.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Description | |
Create cri groups structure from markdown textfile. | |
## Install | |
1. Copy files | |
2. Edit input.txt | |
3. Terminal > `npm install` (assumes you have nodejs and npm on your computer) | |
4. Terminal > `node index.js` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env node | |
// TRY ME : https://npm.runkit.com/ascii-tree | |
//var fs = require('fs'); | |
var asciitree = require('ascii-tree'); | |
//var str = fs.readFileSync('input.txt', 'utf8'); | |
var str = `#CRI | |
##[email protected] | |
###[email protected] | |
###[email protected] | |
###[email protected] | |
##[email protected]`; | |
var tree = asciitree.generate(str); | |
//fs.writeFile('./output.txt', tree, 'utf8', function(){ console.log(tree)} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##[email protected] | |
###[email protected] | |
###[email protected] | |
###[email protected] | |
##[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "cri-groups-tree", | |
"version": "1.0.0", | |
"description": "use markdown file to create tree structure of cri groups ", | |
"main": "index.js", | |
"bin": { | |
"cri-groups-tree": "index.js" | |
}, | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [ | |
"criparis", | |
"ascii-tree" | |
], | |
"author": "hugolpz", | |
"license": "ISC", | |
"dependencies": { | |
"ascii-tree": "^0.3.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment