AVATER help

Annotation Viewer and Tools for (PocketBook) E-Readers (AVATeR) [v0.9.8]

Interactive annotation viewer/exporter for PocketBook e-readers, with additional tools.

We do:

We don’t:

Some highlights

Requirements

Supported E-Reader devices

PocketBook readers, with recent 6.x firmware.

Older firmware versions (5.x) are likely only partially supported - we are open to feedback.

Windows

Linux

Performance notes

Configuration files

The data directory [C] may be synced across devices. The generic settings [A] are then configured locally, but this can be overridden using the CLI. However, these settings are few and easily reproduced.

Configuration file precedence / overrides

Option (4) is the default situation. Any earlier condition takes precedence / overrides the default.

1. Portable mode (See below and "CLI Options")
2. CLI provided locations
3. GUI configured data location (settings dialog)
4. Default locations (Qt derived) if not provided by (2) and (3)

Portable mode

Stores all settings and files in the application directory ‘<APP_DIR>’:

- avater.conf: <APPDIR>/avater.conf
- data: <APPDIR>/data/
- devices.conf: <APP_DIR>/data/devices.conf

CLI Options

- - help

Show available options.

- p / - - portable

Run application in portable mode.

Note: To convert a default ‘data’ directory for use with portable: copy/move it into the application directory. See also Settings and files.

- - settingsdir

Overrides the location of the generic avater.conf file.

- - datadir

Overrides the location of both the default/user-set data directory, and the therein stored devices.conf file.

- - debug

Enable debug logging. The log is accessible under the help menu. Alternatively, enable this under “settings > advanced”.

Notes

Main

Rescan devices (F5)

Scans system for new or removed devices. This includes:

Both USB devices, and local mirrors (0.9.8+) are removed if not found (removed from the program, not unmounted; for local mirrors no files are removed).

Open datadir path

If created, opens the ‘data’ directory using the OS’ file browser. See configuration files. Note: After the first startup, this directory may not yet exist.

Settings

Opens the settings dialog. (yet undocumented, but hovering over labels/options will show ‘tooltip’ pop-ups with information)

Eject all devices

Removes all USB devices from the program - but does not unmount these from the OS.

Device profiles menu (unavailable)

If multiple annotation profiles exist, these are shown here. Changing profiles in the GUI is not yet implemented (but trivial to implement).

Device Toolbar

Scan for devices button (optional)

Scans system for new or removed devices. See also Rescan Devices

Eject device button

Removes the device from the program. This does not unmount the device.

If the device has a ‘local db mirror’, the device entry is kept, is labeled as disconnected, and any references to the device are purged. Ejecting ‘local mirrors’ does nothing.

Device selector

Select one of multiple devices or locally mirrored devices.

Connected devices

Connected devices are indicated by addition of an e-reader icon, and a “connected” text-label. Entries without these are so-called local mirrors.

Switching

Switching between devices loads the annotations for the selected device (unless disabled under settings > Annotationsviewer). Previously loaded annotations are kept in memory until the device is removed from the program (for local DB mirrors this will not occur).

Custom device label

You may add a custom label using “Device Tools > Set Devicelabel”. For example the model type.

(Device) Tools

Available tools may differ per device and vendor.


Send files to device

This tool copies system files, such as apps and fonts, to their appropriate folders on the reader memory (or card memory).

It’s mainly intended for (partially) restoring backups generated by the program.

Currently supports sending the following system/app files:
- .acsm (adobe digital download file)
- .app
- .dic (dictionary)
- .pbi (dictionary/app)
- .ttf (font)
- .otf (font)
- .ttc (font)
- .bin (update file)
.ZIP support

Files stored in .zip files, such as backup archives, can be processed and -if supported- extracted by the program.

Note that marking such a file for deletion, will delete the parent archive, not the individual file.

Uploading of eBooks or ACSM downloading?

Not implemented yet. ACSM downloading is a planned feature.


Manual Backup Device

Creates a common .zip backup archive with selected device content.

Type of files to backup:

Compression

e-Books and dictionary files tend to be already (maximally) compressed. As such, these are simply ‘stored’ in the .zip archive, saving (processing) time.

Backup integrity, testing and long term storage

