Code Monkey home page Code Monkey logo

zshelf's Introduction

title

Z-Library browser and downloader for reMarkable devices


Installation

  1. Know how to SSH to your device: https://remarkablewiki.com/tech/ssh
  2. Make sure package manager toltec is installed.
  3. Run following command to install zshelf:
opkg update
opkg install zshelf
  1. [reMarkable 2 only] You definitely need rm2fb package to run any app:
opkg install rm2fb

[IMPORTANT] Configure domain and cookie

zshelf basically is a web crawler, which fetches and parses z-library web pages, gets the gist of them and natively displays book items on UI. Because it's not web browser, user needs to manually configure domain and cookie so zshelf can download books on demand. Free user account is still limited at downloading 10 books a day.

  1. Open https://z-lib.org on your web browser
  2. Under "Books" link, you should notice domain part that is specifically available for your region/country. Note it down.

  1. Log in with your account.
  2. In any page, open up Console (hit F12 and switch to tab Console), run:
document.cookie

It will return a string contains your ids. Copy the parts have remix_userkey and remix_userid and ignore the rest:

  1. SSH to your reMarkable device and open config file:
nano /opt/etc/zshelf/config.json
  1. Replace keys "domain" and "cookie"'s values with yours.

  1. Save file (In nano: Ctrl + X -> Y -> Enter)
  2. Start zshelf to test configuration:
zshelf

reMarkable 2 user, use this instead:

LD_PRELOAD=/opt/lib/librm2fb_client.so.1.0.0 zshelf

Downloaded EPUB and PDF books will be automatically available on your reMarkable app (if not, please restart the app or restart device). zshelf also makes a copy of the book to location configured in additionalBookLocation, so you can open it in other reader like KOReader, which has ten fold better reading experience, highly recommended and also available on toltec.

Also, install an app launcher so that you can open zshelf easier. Recommend oxide, draft or remux, all of them are available on toltec.

Development

  1. Set up reMarkable toolchain, NodeJS and npm
  2. git clone https://github.com/khanhas/zshelf
  3. qmake
  4. make
  5. cd backend
  6. node install

Credits

zshelf's People

Contributors

khanhas avatar r2r-dev 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

zshelf's Issues

2.6+ Broken?

Possibly related to toltec#322

ZShelf has been blank since 2.6 (I had 2.6.2.75, now have 2.7.0.51). Any hope for an update?

Future?

Now that z-library is no more, are you planning on archiving this, or switching it to work with Anna's Archive?

Can't open book with default reader

I have a rem2 and when I download a book it is blank on the homepage (however the copy downloaded for KOreader can be open).

How come? I'd like to be able to read with the default reader.

download unavailable with singlelogin.re domain

hi,

i modified the config file and added my remix_userkey and remix_userid aswell as the domain https://singlelogin.re.
when i start zshelf i can search for books, but the button which you would normally download the book with just says "'Unavailable"

one thing i noticed was that when i typed document.cookie in my console remix_userid came first and remix_userkey second, whereas in the readme it's the other way. i tried both ways without any luck.

any ideas?

thanks

add an option to skip adding the book to xochitl

Would it be possible to add an option to skip adding the downloaded books to xochitl? I only use KOReader for reading and I need to go into xochitl and delete the newly downloaded file every time.

awesome app otherwise! thanks

Seg Fault under 2.6.1.71

Hi,

Thank you for your apps, it's super useful.
I have updated to the last version available of the RM system, reenable entware and remux to start zshelf, but if I try to start the app the screen stays white. By command line, I can see this error:

root@reMarkable:~# zshelf
EPD platform plugin loaded!
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[SERVER]  QProcess::Running
Creating window
[SERVER]  QProcess::Running
virtual void EPRenderContext::renderNextFrame(QSGRenderer*, uint) can't render without a renderer
[SOCKET] "LIST" Connected
Segmentation fault
root@reMarkable:~# opkg info zshelf
Package: zshelf
Version: 0.3.1-1
Depends: node
Status: install user installed
Section: utils
Architecture: armv7-3.2
Maintainer: khanhas <[email protected]>
Size: 500469
Filename: zshelf_0.3.1-1_armv7-3.2.ipk
Description: Z-Library browser and downloader
Installed-Time: 1616317261

Maybe it does need a recompile? Did RM change their QT version?

In any case, I am available for testing if needed.

Regards, Alex.

Closing the app RM2

When I hit the top right X to close the app my RM2 hangs until I restart using the power button. Have tried pen and finger input and swiping back to launcher menu but only restarting works.

rM2 compatible?

The readme doesn't mention if this works with the rM2 or not, is this utility compatible with the new tablet?

Changed classnames in 1lib.fr domain

While trying to use Z-Lib with the 1lib.fr domain, I noticed that the backend server is throwing some error which prevents ZShelf from working:

ERR: 1 TypeError: Cannot set property 'today_list' of undefined

Investigating this issue led me to this line in info.js:

const rows = $(".counter-value");

It’s looking for elements with the classname .counter-value in the profile.php page, but there’s no such element. I guess the website was recently updated to change the classnames? I can’t check whether this affects other domains as well. Attached is the current HTML for the profile.php page when I’m logged in: profile.zip.

README.md Out of Date - document.cookie

Using the document.cookie command within the console returns the following:

'domains-availability=%7B%22books%22%3A%22hk1lib.org%22%2C%22articles%22%3A%22booksc.org%22%2C%22redirector%22%3Afalse%2C%22singlelogin%22%3A%22singlelogin.app%22%7D'

I assume this is a change on the website backend. The remix_userkey and remix_userid cannot be retrieved

Personal Domains

Since z-library switched to personal domains, I'm unable to find any books with zshelf.
I have my userid and userkey, but I'm not sure what to use as the domain. I used my personal book domain, but I keep getting empty results....

Can this be fixed?

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.