Commit 6a59c9d1f1

6a59c9d1f1c34b39702078ed645aa811bbd5e2f9

parent: 64d67a50fa

Unsigned

Alicia Sykes <alicia@omg.lol> · 2024-03-29 14:05 UTC

Adds ellipses after each listing, linking to full report

Layout: unified · split

lib/awesome-privacy-readme-gen.py +12 −3
@@ -54,11 +54,18 @@ def statsElement(isOpenSource, isSecurityAudited, isAcceptsCrypto):
5454 statsStr += "💰 Accepts Anonymous Payment "
5555 return statsStr
5656
57def slugify(title):
58 if not title:
59 return ''
60 title = title.lower()
61 title = re.sub(r'\s+', '-', title)
62 title = re.sub(r'\+|&', 'and', title)
63 title = title.replace('?', '')
64 return title
65
5766def awesomePrivacyReport(categoryName, sectionName, serviceName):
5867 if not serviceName:
5968 return ""
60 def slugify(name):
61 return (name or '').lower().replace(' ', '-')
6269 return (
6370 f"[![{serviceName} on Awesome Privacy]"
6471 f"(https://img.shields.io/badge/View%20Report-FC60A8?style=flat&logo=awesomelists&label={serviceName.replace(' ', '_')})]"
@@ -111,7 +118,9 @@ def makeAwesomePrivacy():
111118 for app in section.get('services') or []:
112119 markdown += (
113120 f"- **[{iconElement(app.get('url'), app.get('icon'))} {app.get('name')}]"
114 f"({app.get('url')})** - {app.get('description')} "
121 f"({app.get('url')})** - {app.get('description')}"
122 f"[…](https://awesome-privacy.xyz/"
123 f"{slugify(category.get('name'))}/{slugify(section.get('name'))}/{slugify(app.get('name'))} \"View full {app.get('name')} report\") \n"
115124 + ((
116125 f"\t- <details>\n\t\t<summary>Stats</summary>\n\n\t\t"
117126 f"{repoElement(app.get('github'))} "