fns fns! & clean up & clean up output too.
This commit is contained in:
parent
a462e45803
commit
327ff016da
|
@ -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.
|
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
|
### macos
|
||||||
|
|
||||||
it seems to run on macos too.
|
it seems to run on macos too.
|
||||||
|
|
|
@ -94,12 +94,12 @@ def main():
|
||||||
def writesent(tmodel):
|
def writesent(tmodel):
|
||||||
return output.write(str(tmodel.make_sentence(
|
return output.write(str(tmodel.make_sentence(
|
||||||
tries=2000, max_overlap_ratio=args.overlap,
|
tries=2000, max_overlap_ratio=args.overlap,
|
||||||
max_chars=args.length)) + '\n \n')
|
max_chars=args.length)) + '\n\n')
|
||||||
|
|
||||||
def writeshortsent(tmodel):
|
def writeshortsent(tmodel):
|
||||||
return output.write(str(tmodel.make_short_sentence(
|
return output.write(str(tmodel.make_short_sentence(
|
||||||
tries=2000, max_overlap_ratio=args.overlap,
|
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 \
|
fnf = 'error: file not found. please provide a path to a really-existing \
|
||||||
file!'
|
file!'
|
||||||
|
@ -116,7 +116,7 @@ def main():
|
||||||
else:
|
else:
|
||||||
text = read(args.infile)
|
text = read(args.infile)
|
||||||
# read combine file:
|
# read combine file:
|
||||||
ctext = read(args.combine)
|
ctext = read(args.combine)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
print(fnf)
|
print(fnf)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
@ -157,7 +157,7 @@ def main():
|
||||||
# normal sentence:
|
# normal sentence:
|
||||||
else:
|
else:
|
||||||
writesent(combo_model)
|
writesent(combo_model)
|
||||||
output.write(str(' \n \n * \n \n'))
|
output.write(str('*\n\n'))
|
||||||
# add a star between each appended set.
|
# add a star between each appended set.
|
||||||
output.close()
|
output.close()
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ def main():
|
||||||
# normal sentence:
|
# normal sentence:
|
||||||
else:
|
else:
|
||||||
writesent(text_model)
|
writesent(text_model)
|
||||||
output.write(str(' \n \n * \n \n'))
|
output.write(str('*\n\n'))
|
||||||
# add a star between each appended set.
|
# add a star between each appended set.
|
||||||
output.close()
|
output.close()
|
||||||
|
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -7,11 +7,11 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
|
||||||
long_description = f.read()
|
long_description = f.read()
|
||||||
|
|
||||||
setup(name='mkv-this',
|
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.',
|
description='cli wrapper for markovify: take a text file, markovify, output the results to a text file.',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
url='',
|
url='https://git.disroot.org/mousebot/mkv-this',
|
||||||
author='mousebot',
|
author='mousebot',
|
||||||
author_email='martianhiatus@riseup.net',
|
author_email='martianhiatus@riseup.net',
|
||||||
license='AGPLv3',
|
license='AGPLv3',
|
||||||
|
|
Loading…
Reference in New Issue