seblucas / cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
1.42k stars 229 forks source link

COPS 2.0 Alpha demo #279

Open seblucas opened 8 years ago

seblucas commented 8 years ago

Not a real issue, it's more a teaser ;)

After months of coding, I'll share the first demo of COPS's rewrite :

Html catalog : http://cops2-demo.slucas.fr/ui/index.html OPDS catalog : http://cops2-demo.slucas.fr/api/opds/0 (Warning WIP)

The HTML ui part is public : https://github.com/seblucas/cops-html-ui feel free to create issue here if you notice some bugs.

The PHP API is not released yet because I'll be switching framework certainly to Silex soon. It'll be hosted in this repository as the head / 2.0 branch and the actual COPS version will be transferred in 1.0 branch

TODO List before the branch creation

Features missing in COPS 2.0 (in comparison to COPS 1.0)

horus68 commented 8 years ago

oh boy! Excellent.

Missing: info button Is there a book with summary visible? (could be related to bootstrap template as previous version)

Html catalog - all fine for the 1st usage. Books load ok.

OPDS catalog - room for improvement! PocketBook (android)

Aldiko (android)

MoonReader+ (android)

Error when browsing ratings or language : Message: invalidated OPDS content "at line 2, column 0: junk after document element"

Error when browsing books category : Message: invalidated OPDS content "at line 1, column 0: syntax error"

marioscube commented 8 years ago

Great and unexpected but hoped for development!

OPDS is indeed a work in progress.

I will monitor and test any development here! Keep up the good work!

seblucas commented 8 years ago

@horus68

You mean there's no about box ? Yes I know this has been on the top of my list Almost all books have summaries (see here) or I did not understand what you mean. I don't think I've handled the rating yet.

@marioscube / @horus68

I know OPDS is big disappointment, but there not much missing. So it'll come fast

My goal with the rewrite is to limit as much as possible the need for configuration so you'll see a lot of difference with COPS 1.0

horus68 commented 8 years ago

On the info icon = about box On the summary: you are right, I missed it as it requires to click in the book title. Maybe a visible link for "Details" or "more on this book" so people do not pass by that!

Also missing in the tools area: the style options for users

And you know... we will find more issues to solve!

On the OPDS: I know its a WIP but it needs to work with actual apps!

marioscube commented 8 years ago

@seblucas

About the html catalog:

seblucas commented 8 years ago

@marioscube

Download speed is one of the reason I have to switch to another PHP framework (certainly Silex). My VPS is also quite loaded. But I noticed some difference between COPS 1 and COPS 2. The ignored categories will only affect the search box in the header IIRC.

@all

I've updated the OPDS catalog and fixed everything that was easy and this should be way better. Now I'll see what's missing for COPS 1.0.0

@horus68

I don't want to keep the style option as it was. The current style is almost 100% Bootstrap so I expect to borrow Boostrap's user style file and apply it. This should be easier to maintain.

horus68 commented 8 years ago

OPDS review: All working fine using android apps (Pocketbook, Aldiko, Moon+Reader) Speed is fine for me, so great work!

seblucas commented 8 years ago

Thanks for the report

Another thing, search does not work with OPDS (for now) so don't bother trying it.

horus68 commented 8 years ago

@seblucas on the about page: the actual version is an html page that require direct edit. Would love to have a page (even if HTML in major part) but created from a parameter file to include some data fields (as in library name, email, main website URL). This allow less maintenance (even if private libraries do not need this, public libraries will enjoy).

Shadowghost commented 8 years ago

Looks great, I really like the new bootstrap styled interface. But I also got some ideas for it:

Regards Shadowghost PS: I just noticed in my installation (latest master from github) that there's alwas a category CLEAR shown somwhere between the other categorys. I know that this one clears the selected categories ut wouldn't it make more sense to make a fixed button for that?

marioscube commented 8 years ago

OPDS: works on iOS / Marvin classic The interface is fast enough, the download takes a lot of time (waiting for download).

HTML: download from the screen with the book summary does not work. Direct download works

seblucas commented 8 years ago

