Skip to content

Commit

Permalink
Merge pull request #2 from BastiTee/feature/dev-0.3.0
Browse files Browse the repository at this point in the history
0.3.0 Development
  • Loading branch information
BastiTee authored Aug 21, 2023
2 parents df08f39 + e46389a commit b26cca6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.3.0

- Add language support for FR, IT, NL

## 0.2.0

- Improve quote handling of highlights with notes
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
![PyPI](https://img.shields.io/pypi/v/tolino-notes)

Tolino stores your highlights and notes in a `notes.txt` file on your device. However that file has a strange structure and mixes books when you read multiple ones at a time.
Tolino stores your highlights and notes in a `notes.txt` file on your device. However that file has a strange structure and mixes books when you read multiple ones at a time. And the content depends on the language-setting of your device.

This project tries to close the gap by doing the heavy-lifting of parsing the file, sorting and converting to a commonly used format such as Markdown or JSON. – one file per book found in your `notes.txt`.

Expand All @@ -16,8 +16,7 @@ Where do I find this file?

## Install and use

This is a Python program. Install it using `pip` / `poetry` or similar [from PyPi](https://pypi.org/project/tolino-notes/).
If you don't yet have `pip` installed, [go here first](https://pip.pypa.io/en/stable/).
This is a Python program. Install it using `pip` / `poetry` or similar [from PyPi](https://pypi.org/project/tolino-notes/). If you don't yet have `pip` installed, [go here first](https://pip.pypa.io/en/stable/).

```shell
$ python -m pip install tolino-notes
Expand Down Expand Up @@ -50,15 +49,12 @@ $ tolino-notes --input-file notes.txt --output-dir output-dir --format md

- Successfully in use with Tolino Shine 3.
- Supports extraction and conversion of highlights, bookmarks and notes.
- Support for DE, EN and ES device-language settings, which is detected automatically.
- Support for DE, EN, ES, IT, NL, FR device-language settings, which is detected automatically.
- Supported output formats are Markdown and JSON.

Limitations:

Due to the unstructured nature of the `notes.txt`, it is a best-guess approach.
The `notes.txt` format writes notes sequentially and it is not always clear in which order notes were taken.
Also separating notes and highlights can only be done based on "quotes", which is not the most robust approach.
In general, I believe 99% of your notes and highlights should be extracted properly.
Due to the unstructured nature of the `notes.txt`, it is a best-guess approach. The `notes.txt` format writes notes sequentially and it is not always clear in which order notes were taken. Also separating notes and highlights can only be done based on "quotes", which is not the most robust approach. In general, I believe 99% of your notes and highlights should be extracted properly.

Use the [issue tracker](https://github.com/BastiTee/tolino-notes/issues) to let me know about ideas and issues.

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[tool.poetry]
name = "tolino_notes"
version = "0.2.0"
version = "0.3.0"
description = ""
license = "Apache 2.0"
authors = ["Basti Tee <basti.tee@posteo.de>"]
maintainers = ["Basti Tee <basti.tee@posteo.de>"]
readme = "README.md"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Natural Language :: English",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
Expand Down
24 changes: 24 additions & 0 deletions tolino_notes/tolino_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,30 @@
'bookmark_prefix': r'^Selección en la página ',
'date_format': r'%d.%m.%Y %H:%M',
},
'nl': {
'cdate_prefix': r'^Toegevoegd op ',
'cdate_changed_prefix': r'^Gewijzigd op ',
'highlight_prefix': r'^Markering op pagina ',
'note_prefix': r'^Notitie op pagina ',
'bookmark_prefix': r'^Bladwijzer op pagina ',
'date_format': r'%d/%m/%Y %H:%M',
},
'it': {
'cdate_prefix': r'^Aggiunto il ',
'cdate_changed_prefix': r'^Modificato il ',
'highlight_prefix': r'^Evidenziazione a pagina ',
'note_prefix': r'^Nota a pagina ',
'bookmark_prefix': r'^Segnalibro a pagina ',
'date_format': r'%d.%m.%Y %H:%M',
},
'fr': {
'cdate_prefix': r'^Ajouté le ',
'cdate_changed_prefix': r'^Modifié le ',
'highlight_prefix': r'^Surlignement en page ',
'note_prefix': r'^Note en page ',
'bookmark_prefix': r'^Signet en page ',
'date_format': r'%d.%m.%Y %H:%M',
},
}


Expand Down

0 comments on commit b26cca6

Please sign in to comment.