Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 09-25-2021, 10:44 AM   #1
Leseratte_10
Enthusiast
Leseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned off
 
Posts: 31
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:
  • I would suggest creating a new dummy AdobeID to use for Calibre so just in case Adobe detects this and bans you, you don't lose your main AdobeID.
  • Combined with that I suggest importing the DER file into the Alf plugin to make sure that losing your AdobeID doesn't also mean you'll lose access to all your eBooks.
  • Support for PDFs might be unreliable. In order to use DeDRM with PDFs you'll need to apply PR #1689 (including the bugfix in the comments). If there's still issues please send me the PDF file and I'll take a look.
  • This software is not approved by Adobe. I am not responsible if Adobe detects that you're using nonstandard software and bans your account. Do not complain to me if Adobe bans your main ADE account - you have been warned. So far, none of my test accounts have been banned, but you never know ...

How to setup:
  • Download the plugin from this post and import it into Calibre
  • Go into the plugin settings, click "Link to ADE account" and enter your AdobeID credentials
  • After a couple seconds the window should now say "Authorized with AdobeID X" instead of "Not authorized"
  • Click the "Export account activation data" and "Export account encryption key" buttons to export / backup your keys. The first backup can be used to restore the Adobe authorization after a reinstall / reset without wasting one of the 6 activations, the second key file (DER) can be used for DeDRM.
  • 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 an EPUB or PDF.

Version History:

Spoiler:

Version 0.0.9 - 4 Oct 2021
- Add support for the Adobe record "FulfillmentNotification". This lets the Adobe server (and the book distributor server) know you've successfully downloaded a book. This is not strictly required to fulfill a book, but it brings the behaviour of this plugin closer to the exact behaviour of ADE and thus reduces the chance of Adobe detecting and blocking this plugin. If you don't like this feature it can be disabled in the plugin settings.
- Add support for the Adobe record "LoanReturn". This lets you return a loaned eBook to the library (only if FulfillmentNotification support is enabled). This only works with books downloaded with v0.0.9 or newer.

Version 0.0.8 - 3 Oct 2021
- Fix some more issues with some PDF files
- Fix for PDF files larger than 4GB
- Fix for PDF or EPUB files larger than available RAM
- Fix for ACSM files not showing up in Calibre's "Add book" dialog

Version 0.0.7 - 1 Oct 2021
- Bugfix for some PDF files
- More debug logs for PDF issues
- Fix locale bug on MacOS

Version 0.0.6 - 28 Sep 2021
- First support for PDF files
- Add functionality to import an existing activation backup from a previous installation

Version 0.0.5 - 27 Sep 2021
- Bugfix: With version 0.0.4, the DeDRM plugin was also executed on imported books if it was installed but has been disabled in the Calibre settings. With this update the DeDRM plugin is only executed if it's enabled.
- Addition: There's now a standalone Python script included in the ZIP file (get_key_from_Adobe.py) that can be used to download the account DER encryption key (for DeDRM) from Adobe's servers without using up one of the six activations.

Version 0.0.4 - 26 Sep 2021
- Make plugin compatible with DeDRM, it's no longer needed to modify the DeDRM plugin to make it work.

Version 0.0.3 - 25 Sep 2021
- First version published on mobileread.
- Code completely rewritten in Python-only, no longer dependant on the Linux-only libgourou library

Version 0.0.2 - 21 Sep 2021 - unreleased development version
- Fix a bug with encryption key export

Version 0.0.1 - 20 Sep 2021
- First version - Linux-only as it still uses the C++ libgourou instead of my own Python implementation.

Attached Files
File Type: zip DeACSM_0.0.9.zip (858.6 KB, 56 views)

Last edited by Leseratte_10; 10-04-2021 at 09:48 AM. Reason: Update to v0.0.9
Leseratte_10 is offline   Reply With Quote
Old 09-25-2021, 07:22 PM   #2
Leseratte_10
Enthusiast
Leseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned off
 
Posts: 31
Karma: 97166
Join Date: Sep 2021
Device: PRS-T2
(empty 2nd post if needed).

Last edited by Leseratte_10; 10-02-2021 at 03:52 PM.
Leseratte_10 is offline   Reply With Quote
Advert
Old 09-26-2021, 12:03 AM   #3
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 11,474
Karma: 65694623
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Deleted

Last edited by PeterT; 09-26-2021 at 12:05 AM.
PeterT is offline   Reply With Quote
Old 09-26-2021, 07:17 AM   #4
Leseratte_10
Enthusiast
Leseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned off
 
Posts: 31
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 12:19 AM.
Leseratte_10 is offline   Reply With Quote
Old 09-26-2021, 08:06 PM   #5
Joliet Jake
Enthusiast
Joliet Jake doesn't litterJoliet Jake doesn't litter
 
Posts: 34
Karma: 142
Join Date: Feb 2021
Location: Canada
Device: Kobo Forma
Is this backward compatible with older versions of Calibre (specifically 4.23)?
Joliet Jake is offline   Reply With Quote
Advert
Old 09-27-2021, 12:12 AM   #6
Leseratte_10
Enthusiast
Leseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned off
 
Posts: 31
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 01:42 AM.
Leseratte_10 is offline   Reply With Quote
Old 09-27-2021, 02:48 PM   #7
Leseratte_10
Enthusiast
Leseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned off
 
Posts: 31
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.
Leseratte_10 is offline   Reply With Quote
Old 09-28-2021, 12:49 PM   #8
Leseratte_10
Enthusiast
Leseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned off
 
Posts: 31
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.
Leseratte_10 is offline   Reply With Quote
Old 09-29-2021, 06:06 PM   #9
un_pogaz
Chalut o/
un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.
 
un_pogaz's Avatar
 
Posts: 214
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 )
un_pogaz is offline   Reply With Quote
Old 09-30-2021, 12:32 AM   #10
Leseratte_10
Enthusiast
Leseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned off
 
Posts: 31
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 12:45 AM.
Leseratte_10 is offline   Reply With Quote
Old 09-30-2021, 01:35 AM   #11
droopy
Guru
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 751
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.
droopy is offline   Reply With Quote
Old 09-30-2021, 03:16 AM   #12
un_pogaz
Chalut o/
un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.un_pogaz is the One.
 
un_pogaz's Avatar
 
Posts: 214
Karma: 101867
Join Date: Dec 2017
Device: Kobo
Quote:
Originally Posted by Leseratte_10 View Post
That's the point of this plugin, yeah. Create an EPUB or PDF just like ADE would, with DRM.
Yes. Perfect. I will finally be able to get rid of ADE. Thanks you.

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"".
un_pogaz is offline   Reply With Quote
Old 09-30-2021, 08:25 PM   #13
rcentros
eReader Wrangler
rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.
 
rcentros's Avatar
 
Posts: 5,992
Karma: 40049344
Join Date: Mar 2013
Location: Boise, ID
Device: PB HD3, GlowLight 3, Tolino Vision 4, Voyage
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.
rcentros is offline   Reply With Quote
Old 10-01-2021, 12:55 AM   #14
Leseratte_10
Enthusiast
Leseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned offLeseratte_10 can read ebooks with the screen turned off
 
Posts: 31
Karma: 97166
Join Date: Sep 2021
Device: PRS-T2
Quote:
Originally Posted by rcentros View Post
As for Calibre... I was using 4.18. De-ASCM wouldn't work there, so I had a good reason to upgrade.
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.
Leseratte_10 is offline   Reply With Quote
Old 10-01-2021, 01:35 AM   #15
rcentros
eReader Wrangler
rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.rcentros ought to be getting tired of karma fortunes by now.
 
rcentros's Avatar
 
Posts: 5,992
Karma: 40049344
Join Date: Mar 2013
Location: Boise, ID
Device: PB HD3, GlowLight 3, Tolino Vision 4, Voyage
Quote:
Originally Posted by Leseratte_10 View Post
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.
The Calibre 5 GUI looks almost identical to the Calibre 4 one. So I'm not missing anything. Thanks again.
rcentros is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FileType Plugin] GetFileName Terisa de morgan Plugins 375 10-16-2021 04:37 AM
help with epub on_import filetype plugin digitalvideo Development 4 02-27-2020 05:13 AM
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 25 10-12-2019 11:32 PM
Question about file_types in FileType plugin Terisa de morgan Plugins 6 02-08-2017 05:53 AM
Zip Filetype Plugin? rsingley Plugins 7 02-11-2011 05:11 PM


All times are GMT -4. The time now is 02:21 AM.


MobileRead.com is a privately owned, operated and funded community.