![]() |
[FileType Plugin] ACSM Input
1 Attachment(s)
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:
|
1 Attachment(s)
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. |
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. |
Is this backward compatible with older versions of Calibre (specifically 4.23)?
|
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. |
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.
|
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. |
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 :rolleyes:) |
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. |
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. |
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"". |
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. |
Quote:
EDIT: Since v0.0.16 (July 2022) Calibre 4 / Python 2 is now supported. |
Quote:
|
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? |
| All times are GMT -4. The time now is 08:42 AM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.