diff --git a/se/se_epub_lint.py b/se/se_epub_lint.py index 105df998..f983a377 100644 --- a/se/se_epub_lint.py +++ b/se/se_epub_lint.py @@ -96,7 +96,7 @@ SE_SEMANTIC_VOCABULARY = ["collection", "compass", "compound", "diary", "diary.dateline", "era", "image", "image.color-depth", "image.color-depth.black-on-transparent", "image.style.realistic", "image.color-depth.default-on-transparent", "letter", "letter.dateline", "long-description", "name", "name.person", "name.person.full-name", "name.person.pen-name", "name.vehicle", "name.vehicle.airplane", "name.vehicle.auto", "name.vehicle.train", "name.vessel", "name.vessel.boat", "name.vessel.ship", "name.publication", "name.publication.book", "name.publication.essay", "name.publication.journal", "name.publication.newspaper", "name.publication.magazine", "name.publication.pamphlet", "name.publication.paper", "name.publication.play", "name.publication.poem", "name.publication.short-story", "name.music", "name.music.opera", "name.music.song", "name.visual-art", "name.visual-art.engraving", "name.visual-art.film", "name.visual-art.illustration", "name.visual-art.painting", "name.visual-art.photograph", "name.visual-art.sculpture", "name.visual-art.typeface", "name.broadcast", "name.broadcast.television-show", "name.legal-case", "novel", "novella", "publication-notes", "reading-ease", "reading-ease.flesch", "short-story", "sic", "temperature", "transform", "url", "url.authority", "url.authority.nacoaf", "url.homepage", "url.encyclopedia", "url.encyclopedia.wikipedia", "url.vcs", "url.vcs.github", "word-count"] SE_GENRES = ["Adventure", "Autobiography", "Biography", "Children’s", "Comedy", "Drama", "Fantasy", "Fiction", "Horror", "Memoir", "Mystery", "Nonfiction", "Philosophy", "Poetry", "Satire", "Science Fiction", "Shorts", "Spirituality", "Tragedy", "Travel"] -IGNORED_CLASSES = ["elision", "eoc", "full-page", "continued", "together"] +IGNORED_CLASSES = ["continued", "dl2", "dl3", "elision", "eoc", "full-page", "together"] BINARY_EXTENSIONS = [".jpg", ".jpeg", ".tif", ".tiff", ".bmp", ".png", ".epub", ".xcf", ".otf", ".jp2"] IGNORED_FILENAMES = ["colophon.xhtml", "titlepage.xhtml", "imprint.xhtml", "uncopyright.xhtml", "toc.xhtml", "loi.xhtml"] SPECIAL_FILES = ["colophon", "endnotes", "imprint", "loi"] diff --git a/tests/lint/css/c-008/golden/c-008-out.txt b/tests/lint/css/c-008/golden/c-008-out.txt new file mode 100644 index 00000000..4a357818 --- /dev/null +++ b/tests/lint/css/c-008/golden/c-008-out.txt @@ -0,0 +1,4 @@ +c-008 [Manual Review] local.css CSS class only used once. Can a clever selector +be crafted instead of a single-use class? When possible classes should not be +single-use style hooks. + onetimeclass diff --git a/tests/lint/css/c-008/in/src/epub/css/local.css b/tests/lint/css/c-008/in/src/epub/css/local.css new file mode 100644 index 00000000..a3c36c71 --- /dev/null +++ b/tests/lint/css/c-008/in/src/epub/css/local.css @@ -0,0 +1,15 @@ +@charset "utf-8"; +@namespace epub "http://www.idpf.org/2007/ops"; + +/* custom */ +.dl2, +.dl3, +.elision, +.full-page, +.together, +.samefile, +.difffile, +.onetimeclass{ + font-style: normal; +} +/* end of custom */ \ No newline at end of file diff --git a/tests/lint/css/c-008/in/src/epub/text/chapter-1.xhtml b/tests/lint/css/c-008/in/src/epub/text/chapter-1.xhtml new file mode 100644 index 00000000..f64be4c4 --- /dev/null +++ b/tests/lint/css/c-008/in/src/epub/text/chapter-1.xhtml @@ -0,0 +1,34 @@ + + + + I + + + + +
+

I

+ +

An askant tenor is a mitten of the mind. The fireman of a bread becomes a foppish freon. A ghost is a swamp from the right perspective. Some assert that one cannot separate databases from buckram roses.

+ +

This normally goes on a "dropped line" in poetry, but lint doesn’t know where the class is used, only that it is.

+ +

This also normally goes on a dropped line in poetry.

+ +

This is normally used for elided lines in poetry.

+ +

The sparser jail reveals itself as a jiggish collar to those who look. A distal mice's care comes with it the thought that the shaping doll is a pickle, etc. In ancient times a sausage of the cactus is assumed to be a crumby century.

+ +

This normally goes on a figure that should take up the entire page.

+ +

This normally goes in a drama table.

+ +

Authors often misinterpret the tenor as a tingly shark, when in actuality it feels more like a here diamond. What we don't know for sure is whether or not a laborer is a pyramid's noise. Some assert that the wettish euphonium reveals itself as a bodied stock to those who look. One cannot separate russians from scirrhoid sleeps. A scraper of the timer is assumed to be a bovid turret.

+

Though we assume the latter, a queen of the vest is assumed to be a mono destruction. The bloodstained board reveals itself as a dragging examination to those who look. Before slaves, authorizations were only witnesses.

+ +

Thursdaies are hither nights. In recent years, the trouble is a duckling. What we don't know for sure is whether or not a bladder is the abyssinian of a pail. Some assert that before farms, milliseconds were only threads.

+ +

As far as we can estimate, some posit the stellar nigeria to be less than fleeceless. The zeitgeist contends that a population sees a close as a duskish feedback. A steric fine is a bank of the mind. A ramose burglar's interest comes with it the thought that the bragging carrot is a taxicab.

+
+ + diff --git a/tests/lint/css/c-008/in/src/epub/text/chapter-2.xhtml b/tests/lint/css/c-008/in/src/epub/text/chapter-2.xhtml new file mode 100644 index 00000000..93ee637f --- /dev/null +++ b/tests/lint/css/c-008/in/src/epub/text/chapter-2.xhtml @@ -0,0 +1,15 @@ + + + + II + + + + +
+

II

+ +

A nightly plaster is a talk of the mind. A meal is an element from the right perspective. The zeitgeist contends that a stitch is an insect from the right perspective. Inspired healths show us how nephews can be eights.

+
+ +