Commit c2cfb5b316

c2cfb5b3166b7d4fd18a1be4afabeb13840e6203

parent: 9e278676eb

Unsigned

Alicia Sykes <alicia@omg.lol> · 2024-02-25 22:33 UTC

Updates gen readme script, and screenshot docs

Layout: unified · split

.github/screenshots/README.md +8 −8
@@ -1,4 +1,4 @@
1[<sup>↰ Back to README</sup>](../.github/README.md) 1[<sup>↰ Back to README</sup>](../README.md)
2 2
3## Screenshots 3## Screenshots
4 4
@@ -7,22 +7,22 @@
7> Licensed under MIT ⓒ [Alicia Sykes](https://aliciasykes.com) 2024 7> Licensed under MIT ⓒ [Alicia Sykes](https://aliciasykes.com) 2024
8 8
9### Category Page 9### Category Page
10![fig 1: Category Page](screenshots/1_category-page.png) 10![fig 1: Category Page](1_category-page.png)
11 11
12### Section Page 12### Section Page
13![fig 2: Section Page](screenshots/2_section-page.png) 13![fig 2: Section Page](2_section-page.png)
14 14
15### Browse Page 15### Browse Page
16![fig 3: Browse Page](screenshots/3_browse-page.png) 16![fig 3: Browse Page](3_browse-page.png)
17 17
18### Search Page 18### Search Page
19![fig 4: Search Page](screenshots/4_search-page.png) 19![fig 4: Search Page](4_search-page.png)
20 20
21### About Page 21### About Page
22![fig 5: About Page](screenshots/5_about-page.png) 22![fig 5: About Page](5_about-page.png)
23 23
24### Section Page(2) 24### Section Page(2)
25![fig 6: Section Page2](screenshots/6_section-page2.png) 25![fig 6: Section Page2](6_section-page2.png)
26 26
27### Homepage 27### Homepage
28![fig 7: Homepage](screenshots/homepage.png) 28![fig 7: Homepage](homepage.png)
lib/awesome-privacy-readme-gen.py +5 −3
@@ -44,15 +44,17 @@ def makeHref(text):
44 return re.sub(r'[^\w\s-]', '', text.lower()).replace(" ", "-") 44 return re.sub(r'[^\w\s-]', '', text.lower()).replace(" ", "-")
45 45
46def makeContents(): 46def makeContents():
47 contents = "## Contents\n\n" 47 contents = "<details>\n"
48 contents += "<summary><h2>Contents</h2></summary>\n"
49
48 for category in data.get('categories'): 50 for category in data.get('categories'):
49 contents += f"- **{category.get('name')}**" 51 contents += f"\n- **{category.get('name')}**"
50 for section in category.get('sections'): 52 for section in category.get('sections'):
51 contents += ( 53 contents += (
52 f"\n\t- [{section.get('name')}](#{makeHref(section.get('name'))}) " 54 f"\n\t- [{section.get('name')}](#{makeHref(section.get('name'))}) "
53 f"({len(section.get('services') or [])})" 55 f"({len(section.get('services') or [])})"
54 ) 56 )
55 contents += "\n" 57 contents += "\n</details>\n\n"
56 return contents 58 return contents
57 59
58def makeAwesomePrivacy(): 60def makeAwesomePrivacy():