Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

retext.sh

Patrick Pedersen edited this page Nov 16, 2018 · 3 revisions

Source

After modifying the text settings on an EPUB, there is no official way to revert the EPUB to its initial state. This obnoxious flaw can be solved by this host sided script, which can revert the text settings of EPUBS back to their default.

Dependencies

In order for this script to function as intended, the following software must be available on the host machine

Usage:

Usage: repull.sh [-h] [-r ssh_address] path_to_epub1 [path_to_epub2 ...]

Options:
-v		Display version and exit
-h		Display usage and exit
-r		Access device remotely

Example:

Reset text settings of /Books/Book.epub with the device connected via USB

$ bash retext.sh /Books/Book.epub

Reset text settings of /Books/Book.epub remotely (Where 192.168.42.255 is the ip of the device)

$ bash -r 192.168.42.255 retext.sh /Books/Book.epub

Usage Guide

This guide attempts to describe an typical execution of this script

1. Downloading/Installing the script

To download this script, we will be using wget, an application present on most bash compatible systems by default

wget https://github.com/reHackable/scripts/raw/master/host/retext.sh

From here on, you may opt to copy the script to a path defined in the $PATH variable so that it can be executed directly from the terminal

2. Executing the script

It is important to note, that the device must remain unlocked until the script has completed

Assuming our device is connected via USB, we may execute the script on /Foo.epub and /Foo/Bar.epub

$ retext /Foo.epub /Foo/Bar.epub
Attempting to establish connection with the device...
Successfully established connection, please do not lock your device until the script has completed!
Resetting epub(s)...
Applying changes...
Done
Clone this wiki locally