From 7abe5050b42ec785cd268e332741486a413deffe Mon Sep 17 00:00:00 2001 From: lhess Date: Mon, 3 Jan 2022 20:39:03 -0500 Subject: [PATCH] Update README --- README.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7946021..f1aad0d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,38 @@ # divina-commandline -Divina Commandline is a word search tool for the Divine Comedy. \ No newline at end of file +_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 `sed` a 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--.txt` +* apply a blacklist of unnecessary words -> text file `useful-words--.txt` +* highlight the five most useful words in each canto to view in a file pager `highlighted-words--.txt` + +__`find-word.sh`__ +* ask user for a word and `grep` the word in each `all-words--.txt` file -> text file `num--per-canto.txt` +* sort this output to show which cantos have the most instances of the word -> text file `sorted-num--per-canto.txt` + +__`count-total.sh`__ +* ask user for a word and sum the counts from `num--per-canto.txt` to get a total count of the instances of the word in the _Comedy_ + +__`spreadsheet-num-words.sh`__ +* get the information from `num--per-canto.txt` and format it into a `csv` file for use in a spreadsheet program + * csv format: `Canto Number in , Instances of ,, Canto Number in Comedy, Instances of ` + + +* * * + +These scripts are not meant to be exact, polished, or well-commented. Please let me know of any issues. \ No newline at end of file