An implementation of the mesostic generation algorithm Andrew Culver developed for John Cage.
Project description
PyMesomake
PyMesomake is a Python 3 implementation of the mesostic generation algorithm Andrew Culver developed for John Cage.
Installation
Windows
I only use Windows for testing in my projects but these instructions work for me on a vanilla Windows 10 VirtualBox virtual machine:
-
If you don't already have Python on your system download and install the current release from python.org.
-
Open a Command Prompt.
-
Run this command.
pip install pymesomake
- Download the
punkttokenizer from Python's Natural Language Tool Kit.
python -m nltk.downloader punkt
-
Run this command, making sure to provide the correct path to wherever you've downloaded the Genesis text.
python -m pymesomake --sourcefile=Downloads\genesis.txt --mesostring="these are the times that try men's souls"
You should see a mesostic on your screen. Congratulations.
macOS
I do most of my development work on Macintosh hardware so my setup is somewhat customized. If you've done any programming on your Mac it's likely you've already installed Xcode, the homebrew package manager, and maybe a version of Python 3.
-
Install a current release of Python 3 on your Mac. This guide is as good as any.
-
Open a Terminal window.
-
Run this command.
pip install pymesomake
- Download the
punkttokenizer from Python's Natural Language Tool Kit.
python -m nltk.downloader punkt
-
Run this command, making sure to provide the correct path to wherever you've downloaded the Genesis text.
python -m pymesomake --sourcefile=Downloads/genesis.txt --mesostring="these are the times that try men's souls"
You should see a mesostic on your screen. Congratulations.
Linux
coming soon
Usage
python pymesomake --sourcefile='data/genesis.txt' --mesostring="these are the times that try men's souls"
Acknowledgements & Resources
Andrew Culver
- post to silence mailing list that inspired this code
- compilation of computer programs used by John Cage
The Holy See
- source of Genesis text. HTML source subjected to these minimal edits:
- removal of page navigation elements
- removal of chapter headings (e.g., "Chapter 6") and line numbering (e.g., "[1:30]")
Marjorie Perloff contextual essays
Reminder to Maintainer
Publish thusly:
python setup.py sdist bdist_wheel
twine upload dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymesomake-0.4.0.tar.gz.
File metadata
- Download URL: pymesomake-0.4.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f8b0982d11a4c81dd221c642fde2edf5e0e0aef529ef9b61f13d0520685294d
|
|
| MD5 |
74339cce5b93c9132512d906f8b6d06f
|
|
| BLAKE2b-256 |
c8c393e95ad8cfc7598849748a40fd36c7b7c05c963468d1e8251bdefecb9616
|
File details
Details for the file pymesomake-0.4.0-py3-none-any.whl.
File metadata
- Download URL: pymesomake-0.4.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6463d1373439d9e950df3c8a363064da0960a14876bb864530e38aa48a99e2df
|
|
| MD5 |
c34aa7e4433ba7432a276380fcdc6452
|
|
| BLAKE2b-256 |
44010cfcaee99da26b069dc5977bbe724e243a4b2fedbfa3552fcbc03a84b22d
|