|
|
#1 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 59
Karma: 97166
Join Date: Sep 2021
Device: PRS-T2
|
[FileType Plugin] ACSM input plugin
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. If you're using Apprentice Harper's original version of the DeDRM plugin, click "Export account encryption key" and import that file into the DeDRM settings. If you're using noDRM's new forked version of the plugin, you can skip this step as this will happen automatically (thanks noDRM!) 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; 12-15-2021 at 09:24 AM. Reason: Update to v0.0.15 |
|
|
|
|
|
#2 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 59
Karma: 97166
Join Date: Sep 2021
Device: PRS-T2
|
Beta versions
Currently there's no beta version available. Please download the latest released version from the first post. If there's any new beta versions (new code / features that I'm not 100% sure is correct and bug-free), I will add test versions to this post. Last edited by Leseratte_10; 12-15-2021 at 09:27 AM. |
|
|
|
|
|
#3 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 59
Karma: 97166
Join Date: Sep 2021
Device: PRS-T2
|
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
With this update the plugin is compatible with DeDRM, meaning, there's no longer any code changes needed in the DeDRM plugin, it will just work automatically (as long as your key is imported in the DeDRM plugin settings). Once I have enough posts to edit my first post I'll remove the paragraph about the DeDRM modifications. 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 Leseratte_10; 09-27-2021 at 01:19 AM. |
|
|
|
|
|
#4 |
|
Connoisseur
![]() ![]() ![]() ![]() Posts: 69
Karma: 342
Join Date: Feb 2021
Location: Canada
Device: Kobo Forma
|
Is this backward compatible with older versions of Calibre (specifically 4.23)?
|
|
|
|
|
|
#5 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 59
Karma: 97166
Join Date: Sep 2021
Device: PRS-T2
|
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. Last edited by Leseratte_10; 09-27-2021 at 02:42 AM. |
|
|
|
|
|
#6 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 59
Karma: 97166
Join Date: Sep 2021
Device: PRS-T2
|
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.
|
|
|
|
|
|
#7 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 59
Karma: 97166
Join Date: Sep 2021
Device: PRS-T2
|
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. |
|
|
|
|
|
#8 |
|
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 218
Karma: 101867
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 )
|
|
|
|
|
|
#9 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 59
Karma: 97166
Join Date: Sep 2021
Device: PRS-T2
|
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. |
|
|
|
|
|
#10 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 752
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. |
|
|
|
|
|
#11 | |
|
Chalut o/
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 218
Karma: 101867
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"". |
|
|
|
|
|
|
#12 |
|
eReader Wrangler
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,216
Karma: 41596024
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. |
|
|
|
|
|
#13 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 59
Karma: 97166
Join Date: Sep 2021
Device: PRS-T2
|
Yeah, Calibre 4.X is still using Python 2, Calibre 5 and above uses Python 3. I started developing this plugin in Python 3 (because nobody should still develop new stuff in Python 2 in 2021), and although I tried to make it Python-2-compatible afterwards I ran into a bunch of issues with that, so you'll have to use Calibre 5.
|
|
|
|
|
|
#14 | |
|
eReader Wrangler
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,216
Karma: 41596024
Join Date: Mar 2013
Location: Boise, ID
Device: PB HD3, GL3, Tolino Vision 4, Voyage, Clara HD
|
Quote:
|
|
|
|
|
|
|
#15 |
|
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,388
Karma: 2688282
Join Date: Mar 2015
Device: Kindle Oasis1 & Voyage, 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. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FileType Plugin] GetFileName | Terisa de morgan | Plugins | 375 | 10-16-2021 05:37 AM |
| help with epub on_import filetype plugin | digitalvideo | Development | 4 | 02-27-2020 06:13 AM |
| [FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 25 | 10-13-2019 12:32 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 |