Skip to main content

Intellireading-cli is a Python library with a set of tools to improve your reading experience

Project description

Intellireading.com

Standalone tool and library

PyPI - Version PyPI - Python Version Deploy to ghcr.io Lint Test

Intellireading is a CLI tool with commands to accelerate your reading experience. It can also be used as a python library. Currently, it supports metaguiding an EPUB, KEPUB, XHTML, or HTML file (more features coming):

> intellireading metaguide-epub --input_file mybook.epub --output_file mybook_metaguided.epub

Example of a text converted to a metaguided text: Intellireading.com

This repo is part of the Intellireading project, which aims to help people with dyslexia, ADHD, or anyone who wants to improve their reading focus and speed.

Other Intellireading Code Repositories

  • Intellireading website, which allows anyone to convert an Epub to the metaguided version.
  • API Server, that support the Intellireading website.
  • CLI Tool. A standalone tool and library that can be used to metaguide epub files.
  • Calibre Plugins. A set of plugins that can be used to metaguide epub files using Calibre.

What is Epub Metaguiding?

Metaguiding is a technique that can be used to improve your reading focus and speed (sometimes called Bionic Reading). It is based on the idea that you can use a visual guide to help your eyes focus on the text you are reading. In this case, the visual guide is done by bolding a part of the text, creating visual anchors that your eyes can use to focus on the text. This is similar to the way a finger can be used to guide your eyes along a line of text, which has been shown to improve reading speed and focus. (study: "Does finger-tracking point to child reading strategies")

However, unlike a finger, the visual guide is not distracting, and it can be used to guide your eyes along multiple lines of text at once. This allows you to read faster, and with less effort.

Metaguiding is particulary useful for people with dyslexia or ADHD, but it can be used by anyone who wants to improve their reading focus and speed. For more information, visit the Intellireading website.

Features

Intellireading commands can be used to:

  • Metaguide an EPUB file: Metaguide an EPUB file, transforming it into a metaguided EPUB file, by transforming all XHTML files in the EPUB file into metaguided XHTML files.
  • Metaguide an XHTML file: Metaguide an XHTML file, transforming it into a metaguided XHTML file.
  • Metaguide a directory: Metaguide all files in a directory, transforming all EPUB, XHTML, and HTML files into metaguided files.

Installation

Intellireading is a command line tool that can be used in Windows, Linux, and MacOS. It is written in Python and can be used as a module or as a standalone tool, as long as you have Python >3.7 installed (or Docker).

pip

To install it, you can use pip:

> pip install intellireading-cli
> intellireading --help

From source code

You can also install it from the source code:

> git clone https://go.hugobatista.com/gh/intellireading-cli.git
> cd intellireading-cli
> pip install .
> intellireading --help

Docker

Alternatively, you can use the Docker image:

Help command

> docker pull ghcr.io/0x6f677548/intellireading-cli:latest
> docker run -it --rm ghcr.io/0x6f677548/intellireading-cli --help

Metaguide an EPUB file

Linux/MacOS
```linux
> docker run -it --rm -v $(pwd)/tests:/tests ghcr.io/0x6f677548/intellireading-cli metaguide-epub --input_file '/tests/test_files/input.epub' --output_file '/tests/test_files/output.epub'
Windows
> docker run -it --rm -v ${pwd}/tests:/tests ghcr.io/0x6f677548/intellireading-cli metaguide-epub --input_file '/tests/test_files/input.epub' --output_file '/tests/test_files/output.epub'

Usage

All available commands and options can be seen by using the --help option.

> intellireading --help

To get help on a specific command, use the --help option with the command name. For example, to get help on the metaguide-epub command, use the following command:

> intellireading metaguide-epub --help

Intellireading is based on Click, taking advantage of its features, such as chaining commands and options.

Usage Examples

Metaguide an EPUB file

To metaguide an EPUB file, use the metaguide-epub command. The command requires the path to the EPUB file and the output file. The output file will be a metaguided epub file.

> intellireading metaguide-epub --input_file mybook.epub --output_file mybook_metaguided.epub

Metaguide a XHTML file

To metaguide an XHTML file, use the metaguide-xhtml command. The command requires the path to the XHTML file and the output file. The output file will be a metaguided xhtml file.

> intellireading metaguide-xhtml --input_file mybook.xhtml --output_file mybook_metaguided.xhtml

Metaguide all files in a directory

To metaguide all files in a directory, use the metaguide-dir command. The command requires the path to the directory and the output directory. The output directory will contain all metaguided files, including epub, xhtml and html files.

> intellireading metaguide-dir --input_dir mydir --output_dir mydir_metaguided

Experimental Features

Some features are still experimental and may not work as expected. Use them with caution.

Remove metaguiding

The remove metaguiding feature allows you to remove metaguiding from previous metaguided files. This implementation is still experimental and may not work as expected, since it is not possible to recover the original text. The current implementation tries to remove the metaguiding by removing the bold tags from the text, but that may imply in some original text format loss.

Remove metaguiding from an EPUB file

To remove metaguiding from an EPUB file, use the --remove_metaguiding flag. The command requires the path to the EPUB file and the output file. The output file will be an epub file without metaguiding.

> intellireading metaguide-epub --remove_metaguiding --input_file mybook_metaguided.epub --output_file mybook.epub

Remove metaguiding from a XHTML file

To remove metaguiding from a XHTML file, use the --remove_metaguiding flag. The command requires the path to the XHTML file and the output file. The output file will be an xhtml file without metaguiding.

> intellireading metaguide-xhtml --remove_metaguiding --input_file mybook_metaguided.xhtml --output_file mybook.xhtml

Remove metaguiding from all files in a directory

To remove metaguiding from all files in a directory, use the --remove_metaguiding flag. The command requires the path to the directory and the output directory. The output directory will contain all files without metaguiding, including epub, xhtml and html files.

> intellireading metaguide-dir --remove_metaguiding --input_dir mydir_metaguided --output_dir mydir

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

intellireading_cli-2.1.0.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

intellireading_cli-2.1.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file intellireading_cli-2.1.0.tar.gz.

File metadata

  • Download URL: intellireading_cli-2.1.0.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for intellireading_cli-2.1.0.tar.gz
Algorithm Hash digest
SHA256 9f7382fb3736f7723489b1d9cefdd284710c61ad9a0f0d6da1e1f26470e2ea23
MD5 2bd546b4017847580f2d2fac13f6b144
BLAKE2b-256 a5644a942237224047bb8f713318e966b1ae031079c2c2bcdd44c7a5c30b0d86

See more details on using hashes here.

Provenance

The following attestation bundles were made for intellireading_cli-2.1.0.tar.gz:

Publisher: build-and-publish-to-pypi.yml on 0x6f677548/intellireading-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file intellireading_cli-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for intellireading_cli-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09ac73af788e58592298f31e9c6890910977f46800758a8fd03e6fba61556624
MD5 bd63744ea56df699c087d3ef5be2291c
BLAKE2b-256 8f59b5ce86911d1b33ddc5a4f84134150c5afd4a0e01f01844cc1e88843425c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for intellireading_cli-2.1.0-py3-none-any.whl:

Publisher: build-and-publish-to-pypi.yml on 0x6f677548/intellireading-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page