12-20-2022, 01:02 PM | #1891 | |
Junior Member
Posts: 9
Karma: 10
Join Date: Jul 2022
Device: samsung galaxy Z fold 2 5G
|
Quote:
sorry for my bad english, i use a translator. Thank you for your answer. I tried to modify as indicated but I still found myself in front of a blank page. I've downgraded to php 7.4.33 for now. |
|
12-22-2022, 01:21 PM | #1892 |
Junior Member
Posts: 4
Karma: 10
Join Date: Dec 2022
Device: Kindle Oasis
|
Hi,
Can someone please post the example of the following two rows from config_local.php? $config['cops_convert_to_types'] $config['convert_cmd'] I installed COPS on my Synology, and it allows me to download FB2 books. I am trying to add an option to download ePub file using converter from this site: https://github.com/rupor-github/fb2converter/releases but I don't know how to make epub option appearing next to FB2 one. I found an instruction to use two parameters above, but no examples. Thank you in advance. |
12-22-2022, 05:28 PM | #1893 |
Guru
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@leo4any1
As a long time user of COPS I have never seen the 2 lines from config_local.php (they are not in MY config_local.php). Can you point me to where you found them? |
12-22-2022, 06:38 PM | #1894 |
Junior Member
Posts: 4
Karma: 10
Join Date: Dec 2022
Device: Kindle Oasis
|
@mariosipad
I don’t have these lines too. I found the following instruction in COPSFB2 fork of COPS project. (sorry, the following is auto translated) 7. If you need a converter to mobi/epub: We take here the converter for our platform We unpack it into copsfb2/convert, check the rights and attributes of executable files. The specified directory must contain the fb2c executable file (for Windows, fb2c.exe). In copsfb2/config_local.php we edit the parameters: $config['cops_convert_to_types'], specify the types to which to convert, separated by commas, by default mobi,epub are written in the config $config['convert_cmd'], command line for conversion. If you have linux, you can leave it alone, in windows correct the name of the executable file. You can create the convert/configuration.toml configuration file by hand or run the converter with the export command and edit it. If one is found, it will be passed to the executable command at startup If there are problems with the conversion (there are mobi/epub icons, but fb2 is loaded, check the write and execute permissions. By default, the converter tries to create its own log in the copsfb2/ directory (conversion.log). If the http group does not have write permissions to this directory, there will be an error and no output file will be created.Logging can be disabled in configuration.toml ([logger.file] level = "none", read the documentation for the converter) or give write permissions to the http group in the copsfb2/ directory. Sent from my iPad using Tapatalk |
12-27-2022, 05:12 PM | #1895 |
Guru
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@leo4any1
Do you have a link to the code? The only link I could find https://sites.google.com/site/copsfb...attredirects=0 seems to be dead. What this piece of software seems to do is convert FBreader files to epub/mobi files on-the-fly. It does not add a downloadable copy of a FBreader-file in epub-format to COPS. You can (only) do that with Calibre. |
12-29-2022, 06:56 PM | #1896 |
Junior Member
Posts: 4
Karma: 10
Join Date: Dec 2022
Device: Kindle Oasis
|
@mariosipad
The link is below: https://sites.google.com/site/copsfb...;-synology-dsm It is in Russian though therefore you need to use the Google translator. I am trying to get it converted on the fly. The original library has books in fb2 format only. What I am trying to do is to get 'epub' and 'mobi' icons appearing next to 'fb2' one, and to get COPS automatically running the installed converter to get the book downloaded in 'epub' format (if I click on epub icon) I got the following example on another forum, but it still doesn't work for me. $config['cops_prefered_format'] = array ("epub","fb2"); $config['cops_convert_to_types'] = (file_exists('./convert/fb2c') ? "mobi,epub" : TRUE); What is interesting though is that when I remove 'fb2' from the list above I don't get 'fb2' download icon anymore. It means the system takes it, but still something is missing, I get only 'fb2' icons regardless of the values in this list. |
12-30-2022, 07:30 AM | #1897 |
Guru
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@leo4any1
Thanks for the link. However I cannot find any working link to the installable code (copsfb2.zip). It might be that I need new glasses or a bigger monitor, but so far no luck. So I'm not able to install and test it. I would use calibre to convert all FBreader files to epub or mobi and then use COPS to serve them. It's a nice challenge to get copsfb2 working though! |
12-30-2022, 07:37 AM | #1898 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
12-30-2022, 01:09 PM | #1899 |
Guru
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@chaley @leo4any1
The link seems to work. I have tried to test it on a Debian 10 PC with apache2. However copsfb2 does not behave like I expect cops to behave. The source code seems to be a bit more changed than I thought. I am just an enthousiast user of cops and not really a php programmer. If I can find the time I will try again to make it work in 2023! (I give op for 2022.) |
12-30-2022, 01:40 PM | #1900 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Dec 2022
Device: Kindle Oasis
|
Quote:
The actual zip file can be found at: https://drive.google.com/uc?id=0B001...xport=download Everything works fine, I am able to browse and download all books in FB2 format (my library has books in FB2 format only). It is probably possible to get all books pre-converted to epub and/or mobi and have them added to the library, but it will double or triple the required storage space, and seems like an overkill. It would be much better to have an option to convert on the fly, in the same way as Calibre does it. Anyways, I hope we can have it figured out next year. Happy New Year to everyone! |
|
01-12-2023, 09:42 AM | #1901 |
Guru
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@jajaX
I just found out there is an error in the post #1890 I made. Below you'll find the correction in red. How: 1 - open file ../cops/vendor/seblucas/dot-php/doT.php 2 - change line 94 Code:
return @create_function ('$it', $func); Code:
return @function ($it) use ($func) {
return eval($func);
};
Code:
// For PHP 8 replace this line //return create_function ('$it', $func); // with return function ($it) use ($func) { return eval($func); }; // end replace |
03-14-2023, 05:43 PM | #1902 | |
Junior Member
Posts: 9
Karma: 10
Join Date: Jul 2022
Device: samsung galaxy Z fold 2 5G
|
Quote:
ok, thank you véry much. I must upgrade my "server" computer to 22.04 tomorrow. I try that after !! |
|
03-20-2023, 12:58 PM | #1903 | |
Junior Member
Posts: 9
Karma: 10
Join Date: Jul 2022
Device: samsung galaxy Z fold 2 5G
|
Quote:
I confirm => it's works !! thank you very much |
|
06-22-2023, 04:22 AM | #1904 |
Member
Posts: 16
Karma: 10
Join Date: Oct 2022
Device: Kindle Paperwhite 1st Generation
|
Those participating in this thread who also use Home Assistant may be interested in the COPS add-on I have put together. It is updated to work in PHP8 and supports hosting your library locally or via a network share. Make your library easily available to visitors to your home 24/7 via web browser and OPDS. Take a look at HA COPS add-on.
|
07-24-2023, 08:09 AM | #1905 |
Zealot
Posts: 140
Karma: 76596
Join Date: Feb 2015
Location: Portugal
Device: Kobo Aura HD
|
Call to action to create a new template for COPS. Bring in your skills:
«if anyone has a slight interest or knowledge in designing a new front-end web interface for COPS, that would be most welcome.» See this Github: https://github.com/mikespub-org/sebl.../discussions/9 Note: for questions keep on with this actual mobileread forum topic! |
Tags |
calibre opds, dns, kobo aura, synology |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre OPDS server with windows apps? | nickdma | Related Tools | 10 | 03-03-2024 02:53 PM |
[Old Thread] Android FBreader and Calibre OPDS server question | kalex | Calibre | 5 | 12-24-2015 10:16 PM |
PHP+Apache web server for calibre ... | chaley | Related Tools | 254 | 04-28-2014 08:18 PM |
External OPDS catalogue in Calibre | bolton | Calibre | 1 | 09-05-2012 06:14 AM |
Calibre Command Line usage with PHP | artoros | Related Tools | 13 | 07-01-2010 09:57 AM |