|
|
5 years ago | |
|---|---|---|
| inferno | 5 years ago | |
| paradiso | 5 years ago | |
| purgatorio | 5 years ago | |
| word-search | 5 years ago | |
| LICENSE | 5 years ago | |
| README.md | 5 years ago | |
| blacklist | 5 years ago | |
| dd_scrape.sh | 5 years ago | |
| inf34_dd_scrape.sh | 5 years ago | |
README.md
divina-commandline
Divina Commandline is a word search tool for the Divine Comedy. So far, it consists of several Bash scripts which parse cantos stored as text files. The cantos were pulled from https://digitaldante.columbia.edu/dante/divine-comedy/ by a Bash script which extracted them from the HTML source of the website.
For those who are not familiar, a command line interface(https://en.wikipedia.org/wiki/Command-line_interface) processes commands for a programming language. I began this project with the goal of making it easy to interact with the Comedy through computer terminals (with which I do most of my work), which function as a command line interface with the operating system. The name, "Divina Commandline" is thus a play on words--- a condensation of "Divine Comedy" and "command line".
Some scripts may currently be broken due to a new directory structure. They will be fixed soon.
Scripts
dd_scrape.sh
- for each canto, download the HTML source, use
seda bunch of times to remove the HTML
inf34_dd_scrape.sh
- repeat the above process for Inferno 34
Word Search
words-sort-comedy.sh
- sort each canto by its words and remove duplicates -> text file
all-words-<canticle>-<number>.txt - apply a blacklist of unnecessary words -> text file
useful-words-<canticle>-<number>.txt - highlight the five most useful words in each canto to view in a file pager
highlighted-words-<canticle>-<number>.txt
find-word.sh
- ask user for a word and
grepthe word in eachall-words-<canticle>-<number>.txtfile -> text filenum-<word>-per-canto.txt - sort this output to show which cantos have the most instances of the word -> text file
sorted-num-<word>-per-canto.txt
count-total.sh
- ask user for a word and sum the counts from
num-<word>-per-canto.txtto get a total count of the instances of the word in the Comedy
spreadsheet-num-words.sh
- get the information from
num-<word>-per-canto.txtand format it into acsvfile for use in a spreadsheet program- csv format:
Canto Number in <canticle>, Instances of <word>,, Canto Number in Comedy, Instances of <word>
- csv format:
These scripts are not meant to be exact, polished, or well-commented. Please let me know of any issues.