Giter Club home page Giter Club logo

marksplitz's Introduction

marksplitz

Command-line utility to split a Markdown file into linked static web pages.

Development work in progress.

Directive Comments

The following HTML comments can be placed in the source Markdown document to alter the generated HTML.

<!-- title: new-title -->

  • Replace the default HTML title for the page.

<!-- class: class-1 class-2 -->

  • Add one or more classes to the content div.
  • Use to apply additional styles via a custom.css file.

Command-line Usage

usage: marksplitz [-h] [-o OUTPUT_DIR] [-n OUTPUT_NAME] [-i IMAGES_SUBDIR]
                     [-c CSS_FILE]
                     markdown_file

Split a Markdown file into linked HTML pages.

positional arguments:
  markdown_file         Path to the Markdown file to split.

options:
  -h, --help            show this help message and exit
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Path to the output directory.
  -n OUTPUT_NAME, --output-name OUTPUT_NAME
                        Base name for the output HTML files.
  -i IMAGES_SUBDIR, --images-subdir IMAGES_SUBDIR
                        Subdirectory for images. Expected to be in the
                        directory containing the Markdown file. Contents are
                        copied to a subdirectory by the same name in the
                        output directory.
  -c CSS_FILE, --css-file CSS_FILE
                        Optional name of a CSS file to include in the same
                        location as the HTML output. If a CSS file is not
                        specified, a default style is embedded in the HTML
                        output. If a CSS file is specified, the default style
                        is not included.If the specified CSS file does not
                        exist, it is created with the default style.

Reference

CSS

Customizing the generated HTML output requires using CSS.

Packages Used

Project Tools

  • uv - Environment management (in place of pip)
  • Ruff - Linter and code formatter
  • pytest - Testing framework
  • build - Python packaging build frontend
  • twine - Utility for publishing Python packages
  • Just - Command runner

marksplitz's People

Contributors

wmelvin avatar

Watchers

 avatar

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.