Improvements

This commit is contained in:
Umbreon 2021-09-02 16:37:28 +01:00
parent eaa1185abe
commit 34f83d69ef
8 changed files with 181 additions and 151 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
__pycache__/
.vscode/

5
.vscode/launch.json vendored
View File

@ -8,8 +8,9 @@
"name": "Python: Current File", "name": "Python: Current File",
"type": "python", "type": "python",
"request": "launch", "request": "launch",
"program": "${file}", "program": "${workspaceFolder}/src/convert.py",
"console": "integratedTerminal" "console": "integratedTerminal",
"cwd": "${workspaceFolder}/src"
} }
] ]
} }

View File

View File

@ -1,10 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<meta http-equiv="Content-type" content="application/xhtml+xml;charset=utf-8" /> <meta http-equiv="Content-type" content="application/xhtml+xml;charset=utf-8" />
<title>Google Chrome Spyware Watchdog</title> <title>Google Chrome &mdash; Spyware Watchdog</title>
<link rel="stylesheet" href="../style.css" /> <link rel="stylesheet" href="../style.css" />
</head> </head>
@ -20,8 +19,7 @@
<p>Google Chrome is a web browser developed and distributed by <a href="https://spyware.neocities.org/articles/google.html">Google</a>.</p> <p>Google Chrome is a web browser developed and distributed by <a href="https://spyware.neocities.org/articles/google.html">Google</a>.</p>
<h2>Spyware Level: 8</h2> <h2>Spyware Level: 8</h2>
<h3>Google Chrome is not fully open source</h3> <h3>Google Chrome is not fully open source</h3>
<p>Large parts of Google Chrome are open source, however not all of them are, and this prevents people from <p>Large parts of Google Chrome are open source, however not all of them are, and this prevents people from checking the entire software for potential spyware features that are not disclosed.</p>
checking the entire software for potential spyware features that are not disclosed.</p>
<h3>Google Chrome tracks the user's search history</h3> <h3>Google Chrome tracks the user's search history</h3>
<p>Google Chrome contains several spyware features that reply on the user's search history being uploaded to Google servers. This is confirmed by the language in the privacy policy<sup><a href="#source1">[1]</a></sup>, clarifying the spyware features that rely on this.</p> <p>Google Chrome contains several spyware features that reply on the user's search history being uploaded to Google servers. This is confirmed by the language in the privacy policy<sup><a href="#source1">[1]</a></sup>, clarifying the spyware features that rely on this.</p>
<p>The first spyware feature is Google Chrome's integration with the "Google Account" spyware platform. <em>"If you are signed in to a Google site or signed in to Chrome and Google is your default search engine, searches you perform using the address bar in Chrome are stored in your Google account."</em></p> <p>The first spyware feature is Google Chrome's integration with the "Google Account" spyware platform. <em>"If you are signed in to a Google site or signed in to Chrome and Google is your default search engine, searches you perform using the address bar in Chrome are stored in your Google account."</em></p>
@ -40,7 +38,7 @@
<h3>Google Chrome contains a keylogger</h3> <h3>Google Chrome contains a keylogger</h3>
<p>This was confirmed in multiple places<sup><a href="#source3">[3]</a></sup><sup><a href="#source4">[4]</a></sup>. Basically, whenever you type into the search bar, that information is sent to Google. You can apparently turn it off by opting out of the "suggestion service".</p> <p>This was confirmed in multiple places<sup><a href="#source3">[3]</a></sup><sup><a href="#source4">[4]</a></sup>. Basically, whenever you type into the search bar, that information is sent to Google. You can apparently turn it off by opting out of the "suggestion service".</p>
<h3>Google Chrome records your voice</h3> <h3>Google Chrome records your voice</h3>
<p>Google Chrome is confirmed to be constantly listening to any open microphones on your computer. This can be found in this statement<sup><a href="#source5">[5]</a></sup> in a privacy publication. <em>"Voice &amp; audio information may be collected. For example, if your child uses audio activation commands (e.g., "OK, Google" or touching the microphone icon), a recording of the following speech/audio, <strong>plus a few seconds before</strong>, will be stored to their account…"</em> This feature is opt-in if you are using the "Google Accounts" spyware platform and specifically tell Google to build a profile of your child. It's unverified whether or not Google uploads information it listens too to its servers outside of this feature.</p> <p>Google Chrome is confirmed to be constantly listening to any open microphones on your computer. This can be found in this statement<sup><a href="#source5">[5]</a></sup> in a privacy publication. <em>"Voice &amp; audio information may be collected. For example, if your child uses audio activation commands (e.g., "OK, Google" or touching the microphone icon), a recording of the following speech/audio, </em><em>plus a few seconds before</em><em>, will be stored to their account…"</em> This feature is opt-in if you are using the "Google Accounts" spyware platform and specifically tell Google to build a profile of your child. It's unverified whether or not Google uploads information it listens too to its servers outside of this feature.</p>
<h3>Google Chrome saves user passwords on Google Servers</h3> <h3>Google Chrome saves user passwords on Google Servers</h3>
<p>Any password stored in Google Chrome's "password management" feature is uploaded to Google if you sign into the "Google Accounts" spyware platform.</p> <p>Any password stored in Google Chrome's "password management" feature is uploaded to Google if you sign into the "Google Accounts" spyware platform.</p>
<h3>Google Chrome profiles users in other various ways</h3> <h3>Google Chrome profiles users in other various ways</h3>
@ -49,7 +47,7 @@
<p>Google Chrome has an updater which is constantly running in the background and syncing with Google servers to check for updates. The updater will download and run unverified binaries from Google when it updates Google Chrome. It is impossible for an automatic updater service such as this to verify that the updates are not spyware and/or do not contain additional spyware features.</p> <p>Google Chrome has an updater which is constantly running in the background and syncing with Google servers to check for updates. The updater will download and run unverified binaries from Google when it updates Google Chrome. It is impossible for an automatic updater service such as this to verify that the updates are not spyware and/or do not contain additional spyware features.</p>
</div> </div>
<div class="footer"> <div class="further">
<hr> <hr>
<div class="futher"> <div class="futher">
<h4>Further Reading:</h4> <h4>Further Reading:</h4>
@ -58,21 +56,20 @@
<li><a href="https://8ch.net/tech/chrome.html">Welcome to the Botnet. Or, The Case Against Google Chrome</a> <a href="https://web.archive.org/web/20150501010435/https://8ch.net/tech/chrome.html">[web.archive.org]</a> <a href="http://archive.is/OR4dz">[archive.is]</a></li> <li><a href="https://8ch.net/tech/chrome.html">Welcome to the Botnet. Or, The Case Against Google Chrome</a> <a href="https://web.archive.org/web/20150501010435/https://8ch.net/tech/chrome.html">[web.archive.org]</a> <a href="http://archive.is/OR4dz">[archive.is]</a></li>
</ul> </ul>
</div> </div>
</div>
<div class="sources">
<hr> <hr>
<div class="sources"> <div class="sources">
<h4>Sources:</h4> <h4>Sources:</h4>
<ol> <ol><li id="source1"><p><a href="https://www.google.com/chrome/browser/privacy/index.html">Google Chrome Privacy Notice</a> <a href="http://web.archive.org/web/20180427041202/https://www.google.com/chrome/browser/privacy/index.html">[web.archive.org]</a> <a href="https://archive.is/GJIKw">[archive.is]</a></p></li><li id="source2"><p><a href="https://payments.google.com/payments/apis-secure/get_legal_document?ldo=0&amp;ldt=privacynotice">Google Payments Privacy Notice</a> <a href="https://web.archive.org/web/20180514095832/https://payments.google.com/payments/apis-secure/get_legal_document?ldo=0&amp;ldt=privacynotice">[web.archive.org]</a></p></li><li id="source3"><p><a href="http://www.favbrowser.com/google-chrome-spyware-confirmed/">Google Chrome Spyware? Confirmed?</a> <a href="https://web.archive.org/web/20180410043922/http://www.favbrowser.com/google-chrome-spyware-confirmed/">[web.archive.org]</a> <a href="https://archive.li/jxCPf">[archive.li]</a></p></li><li id="source4"><p><a href="https://jischinger.wordpress.com/2008/11/16/google-chrome-a-keylogger-privacy-concerns/">Google Chrome a Keylogger Privacy Concerns</a> <a href="https://web.archive.org/web/20180410043922/https://jischinger.wordpress.com/2008/11/16/google-chrome-a-keylogger-privacy-concerns/">[web.archive.org]</a> <a href="https://archive.li/HclxK">[archive.li]</a></p></li><li id="source5"><p><a href="https://families.google.com/familylink/privacy/child-policy/">Privacy Notice for Google Accounts Managed with Family Link (“Privacy Notice”)</a> <a href="https://web.archive.org/web/20180524142231/https://families.google.com/familylink/privacy/child-policy/">[web.archive.org]</a> <a href="https://archive.li/3ncnz">[archive.li]</a></p></li>
<li id="source1"><p><a href="https://www.google.com/chrome/browser/privacy/index.html">Google Chrome Privacy Notice</a> <a href="http://web.archive.org/web/20180427041202/https://www.google.com/chrome/browser/privacy/index.html">[web.archive.org]</a> <a href="https://archive.is/GJIKw">[archive.is]</a></p></li>
<li id="source2"><p><a href="https://payments.google.com/payments/apis-secure/get_legal_document?ldo=0&amp;ldt=privacynotice">Google Payments Privacy Notice</a> <a href="https://web.archive.org/web/20180514095832/https://payments.google.com/payments/apis-secure/get_legal_document?ldo=0&amp;ldt=privacynotice">[web.archive.org]</a></p></li>
<li id="source3"><p><a href="http://www.favbrowser.com/google-chrome-spyware-confirmed/">Google Chrome Spyware? Confirmed?</a> <a href="https://web.archive.org/web/20180410043922/http://www.favbrowser.com/google-chrome-spyware-confirmed/">[web.archive.org]</a> <a href="https://archive.li/jxCPf">[archive.li]</a></p></li>
<li id="source4"><p><a href="https://jischinger.wordpress.com/2008/11/16/google-chrome-a-keylogger-privacy-concerns/">Google Chrome a Keylogger Privacy Concerns</a> <a href="https://web.archive.org/web/20180410043922/https://jischinger.wordpress.com/2008/11/16/google-chrome-a-keylogger-privacy-concerns/">[web.archive.org]</a> <a href="https://archive.li/HclxK">[archive.li]</a></p></li>
<li id="source5"><p><a href="https://families.google.com/familylink/privacy/child-policy/">Privacy Notice for Google Accounts Managed with Family Link (“Privacy Notice”)</a> <a href="https://web.archive.org/web/20180524142231/https://families.google.com/familylink/privacy/child-policy/">[web.archive.org]</a> <a href="https://archive.li/3ncnz">[archive.li]</a></p></li>
</ol> </ol>
</div> </div>
<hr> </div>
<b>This article was created on 0000.00.00</b></br>
<b>This article was last modified on 2018.12.12</b></br> <div class="footer">
<b>This article is made for version 1337 of the software</b> <hr><b>This article was created on 0000.00.00</b></br><b>This article was last modified on 2018.12.12</b></br><b>This article is made for version 1337 of the software</b>
<hr> <hr>
<p>If you want to edit this article, or contribute your own article(s), visit us at the git repo on <a href="https://codeberg.org/shadow/SpywareWatchdog">Codeberg</a>.</p> <p>If you want to edit this article, or contribute your own article(s), visit us at the git repo on <a href="https://codeberg.org/shadow/SpywareWatchdog">Codeberg</a>.</p>
<p>All contributions must be licensed under the CC0 license to be accepted.</p> <p>All contributions must be licensed under the CC0 license to be accepted.</p>

