just literature

This commit is contained in:
mousebot 2020-04-24 19:51:32 -03:00
parent ed7802b8eb
commit 29d742a768
2 changed files with 10 additions and 14 deletions

View File

@ -1,12 +1,8 @@
## disclaimer
i wrote this cli rapper for the `markovify` python module because i wanted its features to be available as a cli tool.
`mkv-this` simply makes some of the features of the excellent [markovify](https://github.com/jsvine/markovify) module available as a command line tool. i started on it because i wanted to to process my own offline files. i published it to share with friends. i'm a totally novice coder. so you are a programmer and felt like picking it up and improving on it, then by all means!
i only published it to share with friends.
& in case a programmer felt like picking it up and improving on it. so if you are interested in fixing amateur code, then by all means!
maybe this functionality already exists somewhere, but i couldn't find it. if it does, pls let me know!
the rest of these notes are for laypersons rather than programmers.
## mkv-this
@ -14,7 +10,7 @@ maybe this functionality already exists somewhere, but i couldn't find it. if it
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` 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`!
both commands allow you to add a second file or URL to the input, so you can combine your secret diary with some vile shit from the web.
### installing
@ -43,7 +39,7 @@ the script implements a number of the basic `markovify` options, so you can spec
* a maximum sentence length, in characters.
* the amount of (verbatim) overlap allowed between input and output.
* if your text's sentences end with newlines rather than full-stops.
* an additional file or URL 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`.
* an additional file or URL 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` (see below).
* the relative weight to give to the second file if it is used.
run `mkv-this -h` to see how to use these options.
@ -52,7 +48,7 @@ run `mkv-this -h` to see how to use these options.
if you want to input a stack of files, use `mkv-this-dir` instead. specify a directory and all text files in it will be used as input.
as with `mkv-this` you can also combine this directory with a URL.
as with `mkv-this` you can also combine it with a URL.
if for some reason you want to get a similar funtionality with `mkv-this`, you can easily concatenate the files yourself from the command line, then process the resulting file:
@ -68,9 +64,9 @@ 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, code, HTML tags, metadata, stars, bullets, lines, etc.), unless you want mashed versions of those things in your output. (no need to clean up URLs though.)
feed `mkv-this` large-ish amounts of well punctuated text. it works best if you bulk replace/remove as much mess as possible (code, HTML tags, links, metadata, stars, bullets, lines, tables, etc.), unless you want mashed versions of those things in your output. (no need to clean up URLs though.)
youll probably want to edit or select things from 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.
youll probably want to edit or select things from the output. it doesn't rly output print-ready boilerplate bosh, although many bots are happily publishing its output directly. you might find that it prompts you to edit it like a bot.
for a few further tips, see https://github.com/jsvine/markovify#basic-usage.
@ -78,9 +74,9 @@ happy zaning.
### macos
it seems to run on macos too.
it `seems` to run on macos.
you may already have python installed. if not, you first need to install [homebrew](https://brew.sh/#install), edit your PATH so that it works, then install `python3` with `brew install python3`. if you are already running an old version of `homebrew` you might need to run `brew install python3 && brew postinstall python3` to get `python3` and `pip` running right.
you may already have python installed. if not, install [homebrew](https://brew.sh/#install), edit your PATH so that it works, then install `python3` with `brew install python3`. if you are already running an old version of `homebrew` you might need to run `brew install python3 && brew postinstall python3` to get `python3` and `pip` running right.
i know nothing about macs so if you ask me for help i'll just send you random copypasta from the interwebs.

View File

@ -8,7 +8,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
setup(name='mkv-this',
version='0.1.33',
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 or URL, markovify, save the results.',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://git.disroot.org/mousebot/mkv-this',