Skip to main content

Build Status

Description - what, why and how

This library allows you to get basic data from Moon+Reader notes and statistics files either local or remote (Dropbox support is currently available).

Moon+Reader is one of the best ebook readers I've tried for Android OS with lots of functionality. The features I use a lot are creating notes when reading books and having them syncronized with my dropbox account. One day I thought that it would be great to write a library for parsing those files and obtaining data from them, as a result this library is being developed.

Installation from source

This requires poetry for the installation

git clone https://github.com/MrLokans/MoonReader_tools
cd MoonReader_tools
poetry build && poetry install

Installation from PyPI

pip install moonreader_tools

Usage as CLI utility

It is assumed that you're the MoonReader+ Pro user and have Dropbox linked to your reader app. If you're reading and creating highlights you'll be having lots of files in the syncronized folder (e.g. Dropbox/Books/.Moon+/Cache)

To get JSON data about all of your books you may use CLI entry to get data from dropbox or local folder:

moon_tools --path <path/to/moonreader/cache> --output-file <outfile>.json

moon_tools --dropbox-token <DROPBOX TOKEN> --output-file <outfile>.json

Usage as library

import dropbox
from moonreader_tools.finders import FilesystemFinder, DropboxFinder

# We may look for books in FS directories
extractor = FilesystemFinder(path="/dir/with/moonreader/files")
books = extractor.get_books()
for book in books:
    print(book.title)
    for note in book.notes:
        print(note.text)

# And in the dropbox

client = dropbox.Dropbox(access_token='MYSECRETTOKEN')
extractor = DropboxFinder(client, books_path='moonreader_save_dir')

books = extractor.get_books()
for book in books:
    print(book.title)
    for note in book.notes:
        print(note.text)

Running tests

make test

Formatting codebase

make format

Metadata

Release files for moonreader-tools 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moonreader-tools 2.0.0
File Size Uploaded
moonreader_tools-2.0.0.tar.gz 14.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for moonreader-tools 2.0.0
File Interpreter ABI Platform
moonreader_tools-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.0 kB

Release files / moonreader_tools-2.0.0.tar.gz

Download URL moonreader_tools-2.0.0.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
16bd4fbfd4d1f1018e44847c5baecf22425d293d6704b3e05246cc84c2c7cefe
BLAKE2b-256 checksum
How to use checksums
6f1833f97deb7abf64586a52a6c02be06f0280a1ef61dc8b76b153b56765572f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.8.12 Darwin/22.1.0

Release files / moonreader_tools-2.0.0-py3-none-any.whl

Download URL moonreader_tools-2.0.0-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5745c55ef665fd75b44e01fdb7da4d7be0b348b29d70d718a06bbb4fc062e34b
BLAKE2b-256 checksum
How to use checksums
de7aea3b03e164206ef71ca030aaeb0e1ea1bfc015c9887ffc53a66fd9ad1fd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.8.12 Darwin/22.1.0

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

0.9.4

2 release files

0.9.2.1

1 release file

0.9.2

1 release file

0.9.0

2 release files

0.8.9

2 release files

0.8.8

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page