Skip to content

Commit

Permalink
docs(README): added quickstart info
Browse files Browse the repository at this point in the history
  • Loading branch information
accraze committed Nov 27, 2016
1 parent f9a78ec commit ff45163
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,23 @@ 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
=============

Expand Down

0 comments on commit ff45163

Please sign in to comment.