fns fns! & clean up & clean up output too.
This commit is contained in:
parent
a462e45803
commit
62a5e23f2b
|
@ -94,12 +94,12 @@ def main():
|
|||
def writesent(tmodel):
|
||||
return output.write(str(tmodel.make_sentence(
|
||||
tries=2000, max_overlap_ratio=args.overlap,
|
||||
max_chars=args.length)) + '\n \n')
|
||||
max_chars=args.length)) + '\n\n')
|
||||
|
||||
def writeshortsent(tmodel):
|
||||
return output.write(str(tmodel.make_short_sentence(
|
||||
tries=2000, max_overlap_ratio=args.overlap,
|
||||
max_chars=args.length)) + '\n \n')
|
||||
max_chars=args.length)) + '\n\n')
|
||||
|
||||
fnf = 'error: file not found. please provide a path to a really-existing \
|
||||
file!'
|
||||
|
@ -116,7 +116,7 @@ def main():
|
|||
else:
|
||||
text = read(args.infile)
|
||||
# read combine file:
|
||||
ctext = read(args.combine)
|
||||
ctext = read(args.combine)
|
||||
except FileNotFoundError:
|
||||
print(fnf)
|
||||
sys.exit()
|
||||
|
@ -157,7 +157,7 @@ def main():
|
|||
# normal sentence:
|
||||
else:
|
||||
writesent(combo_model)
|
||||
output.write(str(' \n \n * \n \n'))
|
||||
output.write(str('*\n\n'))
|
||||
# add a star between each appended set.
|
||||
output.close()
|
||||
|
||||
|
@ -192,7 +192,7 @@ def main():
|
|||
# normal sentence:
|
||||
else:
|
||||
writesent(text_model)
|
||||
output.write(str(' \n \n * \n \n'))
|
||||
output.write(str('*\n\n'))
|
||||
# add a star between each appended set.
|
||||
output.close()
|
||||
|
||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
|
|||
long_description = f.read()
|
||||
|
||||
setup(name='mkv-this',
|
||||
version='0.1.29',
|
||||
version='0.1.30',
|
||||
description='cli wrapper for markovify: take a text file, markovify, output the results to a text file.',
|
||||
long_description=long_description,
|
||||
long_description_content_type='text/markdown',
|
||||
|
|
Loading…
Reference in New Issue