When you're at the main page the boxes look kind of awkward with one line ...

Yes I know. My goal was to never use any CSS beside Bootstrap classes, so I had to fiddle around and ended using a small CSS (see here). I'll try to use the same icons I already use in the OPDS feed, this should feel less weird.

Remove the slashes between title and sorting link (maybe replace it wth a "|" ?)

This won't work on a smartphone / small tablet / my Kobo. If the icon is too close then it'll be too complicated to click on it. I thought of right aligning it but that's adding CSS :(. With the slashes, it work most of the time on my Kobo.

Just curious: is it planned to keep the "database" indicator in the headline?

Nope ;), it a debug reminder for me, this is the current route name.

In settings page there is a asyncStorage shown at the top - is that intentionally?

Again a debug tool that I used to debug it on my Kobo.

Shadowghost commented 8 years ago

What's so bad about adding some CSS if the projects benefits from it? The idea to just use bootstrap is nice ofcourse but if you need some small additions which aren't interfering with the idea behind bootstrap why not add it? Just my opinion about that ;) But in general I don't see the problem in using the same template on main page you use on author subpage (which is exactly how I meant it to look like). Something also came up to my mind: Wouldn't it be useful to have an option to force a column view of the main page items like it is with the classic design or do you need to add some CSS for it? Nice to see someone also using a Kobo :)

seblucas commented 8 years ago

What's so bad about adding some CSS if the projects benefits from it?

If you want to add theming, fewer CSS means less problems. Besides that, I'm more a developer than a web designer so I generally prefer maintainability over prettiness.

But in general I don't see the problem in using the same template on main page you use on author subpage (which is exactly how I meant it to look like).

Actually it was like that before but many friends told me this looked wrong. IMHO the big advantage of panels is that they are easier to click on than lists on a Kobo / small smartphone beside that while using COPS I spend more time on the various book lists so that's where most of my effort went.

jmgant commented 8 years ago

mobi files download well with a Kindle Paperwhite/Voyage browser. Speaking of, I've been using COPS as the primary way to access my books from my Kindle's browser. To render the interface at a usable resolution, I used css to zoom the whole application by 2. Any chance of more tweaks geared toward the Kindle's high res e-ink browsers? Fantastic project. Keep up the excellent work.

seblucas commented 8 years ago

So you tested it on your PaperWhite, great. How can you compare COPS 1.0 and COPS 2.0 on your Kindle ? And how is the experience of COPS 2.0 versus a standard browser ?

On my Kobo Aura HD (also hi res), I can adjust the zoom manually and I finally got used to changing it every time I load COPS.

I still don't have any Kindle to test on but I'll always test on my Kobo so e-ink will always be very important to me.

jmgant commented 8 years ago

on my Voyage the display was very, very small (all Voyage pages render at ridiculous resolution) and manually zooming with the device was not very accurate, so I used css to zoom the interface, and it works VERY well. In fact COPS is my preferred way to manage my books. I use a custom column "genres" and the browsing experience is pleasurable. The e-ink theme blends smoothly with the rest of the Kinldle's UI (I even added the Bookerly font Amazon uses on the PW and Voyage for completeness). COPS 2.0 doesn't quite do it so well for me. But that's partly due to needing sharper contrasts of tone and maybe sharper lines. I would need to apply the same zoom effect to give an accurate assessment however.

The mobi file was quick to download and showed up on my home screen. COPS 2.0 looks great on my phone, but not so much on e-ink.

side note... is there a trick to having COPS deliver the thumbnail cover when downloading? All of my titles are the same format and all have covers in the database, however not all deliver the image to the device.

marioscube commented 8 years ago

I "tested" (just played around) a bit with my Kobo Glo HD.

The html interface worked, but I was unable to download any epub. ->> authors -> epub = worked in firefox, but not on my kobo (i will try again) ->> authors -> book title -> epub = does not work in firefox/Kobo = return to start screen COPS

Can I use (test) OPDS with a Kobo, and if so how?

