Untitled
unknown
plain_text
3 years ago
529 B
13
Indexable
import subprocess
def remove_kindle_drm(input_file, output_file):
# Use the Calibre ebook-convert command to remove DRM and convert the e-book to Kindle format
command = ["ebook-convert", input_file, output_file, "--output-profile=kindle", "--unencrypted-metadata=opf", "--no-default-epub-cover"]
# Run the command and capture the output
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# Print the output
print(result.stdout.decode())
print(result.stderr.decode())
Editor is loading...