cops icon indicating copy to clipboard operation
cops copied to clipboard

COPS 2.0 Alpha demo

Open seblucas opened this issue 8 years ago • 40 comments

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

  • [x] Switch from BulletPHP to Silex
  • [ ] Rework translation files
  • [ ] Document the API

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

  • [ ] Custom columns
  • [ ] Send book by mail
  • [ ] View epub
  • [ ] Use X-Accel-Redirect / X-Sendfile
  • [ ] OPDS Open search
  • [ ] Metadata update
  • [ ] Tag filtering
  • [ ] Normalized search
  • and certainly many more

seblucas avatar Jul 04 '16 08:07 seblucas

oh boy! Excellent.

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

  • Please put some stars on a book to see how it goes.

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

OPDS catalog - room for improvement! PocketBook (android)

  • Navigation ok (missing category icons)
  • could not download books (book details page do not load)

Aldiko (android)

  • Navigation only by books (other category shows 404 error)
  • could not download books (book details page do load but epub button do not show)

MoonReader+ (android)

  • navigation ok on some categories
  • could not download books (book details page do not load. when hitting a result it just open cover in the browser)

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"

horus68 avatar Jul 04 '16 09:07 horus68

Great and unexpected but hoped for development!

OPDS is indeed a work in progress.

  • could not download pubs with (iOS) Marvin Classic (works with html)
  • Language feed is invalid (works with html)
  • Ratings feed is invalid
  • Detail view do not work (works with html)
  • etc. ;) no problem!

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

marioscube avatar Jul 04 '16 11:07 marioscube

@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

seblucas avatar Jul 04 '16 12:07 seblucas

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!

horus68 avatar Jul 04 '16 14:07 horus68

@seblucas

About the html catalog:

  • the interface is snappy
  • download is relatively slow on a fast machine with a fast internet connection (hardware or software limited on your side?)
  • in settings: ignored categories checking any does not seem to work

marioscube avatar Jul 04 '16 20:07 marioscube

@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.

seblucas avatar Jul 05 '16 13:07 seblucas

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

horus68 avatar Jul 05 '16 14:07 horus68

Thanks for the report

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

seblucas avatar Jul 05 '16 14:07 seblucas

@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).

horus68 avatar Jul 05 '16 14:07 horus68

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

  • When you're at the main page the boxes look kind of awkward with one line just for the number of autors/books/etc. In my opinion it would look nicer if those numbers were just in the same line than the title and sort fields. Another option could be that you display some covers in that line. In general that would look like the design of the authors subpage just with a number in the same field than name (in my opinion there's no benefit at all from using this layout in subpages like authors, it's just useful if you actually have books shown on the subpage)
  • Same goes of alphabetical sorting
  • Remove the slashes between title and sorting link (maybe replace it wth a "|" ?)
  • Just curious: is it planned to keep the "database" indicator in the headline?
  • In settings page there is a asyncStorage shown at the top - is that intentionally? So besides those small design points it's noticable faster and simply better than the "old" COPS ;)

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?

Shadowghost avatar Jul 05 '16 15:07 Shadowghost

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

marioscube avatar Jul 05 '16 15:07 marioscube

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.

seblucas avatar Jul 05 '16 15:07 seblucas

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 :)

Shadowghost avatar Jul 05 '16 16:07 Shadowghost

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.

seblucas avatar Jul 05 '16 16:07 seblucas

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.

jmgant avatar Jul 07 '16 11:07 jmgant

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.

seblucas avatar Jul 07 '16 11:07 seblucas

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.

jmgant avatar Jul 07 '16 13:07 jmgant

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 avatar Jul 07 '16 13:07 marioscube

@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.

marioscube avatar Jul 07 '16 13:07 marioscube

@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.

seblucas avatar Jul 07 '16 14:07 seblucas

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:

  • on the main page, add a Most Recent Books option. I find it very handy.
  • email Mobi files - this is a MUST have (please!) The only way I can get whisper sync to work is to email mobi books to my kindle as oppose to downloading it directly.

Thanks!

bodybybuddha avatar Jul 07 '16 14:07 bodybybuddha

@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!

horus68 avatar Jul 08 '16 08:07 horus68

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

mbirth avatar Jul 08 '16 10:07 mbirth

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.

jmgant avatar Jul 08 '16 17:07 jmgant

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).

eli-schwartz avatar Jul 08 '16 21:07 eli-schwartz

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 avatar Aug 01 '16 16:08 jmgant

@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.

jmgant avatar Aug 06 '16 06:08 jmgant

@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

Ecksters avatar Oct 02 '16 00:10 Ecksters

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

marioscube avatar Oct 02 '16 16:10 marioscube

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 avatar Oct 03 '16 14:10 seblucas