Content.js
Features
Convert:
- xls (excel) to csv
- ppt to pdf
- pdf to text
- image to text
- csv to json
- text to json
- html to json
In the end, all data should be converted to JSON, except code, which is kept unprocessed.
CLI
# convert html to json
content https://twitter.com/ twitter.json
content -i https://twitter.com/ -o twitter.json
The Content Object
JSON
JavaScript
content = require'content.js'contentparse 'https://github.com/viatropos/content'resulttitleresulttagsresultinputresultoutput# cheerio instance, alias to `result.output.find`resultfind'ul'each -># render a standardized htmlresulttoHTML# alias to `result.output`resulttoJSON