From ff2d9cf2a71fc296d6b2c48497f165d87a92a81f Mon Sep 17 00:00:00 2001 From: Florian Bach Date: Fri, 24 Feb 2023 14:11:15 +0100 Subject: [PATCH] Add copyright note to all files --- bundle_calibre_plugin.sh | 8 +++++ bundle_migration_plugin.sh | 7 ++++ calibre-plugin/__init__.py | 33 +++++++++++++++++++ calibre-plugin/config.py | 9 +++++ calibre-plugin/customRSA.py | 10 ++++++ .../exportPluginAuthToWindowsADE.py | 9 +++++ calibre-plugin/fulfill.py | 7 +++- calibre-plugin/getEncryptionKeyLinux.py | 9 +++++ calibre-plugin/getEncryptionKeyWindows.py | 9 +++++ calibre-plugin/get_key_from_Adobe.py | 9 +++++ calibre-plugin/gui_main.py | 9 +++++ calibre-plugin/gui_main_wrapper.py | 9 +++++ calibre-plugin/keyextractDecryptor.py | 9 +++++ calibre-plugin/libadobe.py | 9 +++++ calibre-plugin/libadobeAccount.py | 10 ++++++ calibre-plugin/libadobeFulfill.py | 9 +++++ calibre-plugin/libadobeImportAccount.py | 9 +++++ calibre-plugin/libpdf.py | 9 +++++ calibre-plugin/prefs.py | 7 ++++ calibre-plugin/register_ADE_account.py | 7 +++- migration_plugin/__init__.py | 8 +++++ migration_plugin/migration.py | 9 +++++ package_modules.sh | 7 ++++ tests/main.py | 9 +++++ 24 files changed, 228 insertions(+), 2 deletions(-) diff --git a/bundle_calibre_plugin.sh b/bundle_calibre_plugin.sh index aafbc61..8df926c 100755 --- a/bundle_calibre_plugin.sh +++ b/bundle_calibre_plugin.sh @@ -1,5 +1,13 @@ #!/bin/bash +# Copyright (c) 2021-2023 Leseratte10 +# This file is part of the ACSM Input Plugin by Leseratte10 +# ACSM Input Plugin for Calibre / acsm-calibre-plugin +# +# For more information, see: +# https://github.com/Leseratte10/acsm-calibre-plugin + + [ ! -f calibre-plugin/asn1crypto.zip ] && ./package_modules.sh [ ! -f calibre-plugin/oscrypto.zip ] && ./package_modules.sh diff --git a/bundle_migration_plugin.sh b/bundle_migration_plugin.sh index 5982a28..ad5a1c7 100755 --- a/bundle_migration_plugin.sh +++ b/bundle_migration_plugin.sh @@ -1,5 +1,12 @@ #!/bin/bash +# Copyright (c) 2021-2023 Leseratte10 +# This file is part of the ACSM Input Plugin by Leseratte10 +# ACSM Input Plugin for Calibre / acsm-calibre-plugin +# +# For more information, see: +# https://github.com/Leseratte10/acsm-calibre-plugin + rm -rf calibre-plugin-tmp || /bin/true mkdir calibre-plugin-tmp diff --git a/calibre-plugin/__init__.py b/calibre-plugin/__init__.py index bd1cd9f..30bbe6f 100644 --- a/calibre-plugin/__init__.py +++ b/calibre-plugin/__init__.py @@ -3,6 +3,39 @@ # Calibre plugin for ACSM files. +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +https://github.com/Leseratte10/acsm-calibre-plugin + +ACSM Input Plugin for Calibre / acsm-calibre-plugin +Formerly known as "DeACSM" + +This software is based on a Python reimplementation of the C++ library +"libgourou" by Grégory Soutadé which is under the LGPLv3 or later +license (http://indefero.soutade.fr/p/libgourou/). + +I have no idea whether a reimplementation in another language counts +as "derivative use", so just in case it does, I'm putting this project +under the GPLv3 (which is allowed in the LGPLv3 license) to prevent any +licensing issues. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +See the "LICENSE" file for a full copy of the GNU GPL v3. + +''' # Revision history: # v0.0.1: First version. diff --git a/calibre-plugin/config.py b/calibre-plugin/config.py index 848c929..33269da 100644 --- a/calibre-plugin/config.py +++ b/calibre-plugin/config.py @@ -3,6 +3,15 @@ # pyright: reportUndefinedVariable=false +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + import os, base64, traceback from PyQt5.QtGui import QKeySequence diff --git a/calibre-plugin/customRSA.py b/calibre-plugin/customRSA.py index d394bf0..bf177d5 100644 --- a/calibre-plugin/customRSA.py +++ b/calibre-plugin/customRSA.py @@ -1,6 +1,16 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + + ''' Use my own small RSA code so we don't have to include the huge python3-rsa just for these small bits. diff --git a/calibre-plugin/exportPluginAuthToWindowsADE.py b/calibre-plugin/exportPluginAuthToWindowsADE.py index d2a2c54..aaceb98 100644 --- a/calibre-plugin/exportPluginAuthToWindowsADE.py +++ b/calibre-plugin/exportPluginAuthToWindowsADE.py @@ -4,6 +4,15 @@ # Takes an existing Adobe authorization in the plugin, # writes that into the Windows registry so ADE can read and use it. +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + # In progress ... try: diff --git a/calibre-plugin/fulfill.py b/calibre-plugin/fulfill.py index e073a61..4c789e7 100644 --- a/calibre-plugin/fulfill.py +++ b/calibre-plugin/fulfill.py @@ -2,7 +2,12 @@ # -*- coding: utf-8 -*- ''' -This is an experimental Python version of libgourou. +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin ''' # pyright: reportUndefinedVariable=false diff --git a/calibre-plugin/getEncryptionKeyLinux.py b/calibre-plugin/getEncryptionKeyLinux.py index eebf5a0..447e281 100644 --- a/calibre-plugin/getEncryptionKeyLinux.py +++ b/calibre-plugin/getEncryptionKeyLinux.py @@ -1,6 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + #@@CALIBRE_COMPAT_CODE@@ import sys, binascii, traceback diff --git a/calibre-plugin/getEncryptionKeyWindows.py b/calibre-plugin/getEncryptionKeyWindows.py index 74874ec..fef6247 100644 --- a/calibre-plugin/getEncryptionKeyWindows.py +++ b/calibre-plugin/getEncryptionKeyWindows.py @@ -1,6 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + # Most of the code in this file has been taken from adobekey.pyw written by i♥cabbages # adobekey.pyw, version 7.0 # Copyright © 2009-2020 i♥cabbages, Apprentice Harper et al. diff --git a/calibre-plugin/get_key_from_Adobe.py b/calibre-plugin/get_key_from_Adobe.py index 567c327..e7c66df 100644 --- a/calibre-plugin/get_key_from_Adobe.py +++ b/calibre-plugin/get_key_from_Adobe.py @@ -1,6 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + ''' Run this tool to download the eBook DER encryption key for a given ADE account from the Adobe server. diff --git a/calibre-plugin/gui_main.py b/calibre-plugin/gui_main.py index c7a259a..6817c20 100644 --- a/calibre-plugin/gui_main.py +++ b/calibre-plugin/gui_main.py @@ -1,6 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + # GUI for the ACSM plugin. # # "create_menu_action_unique" taken from the Quality Check plugin: diff --git a/calibre-plugin/gui_main_wrapper.py b/calibre-plugin/gui_main_wrapper.py index d9f02d6..749e64c 100644 --- a/calibre-plugin/gui_main_wrapper.py +++ b/calibre-plugin/gui_main_wrapper.py @@ -1,6 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + # GUI for the ACSM plugin. # diff --git a/calibre-plugin/keyextractDecryptor.py b/calibre-plugin/keyextractDecryptor.py index a202a68..eae3143 100644 --- a/calibre-plugin/keyextractDecryptor.py +++ b/calibre-plugin/keyextractDecryptor.py @@ -1,4 +1,13 @@ +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + # NOTE: # This file contains the two Windows executables "decrypt_win32.exe" and "decrypt_win64.exe" # in base64-encoded form. The source code for these files can be found inside the main.c file diff --git a/calibre-plugin/libadobe.py b/calibre-plugin/libadobe.py index 6829bf5..0032aa2 100644 --- a/calibre-plugin/libadobe.py +++ b/calibre-plugin/libadobe.py @@ -1,6 +1,15 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + ''' Helper library with code needed for Adobe stuff. ''' diff --git a/calibre-plugin/libadobeAccount.py b/calibre-plugin/libadobeAccount.py index e294582..ca8ed0e 100644 --- a/calibre-plugin/libadobeAccount.py +++ b/calibre-plugin/libadobeAccount.py @@ -1,3 +1,13 @@ + +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + from lxml import etree import base64 import locale, platform diff --git a/calibre-plugin/libadobeFulfill.py b/calibre-plugin/libadobeFulfill.py index 33dd826..a12ceba 100644 --- a/calibre-plugin/libadobeFulfill.py +++ b/calibre-plugin/libadobeFulfill.py @@ -1,3 +1,12 @@ +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + from lxml import etree import base64 import random diff --git a/calibre-plugin/libadobeImportAccount.py b/calibre-plugin/libadobeImportAccount.py index 3b11769..0fab1c2 100644 --- a/calibre-plugin/libadobeImportAccount.py +++ b/calibre-plugin/libadobeImportAccount.py @@ -1,3 +1,12 @@ +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + from lxml import etree import base64 import os, locale, platform diff --git a/calibre-plugin/libpdf.py b/calibre-plugin/libpdf.py index 51b9402..2525f65 100644 --- a/calibre-plugin/libpdf.py +++ b/calibre-plugin/libpdf.py @@ -1,3 +1,12 @@ +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + import sys, os, zlib, base64, time class BackwardReader: diff --git a/calibre-plugin/prefs.py b/calibre-plugin/prefs.py index a3070af..bceb393 100644 --- a/calibre-plugin/prefs.py +++ b/calibre-plugin/prefs.py @@ -1,7 +1,14 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' # Standard Python modules. import os diff --git a/calibre-plugin/register_ADE_account.py b/calibre-plugin/register_ADE_account.py index 6ba0e76..bbdc5d2 100644 --- a/calibre-plugin/register_ADE_account.py +++ b/calibre-plugin/register_ADE_account.py @@ -2,7 +2,12 @@ # -*- coding: utf-8 -*- ''' -This is an experimental Python version of libgourou. +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin ''' import getpass, sys diff --git a/migration_plugin/__init__.py b/migration_plugin/__init__.py index 48c6f3f..3ed6b48 100644 --- a/migration_plugin/__init__.py +++ b/migration_plugin/__init__.py @@ -4,6 +4,14 @@ # Migration plugin from "DeACSM" to "ACSM Input" # See README.md for details. +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' # Revision history: # v0.0.20: First version of the migration plugin, released under the old name. diff --git a/migration_plugin/migration.py b/migration_plugin/migration.py index 95d9295..ef1c1d0 100644 --- a/migration_plugin/migration.py +++ b/migration_plugin/migration.py @@ -4,6 +4,15 @@ # Migration plugin from "DeACSM" to "ACSM Input" # See README.md for details. +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + import os, sys from calibre.gui2.actions import InterfaceAction diff --git a/package_modules.sh b/package_modules.sh index b935e9f..97930dd 100755 --- a/package_modules.sh +++ b/package_modules.sh @@ -1,5 +1,12 @@ #!/bin/bash +# Copyright (c) 2021-2023 Leseratte10 +# This file is part of the ACSM Input Plugin by Leseratte10 +# ACSM Input Plugin for Calibre / acsm-calibre-plugin +# +# For more information, see: +# https://github.com/Leseratte10/acsm-calibre-plugin + pushd calibre-plugin # As the latest oscrypto release (1.3.0) does not yet support OpenSSL3, we'll have to download a forked version ... diff --git a/tests/main.py b/tests/main.py index 226381f..f8a88a9 100755 --- a/tests/main.py +++ b/tests/main.py @@ -1,5 +1,14 @@ #!/usr/bin/python3 +''' +Copyright (c) 2021-2023 Leseratte10 +This file is part of the ACSM Input Plugin by Leseratte10 +ACSM Input Plugin for Calibre / acsm-calibre-plugin + +For more information, see: +https://github.com/Leseratte10/acsm-calibre-plugin +''' + import sys, os sys.path.append("../calibre-plugin")