We present to you, OCindle, the e-reader for OCaml. OCindle uses a GUI interface that works on the terminal to allow you to read, highlight and bookmark books as well as search through notes and definitions.
This application was part of the final project for CS 3110: Data Structures and Functional Programming at Cornell University during Fall 2016.
- Aesthetically formatted pages
- Highlighting
- Bookmarking
- Note-making
- Searching for notes
- Searching for definitions
- Saving all annotations locally
- Displaying page numbers and percentage read
- Display a sorted list of notes and highlights (by color and indices)
(Assuming a fresh CS 3110 2016 Virtual Machine)
- Obtain WordNet-3.0 from
http://wordnet.princeton.edu/obtain
and place it insrc
. - Clone this repository onto the machine. Navigate to the cloned repo.
cd OCindle/src
- Enter the command
./wordnet.sh
into the terminal. The terminal should ask your permission to install a number of dependencies. - Enter the command
source ~/.bash_profile
into the terminal. - Enter the command
make
into the terminal and enjoy the OCindle experience!
Do NOT attempt to manipulate the size of the graphics window.
If a user would like to add a new .txt book, they can do so by placing a .txt file in one of the directories placed in the directory named bookshelves. The book's name must be uniquely named with alphanumeric characters. Furthermore, a file of the form .json must be created based on the examples available.
Type v while reading any text to see all the commands available.
o. Opens the current set of bookshelves on the user's folder.
c. Closes the current book.
Press any non-control key to return to the most recent page.
d. Next page.
a. Previous page.
1. Current color <-- black.
2. Current color <-- red.
3. Current color <-- blue.
4. Current color <-- yellow.
5. Current color <-- green.
6. Current color <-- purple.
b. Bookmarks current page. A bookmark is displayed on the top right corner.
h. Highlight the current page. The user will be prompted to select a start and end position on the screen.
n. Makes a note on the current page. The user will be prompted to select a location to tether the note and can write the note itself in the terminal. A note is denoted by a coloured dot at the tethered location.
q. Erases the bookmark on the current page.
x. Erases the selected highlight on the current page.
e. Erases the selected note on the current page.
s. Searches the current set of notes for the given word. After pressing this key, the user will be prompted to enter the search term on the terminal. If found, the corresponding notes will be displayed on a new page.
z. Displays the set of current highlights with their page numbers sorted by colour and then by indices. The user will be then be prompted to return to the book: pressing '/' returns to the last read page, while entering a valid page will take the user to that page.
m. Displays the set of current notes with their page numbers sorted by colour and then by indices. The user will be then be prompted to return to the book: pressing '/' returns to the last read page, while entering a valid page will take the user to that page.
w. Displays the meaning of the word selected by the user. The user will be prompted to highlight a word.
Sample Page | Highlights Added |
---|---|
View All Highlights | Search for Definitions |
---|---|
- Raghav Batra (rb698)
- Arnav Ghosh (ag983)
- Gregory Stepniak (gps43)