{"id":16641413,"url":"https://github.com/cmstead/booklisp","last_synced_at":"2026-04-26T14:31:01.390Z","repository":{"id":72520307,"uuid":"152290138","full_name":"cmstead/booklisp","owner":"cmstead","description":"A small, extremely limited lisp-like DSL for book content embedding written in Javascript","archived":false,"fork":false,"pushed_at":"2019-05-20T18:55:21.000Z","size":150,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-28T08:06:32.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/cmstead.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-09T17:08:29.000Z","updated_at":"2020-11-03T22:31:31.000Z","dependencies_parsed_at":"2023-07-16T05:16:41.117Z","dependency_job_id":null,"html_url":"https://github.com/cmstead/booklisp","commit_stats":{"total_commits":53,"total_committers":1,"mean_commits":53.0,"dds":0.0,"last_synced_commit":"40f5019ba7534bf292e19cffdadf87b3924ea345"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmstead%2Fbooklisp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmstead%2Fbooklisp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmstead%2Fbooklisp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmstead%2Fbooklisp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmstead","download_url":"https://codeload.github.com/cmstead/booklisp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243159166,"owners_count":20245675,"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-10-12T07:46:27.898Z","updated_at":"2025-12-24T14:29:40.134Z","avatar_url":"https://github.com/cmstead.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Booklisp #\n#### A Language for Building Documents ####\n\n## Table Of Contents ##\n\n- [Section 1: Introduction](#user-content-introduction)\n- [Section 2: Setup and Running](#user-content-setup-and-running)\n- [Section 3: Examples](#user-content-examples)\n- [Section 4: To Dos](#user-content-to-dos)\n- [Section 5: Release History](#user-content-release-history)\n\n## Introduction ##\n\n#### What Booklisp Is ####\n\nBooklisp is a language for people who want the compositional support LaTeX provides, but with the ease of Markdown authoring. Although Booklisp is still in the developmental stages, it is still possible to build large, complex documents without setting your hair on fire.\n\nBooklisp content is just Markdown.  Any Booklisp Markdown is valid Github Flavored Markdown (GFM) with embedded HTML comments.\n\nBooklisp executable blocks are a simple DSL utilizing Lisp-style syntax, making the work of composing complex documents little more than declaring what you want... and a few parens.\n\nThis readme was even created with Booklisp!\n\n#### What Booklisp Is Not ####\n\nBooklisp is NOT a complete, standalone language.  It is simply designed to make the process of compiling documents simpler for authors.\n\nBooklisp is NOT a replacement for LaTeX.  If you need the power, the language exists for a reason.\n\nBooklisp is NOT finished.  It is likely the project will continue to grow over time.  To see the current state of the project it is worth having a look at the todo list.\n\n#### How to Find Me ####\n\nFind me online:\n- [@cm_stead](https://twitter.com/cm_stead)\n- [ChrisStead.com](http://www.chrisstead.com)\n    \n\n## Setup and Running ##\n\n### Setup ###\n\nSetting up Booklisp is simple:\n\n1. Make sure you have node installed on your computer\n2. Install Booklisp with npm:\n    - Windows: `npm i booklisp -g`\n    - Mac/Linux: `sudo npm i booklisp -g`\n\n### Running ###\n\nAfter installing Booklisp, you can compile documents like this:\n\n1. Open a terminal window and go to the directory where your markdown source is\n2. Run `booklisp` on your markdown source.  Just provide the main source file where your table of contents is:\n    - `booklisp ./my-markdown-main-source.md ./my-compiled-markdown.md`\n\n### Advanced Setup ###\n\nYou can create a build script that remembers all of your file paths if you like.  This is what the Booklisp readme build script (it's Javascript) looks like:\n\n```javascript\n'use strict';\n\nconst childProcess = require('child_process');\n\nchildProcess.exec('booklisp ./readme-source/readme.md ./README.md', function(error) {\n    if(error) {\n        console.log('An error occurred: ', error.message);\n    } else {\n        console.log('Compile complete');\n    }\n});\n```\n\nThat's all there is to know!\n    \n\n## Examples ##\n\nThe best example of Booklisp is to simply look at the source files for the readme doc you are reading right now.  Here is the main source file as I write this examples file:\n\n```\n\u003c!--bl\n(filemeta\n    (title \"Booklisp\")\n    (subtitle \"A Language for Building Documents\"))\n\n(table-of-contents\n    (section-main \"./readme-source/sections/introduction.md\")\n    (section-main \"./readme-source/sections/setup-and-running.md\")\n    (section-main \"./readme-source/sections/examples.md\")\n    (section-main \"./readme-source/sections/todos.md\")\n    (section-main \"./readme-source/sections/release-history.md\")\n)/bl--\u003e\n```\n\nIn this example, the file metadata -- filemeta -- contains a title, \"Booklisp\", and a subtitle \"A Language for Building Documents\".  The main source file also contains a table of contents which captures information about the chapters contained within the document.\n\nEach of the identifiers here is a function:\n- filemeta\n- title\n- subtitle\n- table-of-contents\n- section-main\n\nThis means you can simply type what you mean and the compiler will interpret and create your document. Each document must contain a filemeta expression. All arguments to filemeta are optional.\n\nHere's what a section-main file looks like:\n\n```\n\u003c!--bl\n(filemeta\n    (title \"My Chapter\"))\n/bl--\u003e\n\nIn this section, we look at an example of a section-main. ;-)\n```\n\nContent can be included as either a section, section-main, or chapter; both inside and outside the table of contents:\n\n```\n\u003c!--bl\n(table-of-contents\n    (chapter \"./myChapter.md\")\n    (section-main \"./mySectionMain.md\"))\n    (section \"./mySection.md\"))\n\n(chapter \"./notInTableOfContentsChapter.md\")\n(section-main \"./notInTableOfContentsSectionMain.md\")\n(section \"./notInTableOfContentsSection.md\")\n/bl--\u003e\n```\n\nAlso, if you want to write an example of a Booklisp executable block, use the noexec escape sequence:\n\n```\n\u003c!--noexec\n\u003c!--bl\n(define! \"do-not-execute\" \"This will not execute.\")\n/bl--\u003e\n/noexec--\u003e\n```\n\n**Inserting Build Messages**\n\nIf you want to print something out during the process of building, a build message can be inserted:\n\n```\n\u003c!--bl\n(build-message \"This is a build message\")\n/bl--\u003e\n```\n\nThat's it!\n    \n\n## To Dos ##\n\nUpcoming Todos:\n- [x] Section (non-chapter) content\n- [x] Standalone section and chapter content (no table-of-contents function required)\n- [ ] Bibliographic Tooling\n- [ ] Non-chapter/section table of contents items, e.g. introduction, appendix, etc.\n    \n\n## Release History ##\n\n**v2.0.0**\n\n- Introduced proper relative-path management\n\n**v1.7.0**\n\n- Introduced `subsection-minor` type content\n\n**v1.6.0**\n\n- Introduced `subsection` type content\n\n**v1.4.0**\n\n- Introduced `section-main` type content\n\n**v1.3.0**\n\n- Introduced `section` type content\n- Renders sections and chapters from outside a table of contents\n\n**v1.2.3**\n\n- First readme complete\n\n**v1.2.2**\n\n- Fixed bug in noexec command\n\n**1.2.0**\n\n- Introduced noexec command\n\n**1.1.0**\n\n- Removed requirement that table-of-contents receive a vector of chapters\n\n**1.0.0**\n\n- First release\n    \n\n    ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmstead%2Fbooklisp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmstead%2Fbooklisp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmstead%2Fbooklisp/lists"}