I had to zoom in, just like you mentioned, to make browsing in the Kobo useable. Otherwise is was a very "grey" experience (I'm used to the colours of my iPad/iPhone).

marioscube commented 8 years ago

@jmgant

You probably used the "classic" interface of COPS 1, not the Bootstrap interface in COPS 1 and COPS 2.

The classic interface does not look very nice, but works remarkably well on all kinds of devices.

seblucas commented 8 years ago

@jmgant

Actually I agree with you, for now I prefer using COPS 1 on my Kobo. I hope to work on that soon. As @marioscube said (couldn't have said it better) :

The classic interface does not look very nice, but works remarkably well on all kinds of devices.

So true !

side note... is there a trick to having COPS deliver the thumbnail cover when downloading? All of my titles are the same format and all have covers in the database, however not all deliver the image to the device.

I only update the metadata / cover of Epub, I've never taken a look at Calibre's code to seen if I can port it easily to Mobi / AZW.

I "tested" (just played around) a bit with my Kobo Glo HD. The html interface worked, but I was unable to download any epub.

Downloading an epub on a Kobo device needs a tweak that's not ported yet on COPS 2.0.

Can I use (test) OPDS with a Kobo, and if so how?

The answer is no and certainly never. Kobo will never develop that.

IIRC if you install KOReader on your Kobo then it has an embedded OPDS Client that should work fine with Cops.

bodybybuddha commented 8 years ago

Wow - most excellent! I had used tranquilbase.org's article to get bootstrap to work with an older rev of COPS for sometime. Everything was working so I never kept COPS updated - so it's great to see this new development! (Yes, i know v1 had the ability... ;-) )

A couple of items that you may have thought about it:

Thanks!

horus68 commented 8 years ago

@jmgant

side note... is there a trick to having COPS deliver the thumbnail cover when downloading? All of my titles are the same format and all have covers in the database, however not all deliver the image to the device.

I don't know if this is the same for Mobi but with epub you need to hit the button "embed metadata" on Calibre. Else the metadata (and covers added after initial ebook creation) will be downloaded with no metadata added by calibre. Note that you also need to delete the backup file Calibre will create!

mbirth commented 8 years ago

AFAIK MOBI can't be changed on-the-fly. You have to convert it (from MOBI to MOBI) to have your custom metadata embedded.

jmgant commented 8 years ago

you are correct, one must convert the file again for changes to take. harder still with azw3 files.

the mistake regarding cover images was on my end. the Kindle, when it receives a file marked "personal document" ie any mobi that Amazon did not deliver, would then generate a thumbnail based on the cover metadata in the book. if the mobi is marked "book" by me in order to sort it properly, the Kindle ignores the local cover and queries the Amazon server for the image. the bug is that if the request times out or the ASIN of the book is wrong, the Kindle does not fall back on the embedded image and simply renders a generic, and ugly, thumbnail. with repeated downloads, the covers eventually did show-- my metadata was a bit muddled and dampening the flow of the process.

COPS is a great project. I can't wait to see more of it. can I make a feature request? a way to generate a random selection from the database. I like surprises.

eli-schwartz commented 8 years ago

calibre can embed MOBI/AZW3 metadata just fine. Conversions are not necessary.

However, MOBI does not really support cover metadata, so you will have to reconvert to modify the cover image. This is one reason why AZW3 is superior to legacy MOBI.

...

Of course, it is also true that cover thumbnails in the Kindle's "cover view" mode are not part of the book itself, and Amazon has an embarrassing bug that may or may not be deliberate, if you presumptuously use a non-PDOC that you didn't purchase from them (or apply sneaky workarounds).

On that note, if you use the Quality Check plugin in calibre, there is an option to fix the exth 113 (ASIN) field in a MOBI/AZW3 by embedding the mobi-asin/asin/amazon identifier. Which should mean that the cover downloads from Amazon's servers, assuming the book is in their catalog to begin with. And you won't need to sideload a cover thumbnail (which is impossible to do from the web browser).

jmgant commented 8 years ago

thanks. the more I come to learn about how complicated the Amazon format/device(s) tend to be... Im tempted to just jailbreak for Koreader and epubs.

jmgant commented 8 years ago

@seblucas

To clarify abut the HTML and the Kindle. My friend has a Paperwhite 2 and COPS renders just fine. It's only on the Paperwhte 3 and Voyage that everything appears small. COPS was my first time doing anything at all with HTML or PHP, so my simple mod was zooming via CSS. (is there a cleaner way?)

My children have my url and COPS is the primary way I deliver to them books they need for school or comics for my youngest who accesses it on her iPad. I have one instance set up for each of them. We all appreciate it.

Ecksters commented 7 years ago

@seblucas Any chance we'll get a branch of 2.0 posted in the near future? Would love to start contributing but it feels meaningless on the current branch when you've made so many nice changes.

Would like to work on adding: -In-line book reading with pdf.js and epub.js(or alternatives) -Full library tile view(no subsectioning required) -Better options for accessing calibre commands to manage library

marioscube commented 7 years ago

My humble opinion is that the current branch is and will be very much alive. Any further improvement is always welcome.

seblucas commented 7 years ago

I've updated the first post with a TODO list. The most important stuff is to document the API or at least start a documentation (I'm using apiary for now).

