GithubHelp home page GithubHelp logo

johnfactotum / foliate Goto Github PK

View Code? Open in Web Editor NEW
5.0K 5.0K 245.0 24.72 MB

Read e-books in style

Home Page: https://johnfactotum.github.io/foliate/

License: GNU General Public License v3.0

Meson 0.89% JavaScript 92.14% HTML 6.97%
azw azw3 cbz ebook-reader epub fb2 gjs gtk mobi opds

foliate's People

Contributors

albanobattistella avatar archisman-panigrahi avatar bertob avatar frnogueira avatar fulvio-alves avatar gmou3 avatar habenamare avatar itprojects avatar johnfactotum avatar julroy67 avatar kleinheiti avatar lumingzh avatar m0rf30 avatar maronghappy avatar merlijn-sebrechts avatar not-chicken avatar oscfdezdz avatar pafri avatar rene-coty avatar reorr avatar schw0reismus avatar ser82-png avatar shibotto avatar soumyadghosh avatar tttranquilooo avatar tupubozu avatar vistaus avatar yakushabb avatar yoseforb avatar zluca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

foliate's Issues

"trace trap (core dumped) /opt/vlc-3.0/foliate/bin/com.github.johnfactotum.Foliate" after installing to a prefix

I am getting this error when running the exe:

[shlomif@telaviv1 ~]$ /opt/vlc-3.0/foliate/bin/com.github.johnfactotum.Foliate

(com.github.johnfactotum.Foliate:7133): GLib-GIO-ERROR **: 01:32:10.459: Settings schema 'com.github.johnfactotum.Foliate' is not installed
zsh: trace trap (core dumped)  /opt/vlc-3.0/foliate/bin/com.github.johnfactotum.Foliate
[crashes]
[shlomif@telaviv1 ~]$ GSETTINGS_SCHEMA_DIR=/opt/vlc-3.0/foliate/share/glib-2.0/schemas /opt/vlc-3.0/foliate/bin/com.github.johnfactotum.Foliate /home/shlomif/Download/Docs/Books/modern_svg_amelia_bellamy_royds_and_kurt_cagle.epub 
Gjs-Message: 01:32:36.393: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/main.js 1249]: reference to undefined property "atEnd"
[runs fine]

I used meson build --prefix /opt/vlc-3.0/foliate to build followed by cd build && ninja install.

Go to the next page with space?

This is hands down the best ebook reading app I've used on Linux!

I'd like to suggest adding space as an alternate shortcut for Go to the next page (and shift+space for Go to the previous page).

Change project name?

It looks like there's already a "FolioReader". It's not exactly the same as "Foliate", but they do use a leaf as their logo. I think that's way too similar. I'm open to suggestions if anyone has any ideas.

Would also need to migrate all the settings and files, which I'm unsure how to best implement. Or just let users copy the files manually?

CPU spikes when left open

Hi! Thanks for foliate.

Steps to reproduce the issue:
Open a ebook, scroll some page then left it open for ~1h
Screenshot_20190617_120546

Version: 1.2 and git master
OS: Fedora 30

Option to delete/change associated data after eBook file is deleted or moved

Books can be opened, but not closed, and thus not removed from the app.

Details:

  1. Open Foliate, pick an epub A.epub loads correctly if it exists

  2. Close Foliate

  3. Rename A.epub file to B.epub

  4. Open Foliate: home screen has two options - Open, Continue Reading

  5. Press Continue Reading: "Oh no!, The file cannot be opened"

