th3r00t / pyshelf Goto Github PK
View Code? Open in Web Editor NEWA simple terminal based ebook server
License: GNU General Public License v3.0
A simple terminal based ebook server
License: GNU General Public License v3.0
i would like to have the ability to add "github"library so user could sync there library to a public/private repository on github. so it could ease the sync library setup for backup and stuff
ARM Support has been asked for on reddit. Will start working on this once i buy a Raspberry pi
Since i have a big technical ebook library(developper ebook, with code example) i would like to be able to attache a zip file to an ebook so when i read it i could host it and download the attachement from the pyshelf ui
This could bring pyshelf as a technical book library reference!!!
Having some trouble rendering the bin data stored in the books table, cover column. I have created a custom filter, bin_2_img, and it seems to return the binary I'm looking for. The template is including the the returned data, in the requisite img src tag. however the image is still not rendering.
Merits of db stored images
One should endeavor not to store images in a database, instead storing a path
Of this I am very aware, however for the time being the images are ideally originally stored in side each epubs file. Epub files are semi-analogous to zip files. In order to minimize repeatedly opening and querying the file each time the image is needed I chose to store it instead.
Future releases will most likely be changed to extract the image prior to storing the book and renaming it to match the book title, or file name then storing it in the directory of the book, and a link to the new file in the db instead.
In src/frontend/settings.py
I've found the following:
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "@(9b9jslgg41u1u=mr)-2*-n2x0vef0zsy39*z@sz18&tvow18"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = TEMPLATE_DEBUG = True
if DEBUG is True:
from pudb.remote import set_trace
ALLOWED_HOSTS = CONFIG.allowed_hosts
I don't think the secret key shoud be visible here? DEBUG = TEMPLATE_DEBUG = True
should better default to False
Design a system (flat file?) to check if files in book directory have already been processed
Adding this functionality will allow the docker release to be updated in-situ. Currently it is not possible to update the library once deployed
Any chance of sqlite support? It'd simplify a docker deploy as it'd be one less dependency.
Hey,
It seems like the pyShelf website redirects to the below URI and renders an unrelated website for "Soulwich: Asian sandwiches & more".
URI: http://162.255.85.132/?SID=rt6t135fm9bknvaptrrh6bf0dm
would be nice to add a way to link multiple pyshelf,
so you will have access to the whole DB of every linked pyshelf, but locally download the book on request only
Having now began the front-end interface I am looking for a way to display the books dynamically in HTML based on available screen size, and set the rest up in a pager system.
Normally I would do this easily in Django, or Flask however my intention is to avoid those as requirements, and use the built in http.server module.
It would be nice to have a separate wifi enabled ebook friendly page. It should be simple html supported by outdated browsers and contrast e-ink friendly design.
It would be great to be able to set the config.json variables as docker environment variables when spinning up the container. Right now the only way to customize them is to map a customized config.json file into the container.
Calibre has the capability to send MOBI files directly to the Kindle by E-mailing to a kindle specific address. See here. It says that Gmail does not work, but I've been using it just fine.
Would be great if pyshelf supported this.
Cover images are being acquired from a regex search of the epubs file contents. Cover could be attained by scraping the opf for the requisite meta data. If the current search does not render results, I am hooking in the DuckDuckGo search api and returning the first image result.
i would like to be able to have a main admin user and then from it add user with different privileges (and maybe api key would be nice)
Seems the async operation is timing out before starting, this is a new bug that wasnt present the last time I installed pyshelf. As I have been unhappy with the current websocket implementation I may take this opportunity to revisit that as well. For now books imports only working via calling import books from the install directory.
During initial setup I select import and then, after several books have been processed, I get the following error.
...
...
...
2020-10-16 18:31:46.409 | INFO | backend.lib.storage:insert_book:80 - American Exceptionalism and American Innocence
2020-10-16 18:31:46,480 ERROR Error in connection handler
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/websockets/server.py", line 191, in handler
await self.ws_handler(self, path)
File "./backend/lib/pyShelf.py", line 84, in socketio
await self.runImport()
File "./backend/lib/pyShelf.py", line 69, in runImport
Catalogue(self.config).import_books()
File "./backend/lib/library.py", line 281, in import_books
db.insert_book(book)
File "./backend/lib/storage.py", line 86, in insert_book
raise e
File "./backend/lib/storage.py", line 65, in insert_book
self.cursor.execute(
psycopg2.errors.StringDataRightTruncation: value too long for type character varying(255)
2020-10-16 18:31:46,491 WARNING Executing <Task finished name='Task-163' coro=<WebSocketServerProtocol.handler() done, defined at /usr/local/lib/python3.8/dist-packages/websockets/server.py:118> result=None created at /usr/local/lib/python3.8/dist-packages/websockets/server.py:116> took 10.273 seconds
it would be nice to be able to have a calibre plugin:
calibre server may not be greate, but the user part is good for local desktop
Figure out how to get page count from epub. I am unsure as to if this is a standard count, or if it would be different depending on device.
More research is needed
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.