{"id":19677990,"url":"https://github.com/lindig/lipsum","last_synced_at":"2025-04-29T03:31:14.039Z","repository":{"id":3775437,"uuid":"4852547","full_name":"lindig/lipsum","owner":"lindig","description":"A Literate Programming Tool inspired by NoWeb, implemented in OCaml","archived":false,"fork":false,"pushed_at":"2018-11-07T21:55:14.000Z","size":253,"stargazers_count":34,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T12:51:13.537Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lindig.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-07-01T18:46:37.000Z","updated_at":"2024-08-16T19:11:10.000Z","dependencies_parsed_at":"2022-09-13T09:50:44.390Z","dependency_job_id":null,"html_url":"https://github.com/lindig/lipsum","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindig%2Flipsum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindig%2Flipsum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindig%2Flipsum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindig%2Flipsum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lindig","download_url":"https://codeload.github.com/lindig/lipsum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251426830,"owners_count":21587658,"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","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-11-11T17:35:52.964Z","updated_at":"2025-04-29T03:31:10.505Z","avatar_url":"https://github.com/lindig.png","language":"OCaml","readme":"\n### Lipsum - Literate Programming Simplified\n\nLipsum is a command-line utility for literate programming. It stands in the\ntradition of [Noweb](http://www.cs.tufts.edu/~nr/noweb/), a popular and\nflexible literate programming system by Norman Ramsey. The idea of literate\nprogramming is to keep documentation for programmers and program code in\none file and to arrange it in a way that helps understanding it best. To\nactually compile or run the code it needs to be extracted from the literate\nprogram and Lipsum is a tool to do this.\n\nLike Noweb, Lipsum employs a minimal markup to arrange documentation and\ncode in a file. Also like Noweb, Lipsum is language agnostic and can be\nused for almost any programming language and documentation.\n\n        @ Echo prints each command line argument on a line by itself. This\n        documentation chunk starts with @ and extends until the beginning\n        of the named code chunk below. A lipsum file (`*.lp` by convention)\n        is a sequence of code and documentation chunks. Each chunk extends\n        until the beginning of the next one (or the end of file.)\n\n        \u003c\u003cecho.c\u003e\u003e=\n        /* \u003c\u003ccopyright\u003e\u003e */\n        #include \u003cstdio.h\u003e\n\n        int main(int argc, char** argv)\n        {\n                int i;\n                for (i=0; i\u003cargc; i++)\n                        puts(argv[i]);\n                return 0;\n        }\n\n        @ By keeping the copyright notice in a chunk by itself it is easy\n        to include it in several files. This documenation chunk starts with\n        an @ followed by a space and extends until the beginning of the\n        next chunk.  Inside of documentation, @ only has special meaning at\n        the beginning of a line and hence is unlikely to interfear in most\n        use cases.\n\n        \u003c\u003ccopyright\u003e\u003e=\n        This code is in the public domain.\n\n        @ Below we are extending the code chunk above. \n\n        \u003c\u003ccopyright\u003e\u003e=\n        This code is part of the documentation for Lipsum.\n\n\nTo extract the code for `echo.c` for compilation from the file `echo.lp`\nusing Lipsum, one would run Lipsum like this:\n\n        $ lipsum expand echo.c echo.lp\n        $ cc -o echo echo.c\n\n## Important Commands\n\n* `lipsum tangle`: extract source code to stdout\n* `lipsum expand`: extract source code to file\n* `lipsum weave`: format input\n* `lipsum roots`: emit names of root chunks to stdout\n\nFor more information, see the manual page lipsum(1) and invoke `lipsum\n\u003ccommand\u003e --help`.\n\n## Installation from Opam \n\nLipsum is available via the OCaml package manager Opam:\n\n        $ opam install lipsum\n\nThis will install a binary and the manual page. See also below for how to\nobtain the source code from GitHub.\n            \nIt can be also compiled from sources. Take a look a `lipsum.opsm` for\ndependencies:\n\n    $ make\n\n## Resources for Literate Programming\n\nWhile literate programming isn't a mass phenomenon among programmers it has\na dedicated following. Here are some resources to learn about its concepts,\nstrengths, and weaknesses.\n\n* [Noweb Homepage](http://www.cs.tufts.edu/~nr/noweb/)\n* [Noweb on Wikipedia](http://en.wikipedia.org/wiki/Noweb)\n* [Literate Programming on \n        Wikipedia](http://en.wikipedia.org/wiki/Literate_programming)\n\nLiterate programming enjoys popularity in the [R](www.r-project.org/)\ncommunity which uses a literate programming system called Sweave which is\nalso in the tradition of Noweb. R is a system for statistical analysis and\nSweave is mainly used to include statistical analysis into scientific\npapers that are typeset with LaTeX.\n\n## Why not using Noweb?\n\nNoweb is a great tool with a flexible architecture that permits a user to\nplug in filters to extend it. This makes its installation depend on various\nfilters that are part of its distribution and that are written in various\nlanguages. While this is usually not a problem if you develop code mostly\nfor yourself, it adds one more dependency if you want to release code as\nopen source.\n\nLipsum is less ambitious: it is just one binary and almost all it does is\nextracting code from a literate program. I am planning to use it in\ncombination with Markdown as a syntax for documentation and to include it\nwith literate programs that I release as open source.\n\n## Documentation\n\nLipsum comes with a Unix manual page `lipsum.1` that is generated from\n[`lipsum.pod`](lipsum/blob/master/lipsum.pod). POD is a simple markup\nlanguage, much like Markdown, that is used by the Perl community. To view\nthe manual page prior to installation use `nroff`:\n\n        $ nroff -man lipsum.1 | less\n        \nAfter installation it is available using `man lipsum` as usual.\n\nLipsum provides minimal online help via `--help` options for all its sub\ncommands.\n\n## Source Code\n\nhttps://github.com/lindig/lipsum.git\n\n## License\n\nLipsum is distributed under the BSD-2 license. The license can be also\ndisplayed by the program:\n\n    $ lipsum copyright\n    https://github.com/lindig/lipsum.git\n    Copyright (c) 2012, 2013, 2014, 2015 \n    Christian Lindig \u003clindig@gmail.com\u003e\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or\n    without modification, are permitted provided that the following\n    conditions are met:\n\n    (1) Redistributions of source code must retain the above copyright\n        notice, this list of conditions and the following disclaimer.\n    (2) Redistributions in binary form must reproduce the above copyright\n        notice, this list of conditions and the following disclaimer in\n        the documentation and/or other materials provided with the\n        distribution.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND\n    CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,\n    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\n    USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED\n    AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n    ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n    POSSIBILITY OF SUCH DAMAGE.\n\n## Author\n\nChristian Lindig \u003clindig@gmail.com\u003e\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flindig%2Flipsum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flindig%2Flipsum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flindig%2Flipsum/lists"}