Merge branch 'testing'

This commit is contained in:
mousebot 2020-04-22 21:48:35 -03:00
commit 66e40f9b2c
2 changed files with 21 additions and 19 deletions

View File

@ -5,9 +5,9 @@ i wrote this cli rapper for the `markovify` python module because i wanted its f
i only published it in case someone who actually knows what they're doing felt like picking it up and improving on it. (and to share it with friends.)
maybe this functionality already exists somewhere, but i couldn't find it.
and if you are interested in fixing my amateur code, then by all means!
so if unlike me you are actually a programmer and are interested in expanding/correcting/fixing my non-programmer's code, then by all means!
maybe this functionality already exists somewhere, but i couldn't find it. if it does, pls let me know!
## mkv-this
@ -15,7 +15,7 @@ so if unlike me you are actually a programmer and are interested in expanding/co
a second command, `mkv-this-dir` (see below) allows you to input a directory and it will read all text files within it as the input.
`mkv-this` simply makes some of the features of the excellent `markovify` python module available as a command line tool. it was written by a total novice, so you probably shouldnt download it. i only learned about `argparser` yesterday, and pypi.org today, no matter what day it is. tomorrow i might learn about `os` and `sys`. and then maybe even `cookiecutter`!
`mkv-this` simply makes some of the features of the excellent `markovify` module available as a command line tool. it was written by a total novice, so you probably shouldnt download it. i only learned about `argparser` yesterday, and pypi.org today, no matter what day it is. tomorrow i might learn about `os` and `sys`. and then maybe even `cookiecutter`!
### installing
@ -33,12 +33,12 @@ to do this you need `python3` and `pip`. if you don't have them, install them th
`markovify` is also a dependency, but it should install along with `mkv-this`.
if you get sth like `ModuleNotFound error: No module named 'modulename'`, just run `pip install modulename` to get it.
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
https://git.disroot.org/mousebot/mkv-this.
### macos
@ -52,16 +52,20 @@ i know nothing about macs so if you ask me for help i'll just send you random co
### options
the script implements a few of the basic `markovify` options, so you can:
the script implements a few of the basic `markovify` options, so you can specify:
* specify output file (default = "./mkv-output.txt")
* specify a maximum sentence length, in characters.
* specify how many sentences to output (default = 5)
* specify state size, i.e. the number of preceeding words to be used in calculating the probability of the next word (default = 2).
* specify the amount of (verbatim) overlap allowed between your input text and your output text.
* specify that your text's sentences end with newlines rather than full-stops.
* specify an additional file to use for text input. you can add only one. if you want to feed a stack of files into your bank, use `mkv-this-dir`.
* if a second file is added, you can also specify the relative weight to give to the two files.
* how many sentences to output (default = 5)
* the state size, i.e. the number of preceeding words to be used in calculating the probability of the next word (default = 2).
* a maximum sentence length, in characters.
* the amount of (verbatim) overlap allowed between your input text and your output text.
* that your text's sentences end with newlines rather than full-stops.
* an additional file to use for text input. you can add only one. if you want to feed a stack of files into your bank, use `mkv-this-dir`.
* the relative weight to give to the second file if it is used.
as of 0.1.29 you can also specify:
* a URL to a text file online. (you can input something that isn't a text file but the results will be mush.)
* an additional URL to use as text input.
run `mkv-this -h` to see how to use these options.
@ -69,7 +73,7 @@ run `mkv-this -h` to see how to use these options.
`mkv-this` can only take two files as input material each time. if you want to input a stack of files, use `mkv-this-dir`. it allows you to specify a directory and all text files in it will be used as input material.
if for some reason you want to get a similar funtionality with `mkv-this`, you can easily concatenate some files yourself in bash, then process them:
if for some reason you want to get a similar funtionality with `mkv-this`, you can easily concatenate some files yourself from the command line, then process them:
* copy all your text files into a directory
* cd into the directory
@ -83,9 +87,7 @@ you need to input plain text files. currently accepted file extensions are `.txt
### for best results
feed `mkv-this` large-ish amounts of well punctuated text. it works best if you bulk replace/remove as much mess as possible (URLs, metadata, stars, bullets, etc.), unless you want mashed versions of those things in your output.
if your input text doesnt use full-stops to mark the ends of sentences, try putting each 'sentence' on a newline, and then write to the maintainer of this package to complain about how that option isn't yet implemented. then the parser wont read your entire file as one big sentence and output nothing.
feed `mkv-this` large-ish amounts of well punctuated text. it works best if you bulk replace/remove as much mess as possible (URLs, code, tags, metadata, stars, bullets, etc.), unless you want mashed versions of those things in your output.
youll probably want to edit the output. it is very much supposed to be a kind of raw material rather than print-ready boilerplate bosh, although many bots are happily publishing such output directly. you might find that it prompts you to edit it like a bot yourself.

View File

@ -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.28',
version='0.1.29',
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',