Expected behaviour: if the file cannot be found then ask the user to remove it from the internal database (dconf gschema value com.github.johnfactotum.Foliate.last-file), or to replace it with the correct file name and location (keeping one's bookmarks etc).

Recently opened books list

It would be handy to have a list of recently opened books (5 or something like that), instead of 'Continue reading' option on a welcome screen.

Option to scroll through pages

Very nice application!
However I would like to see an option for flipping through pages with mouse scrolling, and also a hotkey for "Go Back" would be good.

Problems when using natural scrolling

When using natural scrolling there is an exchange between gestures for paging. In my opinion it is not intuitive that the next page opens with a swipe to the left. In the same epiphany, swipe to the right with two fingers, this is similar to the back button (alt + back arrow). If possible then exchange the appointment of gestures.
Fedora 30.
Install from flatpak and copr.

Please provide an AppImage for Linux

If a Snap app, PPA, or an AppImage should pop up after I publish this, do let me know so I can add it in.

https://www.omgubuntu.co.uk/2019/05/foliate-ebook-reader-linux

Providing an AppImage would have, among others, these advantages:

  • Applications packaged as an AppImage can run on many distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
  • One app = one file = super simple for users: just download one AppImage file, make it executable, and run
  • No unpacking or installation necessary
  • No root needed
  • No system libraries changed
  • Works out of the box, no installation of runtimes needed
  • Optional desktop integration with appimaged
  • Optional binary delta updates, e.g., for continuous builds (only download the binary diff) using AppImageUpdate
  • Can optionally GPG2-sign your AppImages (inside the file)
  • Works on Live ISOs
  • Can use the same AppImages when dual-booting multiple distributions
  • Can be listed in the AppImageHub central directory of available AppImages
  • Can double as a self-extracting compressed archive with the --appimage-extract parameter
  • No repositories needed. Suitable/optimized for air-gapped (offline) machines
  • Decentralized

Here is an overview of projects that are already distributing upstream-provided, official AppImages.

If you have questions, AppImage developers are on #AppImage on irc.freenode.net.

Add support for more dictionaries

Thx for this amazing ebook reader
I'm wondering if there will be chinese translation support
or how can I implement one. not familiar with js though.

Hide cursor on inactivity

Gnome's wayland session doesn't provide an option to hide cursor on inactivity (even with third-party stuff). While it is possible to hide cursor by moving it to bottom left corner, it would much better if cursor will be hidden automatically after some delay.

Allow font size adjustment when using publisher fonts

Allowing to use the the publisher fonts works fine since #15, but that also causes the font size to be whatever the publisher chose.

My suggestion would be something like this:

Rename the option to "force custom font" or something along those lines.

  • If "force custom font" is enabled, do pretty much the same as it does currently if a custom font is set.
  • If "force custom font" is disabled, apply font-family and font-size to body (or maybe html?), but without !important, so the book may override it while still being able to provide a font and size for books that don't specify them.

The annotation syntax is "proprietary" or future proof?

I would like to know if the JSON syntax for annotations is a kinda standard format that I could import in others software (aka future proof).

This is important to me because I wanna use this for studies that I'll need access by the following years.

(Ps: I don't know if epub annotations have a standard syntax.)

[Feature suggestion] Option to open source images

This app is a great alternative for calibre. But I would appreciate it if you can add option to open source images or somehow zoom in the images because sometime the images have text which is unreadable in the default size.

Secure & Private Sandboxed Reading

When Foliate loads an epub that has an external image like so:

<img src="http://path/to/image.jpg" width="100" height="200"/>

The application goes online and fetches the image. This action would, however, reveal to the epub maker where the reader is currently located, and what is being read.

Could you please add options to disable image fetching and javascript disable.

Some WebKit related items:

WebKitSettings:enable-java,
The “enable-java” property

WebKitSettings:enable-javascript,
The “enable-javascript” property

WebKitSettings:javascript-can-access-clipboard,
The “javascript-can-access-clipboard” property

WebKitSettings:javascript-can-open-windows-automatically,
The “javascript-can-open-windows-automatically” property

Text to Speech

Please add the ability to have epubs read aloud.

Preferably using speech dispatcher at max speed.

[Suggestion] Shorten the name to "foliate"

I don't know if that's the expected way of launching foliate, but right now I have to type "com.github.johnfactotum.Foliate" in order to launch it from terminal.

Shortening it to foliate would make it convenient for the users.

Full screen mode

Hi,

Firstly, thank you for an amazing ebook reader. I've been looking like for something like foliate on Linux for years.

One item I was wondering if you could consider implementing, is a full screen reading mode. This would enable a more immersive reading experience.

Thank you for the great development work. 👍

building

Hello, trying to build:
r@prime:~/foliate-master$ meson build --prefix=$PWD/fakeprefix
The Meson build system
Version: 0.37.1
Source dir: /home/r/foliate-master
Build dir: /home/r/foliate-master/build
Build type: native build

Meson encountered an error in file meson.build, line 1, column 0:
Not enough arguments to project(). Needs at least the project name and one language
r@prime:/foliate-master$ ninja -C build
ninja: Entering directory `build'
ninja: error: loading 'build.ninja': No such file or directory
r@prime:
/foliate-master$

Enhancement - Option to tweak Themes

Hi!
First of, big Kudos for this App! I Tried all ebook readers on Linux, and you just topped my list, beating Apps that have been developed for a far longer time than Foliate!
It is solid, great looking and integrating into my Adwaita GNOME 3 Desktop, and feels pretty polished already.

What i miss compared to e.g. Bookworm: The ability to tweak how the text is displayed:
-Option to increase/decrease the space between window border and text (like having the App fullscreen, but with the text only in the middle)
-Option to select background and text color
Those 2 options would go a big way in having a more comfortable reading environment, so thank you in advance for any consideration, for all the work you already did, and any future time you invest!
Best Wishes!

Dictionary doesn't works in v1.2.1

$ com.github.johnfactotum.Foliate 
Gjs-Message: 17:49:53.037: JS WARNING: [resource:///com/github/johnfactotum/Foliate/js/main.js 448]: reference to undefined property "Paginated"

(com.github.johnfactotum.Foliate:4843): Gjs-WARNING **: 17:49:53.037: JS ERROR: TypeError: this._buttons[x] is undefined

Support OPDS

Thanks for your work!

At some point in the future, it would be nice to support OPDS, so that it's easy to navigate books from the Internet Archive, Gutenberg.org etc.

Can't display switching.social epub properly

I'm not sure why exactly it happens, but when I try to open this book written by the author behind https://switching.social it was only displaying the Table of content. Which I guess you will agree, is a bit disappointing.

I could open it in other ebook reader applications and it's DRM free, so I guess it's some kind of parsing bug. I would appreciate any hint on how to help to debug the problem and look forward to see this application evolving. 🙂

According to the author it was created with Sigil, just if that helps debugging :)

Dictionary Bugs

Double-clicking a word in foliate automatically spams the dictionary server for a word description, in a decentralised manner.

Wouldn't it be best if the dictionary function was implemented through the internal dictd?

If not, then maybe this behavior should be controlled with a button ('check online' over an initial popup) to avoid an unecessary Distributed Denial of Service.

Also - What if the ePub is a very private document? Sending an online query is a data leak, users might not know that. Best warn them in the description?

Network charges can cost money, too.

Thanks making the best ePub software!

Custom fonts not working

Screenshot from 2019-05-31 04-38-17

The text remains displayed with a default serif font, no matter which font you choose.

Compared to what the display should actually look like:

image

I'm using this app on Fedora 30

Can't change font size

Can't change a font size
Operating System: Manjaro Linux
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.3
Kernel Version: 4.19.45-1-MANJARO
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 7.2 GiB of RAM
Screenshot_20190531_191842

Section marks and system themes

Some themes cause problems with the chapter section marks. See the screenshot. The one below is adwaita, it completely covers the section marks.

Untitled

Build requirements and runtime requirements

Hi.

I'm thinking about packaging Foliate for Mageia and am wondering what would be the Build and Runtime requirements.

I've been able to build and run it because this is my dev computer. So far I have the packages mentioned in README.md, but are any of those also necessary at runtime?

Thanks in advance.

Please document how to build on Ubuntu xenial

Please document how to build on Ubuntu xenial, the currently oldest still-supported LTS release of Ubuntu.

Since this project is using Meson, I fear that it will require newer versions of Meson, Python and whatnot than what comes with the system by default.

Highlight not saved

Hi, main issue I found is that notes and highlights are not saved.

(com.github.johnfactotum.Foliate:3277): GLib-CRITICAL **: 18:47:43.043: g_source_set_ready_time: assertion 'source->priv != NULL' failed

I have tested this with the latest tag and with the master branch.
System is ubuntu 18.04 with
gnome 3.28
gjs 1.52.5
meson 0.45.1
ninja 1.8.2

please, I've seen that in master you raised the requirements of meson: I manually changed them back and build works fine. Can you still use at most the ubuntu lts version? Otherwise meson won't build - I don't know whats happens with gnome "runtime-version" : doesn't seem to affect the behaviour.

Cannot build from source

Here's what I tried to do (note, I don't want to install system wide, I want to build for testing only)

$ meson buiThe Meson build system
Version: 0.50.1
Source dir: /home/gabmus/git/foliate
Build dir: /home/gabmus/git/foliate/build
Build type: native build
Project name: com.github.johnfactotum.Foliate
Project version: 1.0.1
Build machine cpu family: x86_64
Build machine cpu: x86_64
Program desktop-file-validate found: YES (/usr/bin/desktop-file-validate)
Program appstream-util found: YES (/usr/bin/appstream-util)
Program glib-compile-schemas found: YES (/usr/bin/glib-compile-schemas)
Found pkg-config: /usr/bin/pkg-config (1.6.1)
Program gjs found: YES (/usr/bin/gjs)
WARNING: Project targetting '>= 0.40.0' but tried to use feature introduced in '0.50.0': install arg in configure_file
Configuring com.github.johnfactotum.Foliate using configuration
Program build-aux/meson/postinstall.py found: YES (/home/gabmus/git/foliate/build-aux/meson/postinstall.py)
Build targets in project: 7
WARNING: Project specifies a minimum meson_version '>= 0.40.0' but uses features which were added in newer versions:
 * 0.50.0: {'install arg in configure_file'}
Found ninja-1.9.0 at /usr/bin/ninjald --prefix=/home/gabmus/git/foliate/fakeusr
$ cd build
$ ninja
[3/3] Generating com.github.johnfactotum.Foliate.appdata.xml_data_merge with a custom command.
$ ninja install
[0/1] Installing files.
Installing subdir /home/gabmus/git/foliate/src/assets to /home/gabmus/git/foliate/fakeusr/share/com.github.johnfactotum.Foliate/assets
Installing /home/gabmus/git/foliate/src/assets/cheerio.js to /home/gabmus/git/foliate/fakeusr/share/com.github.johnfactotum.Foliate/assets
Installing /home/gabmus/git/foliate/src/assets/jszip.min.js to /home/gabmus/git/foliate/fakeusr/share/com.github.johnfactotum.Foliate/assets
Installing /home/gabmus/git/foliate/src/assets/epub.js to /home/gabmus/git/foliate/fakeusr/share/com.github.johnfactotum.Foliate/assets
Installing /home/gabmus/git/foliate/src/assets/viewer.html to /home/gabmus/git/foliate/fakeusr/share/com.github.johnfactotum.Foliate/assets
Installing data/com.github.johnfactotum.Foliate.desktop to /home/gabmus/git/foliate/fakeusr/share/applications
Installing data/com.github.johnfactotum.Foliate.appdata.xml to /home/gabmus/git/foliate/fakeusr/share/metainfo
Installing src/com.github.johnfactotum.Foliate.src.gresource to /home/gabmus/git/foliate/fakeusr/share/com.github.johnfactotum.Foliate
Installing /home/gabmus/git/foliate/data/com.github.johnfactotum.Foliate.gschema.xml to /home/gabmus/git/foliate/fakeusr/share/glib-2.0/schemas
Installing /home/gabmus/git/foliate/data/com.github.johnfactotum.Foliate.svg to /home/gabmus/git/foliate/fakeusr/share/icons/hicolor/scalable/apps
Installing /home/gabmus/git/foliate/data/com.github.johnfactotum.Foliate-symbolic.svg to /home/gabmus/git/foliate/fakeusr/share/icons/hicolor/symbolic/apps
Installing /home/gabmus/git/foliate/build/src/com.github.johnfactotum.Foliate to /home/gabmus/git/foliate/fakeusr/bin
Running custom install script '/usr/bin/meson --internal gettext install --subdir=po --localedir=share/locale --pkgname=com.github.johnfactotum.Foliate'
Installing /home/gabmus/git/foliate/build/po/zh_TW.gmo to /home/gabmus/git/foliate/fakeusr/share/locale/zh_TW/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
Running custom install script '/home/gabmus/git/foliate/build-aux/meson/postinstall.py'
Updating icon cache...
Updating desktop database...
Compiling GSettings schemas...
$ ninja run
[0/1] Running external command run.
Could not execute command "/home/gabmus/git/foliate/build/src/org.example.Application". File not found.
FAILED: meson-run 
/usr/bin/meson --internal commandrunner /home/gabmus/git/foliate /home/gabmus/git/foliate/build src /usr/bin/meson /home/gabmus/git/foliate/build/src/org.example.Application
ninja: build stopped: subcommand failed.
$ ../fakeusr/bin/com.github.johnfactotum.Foliate 

(com.github.johnfactotum.Foliate:2166): GLib-GIO-ERROR **: 11:23:36.417: Settings schema 'com.github.johnfactotum.Foliate' is not installed
[1]    2166 trace trap (core dumped)  ../fakeusr/bin/com.github.johnfactotum.Foliate

[Feature Request] Mouse wheel to change pages in paginated mode

Subject says it all pretty much. I find I prefer to read in paginated mode due to the dual columns, but I don't like having to use the keyboard or the arrows at the bottom to change pages. It would be nice if the mouse wheel could change pages in this mode.

Don't use localStorage for generated locations

localStorgae has a very limited quota that is easily exceeded. Should switch to another storage method as there doesn't seem to be a way to increase the limit.

Seems like a pretty serious oversight. Should be rectified shortly.

Double page view loads only partial text

So I increased the font size to 16 and started to read a book in double view.
But it only loads only showable amount of texts and remaining texts doesn't show up, nor in the next page.
But I can read the full page in scroll mode!

To Reproduce:
download epub from archive.com website The Quran Epub

Some Screenshots of the bug:

Only partial loaded in double page

The Settings

And in the single page:

The page gets loaded and scrollable with mouse only

Font styling not working properly when custom font is set

Thank you very much for providing such a great app!

There is a bug, it appears in several books - when custom font is set, headers uses normal font-weight instead of bold (switching to publisher font fixes the issue).
Example book can be downloaded here: https://www.planetebook.com/the-odyssey/
Right at the start of the book, header 'The Odyssey By Homer (Circa 700 BC) Translated by Samuel Butler' is bold with publisher fonts, but normal with custom font.

Note, in some other books, I've also seen text hunks (like few words at the start of paragraph or a quote) styled with bold/italic, and they were rendered correctly. Issue only appears on headers.

Usability of the highlighter tool

Hello John Factotum and first of all thank you for coding such a promising tool!

I am finding it difficult to apply highlights properly as is however as they seem to be applied based on a timer with a very short fuse. This means that when selecting the text that is to be highlighted, the selection will be interrupted if the user isn't fast enough. In pratical terms, highlighting long sentences in one go is all but impossible and most highlights will miss a few words. The usual way of implementing this tool in highlighter-enabled PDF viewers or the rare highlighter-enabled EPUB viewers (Bluefire on Windows and Android) is to apply the highlighting when the mouse click is released ("onmouseup"), which allows for much better user experience for serial highlighters such as myself.

Also, the highlight options tools that appears upon application is really neat but can appear quite far from where the user's cursor is (top of the active paragraph only). Wouldn't it be better to make it appear just below the cursor upon application? This would help minimize cursor travel distance and therefore improve usability.

Thanks!

Option to use epub font

I have an epub with embedded fonts. Opening it in Foliate results in a weird mishmash between the user-chosen font (for standard paragraphs) and other elements that override this font.

Foliate should either display everything in the override font and if that's not sufficient also allow to use the publisher font.

Screen Tearing

I often experience screen tearing when maximizing or flipping pages in Foliate. I haven't experienced this behavior on any other apps on my system (Fedora 30).

Here is a screencast of the behavior (apologies for the low resolution):

foliatebug

Unable to open files via symlink

My situation: I have most of my digital life (photos, music, documents, etc etc) managed using git-annex. The part of git-annex that is important here is that it replaces the files with symlinks to a SHA'd verison of the file (so it can track changes over time).

eg:

greg@x1 (git)-[master] ~/annex/Books/to-sort % ls -al LearnPythonTheHardWay2ndEdition.epub 
lrwxrwxrwx 1 greg greg 204 May 31 10:11 LearnPythonTheHardWay2ndEdition.epub -> ../../.git/annex/objects/Fk/wv/SHA256E-s335707--3dcf8910fdfcbc5ce1ce4ee5b27affd117006100701614a8587de89769f19dfc.epub/SHA256E-s335707--3dcf8910fdfcbc5ce1ce4ee5b27affd117006100701614a8587de89769f19dfc.epub

Foliate gives an error ("Oh no! The file cannot be opened") when trying to open one of those symlinks. If I instead open the normal (non-symlink) file it works.

Open URL

Is there a way to open a link in the broweser?

Highlight/annotation not working

foliatebug

It looks like my copy of Foliate has somehow lost highlight/annotate functionality. I tried selecting the text, right-clicking, and clicking on the annotations button, but none of them produce the desired result of highlighting the text.

Meta data editing [new feature request]

Would it be possible to consider looking into adding a metadata editing capability i.e. the ability to edit/modify the author, subject, etc?

There is no urgency for this feature as this can be readily handled by existing programs [exiftools for cli and Sigil for GUI]. However it would be nice to be able to make minor metadata tweaks directly in the application while reading a book.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.