Application to read in some plain text files, and generate (in manual or auto mode) a document of specified length. The first word is selected at random (auto) or selected by the user (manual), and subsequent words are selected randomly from the list of words that follow the preceeeding word from the source text.
There are three command line parameters used:
- 'auto' or 'manual'. If manual is specified, you will be prompted to select the first word
- number of words to output (an integer)
- filename of the config file (which contains a list of files to read, one filename per line)
Directory path for files is: <userDirectory>/IdeaProjects/Shake/
Example directory:
(base) [531] ~/IdeaProjects/Shake $ ll
total 864
-rw-r--r--@ 1 i834513 staff 141939 Jun 14 01:06 combo.txt
-rw-r--r--@ 1 i834513 staff 9 Jun 14 18:25 config1.txt
-rw-r--r--@ 1 i834513 staff 13 Jun 14 18:27 config2.txt
-rw-r--r-- 1 i834513 staff 53033 Jun 14 01:18 const-dec.txt
-rw-r--r--@ 1 i834513 staff 44952 Jun 14 00:11 constitution.txt
-rw-r--r--@ 1 i834513 staff 8120 Jun 13 23:22 declaration.txt
-rw-r--r--@ 1 i834513 staff 88904 Jun 14 01:05 macbeth.txt
Example command line: java Shake auto 650 config1.txt