accraze / python-markov-novel

Write a random novel using Markov chains

Home Page:https://pypi.org/project/markov-novel/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

docs Documentation Status
tests
Travis-CI Build Status AppVeyor Build Status Requirements Status
Coverage Status Coverage Status
package PyPI Package latest release PyPI Package monthly downloads PyPI Wheel Supported versions Supported implementations

Write a random novel using markov chains.

  • Free software: BSD license

Installation

pip install markov-novel

Quick Start

import markovify
import markov_novel

with open('path/to/corpus.txt') as f:
    text = f.read()
# Build the model.
text_model = markovify.Text(text)
novel = markov_novel.Novel(text_model, chapter_count=1)
novel.write(novel_title='my-novel', filetype='md')

The novel will be written to your current working directory.

Documentation

https://python-markov-novel.readthedocs.io/

Development

To run the all tests run:

tox

Note, to combine the coverage data from all the tox environments run:

Windows
set PYTEST_ADDOPTS=--cov-append
tox
Other
PYTEST_ADDOPTS=--cov-append tox

About

Write a random novel using Markov chains

https://pypi.org/project/markov-novel/

License:BSD 2-Clause "Simplified" License


Languages

Language:Python 91.0%Language:Batchfile 9.0%