09-25-2021, 11:44 AM | #1 |
Groupie
Posts: 183
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
[FileType Plugin] ACSM Input
ACSM import support for Calibre
This plugin is a replacement for Adobe Digital Editions (ADE) which allows you to turn an ACSM file into an EPUB or PDF just like ADE would. A couple months ago, Grégory Soutadé created an open-source ADE replacement library (libgourou) in C++ which can be used to "convert" ACSM files into EPUB or PDF files - see the thread https://www.mobileread.com/forums/sh...d.php?t=340479 A couple days ago, I noticed that library and started to look at how that worked. First I only managed to make a small Calibre plugin that just executes his library / binary, so the first version was Linux-only, but then I was able to completely reimplement the libgourou library in native Python as a Calibre plugin. This means, that Windows, Linux, and Mac users can just add this FileType plugin to Calibre, enter their AdobeID credentials in the plugin settings, and then just drag-and-drop an ACSM file into Calibre and it'll turn into an EPUB or PDF. The source code, if you want to take a look, can be found here: https://github.com/Leseratte10/acsm-calibre-plugin Couple important notes:
How to setup: Download the plugin from this post (or from the Calibre Plugin list) and import it into Calibre, then open the plugin settings. You now have four different ways to authorize / activate the plugin:
Once you activated the plugin using one of the four methods, click "Export account activation data" and save the data somewhere. Make enough backups of this, if you have an anonymous authorization you'll need this to restore the data if you reinstall your OS or move to another computer. If you are using an AdobeID, you can use this data to restore the activation without using another one of your available authorizations. Now download an ACSM file from Adobe's test library ( https://www.adobe.com/de/solutions/e...k-library.html ) and see if you can import it into Calibre and if it turns into a readable EPUB or PDF file. Version History: Spoiler:
Last edited by Leseratte_10; 10-21-2022 at 02:22 AM. |
09-25-2021, 08:22 PM | #2 |
Groupie
Posts: 183
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
Beta versions
If you run into the following error message: oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto This is due to a bug in oscrypto that doesn't correctly work with OpenSSL 3.0.10 and newer. If you're on version 0.0.16 you can install the fixed version from this post. If you're on the 0.1.0 beta from Github, re-download the latest version from Github and install that. Last edited by Leseratte_10; 09-03-2023 at 06:42 AM. |
Advert | |
|
09-26-2021, 08:17 AM | #3 |
Groupie
Posts: 183
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
Just updated the plugin to v0.0.4. Unfortunately I don't have enough posts here yet to be able to edit my first post and attach the new version, so it's probably best to just post a link to the Github Releases page where there will always be the most recent version: https://github.com/Leseratte10/acsm-...lugin/releases
Initial post updated to have new version PeterT ^ Thanks PeterT for updating, now I finally have enough posts to edit previous ones so I'll be able to add future updates myself. Last edited by pdurrant; 04-06-2022 at 03:43 PM. Reason: removed detailed help with DRM removal |
09-26-2021, 09:06 PM | #4 |
Zealot
Posts: 110
Karma: 3098438
Join Date: Feb 2021
Location: Canada
Device: Kobo Sage
|
Is this backward compatible with older versions of Calibre (specifically 4.23)?
|
09-27-2021, 01:12 AM | #5 |
Groupie
Posts: 183
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
I haven't tested it, but I would be surprised if it is. I bet I've used one or the other Python 3 feature in the plugin. Though I can try it and see what happens.
EDIT: Just tested it, no, it's not compatible. I tried making it compatible with Python 2 but there's some weird errors with the libadobe imports that I can't get fixed, so for now this plugin will require Calibre 5.0 or newer. EDIT 2: Since v0.0.16 (July 2022) Calibre 4 / Python 2 is now supported. Last edited by Leseratte_10; 10-17-2022 at 05:51 AM. |
Advert | |
|
09-27-2021, 03:48 PM | #6 |
Groupie
Posts: 183
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
Finally managed to fulfill a couple PDF files. Just need to clean up the code a bit, and I imagine tomorrow or Wednesday there will be an update to add PDF support.
|
09-28-2021, 01:49 PM | #7 |
Groupie
Posts: 183
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
v0.0.6 is now available which supports PDF files, too.
PDF support might still be slightly unreliable due to how complex the PDF format is, if you find any file where the resulting PDF seems to be corrupt please let me know. |
09-29-2021, 07:06 PM | #8 |
Chalut o/
Posts: 426
Karma: 145424
Join Date: Dec 2017
Device: Kobo
|
To make sure I understood correctly:
This plugin allows to import the ePub/PDF file associated to an ACSM file exactly as Adobe Digital Editions does? (With their DRM that will to be handled... elsewhere ) |
09-30-2021, 01:32 AM | #9 |
Groupie
Posts: 183
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
That's the point of this plugin, yeah. Create an EPUB or PDF just like ADE would, with DRM.
I have tested a couple EPUB and PDF files and the resulting file was always 100% identical to the one generated by ADE. I have no idea whether that's always the case, but it should always generate a file that's semantically identical. Last edited by Leseratte_10; 09-30-2021 at 01:45 AM. |
09-30-2021, 02:35 AM | #10 |
Guru
Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
|
Thank you, Leseratte_10 (OP).
Your work means I don't have to bother with Wine-ADE on my Linux system. It also means I don't have to do "terminal" work with the soutade binary/files. |
09-30-2021, 04:16 AM | #11 | |
Chalut o/
Posts: 426
Karma: 145424
Join Date: Dec 2017
Device: Kobo
|
Quote:
It's nice to say how it works and how its idea came to you, but the purpose of the plugin is not clear and I had to deduct it. Is missing a little paragraph in the first line ""ADE in Calibre"". |
|
09-30-2021, 09:25 PM | #12 |
eReader Wrangler
Posts: 7,753
Karma: 50255637
Join Date: Mar 2013
Location: Boise, ID
Device: PB HD3, GL3, Tolino Vision 4, Voyage, Clara HD
|
Thank you, Leseratte_10. Never could get ADE to work in Wine (not a big fan of Wine anyhow). This works perfectly. Thanks!
As for Calibre... I was using 4.18. De-ASCM wouldn't work there, so I had a good reason to upgrade. |
10-01-2021, 01:55 AM | #13 | |
Groupie
Posts: 183
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
|
Quote:
EDIT: Since v0.0.16 (July 2022) Calibre 4 / Python 2 is now supported. Last edited by Leseratte_10; 10-17-2022 at 05:52 AM. |
|
10-01-2021, 02:35 AM | #14 | |
eReader Wrangler
Posts: 7,753
Karma: 50255637
Join Date: Mar 2013
Location: Boise, ID
Device: PB HD3, GL3, Tolino Vision 4, Voyage, Clara HD
|
Quote:
|
|
10-01-2021, 03:54 AM | #15 |
just an egg
Posts: 1,715
Karma: 6653246
Join Date: Mar 2015
Device: Kindle, iOS
|
Intriguing plugin. Thank you, Leseratte_10
I am trying this on macOS Catalina. When I input Adobe credentials, I get: ERROR: Unhandled exception: <b>TypeError</b>:Argument must be bytes or unicode, got 'NoneType' Suggestions? Last edited by odamizu; 10-01-2021 at 04:49 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[FileType Plugin] GetFileName | Terisa de morgan | Plugins | 417 | 07-16-2024 04:37 AM |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 02:25 AM |
help with epub on_import filetype plugin | digitalvideo | Development | 4 | 02-27-2020 06:13 AM |
Question about file_types in FileType plugin | Terisa de morgan | Plugins | 6 | 02-08-2017 06:53 AM |
Zip Filetype Plugin? | rsingley | Plugins | 7 | 02-11-2011 06:11 PM |