{"id":22122858,"url":"https://github.com/andreaspitzer/literature","last_synced_at":"2025-08-19T13:03:56.564Z","repository":{"id":21266469,"uuid":"24582150","full_name":"andreaspitzer/literature","owner":"andreaspitzer","description":"Run code written in Markdown.","archived":false,"fork":false,"pushed_at":"2018-11-18T08:09:19.000Z","size":14,"stargazers_count":11,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-17T03:37:05.470Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreaspitzer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-29T06:13:10.000Z","updated_at":"2019-08-13T15:51:47.000Z","dependencies_parsed_at":"2022-09-12T10:21:01.439Z","dependency_job_id":null,"html_url":"https://github.com/andreaspitzer/literature","commit_stats":null,"previous_names":["andreaspitzer/literature","andreaspizsa/literature"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/andreaspitzer/literature","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaspitzer%2Fliterature","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaspitzer%2Fliterature/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaspitzer%2Fliterature/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaspitzer%2Fliterature/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreaspitzer","download_url":"https://codeload.github.com/andreaspitzer/literature/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaspitzer%2Fliterature/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271158497,"owners_count":24709076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T15:28:04.573Z","updated_at":"2025-08-19T13:03:56.496Z","avatar_url":"https://github.com/andreaspitzer.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# literature [![NPM version](https://badge.fury.io/js/literature.svg)](http://badge.fury.io/js/literature)\n  [![Build Status](https://travis-ci.org/AndreasPizsa/literature.svg)](https://travis-ci.org/AndreasPizsa/literature)\n\n\u003e Write literate code in Markdown, then use Literature to extract code blocks that you can pass to any compiler.\n\n## Install\n#### Install with [npm](npmjs.org)\n\n```bash\nnpm i literature --save -g\n```\n\n## Usage\n## Command line\n\n```bash\nnpm i literature -g\nliterature \u003cfile ...\u003e\n```\n\n\n## API\n\n```javascript\nliterature = require('literature');\nconsole.log(literature('test.js.md'));\n```\n\n### Example\n#### Input\n `test.js.md`\n\n```markdown\n# Usage\nLiterature extracts (unfenced) code blocks - such as the following - from Markdown files:\n\n    literature = require('literature');\n    console.log(literature('test.js.md'));\n\nSending this file through Literature will output only the above two code lines.\n```\n\n#### Output\n`test.js`\n```javascript\nliterature = require('literature');\nconsole.log(literature('test.js.md'));\n```\n\n\n## gulp\n\nThere’s a [gulp plugin](http://github.com/AndreasPizsa/gulp-literature).\n\n```bash\nnpm install --save-dev gulp-literature\n```\n\n\n## About\nDocumentation often lives a separate life from code, in separate files, stored away in folders. Yet very often prose can make code more comprehensible, while code can be more expressive than prose. They are equally important and should be equal partners.\n\nLiterature lets you write prose and code in the same file where they both live not just side by side but together as equal, complementary partners, and that’s A Good Thing.\n\nLiterature generalizes the idea of Literate CoffeeScript to just any language. It’s just Markdown with code blocks, except that the code blocks are intended to be executed. There are basically only three rules:\n\n* Regular, unfenced code blocks are executable code\n* Fenced code blocks are documentation. (That’s handy for usage examples)\n* `.litjs` or `.js.md` will result in a `.js` file, `.litc` or `.c.md` will create a `.c` file, etc.\n\n\n## Issues\nPlease [report any bugs or feature requests](https://github.com/AndreasPizsa/literature/issues/new), thanks!\n\n## Contribute\n\n\u003e Whatever value you'd like to add to the project, we'd love to have your help! If you'd like to take a more active role, get in touch! We'd be happy to help you get started!\n\n* If you find this project useful please consider \"starring\" it to show your support!\n* Find a bug? Have a feature request? Please [create an Issue](https://github.com/AndreasPizsa/literature/issues)\n* In lieu of a formal styleguide please take care to maintain the existing coding style\n* Add unit tests for any new or changed functionality\n\n## Pull requests\n\nPull requests are encouraged! This project builds its our own documentation, so please remember to build the documentation with [Verb](https://github.com/assemble/verb) before you submit your pull request! Please don't edit the readme or other docs directly, edit their respective templates instead.\n\n### Building the docs\n\nTo build the docs, first make sure [verb-cli](https://github.com/assemble/verb-cli) is installed globally (`npm i -g verb-cli`), then just follow these simple steps:\n\n* Edit the templates in the ['docs/' directory](./docs), and/or [.verbrc.md](./.verbrc.md)\n* Run `verb` in the command line\n* Pull request!\n\nThanks!\n\n## Author\n\n**Andreas Pizsa**\n\n+ [github/AndreasPizsa](https://github.com/AndreasPizsa)\n+ [twitter/AndreasPizsa](http://twitter.com/AndreasPizsa)\n\n\n## License\nCopyright (c) 2014 Andreas Pizsa, contributors.  \nReleased under the [MIT license](LICENSE-MIT).\n\n\n***\n\n_This file was generated by [gulp-verb](https://github.com/assemble/gulp-verb) on September 29, 2014._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaspitzer%2Fliterature","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreaspitzer%2Fliterature","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaspitzer%2Fliterature/lists"}