Skip to main content

Guten Haiku

Build Status Latest Version Python Support

A Commandline tool to mine haiku poems from text

  • 80's cli interface with colors
  • Works great with gutenberg books thx to a builtin cleaner script from Peyman Mohseni Kiasari
  • Reconstructs punctuation of haikus using deepcorrect
  • Appends json haiku's to a file

Install

$ pip install gutenhaiku

Then you need to download the models in cache:

$ gutenhaiku setup

Usage

$ gutenhaiku -f frankenstein.txt -a 'mary shelley' -t 'frankenstein' -d '1818-01-01'

Wat?             Guten Haiko lets you extract haiku poems from text
Usage:           gutenhaiku \
                 -f frankenstein.txt \
                 -a 'Mary Wollstonecraft Shelley' \
                 -t 'frankenstein' \
                 -d '1818-01-01'
Optional params: --commandfile [-cf] a file with comma seperated 
                                     values for f,a,t,d params
                 --outputfile   [-o] the output file path [default haiku.json
                 --eighties     [-e] eighties mode [default 1]

Advanced usage:  gutenhaiku \
                 -f frankenstein.txt \
                 -a 'Mary Wollstonecraft Shelley' \
                 -t 'frankenstein' \
                 -d '1818-01-01' \
                 -f dracula.txt \
                 -a 'Bram Stoker' \
                 -t 'dracula' \
                 -d '1897-05-26'

setup:           gutenhaiku setup
                 downloads AI models

Output format

example from assets

{
    "page": 261,
    "word_number": 65407,
    "haiku": [
        "He pointed towards.",
        "The corpse of my wife I rushed.",
        "Towards the window."
    ],
    "author": "mary shelley",
    "title": "frankenstein",
    "date": "1818-01-01T00:00:00"
}

Dev

Run tests with

$ poetry run nox

Metadata

Release files for gutenhaiku 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gutenhaiku 1.0.1
File Size Uploaded Provenance Actions
gutenhaiku-1.0.1.tar.gz 12.0 kB Without provenance Details for gutenhaiku-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gutenhaiku 1.0.1
File Interpreter ABI Platform Actions
gutenhaiku-1.0.1-py3-none-any.whl Python 3 none any Details for gutenhaiku-1.0.1-py3-none-any.whl

Total release size: 26.7 kB

Release files / gutenhaiku-1.0.1.tar.gz

Download URL gutenhaiku-1.0.1.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1aa57d4effc07ece1d254c036ca58923553484574760e583e12defa2d4c1cdbf
BLAKE2b-256 checksum
How to use checksums
1398cbe224f22155927e0a89d1c3a4f1397edd0178183137caef190230258a44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.7.5 Darwin/19.0.0

Release files / gutenhaiku-1.0.1-py3-none-any.whl

Download URL gutenhaiku-1.0.1-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f64d009ef68f000028469afb6dc5b787447ebcd1a0f758c9ce30adc7bf01aa2
BLAKE2b-256 checksum
How to use checksums
5dca8d94d93ab6404542b1a24daab83caf65947bbc9ea689507a21f47be932a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.7.5 Darwin/19.0.0

Security for gutenhaiku 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page