diff --git a/examples/practical1.json b/examples/practical1.json index 00e1d20..214dae0 100644 --- a/examples/practical1.json +++ b/examples/practical1.json @@ -4,5 +4,6 @@ "author": "erraticerrata", "chapter_selector": "#main .entry-content > ul:nth-of-type(1) > li > a", "content_selector": "#main .entry-content", - "filter_selector": ".sharedaddy, .wpcnt, style" + "filter_selector": ".sharedaddy, .wpcnt, style", + "cover_url": "https://gitlab.com/Mikescher2/A-Practical-Guide-To-Evil-Lyx/raw/master/APGTE_1/APGTE_front.png" } diff --git a/sites/arbitrary.py b/sites/arbitrary.py index d2864f2..2cba937 100644 --- a/sites/arbitrary.py +++ b/sites/arbitrary.py @@ -18,7 +18,8 @@ Example JSON: "author": "erraticerrata", "chapter_selector": "#main .entry-content > ul > li > a", "content_selector": "#main .entry-content", - "filter_selector": ".sharedaddy, .wpcnt, style" + "filter_selector": ".sharedaddy, .wpcnt, style", + "cover_url": "https://gitlab.com/Mikescher2/A-Practical-Guide-To-Evil-Lyx/raw/master/APGTE_1/APGTE_front.png" } """ @@ -33,6 +34,7 @@ class SiteDefinition: chapter_selector = attr.ib(default=False) # If this is present, it's used to filter out content that matches the selector filter_selector = attr.ib(default=False) + cover_url = attr.ib(default='') @register @@ -52,7 +54,8 @@ class Arbitrary(Site): story = Section( title=definition.title, author=definition.author, - url=url + url=url, + cover_url=definition.cover_url ) if definition.chapter_selector: