+1

Theme/theme mod that adds readprogress and/or bookmarks/favorites to "any" theme or the default one.

DarkShadowSwE 1 month ago updated by pppasc 2 weeks ago 13

Hi,

So I made a small python script like the previous one that keep track of you "bookmark/favorite" folders/path in the browser.

I keep my comics in a lot of folders and sub folders so with this addition is to easier to keep track of the series you are currently reading.

All the files can be found below.

I have divided the "themes" in 3 different variants.

Both the themes that have the bookmarks/favorites feature need the python script to work, i have only compiled it to an .exe for windows.

The original script is also included if you would like to compile it for any other OS, hope it works for other than windows.

The themes are not complete sins i don't fancy sending unnecessary files.

You will have to go into the admin GUI (for example http://192.168.X.X:2203/admin) and create a new theme.

Then you go your Ubooquity install directory and drop the 2 javascript files into your new theme folder that is in the "themes" folder, or your currently used theme if you haven't modified the "themeScript.js" file.

I have only modified the "themeScript.js" file of the theme and the jquery file is to shorten the code needed compared to write it in native javascript.

Here is an image of the admin GUI and where you need to make the new theme if needed.

Hers is screenshoot of what the themes and python script/program adds:

The readprogress (left part of the image) relies only on what the default Ubooquity provides and don't need any additional files, it loops through all the comics that is on the screen and asks the built in API how many pages there are and what your current page is and if it's above 0 it shows it accordingly.

The bookmarks/favorites script/program file (.exe) must be run on the same server/computer that runs the ubooquity sins browsers don't like mixing domains and I haven't invested time into looking if it could be run from another server/computer.

And the javascript in the theme tries to reach the bookmarks server at the same IP as you are browsing your comics.

The bookmarks/favorites script sends a request to the pythonfile at port 2204 (sins the default port is 2202 and 2203 i put it at 2204) and asks for any current paths for your bookmarks/favorites.

Then if you press the old "random" button you get the popup shown in the middle of the above image where you can input a name for your bookmark and it will send the name and current path in your browser to the pythonfile that saves it in the bookmarks.db database file.

So for example if you input "batman" and press save after you have browsed down to you batman folder it will send a request containing: name=batman, path=http://192.168.X.X:2202/comics/17821/folderCover (just an example) , and when you press the name of the bookmark again you can quickly navigate between your bookmarks.

Any theme maker and/or Tom may use the files/code if you like, it would be nice if you put my name and reference to this forum in the credits or something, ;)

Feel free to reply if you have any questions.

Readprogress only: http://s000.tinyupload.com/?file_id=03616343100468791259 , no need for the python .exe file

Pythonscript: http://s000.tinyupload.com/?file_id=07317340696167758222

Bookmarks/favories only: http://s000.tinyupload.com/?file_id=03504496794861024505

Bookmarks/favories and readprogress: http://s000.tinyupload.com/?file_id=00035228378135134176

Dude, that's really good.   Nice work!

Hi,