seblucas commented 7 years ago

As everyone already know, I'm very bad with ETA -> In any case I'll publish the current state of 2.0 branch in 12 days (I'll be away from home the 2 weeks after that).

Ecksters commented 7 years ago

Awesome, I'm excited to get involved with that

Bonbadil commented 7 years ago

Little detail: in the ebook detail, there are links to ebooks lists filtered by the authors, tags and series. Could these links be added to the ebooks list, too?

Very great tools than COPS. I look forward you publish the 2.0 branch to test it on my server.

spitedoggie commented 7 years ago

I love the COPS server on Synology and will be excited when 2.0 is ready. Like @jmgant , would love to a see a RANDOM selection of books! Thanks very much for such a great project ! (I know nothing about code; I just signed up to say thank you :)

tlc commented 7 years ago

@jmgant, Can you share your CSS changes? I have a voyage, too.

hugoheitz commented 7 years ago

I also use the COPS server on Synology. It is great.

I am very excited by the 2.0 version. I was about to open an issue about the design of version 1 because of the fact that the "i" button on the bottom left is not explicit at all on the fact that you can modify parameters when I saw that a 2.0 is on its way. So let's focus on the future !

The new interface seems way more user friendly than the 1.0
clicking on the cog wheel to get the search function ? come on... clicking on the "i" button on bottom left to change parameters ? come on...

Right now I am focused on improving the send to functionality because I think it is easy to search or consult COPS with my smartphone and make it send the books I want to my ereader (ok, a kindle) than access it through my ereader, navigate the catalog and dowload it on the ereader.

So, what's missing in the 2.0 ? the destination mail of course.

The demo does not work about the search so it is not easy to say if it works OK.

I think the search field size is too small. Make it big, it is the thinh we use to access a book when we know what we are looking for.

I think the language should be in the parameters zone because on an ereader, sometimes we click elsewhere as there is a lag on the eink screen.

Great, great job !

blacs30 commented 7 years ago

That is really a nice surprise to see 2.0 on its way. Great job!

Have you though of creating a COPS app for nextcloud (or owncloud). I use my nextcloud instance for syncing the books between my calibre machine and my vps. There COPS 1 is running well and accessing the calibre library. For access I use basic authentication in nginx. That is okay but it would be just perfect if there'd be this nice COPS app inside of nextcloud, using my nextcloud user and this way enabling actually multiple users to have their own library in the private cloud. (sharing the library would be a nice thing then as well...)

Just an idea and dream at the moment but well wanted to share it and maybe hear your thoughts about it.

Thanks anyway for this great job.

ebartlomiej89 commented 7 years ago

When do you plan release the COPS 2.0 version?

Joduai commented 5 years ago

@seblucas any news about v2? Maybe a pre-alpha test release? ;)

horus68 commented 5 years ago

Now realizing that the actual 1.1.3 version with bootstrap has no settings link... when 2.0 version has it! or better will have it when it happens!