Skip to content
/ werd Public

A simple static site generator CLI with a focus on using AI to translate all content (and keep it easy to maintain)

License

Notifications You must be signed in to change notification settings

awhillas/werd

Repository files navigation

werd

PyPI Changelog Tests License

CLI tool for static website generation with a focus on translation to any number of languages via AI

Features

  • Translate content, marked up in markdown, into as many languages as desired (or at least as many as OpenAI's ChatGPT can translate into)
  • Render content as HTML using Jinja2 templates (partially finished)

Installation

Install this tool using pip:

pip install werd

Usage

For help, run:

werd --help

You can also use:

python -m werd --help

Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

cd werd
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

TODOs

In order of most likely to-do to least

  • Commands
    • translate
      • sub-directories
      • Blog filename parser
      • Error page content
      • Parallel inference requests to speed up translations
      • force generate 1 language --flag
      • force generate all languages --flag
      • translate file names to be used for navigation.
      • content using OpenAI
    • render HTML using theme
      • Secondary content i.e. layout elements (not rendered as pages)
      • navigation
        • Hierarchy, directories as sub-menus
      • Non-content driven pages i.e.
        • General index rendering
          • Root
          • directory roots
          • blog index
        • Site index language selection list
        • site root redirect to language page
        • home/landing page
      • Error page, list content in all languages
      • Switch language
      • 1-to-1 rendering of content to a page using Jinja2 theme templates
    • go - translate and render in one command
    • server - local web server of HTML output
    • deploy
      • to S3 bucket
      • ftp?
      • Github pages? just a commit and push
    • scaffold - setup content, templates directories and config file.
  • Documentation site (using werd and translated)
  • Switch to SQLite for all data tracking?
  • Refactor to use click

Credits

This project was bootstrapped from the cookiecutter template https://github.com/simonw/click-app.

The name werd was the result of the letters being close together on the keyboard and it not being taken as a package on pipy

About

A simple static site generator CLI with a focus on using AI to translate all content (and keep it easy to maintain)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published