{"_id":"@barraponto/markdown-to-json","_rev":"2-5f04b66c29680d40f6f04ebcfbb8e5fe","name":"@barraponto/markdown-to-json","description":"Extracts YAML front matter from markdown files to a single JSON string or file.","dist-tags":{"latest":"0.6.0"},"versions":{"0.6.0":{"name":"@barraponto/markdown-to-json","version":"0.6.0","description":"Extracts YAML front matter from markdown files to a single JSON string or file.","author":{"name":"Scott Stanfield","email":"scott@vertigo.com"},"keywords":["yaml","markdown","json"],"main":"./lib/m2j.js","scripts":{"test":"TZ='America/Tijuana' mocha -u bdd"},"bin":{"m2j":"./bin/m2j"},"repository":{"type":"git","url":"git://github.com/scottstanfield/markdown-to-json.git"},"engines":{"node":"*"},"license":"BSD","dependencies":{"commander":"^2.9.0","lodash.truncate":"^4.4.2","moment":"^2.17.1","yaml-front-matter":"^3.4.0"},"devDependencies":{"eslint":"^3.15.0","eslint-config-google":"^0.7.1","glob":"*","mocha":"*","should":"*"},"gitHead":"719016ee5ce12888512ae47c51f6d116111b699c","bugs":{"url":"https://github.com/scottstanfield/markdown-to-json/issues"},"homepage":"https://github.com/scottstanfield/markdown-to-json#readme","_id":"@barraponto/markdown-to-json@0.6.0","_shasum":"cb32995972d9aaa2d6544915ee17a6e4ed5623c3","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.5.0","_npmUser":{"name":"barraponto","email":"barraponto@gmail.com"},"dist":{"shasum":"cb32995972d9aaa2d6544915ee17a6e4ed5623c3","tarball":"https://registry.npmjs.org/@barraponto/markdown-to-json/-/markdown-to-json-0.6.0.tgz","integrity":"sha512-7somd7ffZn12BJ8IymfnGujGSKdFf7SsCu/0u6Qp431q4LZp7xPzi1dPfw+SMfbHsrXfW2vABceyjW5PwiSauw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYNfQzDGqaeH82oJ5/xGt3/Jn1H7gX7/fHcnRJxINBsQIgVk7eG6jgA0PSYAOT/4hpRB7fVsMvCXWPML6OLdbyleE="}]},"maintainers":[{"name":"barraponto","email":"barraponto@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/markdown-to-json-0.6.0.tgz_1487307030738_0.5619135259184986"}}},"readme":"# markdown-to-json\n\nTool for converting YAML Front Matter in Markdown files to JSON files.\n\n`m2j` is used to read a folder of Markdown files, pulling out the YAML\nFront Matter from each, and saving it all as a JSON blob.\n\nThis is especially useful if you have a folder full of Markdown files\nthat you want scanned and processed into a single JSON file, which can\nthen be consumed by Angular on the client, cached in a Node server, or\nsaved in a NoSQL database.\n\nIn addition to moving the YAML to JSON, a few extra elements are created: \n\n-  `iso8601` [formatted][1] timestamp from `date` using [Moment.js][2]\n-  `preview` is the first 70 or so characters of the actual raw Markdown content, with ellipses at the end\n-  `basename` is the filename without the path or extension\n-  `content` is created only if the content flag is enabled; raw Markdown content will be unabridged\n\n_Example_\n\n```\n% m2j --help\n\n  Usage: m2j [options] <files>\n\n  Options:\n\n    -h, --help               output usage information\n    -V, --version            output the version number\n    -w --width <int>         max width of preview text [70]. Set to 0 for no preview.\n    -p --pretty              format JSON with newlines\n    -c --content             include the full content of the file unabridged\n    -o --outfile <filename>  filename to save json to [output.json]\n\n\n% m2j.js lottery.md\n```\n\n**lottery.md**\n\n```md\n---\ntitle: The Lottery Ticket\nauthor: Anton C.\ndate: \"2013-03-15 15:00\"\ntemplate: article.jade\ntags:\n  - Fiction\n  - Russian\n\n---\n\nIvan Dmitritch, a middle-class man who lived with his family on an income of twelve hundred a year and was very well satisfied with his lot, sat down on the sofa after supper and began reading the newspaper. \n\n```\n\n**output**\n\n```js\n{\n  \"files\": [\n    {\n      \"title\": \"The Lottery Ticket\",\n      \"author\": \"Anton C.\",\n      \"date\": \"1893-04-01\",\n      \"template\": \"article.jade\",\n      \"tags\": [\n        \"Fiction\",\n        \"Russian\"\n      ],\n      \"preview\": \"Ivan Dmitritch, a middle-class man who lived with his family on an …\",\n      \"iso8601Date\": \"1893-04-01T00:00:00-07:00\",\n      \"basename\": \"lottery.md\"\n    }\n  ]\n}\n```\n\n\n[1]: https://en.wikipedia.org/wiki/ISO_8601\n[2]: http://momentjs.com/docs/#/parsing/string/\n","maintainers":[{"name":"barraponto","email":"barraponto@gmail.com"}],"time":{"modified":"2022-06-12T15:02:44.407Z","created":"2017-02-17T04:50:32.492Z","0.6.0":"2017-02-17T04:50:32.492Z"},"homepage":"https://github.com/scottstanfield/markdown-to-json#readme","keywords":["yaml","markdown","json"],"repository":{"type":"git","url":"git://github.com/scottstanfield/markdown-to-json.git"},"author":{"name":"Scott Stanfield","email":"scott@vertigo.com"},"bugs":{"url":"https://github.com/scottstanfield/markdown-to-json/issues"},"license":"BSD","readmeFilename":"README.md"}