fns fns! & clean up & clean up output too.

This commit is contained in:
mousebot 2020-04-23 17:43:21 -03:00
parent a462e45803
commit 327ff016da
3 changed files with 7 additions and 12 deletions

View File

@ -35,11 +35,6 @@ to do this you need `python3` and `pip`. if you don't have them, install them th
if you get sth like `ModuleNotFound error: No module named 'modulename'`, just run `pip install modulename` to get the missing module.
### repository
if you are reading this on pypi.org, the repo is here:
https://git.disroot.org/mousebot/mkv-this.
### macos
it seems to run on macos too.

View File

@ -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()

View File

@ -7,11 +7,11 @@ 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',
url='',
url='https://git.disroot.org/mousebot/mkv-this',
author='mousebot',
author_email='martianhiatus@riseup.net',
license='AGPLv3',