From dd7d8ea3c4f47e315623d882d6b68339da959ab9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 2 Jan 2019 21:49:02 +0530 Subject: [PATCH] Switch from cssutils to css-parser css-parser is a new fork of the unmaintained cssutils. See https://github.com/ebook-utils/css-parser --- manual/plugin_examples/editor_demo/main.py | 5 ++-- src/calibre/customize/profiles.py | 2 +- src/calibre/devices/kobo/driver.py | 8 +++---- .../ebooks/conversion/plugins/epub_output.py | 2 +- .../ebooks/conversion/plugins/fb2_input.py | 4 ++-- .../ebooks/conversion/plugins/html_input.py | 6 ++--- src/calibre/ebooks/conversion/plumber.py | 4 ++-- src/calibre/ebooks/css_transform_rules.py | 4 ++-- src/calibre/ebooks/mobi/reader/markup.py | 24 ------------------- src/calibre/ebooks/mobi/writer8/main.py | 18 +++++++------- src/calibre/ebooks/odt/input.py | 12 ++++------ src/calibre/ebooks/oeb/base.py | 10 ++++---- src/calibre/ebooks/oeb/normalize_css.py | 9 +++---- src/calibre/ebooks/oeb/polish/cascade.py | 7 +++--- src/calibre/ebooks/oeb/polish/check/fonts.py | 2 +- src/calibre/ebooks/oeb/polish/check/main.py | 3 +-- .../ebooks/oeb/polish/check/parsing.py | 6 ++--- src/calibre/ebooks/oeb/polish/container.py | 6 ++--- src/calibre/ebooks/oeb/polish/css.py | 4 ++-- .../ebooks/oeb/polish/tests/cascade.py | 2 +- src/calibre/ebooks/oeb/polish/utils.py | 8 +++---- src/calibre/ebooks/oeb/reader.py | 4 ++-- src/calibre/ebooks/oeb/stylizer.py | 10 ++++---- .../ebooks/oeb/transforms/embed_fonts.py | 4 ++-- .../ebooks/oeb/transforms/filenames.py | 5 ++-- src/calibre/ebooks/oeb/transforms/flatcss.py | 14 +++++------ .../ebooks/oeb/transforms/page_margin.py | 2 +- .../ebooks/oeb/transforms/trimmanifest.py | 4 ++-- src/calibre/gui2/tweak_book/boss.py | 8 +++---- src/calibre/gui2/tweak_book/diff/view.py | 6 ++--- .../gui2/tweak_book/editor/smarts/html.py | 2 +- src/calibre/srv/render_book.py | 4 ++-- src/tinycss/fonts3.py | 3 ++- 33 files changed, 91 insertions(+), 121 deletions(-) diff --git a/manual/plugin_examples/editor_demo/main.py b/manual/plugin_examples/editor_demo/main.py index 85c0dcdd69..88b032a563 100644 --- a/manual/plugin_examples/editor_demo/main.py +++ b/manual/plugin_examples/editor_demo/main.py @@ -8,7 +8,7 @@ __copyright__ = '2014, Kovid Goyal ' import re from PyQt5.Qt import QAction, QInputDialog -from cssutils.css import CSSRule +from css_parser.css import CSSRule # The base class that all tools must inherit from from calibre.gui2.tweak_book.plugin import Tool @@ -17,6 +17,7 @@ from calibre import force_unicode from calibre.gui2 import error_dialog from calibre.ebooks.oeb.polish.container import OEB_DOCS, OEB_STYLES, serialize + class DemoTool(Tool): #: Set this to a unique name it will be used as a key @@ -79,7 +80,7 @@ class DemoTool(Tool): # stylesheets,