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 Feb 12, 2018 · 3 revisions

Source

After applying new text settings on an epub, there is no official way to revert them back to its initial state. This obnoxious flaw can be solved by this host sided script, which reverts the text settings of one or more epubs back to 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:
-h		Display this usage guide
-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'll be using wget, a 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 /Diary.epub and /EE/Digital.epub

$ retext /Diary.epub /EE/Digital.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

3. Done

If all steps have been followed correctly, the device interface has restarted and the text settings epubs have been successfully reverted to default. Note that the epubs may take a while to load as their cache has been cleared.

Clone this wiki locally