Ideally the end-user (you) would tests back-ups, which is not practical. The program employs some precautions to ensure correct storage, and will (attempt to) warn on failure.

Regarding data integrity: the .zip format’s internal checksums can (only) indicate data corruption after storage or transmission. Depending on the value of your data, consider a good backup strategy, and hardware/software integrity features (ECC, ZFS, etc.).


Check DB integrity

This tool checks both device and locally mirrored databases (DBs) for errors. It utilizes SQLite’s “integrity_check” feature in part.

Should any errors be indicated, click on “Show Details” for more information. Warnings regarding so-called ‘WAL’ files, or “database not found” are quite harmless; any other errors types can indicate serious issues, usually implying that DB is unrecoverable. However, you may still attempt to recover part or whole of the DB using third party recovery tools (SQLite’s CLI tool offers some free options). Success cannot be guaranteed, and as such, we do not offer a recovery tool.

Note: ‘WAL file’ related errors may be ignored, and may not persist across checks. Errors relating to opening databases may occur when the device monitor is disabled (by user or a failure to start), and a device was disconnected.


Merge/Fix annotations on device

This allows merging of bookmarks/annotations for similar e-books.

After an e-book file is changed on the device, it may be treated as a new book. Examples are re-downloading encrypted public library e-books. Afterwards, annotations from the previous file may no longer show for the ‘new’ file.

This tool searches for such duplicated titles, and (interactively) modifies associated annotations to point to the (highest) ID representing the ‘newest’ book entry.

If you are sure the child items refer to the same book (see warnings), you may check these. Clicking the parent checks all child items. Next, click ‘Ok’ to apply the merge/fix.

Warning:

Note: The PB database design tends towards adding or duplicating entries instead of modifying them. However, to avoid excessive duplication, this tool modifies data in-place.


Local DB mirror

Mirrors a device its databases locally, for accessing annotations when a device is disconnected.

If enabled for a device, the local mirror is updated whenever that device connects to the program. Annotations are then reloaded (or manually using “Reload annotations”).

This is a basic local caching solution, that leverages existing device support. A future centralized database is being considered.

Warning regarding dual use as ‘autobackup’

Beware that a device reset (which resets the device DBs) will be carried over into the local mirror, thus erasing any previously locally stored annotations. Should you want to reset a device, store a manual backup before resetting. This backup can be imported to keep access to the annotations.


Add Devicelabel

The label provided here, will be shown in the device selector.


Load annotations button (optional)

Only visible when auto-loading annotations is disabled (see settings). If your device is slow, this may improve startup time.

Annotation Viewer

The viewer displays annotation (meta)data in multiple columns.

Column visibility

Can be toggled by right-clicking in the ‘header’ bar (i.e. with “Title”, “Page”). By default, the “Date” and “Authors” columns are hidden.

Highlight/note texts

Double clicking on the highlight or notes cell, allows selection and copying of text fragments. Note: Newlines are currently not shown.

Highlight/note coloring (0.9.8+)

Highlight colors can be shown (since 0.9.8), with an optional color text abbreviation. See Additional options..

Future AVATeR versions intend to allow editing of each annotation’s highlight color.

Viewer context menu

The viewer context menu (right-click), offer short-cuts for filtering on that row’s fields.

Searching annotation data

Allows interactive searching. Text searches are delayed, to reduce CPU usage. The duration can be changed under “settings > Annotation Viewer”.

Case sensitivity

Case sensitivity can be toggled under the Viewer Tools menu (right-most button).

Regular Expression support

Currently implemented only for “Search highlights/notes”. A general grasp of ‘common’ regular expression syntax will be beneficial. Some examples:

Note: This is still a basic feature. If you have a specific use-case, feel free to inform the authors.

Sorting annotations

The following sorting modes are available:

Note: Custom sorting is partially implemented, and does not persist across restarts.

Case sensitivity can be toggled under the Annotation Viewer menu.
Lastly, sorting of exported annotations can be configured separately.

Additional options

Accessible via the right-most tools button.

Exporting annotations

Selected annotations can be exported to file or the clipboard, using the buttons “To File…” or “To Clipboard” (in the bottom export toolbar). A short-cut is available via the context-menu (right-click on a viewer annotation row).