Does not work.. both.. :(

read in progress does not show up once I have selected a book, then read a number of page, then close the book.

bookmark shows the popup, I can enter a text in the box, the save button stay greyish, when clicked, nothing happend, need to click away from the popup to make it disappear.

Happy to better understand where I'm mistaking :)

Sorry for tthe late reply pppasc, the email was placed in my junk mail.

It sounds like it could be a cashe problem, how did you install it?, could you send a screenshot of you theme folder?

And maybe a screentshot of you development console, it's F12 in chrome so i can see if there are any errors.

To clear the cache you could try press ctrl+F5 (for chrome, not sure about firefox or Edge), also does it work in incognito/private mode?

The python script and the ubooquity server file must be run on the same computer.

Hello DarkShadowSwE,

Thanks for the reply.

I've been around these cache questions and install as well. I re install again this way 

- empty Chrome cache

- script & server on the same computer

- create 'readprogress' directory under theme directory

- download Pythonscript & extract both .exe & .py file under 'readprogress'

- download Bookmarks/favories and readprogress & extract files under 'readprogress'

- go to the Ubooquity configuration panel, select the newly created them 'readprogress', then restart the server (button SAVE AND RESTART)

- launch LIBRARY (Ubooquity user interface) from the Ubooquity server UI


1/ Open a book, read some pages, close the book

2/ There is no check box nor fill bar above the book image thumbnail (book L'avatar)

3/ Click on the random button on top of the ubooquity UI

4/ Fill the field and click in the Save button, nothing happens.!

here is the content of the 'readprogress' directory

I'm going to try in ingognito mode

Thanks

Hi again,

I might have been a bit vague when describing how to use it, ;)

example structure:


So your last image should have a lot more theme files and you dont need the bookmarks program in the theme folder if you dont like to.

Easiest if you create a new theme in the admin panel (http://your_ip_address:2203) so it copies all the files for the theme to you new theme folder or if you use the default theme.

Ok, I believe, I'm starting to understand.

Actually, I do not have a proper http server (such as apache).
I run Ubooquity by launching Ubooquity.jar (double clicking) from the directory where I did the initial download.

Looking in the Theme.js, I understand the program is calling for bookmark in the /user-api/ path, which does not exist in my case. It recall me things like /cgi-bin/. Is this something I should look at and setup with a proper http server ?


Now If I'm not bothering with bookmarks, but just want to have the read in progress feature, doing what you have suggested (thank you)  does not work.

Create a new theme with the configuration panel (so I get all themes files in it) + extract the ThemeScript.js + JQuery.js in this new theme directory so it looks like this:

Bu still, no thing showing up.

I'm probably mistaking things but hardly find which..?

Hi,

Yes, thats correct, there is no need to run any additional software, runing the ubboquity.jar will be enough (exept for the bookmarks.exe that i made), the /user-api/ path is an internal path ubooquity uses and its not part of the themes folder.

The folder structure seems correct, did your PC ask you to overwrite the themeScript.js when copying?

Did you make sure that "readprogress_1" is the active theme in the admin panel?

Not sure if having multiple themes with the same name or simular name might bug the themes?, could you try make a new with a totaly different name?

If you press F12 and press the console tab does it say any red errors?

Thanks for the advises

I redo with a new name for the theme directory (created from the conf panel)

Make sure I extracted the 2 correct files from your zip - http://s000.tinyupload.com/?file_id=03616343100468791259 

Make sure I can see those 2 overwrite my 2 from the initial creation

Empty cache


and same result.. :)

no in progress bar.


The way I'm using it is to select a comic, click on read button, read few page, then click ESC (to close), then I should see a read in progress bar above the thumbnail of my comic.?


No red flag or message in the console

I'm puzzle !

Anyway, thank you for trying to find out where I'm doing wring thing..

Hi,

Hmmm... , it sounds like you are doing it correct.

And your new theme folder looks like the image above for "readprogress_1"?, and you made it from the admin panel and its the active theme?

In you second post your image from your comics seems to be in a top folder (because all the comics have a red box with a number), if you go into the "Adler" comics folder and read a few and then stay in the Adler folder do you see the progress?

Yes I think I have done all this in the correct way..
I suggest we do a last try.

I have made a video that shows what I believe is making sense for you to understand (config, files, usage, etc.,)

Then If it does not work, we can consider this a closed, I do not want to nother you more than I have already done :)

Thank you very much for your time anyway

Hi again,

I did a super fast and small setup on my main PC and you need to disable the "Store bookmarks in cookie instead of server" option under advanced for it to work.

Whoa, hey, that setting in the Advanced section "Do not remove data from unreachable folders", unless you intentionally have that unchecked, I highly recommend it be checked.

Maybe your comics are on the same system as your Ubooquity server, so you have a more stable setup than my server + NAS, but if that folder ever goes unreachable and Ubooquity does a scan it will delete your whole database.

+1

It works !

Great

Thank you !

:)