Giter Site home page Giter Site logo

byron / termbook Goto Github PK

View Code? Open in Web Editor NEW
47.0 3.0 3.0 974 KB

A runner for `mdbooks` to keep your documentation tested.

Home Page: https://byron.github.io/termbook

License: Apache License 2.0

Rust 59.55% Makefile 3.14% Shell 35.67% Ruby 1.65%
mdbook terminal cli markdown cmark

termbook's Introduction

Rust

termbook is a command-line tool to build mdbook's while executing codeblocks and collecting their output to become part of the mdbook.

This allows to write testable documentation for command-line interfaces.

It came to life for the documentation needs of share-secrets-safely.

asciicast

Installation

Installation documentation can be found here.

Documentation

termbook uses termbook to document itself. Click here for more!

Roadmap

Add 'replace' support

Currently we can only append the output of programs. However, if there was 'replace', we can implement html converters, such as https://github.com/ivanceras/svgbobrus.

That way, diagrams can be written in text, either in the code-block, or in files which are then included via 'include-file'.

termbook renderer plugin programs for mdbook

Provide all renderers in termbook as standalone mdbook compatible plugin renderers, to allow easier integration with the mdbook binary.

Depends on rust-lang/mdBook#631

termbook preprocessor plugin programs for mdbook

Ideally, we don't have to wrap mdbook into termbook. Instead, there should be plugin-preprocessor support for mdbook, similar to what's already done for renderers.

Maintenance Guide

Making a new release

  • Assure all documentation is up-to-date and tests are green
  • Run cargo-clippy and fix all issues
  • update the version in all Cargo.toml files and git commit
  • run cargo publish for the library and the CLI
  • run git tag -s <version>
  • run git push --tags origin master
  • update the asciinema docs
    • Set your terminal to a decent size
    • run make asciinema-no-upload
    • When happy with the result, run make asciinema-upload
    • visit the URL, configure the video, make it public, and copy the markdown link into the README file.
  • update brew file
    • run make update-homebrew and commit the change

Documentation is updated on each push to master.

termbook's People

Contributors

byron avatar havvy avatar stefanbirkner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

termbook's Issues

A newline is missing when `include`ing a file

This can lead to markdown like this:

```
included-file without newline```

which turns out to be malformed markdown.

A solution could be to enforce a newline at the end of anything placed within code blocks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.