View File

@ -1,26 +1,28 @@
Title: Google Chrome ---
Rating: 8 title: Google Chrome
Catagory: Browser rating: 8
Created: 0000.00.00 catagory: Browser
Modified: 2018.12.12 created: 0000.00.00
Version: 1337 modified: 2018.12.12
Introduction: version: 1337
---
## Introduction
Google Chrome is a web browser developed and distributed by [Google](https://spyware.neocities.org/articles/google.html). Google Chrome is a web browser developed and distributed by [Google](https://spyware.neocities.org/articles/google.html).
Content: ## Content
### Google Chrome is not fully open source ### Google Chrome is not fully open source
Large parts of Google Chrome are open source, however not all of them are, and this prevents people from Large parts of Google Chrome are open source, however not all of them are, and this prevents people from checking the entire software for potential spyware features that are not disclosed.
checking the entire software for potential spyware features that are not disclosed.
### Google Chrome tracks the user's search history ### Google Chrome tracks the user's search history
Google Chrome contains several spyware features that reply on the user's search history being uploaded to Google servers. This is confirmed by the language in the privacy policy[^1], clarifying the spyware features that rely on this. Google Chrome contains several spyware features that reply on the user's search history being uploaded to Google servers. This is confirmed by the language in the privacy policy[^1], clarifying the spyware features that rely on this.
The first spyware feature is Google Chrome's integration with the "Google Account" spyware platform. _"If you are signed in to a Google site or signed in to Chrome and Google is your default search engine, searches you perform using the address bar in Chrome are stored in your Google account."_ The first spyware feature is Google Chrome's integration with the "Google Account" spyware platform. *"If you are signed in to a Google site or signed in to Chrome and Google is your default search engine, searches you perform using the address bar in Chrome are stored in your Google account."*
Google Chrome also contains a spyware feature called "Search prediction service". It is explained that: Google Chrome also contains a spyware feature called "Search prediction service". It is explained that:
_"When you search using the address bar in Chrome, the characters you type (even if you havent hit "enter" yet) are sent to your default search engine. If Google is your default search engine, predictions are based on your own search history, topics related to what youre typing and what other people are searching for."_ *"When you search using the address bar in Chrome, the characters you type (even if you havent hit "enter" yet) are sent to your default search engine. If Google is your default search engine, predictions are based on your own search history, topics related to what youre typing and what other people are searching for."*
There is also the spyware feature "Navigation Assistance" which states that: _"When you cant connect to a web page, you can get suggestions for alternative pages similar to the one you're trying to reach. In order to offer you suggestions, Chrome sends Google the URL of the page you're trying to reach. "_ There is also the spyware feature "Navigation Assistance" which states that: *"When you cant connect to a web page, you can get suggestions for alternative pages similar to the one you're trying to reach. In order to offer you suggestions, Chrome sends Google the URL of the page you're trying to reach. "*
### Google Chrome profiles your computer usage ### Google Chrome profiles your computer usage
In the privacy policy[^1], Google details the extreme spyware feature it labels "Usage Statistics and Crash Reports". What it does, is it sends very detailed information about your hardware and computer usage, which confirms that it definitely contains the following spyware features: In the privacy policy[^1], Google details the extreme spyware feature it labels "Usage Statistics and Crash Reports". What it does, is it sends very detailed information about your hardware and computer usage, which confirms that it definitely contains the following spyware features:
@ -37,7 +39,7 @@ Google Payments is a spyware service that records your banking information and s
This was confirmed in multiple places[^3][^4]. Basically, whenever you type into the search bar, that information is sent to Google. You can apparently turn it off by opting out of the "suggestion service". This was confirmed in multiple places[^3][^4]. Basically, whenever you type into the search bar, that information is sent to Google. You can apparently turn it off by opting out of the "suggestion service".
### Google Chrome records your voice ### Google Chrome records your voice
Google Chrome is confirmed to be constantly listening to any open microphones on your computer. This can be found in this statement[^5] in a privacy publication. _"Voice &amp; audio information may be collected. For example, if your child uses audio activation commands (e.g., "OK, Google" or touching the microphone icon), a recording of the following speech/audio, **plus a few seconds before**, will be stored to their account…"_ This feature is opt-in if you are using the "Google Accounts" spyware platform and specifically tell Google to build a profile of your child. It's unverified whether or not Google uploads information it listens too to its servers outside of this feature. Google Chrome is confirmed to be constantly listening to any open microphones on your computer. This can be found in this statement[^5] in a privacy publication. *"Voice &amp; audio information may be collected. For example, if your child uses audio activation commands (e.g., "OK, Google" or touching the microphone icon), a recording of the following speech/audio, **plus a few seconds before**, will be stored to their account…"* This feature is opt-in if you are using the "Google Accounts" spyware platform and specifically tell Google to build a profile of your child. It's unverified whether or not Google uploads information it listens too to its servers outside of this feature.
### Google Chrome saves user passwords on Google Servers ### Google Chrome saves user passwords on Google Servers
Any password stored in Google Chrome's "password management" feature is uploaded to Google if you sign into the "Google Accounts" spyware platform. Any password stored in Google Chrome's "password management" feature is uploaded to Google if you sign into the "Google Accounts" spyware platform.
@ -48,11 +50,11 @@ According to the privacy policy[^1], Google Chrome profiles what kinds of web fo
### Google Chrome is self-updating software ### Google Chrome is self-updating software
Google Chrome has an updater which is constantly running in the background and syncing with Google servers to check for updates. The updater will download and run unverified binaries from Google when it updates Google Chrome. It is impossible for an automatic updater service such as this to verify that the updates are not spyware and/or do not contain additional spyware features. Google Chrome has an updater which is constantly running in the background and syncing with Google servers to check for updates. The updater will download and run unverified binaries from Google when it updates Google Chrome. It is impossible for an automatic updater service such as this to verify that the updates are not spyware and/or do not contain additional spyware features.
Further: ## Further
* [Reasons to not use google](https://stallman.org/google.html) [[web.archive.org]](https://web.archive.org/web/20180512214729/http://stallman.org/google.html) [[archive.is]](http://archive.is/20170929072403/https://stallman.org/google.html) * [Reasons to not use google](https://stallman.org/google.html) [[web.archive.org]](https://web.archive.org/web/20180512214729/http://stallman.org/google.html) [[archive.is]](http://archive.is/20170929072403/https://stallman.org/google.html)
* [Welcome to the Botnet. Or, The Case Against Google Chrome](https://8ch.net/tech/chrome.html) [[web.archive.org]](https://web.archive.org/web/20150501010435/https://8ch.net/tech/chrome.html) [[archive.is]](http://archive.is/OR4dz) * [Welcome to the Botnet. Or, The Case Against Google Chrome](https://8ch.net/tech/chrome.html) [[web.archive.org]](https://web.archive.org/web/20150501010435/https://8ch.net/tech/chrome.html) [[archive.is]](http://archive.is/OR4dz)
Sources: ## Sources
1. [Google Chrome Privacy Notice](https://www.google.com/chrome/browser/privacy/index.html) [[web.archive.org]](http://web.archive.org/web/20180427041202/https://www.google.com/chrome/browser/privacy/index.html) [[archive.is]](https://archive.is/GJIKw) 1. [Google Chrome Privacy Notice](https://www.google.com/chrome/browser/privacy/index.html) [[web.archive.org]](http://web.archive.org/web/20180427041202/https://www.google.com/chrome/browser/privacy/index.html) [[archive.is]](https://archive.is/GJIKw)
2. [Google Payments Privacy Notice](https://payments.google.com/payments/apis-secure/get_legal_document?ldo=0&ldt=privacynotice) [[web.archive.org]](https://web.archive.org/web/20180514095832/https://payments.google.com/payments/apis-secure/get_legal_document?ldo=0&ldt=privacynotice) 2. [Google Payments Privacy Notice](https://payments.google.com/payments/apis-secure/get_legal_document?ldo=0&ldt=privacynotice) [[web.archive.org]](https://web.archive.org/web/20180514095832/https://payments.google.com/payments/apis-secure/get_legal_document?ldo=0&ldt=privacynotice)
3. [Google Chrome Spyware? Confirmed?](http://www.favbrowser.com/google-chrome-spyware-confirmed/) [[web.archive.org]](https://web.archive.org/web/20180410043922/http://www.favbrowser.com/google-chrome-spyware-confirmed/) [[archive.li]](https://archive.li/jxCPf) 3. [Google Chrome Spyware? Confirmed?](http://www.favbrowser.com/google-chrome-spyware-confirmed/) [[web.archive.org]](https://web.archive.org/web/20180410043922/http://www.favbrowser.com/google-chrome-spyware-confirmed/) [[archive.li]](https://archive.li/jxCPf)

View File

@ -1,109 +1,95 @@
import markdown ## Imports
import extension import re # built-in
import re import markdown, yaml #PIP
import extension # local
MAIN_HTML = """ ## Config
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> FORMAT_HTML = False # Useful for debugging, can be disabled otherwise.
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> CONFIG_REGEX = r"---((.|\n)+)---" # Regex used to find YAML config.
CATAGORY_REGEX = r"(?:^|\n)##\s([^\n]*)\n(.*?)(?=\n##?\s|$)" # Regex used to find each catagory - source: https://stackoverflow.com/a/66619938.
<head> ## Main
<meta http-equiv="Content-type" content="application/xhtml+xml;charset=utf-8" /> f = open("template.html")
<title>{title} Spyware Watchdog</title> MAIN_HTML = f.read()
<link rel="stylesheet" href="../style.css" /> f.close()
</head>
<body> md = markdown.Markdown(
<div class="case"> extensions=[
<div class="nav"> extension.ArticleMarkdown() # The extension which adds various features to the markdown
<a href="index.html">&larr; Catalog</a> ]
</div> )
<div class="main">
<img src="../images/{fileName}_logo.png" alt="{title}'s Logo" />
<h1>{title}</h1>
{introduction}
<h2>Spyware Level: {spywareLevel}</h2>
{content}
</div>
<div class="footer">
{footer}
<hr>
<p>If you want to edit this article, or contribute your own article(s), visit us at the git repo on <a href="https://codeberg.org/shadow/SpywareWatchdog">Codeberg</a>.</p>
<p>All contributions must be licensed under the CC0 license to be accepted.</p>
<a href="../LICENSE.txt"><img class="icon" src="../images/cc0.png" alt="CC0 License" /></a>
</div>
</div>
</body>
</html>
"""
md = markdown.Markdown(extensions=[extension.ArticleMarkdown()]) # The extension which adds various features to the markdown
regex = r"Title: (.+)\nRating: (\d+)\nCatagory: (.+)\nCreated: (.+)\nModified: (.+)\nVersion: (.+)\nIntroduction:\n([\s\S]*)Content:\n([\s\S]*)Further:\n([\s\S]*)Sources:\n([\s\S]*)"
def convertMarkdown(inputStr, fileName): def convertMarkdown(inputStr, fileName):
result = re.match(regex, inputStr, re.MULTILINE) ## Variable Setup
title = result.group(1) # Get Markdown config
rating = result.group(2) configReg = re.match(CONFIG_REGEX, inputStr, re.MULTILINE)
catagory = result.group(3) if configReg is None:
created = result.group(4) raise Exception("Config regex failed")
modified = result.group(5) config = yaml.safe_load(configReg.group(1))
version = result.group(6)
introduction = result.group(7)
content = result.group(8)
further = result.group(9)
sources = result.group(10)
footer = "" # Get Markdown catagories
catagories = {}
catagoriesReg = re.finditer(CATAGORY_REGEX, inputStr, re.DOTALL)
if catagoriesReg is None:
raise Exception("Catagories regex failed")
for _, match in enumerate(catagoriesReg, start=1):
catagories[match.group(1)] = match.group(2)
## Document generation
# Futher reading # Futher reading
footer += """<hr> further = ""
if "Further" in catagories:
further = """<hr>
<div class="futher"> <div class="futher">
<h4>Further Reading:</h4> <h4>Further Reading:</h4>
{further} {further}
</div> </div>
""".format(further = md.convert(further).replace("\n","\n\t")).replace("\n", "\n\t\t\t") """.format(further = md.convert(catagories['Further']))
# Sources # Sources
sources = ""
if "Sources" in catagories:
a = "" a = ""
for i in sources.split("\n"): for i in catagories['Sources'].split("\n"):
if i != "": if i != "":
result = re.match(r"(\d+)\. (.+)", i) result = re.match(r"(\d+)\. (.+)", i)
a += """\n<li id="source{number}">{content}</li>""".format( a += """<li id="source{number}">{content}</li>""".format(
number = result.group(1), number = result.group(1),
content = md.convert(result.group(2)) content = md.convert(result.group(2))
).replace("\n", "\n\t\t") )
footer += f"""<hr> sources = f"""<hr>
<div class="sources"> <div class="sources">
<h4>Sources:</h4> <h4>Sources:</h4>
<ol>{a} <ol>{a}
</ol> </ol>
</div> </div>"""
""".replace("\n", "\n\t\t\t")
# dates # Footer
footer += f"""<hr> footer = "<hr>"
<b>This article was created on {created}</b></br> if "created" in config:
<b>This article was last modified on {modified}</b></br> footer += f"<b>This article was created on {config['created']}</b></br>"
<b>This article is made for version {version} of the software</b>""".replace("\n", "\n\t\t\t") if "modified" in config:
footer += f"<b>This article was last modified on {config['modified']}</b></br>"
if "version" in config:
footer += f"<b>This article is made for version {config['version']} of the software</b>"
# The .replace is used below to make sure indentation is consistent html = MAIN_HTML.format(
# This is not required but makes debugging a little easier. title = config['title'],
return MAIN_HTML.format(
title = title,
fileName = fileName, fileName = fileName,
spywareLevel = rating, spywareLevel = config['rating'],
introduction = md.convert(introduction).replace("\n", "\n\t\t\t"), introduction = md.convert(catagories['Introduction']),
content = md.convert(content).replace("\n", "\n\t\t\t"), content = md.convert(catagories['Content']),
further = further,
sources = sources,
footer = footer footer = footer
) )
return html
open("chrome.html", "w", encoding="utf8").write( open("chrome.html", "w", encoding="utf8").write(
convertMarkdown( convertMarkdown(
open("./chrome.md", encoding="utf8").read(), open("chrome.md", encoding="utf8").read(),
"chrome" "chrome"
) )
) )

42
src/template.html Normal file
View File

@ -0,0 +1,42 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-type" content="application/xhtml+xml;charset=utf-8" />
<title>{title} &mdash; Spyware Watchdog</title>
<link rel="stylesheet" href="../style.css" />
</head>
<body>
<div class="case">
<div class="nav">
<a href="index.html">&larr; Catalog</a>
</div>
<div class="main">
<img src="../images/{fileName}_logo.png" alt="{title}'s Logo" />
<h1>{title}</h1>
{introduction}
<h2>Spyware Level: {spywareLevel}</h2>
{content}
</div>
<div class="further">
{further}
</div>
<div class="sources">
{sources}
</div>
<div class="footer">
{footer}
<hr>
<p>If you want to edit this article, or contribute your own article(s), visit us at the git repo on <a href="https://codeberg.org/shadow/SpywareWatchdog">Codeberg</a>.</p>
<p>All contributions must be licensed under the CC0 license to be accepted.</p>
<a href="../LICENSE.txt"><img class="icon" src="../images/cc0.png" alt="CC0 License" /></a>
</div>
</div>
</body>
</html>