This repository contains PowerShell scripts to automate exporting notebooks from a Kindle Scribe, converting them to PDF, and integrating them into Logseq.
The script can be left running, when you want to sync the notebooks from your kindle scribe to your pc and logseq, simply plug it in through usb. The script will watch for the connection, check for any new or changed notebooks, convert them to pdf, and add them to the LogSeq page "Scribe Notebooks.md".
The main script, scribe_watcher.ps1
, monitors for the connection of a Kindle Scribe device, exports the notebooks, converts them to PDF, and integrates them into Logseq.
Logseq.Kindle.Scribe.Sync.mp4
Ensure the following are installed:
- Calibre: An e-book manager. Info Here
- KFX Input Plugin: Required for handling Kindle formats. Info Here.
- LogSeq: The main intent is to add the Notebooks converted to pdf to logseq. It can also be used without logseq to just generate the pdfs from your notebooks. Info here
Run this script first, it will create a settings/config.ps1 file containing your configuration.
This script monitors for the Kindle Scribe device connection and triggers the export and conversion process.
Handles the extraction of notebooks from the connected Kindle Scribe.
Manages the process of adding the converted PDFs into Logseq.
You can manually modify the labels of specific notebooks in the notebook_labels.json
file. This JSON file maps unique notebook identifiers to custom labels. The specified label will be used as the filename for the corresponding PDF when generated.
{
"12345-abcde-67890": "Project Ideas",
"67890-fghij-12345": "Meeting Notes"
}
In this example, the notebook with the ID 12345-abcde-67890
will generate a PDF named Project Ideas.pdf
, and the notebook with the ID 67890-fghij-12345
will generate a PDF named Meeting Notes.pdf
.
The script uses these labels when setting the PDF filename:
$label = $jsonObject.Notebooks[$notebook.Id].Label
$pdfFilename = "${label}.pdf"
By updating the notebook_labels.json
file, you control the naming of the output PDF files.
- Ensure all prerequisites are installed and paths are correctly set in the scripts.
- Run
setup.ps1
script - Run the
scribe_watcher.ps1
script. The script will detect the device, export notebooks, convert them to PDF, and integrate them into Logseq. - Connect your Kindle Scribe to the computer.
- Calibre Not Found: Verify the
$calibrePath
and$ebookConvertPath
variables are correctly set and point to the appropriate Calibre installation directories. - Kindle Not Detected: Check that the
$deviceNamePattern
matches the connected device's name and ensure the device is properly connected.
Fork this repository and submit pull requests for improvements or additions.
This is just a script for convenience, all the actual heavy lifting is done by the Calibre KFX plugin, thank you jhowell, and everyone that contributed in this thread .
This project is licensed under the MIT License.