Note: ‘note inlining’ should be carried over into the note export. This may become optional in the future.

Notes, PocketBooks: Highlights edited on PB devices using that device’s Notes app, may lose their page and highlight location data.

Other Topics

Known Issues

If you can help test this, please contact the author(s). For extra safety, first disable “loading annotations” (under settings), restart the program, and then try (this avoids database access).

Minor issues:


FAQ

Reader device is not recognized or shown

First, ensure the reader files are accessible from the OS (i.e. is mounted). Otherwise, the program will (silently) ignore the e-reader. For example, some Linux distributions will show but only mount filesystems upon user (UI) action.

Ensure your device is supported by this program. Also, newly introduced devices may use a new (USB) vendor ID, which must then be added to the program.

If your computer is slow and/or older, consider increasing the “mountDelay” time under “settings > advanced”.

Steps you may try in addition:

If the problem persists, enable debugging and inspect the program logfile.

Columns are compressed or text is invisible

This occurs when saving column-sizes on an empty table; it should normally not occur.

To fix: right-click the annotation viewer header row (with “Author”, “Title”, etc.) and select “Reset to Default”.

In case that fails:

  1. Stop the program, or else the ‘faulty’ entries will get saved again.
  2. Locate the avater.conf file (see start of the logfile)
  3. Remove two lines from avater.conf labeled “table_columnsettings”: one below the “[viewer]” line, and the other below the “[uploader]” entry.

Is the device data(base) safe?

This program’s read-only functions should(!) not be able to cause damage. We do not continuously access DBs, preferring to import data instead (at the cost of memory), minimizing the window of risk.

Program functions that modify the device’s DBs are inherently dangerous: these are the “merge/fix annotations” and “restore reading progress”:

  1. First, always make a backup before using these tools (you are prompted to do so).

  2. Second, take care not to disconnect the device when running these tools (take special care with worn out USB ports or cables: even a nudge can cause a disconnection).

These functions are not excempt from programming mistakes and/or compatibility problems, such as database changes after firmware updates. Checks for the latter are still in development.

Lastly, note the SQLite database (DB) commonly used by (embedded appliances such as) e-readers is robust DB format, widely used and well tested.


Appendix: PocketBook recovery details

Over time, in discussions some topics come up repeatedly.

We provide no support for, and assume no responsibility for, trying out the discussed recovery aspects.

Configuration files and settings

The various PB configuration settings files (.cfg, .dat, etc) cannot be modified. This is due to a hash signature, prompting the reader to revert to the backup file.

In case of problems, deletion can be considered, but this rarely solves problems. If so, also remove the .back copy, which is otherwise restored.

Manual recovery of fonts, dictionaries and apps

Fonts, dictionaries and apps may be restored by loading a backup archive with the “send files” tool.

Note the backup archives produced by this program are standard .zip archives. Any .zip extraction utility should be able to extract files. In addition, files are stored in their original (device-relative) paths. These may change however between firmware versions.

Manual recovery (database files)

Restoring database files is risky and should be avoided. However, if devices have identical firmware and e-book file paths, a chance of success exists. Often there is little to lose: at worst the device can be reset again.

Database types

For PocketBooks, the main DBs of interest are:

Caveats

Consider the sources of complications when replacing databases:


History/changelog/roadmap

See changelog.txt

Originally this was a set of tools for PB readers. The annotation HTML exporter was made interactive, and made the centerpiece of the UI.


Design philosophy

We mainly provide a basic set of tools, focused on being generic and adaptable to new situations.

Content can be best managed by the e-reading device or specialized programs.

The current implementation integrates several components: an underlying reader management layer (using standard library functions, and Qt SQL functions), a Qt based mainwindow, with an integrated annotation viewer, and several tools. Future versions may see these components being split out.


Roadmap


Donation/purchasing

At the moment, you are encouraged to donate if you are able to do so. This may change in future versions, if there are valid reasons (support load, etc.).


Privacy


Support / Bugs / Feature requests / etc

Please see the website for more information.


Copyright (C) 2021-2022 Authors (See “help > about” or authors.txt)

This software is provided ‘as-is’, without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.