https://github.com/ltguillaume/ureader
Minimal code to present a preformatted plain text (or Markdown) document for comfortable reading on mobile and desktop.
https://github.com/ltguillaume/ureader
ebook ebook-reader markdown reader reader-ui reading
Last synced: 2 months ago
JSON representation
Minimal code to present a preformatted plain text (or Markdown) document for comfortable reading on mobile and desktop.
- Host: GitHub
- URL: https://github.com/ltguillaume/ureader
- Owner: ltguillaume
- License: agpl-3.0
- Created: 2022-05-07T19:36:00.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-02T08:24:04.000Z (about 2 years ago)
- Last Synced: 2025-03-05T08:36:21.902Z (over 1 year ago)
- Topics: ebook, ebook-reader, markdown, reader, reader-ui, reading
- Language: PHP
- Homepage: https://codeberg.org/ltguillaume/ureader
- Size: 343 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# uReader
by ltGuillaume: [Codeberg](https://codeberg.org/ltGuillaume) | [GitHub](https://github.com/ltGuillaume) | [Buy me a beer](https://buymeacoff.ee/ltGuillaume) 🍺
Minimal code to present a preformatted plain text document for comfortable reading on mobile and desktop. Some Markdown syntax is supported.

## Overview
- Pagination
- Font scaling
- Support for subfolders/chapters
- Keyboard, touch and mouse wheel navigation
- 3 themes: reading mode (blue background), dark and light
- NoScript support (without pagination, font scaling and theme switching)
- Partial Markdown support `#, ##, __, **, [](), ![]()` and HTTP(S) links
- Optional protection with a watchword, passed on directly as URL parameter or entered via a prompt
## Getting started
1. Copy the files to a server with PHP7+
1. (Optional) Copy `config.php.template` to `config.php` and set the variables to your liking
- For Apache, use `.htaccess` to prevent access to the contents directly
- For nginx, add something like this to do the same:
```
location / {
rewrite ^([^.\?]*[^/])$ $1/ permanent; # Add trailing slash for relative links
rewrite ^ /index.php; # Prevent access to anything except for index.php
}
```
1. Put the preformatted text in `contents.txt`, or Markdown formatted text in `contents.md`
1. For offering multiple books/chapters you can put `contents.txt`/`contents.md` into subfolders (and optionally add a `config.php` for per-book settings)
1. To share links that include the watchword, append `#ww=your%20watchword` to the URL (needs JavaScript to be enabled). The watchword will not be included in the server logs.
## Credits
* The [Fanwood Text](https://www.theleagueofmoveabletype.com/fanwood) font by Barry Schwartz