Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : CMM2 - Gutenberg - ebook collection/reader
Author | Message | ||||
Goksteroo Senior Member Joined: 15/03/2021 Location: AustraliaPosts: 110 |
This programme was written so that books from the Project Gutenberg's vast library can be read on the Maximite 2. Although the books are now copyright free, Project Gutenberg does require users to be aware of the license to use the files from the collection. The full Project Gutenberg License follows these instructions. Gutenberg is a basic text file reader. It will use the system font and video resolution. REM'd out MODE and FONT commands can be edited to change from your system defaults early in the programme. Character width of the page can be changed on the fly to make reading easier and losing your place harder. This is a problem for me so I run a width of 60-80 characters in my mode 12 screen. Original pen and background colours are used initially but these can be changed within the programme. Progress in reading a book can be saved and will automatically resume at this point when that book is next read. There are 3 book lists, each having 20 books to choose from. The first book displayed contains these instructions and Gutenberg's full license, hence there are 59 novels from Gutenberg's library. Instructions: Last line of screen will display current selection choices. Book selection screen: Up/Down arrow keys to highlight book you want to read. [SPACE] to read selected book. [1], [2], [3] select book list - 20 books per page Left/Right arrow keys to cycle through colour schemes (including original) - edit last DATA lines to change colours schemes to suit your tastes. [Q] to quit programme Reading screen: [SPACE] turn page Up/Down arrow keys or Page Up/Page Down keys will skip forward/backwards through file (skip is 70% of screen size - about 1 page!) - a fast way of flipping though a book to find a lost reading point or to back up after you've dozed off. No PAUSE command in routine so faster than just turning pages normally. Left/Right arrow keys to cycle through colour schemes including original [1] to [0] keys to change number characters displayed on each line - each key is 10% of full character count for a mode/font combination. [S] save read position [Q] quit to main menu The reading screen header will show the name and author of the book being read. The right side of the header will show the current saved reading position of the book - use this to check that the read pointer has been updated after being saved. The footer will show possible keys and their actions. The left side of the footer will display % of book read. My personal preference is to use font 4 for reading (font 2 being a close 2nd) and mode 12 with a resolution of 960x540. A character count per line of between 60 and 80 is good for me as I find this easier to scan from the end of one line to the beginning of the next without loosing my way. Problems/issues/stuff: Some of CMM2's fonts only contain characters 0-127. All book files are characters 0-127 only so that any of the fonts (except 6 of course!) will display all of the text characters making up the book. The book files have been edited by a couple of short programmes to remove LF/CR within paragraphs so that books can be displayed in any mode/font combination. This may have lead to some errors in layout that I have not caught. Please let me know if/when you find any. Because of the number of mode/font/character count per line combinations I have not been able to accurately jump back/forward 1 page at a time. The skip back/forward uses an approximation (70% of page character count) and so is not accurate. I have played with pre-calculating pages but this takes just too long (especially on the very long files) unless fixed modes/fonts are used, and would have to be re-calculated when ever character count per line was changed. "Any mode/font combination" is a brave statement and probably not entirely accurate. Low resolution modes and large sized font may cause issues! Geoff Camp, aka Goksteroo - goksteroo@gmail.com gutenberg.zip |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 2989 |
Kudos. Encyclopedic might be the word for it. Thanks. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
paceman Guru Joined: 07/10/2011 Location: AustraliaPosts: 1321 |
This is a great effort Geoff, congratulations and thanks very much. Greg |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 2989 |
Thanks for the update. (For continuing development/discussion on the same topic, it's probably better to continue a thread than to start a new one.) PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
mclout999 Guru Joined: 05/07/2020 Location: United StatesPosts: 430 |
First Off very nicely done. I love it. I was wondering if you had any plans for a file picker or some other facility so you can load additional books? Thank you for this great addition to the CMM2. |
||||
Goksteroo Senior Member Joined: 15/03/2021 Location: AustraliaPosts: 110 |
'Yes' is the short answer.... the longer answer is 'maybe... depends'! Because many of the CMM2's fonts only contain the ASCII characters 1-127, and because I wanted the reader to display in any font/mode combination, and because most of the books in the Gutenberg Project's library are encoded as UTF-8 and use the extended ANSI character set.... I have had to convert the books to pure ASCII text files with CR/LF removed from within paragraphs. Originally I was using Notepad+++ to convert files to ANSI characters and then searching the files for characters 128-255 and replacing them appropriately. An all in one programme would be nice and so I've had some learning about UTF-8 coding to do so I can strip it from a text file and replace the Unicode bytes with the appropriate ASCII character/s. The more I learn about UTF-8 encoding, the more complex a job it seems. I have started to refine and combine these codes into one programme and hopefully will complete it soon. Goksteroo. |
||||
jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 532 |
Hi Goksteroo, maybe can be also good idea to use proportional font (PropText library )? I tried some of the books in new Napoleon Commander prop-viewer (ALT F4) and it looks better than in pure ASCII viewer... Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), CMM2.fun |
||||
Goksteroo Senior Member Joined: 15/03/2021 Location: AustraliaPosts: 110 |
Sounds like a good idea - I've downloaded your code and will have a go during the week when life allows it. Geoff |
||||
Print this page |