Skip to main content

Command-line tool that converts .txt or .md files into .html files.

Project description

go-go-web

Command-line tool that converts .txt or .md files into .html files.

Features

  • v1.0.2 project package uploaded to Test PyPI
  • v0.0.5 additionally parses front matter from .md files for metadata
  • v0.0.4 additionally accepts TOML config file
  • v0.0.3 additionally parses code blocks and horizontal rules for .md files
  • v0.0.2 additionally converts .md files into .html and parses italic and bold for .md files
  • v0.0.1 converts TIL post (.txt file) into .html file, specify output location, specify stylesheet url, view app version, view app help message

Installation

  1. Download and install the latest version of python. Open a terminal and check that it is installed.

    py --version

  2. Make sure you have upgraded version of pip.

    Windows

    py -m pip install --upgrade pip
    

    Linux/MAC OS

    python3 -m pip install --upgrade pip
    
  3. Install gogoweb using pip.

    Windows

    pip install gogoweb
    

    Linux/MAC OS

    python3 -m pip install gogoweb
    
  4. Check that you have the latest version of the app.

    py -m gogoweb.convert -v

Usage

View App Version

py convert.py --version or py convert.py -v

View Usage Message

py convert.py --help or py convert.py -h

Convert .txt to .html

py convert.py <file or folder path>

Example 1 (Convert one file)

py convert.py ./examples/til_post1.txt

Example 2 (Convert a folder of files)

py convert.py ./examples

Output(s) can be found in til folder.

Specify Output Location

py convert.py <file or folder path> -o <folder path>

Example

py convert.py ./examples/examples.txt -o ./examples

Specify Stylesheet

py convert.py <file or folder path> -s <stylesheet url>

Example

py convert.py ./examples/til_post2.txt -s https://cdnjs.cloudflare.com/ajax/libs/tufte-css/1.8.0/tufte.min.css

Specify Config File

py convert.py <file or folder path> -c <config toml file path>

Example

py convert.py ./examples -c src/gogoweb/config.toml

Additional Features Available for Markdown

Input file must be a .md file that is written in proper Markdown syntax

Front Matter Parsing

You may specify the following front matter in Markdown files and these will become the metadata of the resulting HTML file

Name Type Default Description
description string undefined The description of your document. Used for the page metadata and by search engines.
keywords string[] undefined Keywords meta tag for the document page, for search engines.
lang string en The language of your document.
title string file name The text title of your document. Used for the page metadata.

How to specify front matter in a Markdown file:

---
title: Katie's Homepage
keywords: website, coding
description: This is Katie's personal website.
---

License

License (MIT)

See Examples Outputs

go-go-web examples

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gogoweb-1.0.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

gogoweb-1.0.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file gogoweb-1.0.2.tar.gz.

File metadata

  • Download URL: gogoweb-1.0.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for gogoweb-1.0.2.tar.gz
Algorithm Hash digest
SHA256 14bbcef8e241e6c4767718efb9f6a6d749d4ee9bb084d785af9107f9d976bd08
MD5 82c5a75c602c4b441f53fb84aa97851c
BLAKE2b-256 de180b991e4557b0b554e9f3d492e6c501689ff2f87449b846fb2bd37e0b8c59

See more details on using hashes here.

File details

Details for the file gogoweb-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: gogoweb-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for gogoweb-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ab242a33a196d48c10bf3a2452f7039b6292e67d7aaf30ba5da3efaed9fcba7a
MD5 fbba88365bb5a99c6d1581a25fa5d3ed
BLAKE2b-256 d043d78263a6b33ff47f8dfb306d0c907932f9d788a7c101417ec9e8a68dbf30

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page