Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
output.html
output/
5 changes: 4 additions & 1 deletion duree.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
NOTES:
* A limit of 335000 seems to be around the maximum limit that KDP will take
"""
import random, phrases
import os, random, phrases

class Book(object):
"""docstring for Book."""
Expand All @@ -34,6 +34,9 @@ def generate(self):

def gen_volume(self):
"""generate volume"""
if not os.path.exists("output"):
os.makedirs("output")
print("Created directory: output/")
output_file = open("output/vol{0}.html".format(self.volume_num), "w")
book = ""
real_length = 0
Expand Down