Skip to content

Haskell Library, CLI App, & API Server for Generating Genkouyoushi(原稿用紙) Paper

License

Notifications You must be signed in to change notification settings

prikhi/genkouyoushi-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genkouyoushi Paper Generator

Genkouyoushi Generator Build Status

A library, command line program, and web server to generate various formats of genkoyoushi paper for practicing your Kana/Kanji.

The CLI program may be passed arguments to customize the page size, margins, box count(rows/columns), presence of Furigana boxes, etc. Output formats include PNG, JPG, & PDF.

The API server accepts configuration parameters via JSON and replies with a bytestring of the generated PDF file.

Build / Run

You'll need stack installed. Then you can build & run the CLI program:

stack build
stack run genkouyoushi-gen test.png
feh test.png

Run stack run genkouyoushi-gen -- --help to see a full list of arguments that can be used to customize the generated paper.

Run stack install genkouyoushi-generator:exe:genkouyoushi-gen to build & copy the genkouyoushi-gen executable to ~/.local/bin. Running stack install without any arguments will copy both the CLI program and API server.

API Server

A simple web service is provided with the genkouyoushi-api executable. This accepts JSON POST requests for the Genkouyoushi.Config type and replies with a bytestring containing a generated PDF. A webapp to interact with the API server will also be added to this repository.

License

GPL-v3.0+

Releases

No releases published

Packages

No packages published