From 9a5c4708d2a2d346480a984e17d917b5551c3f76 Mon Sep 17 00:00:00 2001
From: Peter Molnar
Date: Sat, 16 Feb 2019 00:14:12 +0000
Subject: [PATCH] - relative urls!
- got rid of bleach and reacji detection, nobody is using it
- removed google vision and google text classification
- 410 for ^/tag and ^/comment
- 80x15 SVG bottom banners
- better code syntax hightlight CSS
---
Pipfile | 27 ++--
Pipfile.lock | 91 +++++--------
assets/cc-button.svg | 18 +++
assets/indieweb-button.svg | 27 ++++
assets/microformats-button.svg | 50 +++++++
assets/webmention-button.svg | 17 +++
meta.py | 126 -----------------
nasg.py | 238 ++++++++++++++++++++++-----------
settings.py | 24 ++--
templates/404.j2.php | 20 +--
templates/Category.j2.html | 6 +-
templates/Home.j2.html | 2 +-
templates/Singular.j2.html | 47 +++++--
templates/base.j2.html | 46 ++++++-
templates/meta-article.j2.html | 14 +-
templates/prism.css | 9 +-
templates/style.css | 4 +-
templates/symbols.svg | 117 ++++++++++++++++
18 files changed, 555 insertions(+), 328 deletions(-)
create mode 100644 assets/cc-button.svg
create mode 100644 assets/indieweb-button.svg
create mode 100644 assets/microformats-button.svg
create mode 100644 assets/webmention-button.svg
diff --git a/Pipfile b/Pipfile
index 6384032..1b9569b 100644
--- a/Pipfile
+++ b/Pipfile
@@ -1,22 +1,19 @@
[[source]]
-name = "pypi"
-url = "https://pypi.org/simple"
+url = "https://pypi.python.org/simple"
verify_ssl = true
+name = "pypi"
+
+[packages]
+wand = "*"
+arrow = "*"
+unicode-slugify = "*"
+requests = "*"
+python-frontmatter = "*"
+langdetect = "*"
+jinja2 = "*"
+feedgen = "*"
[dev-packages]
-[packages]
-arrow = "*"
-bleach = "*"
-emoji = "*"
-feedgen = "*"
-langdetect = "*"
-requests = "*"
-unicode-slugify = "*"
-Jinja2 = "*"
-Wand = "*"
-pyyaml = "*"
-python-frontmatter = "*"
-
[requires]
python_version = "3.7"
diff --git a/Pipfile.lock b/Pipfile.lock
index 5741415..309394c 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
- "sha256": "61a7889c295e0054b0526ddb11e48b5f8297c57bc7ce3196e9d49c602146e208"
+ "sha256": "da45b393e04bad2e1be92dde0f79ba517e3cb90e0db5f76afdc3754f638b38bf"
},
"pipfile-spec": 6,
"requires": {
@@ -10,7 +10,7 @@
"sources": [
{
"name": "pypi",
- "url": "https://pypi.org/simple",
+ "url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
@@ -18,18 +18,11 @@
"default": {
"arrow": {
"hashes": [
- "sha256:9cb4a910256ed536751cd5728673bfb53e6f0026e240466f90c2a92c0b79c895"
+ "sha256:3397e5448952e18e1295bf047014659effa5ae8da6a5371d37ff0ddc46fa6872",
+ "sha256:6f54d9f016c0b7811fac9fb8c2c7fa7421d80c54dbdd75ffb12913c55db60b8a"
],
"index": "pypi",
- "version": "==0.13.0"
- },
- "bleach": {
- "hashes": [
- "sha256:213336e49e102af26d9cde77dd2d0397afabc5a6bf2fed985dc35b5d1e285a16",
- "sha256:3fdf7f77adcf649c9911387df51254b813185e32b2c6619f690b593a617e19fa"
- ],
- "index": "pypi",
- "version": "==3.1.0"
+ "version": "==0.13.1"
},
"certifi": {
"hashes": [
@@ -45,14 +38,6 @@
],
"version": "==3.0.4"
},
- "emoji": {
- "hashes": [
- "sha256:1e959336dafc7a5ed2c0256ee587bbd38a7187d772141f0b5ba42de9e08599a8",
- "sha256:a9e9c08be9907c0042212c86dfbea0f61f78e9897d4df41a1d6307017763ad3e"
- ],
- "index": "pypi",
- "version": "==0.5.1"
- },
"feedgen": {
"hashes": [
"sha256:82c9e29884e137c3e3e7959a02f142d1f7a46cd387d572e9e40150112a27604f"
@@ -84,34 +69,34 @@
},
"lxml": {
"hashes": [
- "sha256:0dd6589fa75d369ba06d2b5f38dae107f76ea127f212f6a7bee134f6df2d1d21",
- "sha256:1afbac344aa68c29e81ab56c1a9411c3663157b5aee5065b7fa030b398d4f7e0",
- "sha256:1baad9d073692421ad5dbbd81430aba6c7f5fdc347f03537ae046ddf2c9b2297",
- "sha256:1d8736421a2358becd3edf20260e41a06a0bf08a560480d3a5734a6bcbacf591",
- "sha256:1e1d9bddc5afaddf0de76246d3f2152f961697ad7439c559f179002682c45801",
- "sha256:1f179dc8b2643715f020f4d119d5529b02cd794c1c8f305868b73b8674d2a03f",
- "sha256:241fb7bdf97cb1df1edfa8f0bcdfd80525d4023dac4523a241907c8b2f44e541",
- "sha256:2f9765ee5acd3dbdcdc0d0c79309e01f7c16bc8d39b49250bf88de7b46daaf58",
- "sha256:312e1e1b1c3ce0c67e0b8105317323e12807955e8186872affb667dbd67971f6",
- "sha256:3273db1a8055ca70257fd3691c6d2c216544e1a70b673543e15cc077d8e9c730",
- "sha256:34dfaa8c02891f9a246b17a732ca3e99c5e42802416628e740a5d1cb2f50ff49",
- "sha256:3aa3f5288af349a0f3a96448ebf2e57e17332d99f4f30b02093b7948bd9f94cc",
- "sha256:51102e160b9d83c1cc435162d90b8e3c8c93b28d18d87b60c56522d332d26879",
- "sha256:56115fc2e2a4140e8994eb9585119a1ae9223b506826089a3ba753a62bd194a6",
- "sha256:69d83de14dbe8fe51dccfd36f88bf0b40f5debeac763edf9f8325180190eba6e",
- "sha256:99fdce94aeaa3ccbdfcb1e23b34273605c5853aa92ec23d84c84765178662c6c",
- "sha256:a7c0cd5b8a20f3093ee4a67374ccb3b8a126743b15a4d759e2a1bf098faac2b2",
- "sha256:abe12886554634ed95416a46701a917784cb2b4c77bfacac6916681d49bbf83d",
- "sha256:b4f67b5183bd5f9bafaeb76ad119e977ba570d2b0e61202f534ac9b5c33b4485",
- "sha256:bdd7c1658475cc1b867b36d5c4ed4bc316be8d3368abe03d348ba906a1f83b0e",
- "sha256:c6f24149a19f611a415a51b9bc5f17b6c2f698e0d6b41ffb3fa9f24d35d05d73",
- "sha256:d1e111b3ab98613115a208c1017f266478b0ab224a67bc8eac670fa0bad7d488",
- "sha256:d6520aa965773bbab6cb7a791d5895b00d02cf9adc93ac2bf4edb9ac1a6addc5",
- "sha256:dd185cde2ccad7b649593b0cda72021bc8a91667417001dbaf24cd746ecb7c11",
- "sha256:de2e5b0828a9d285f909b5d2e9d43f1cf6cf21fe65bc7660bdaa1780c7b58298",
- "sha256:f726444b8e909c4f41b4fde416e1071cf28fa84634bfb4befdf400933b6463af"
+ "sha256:0537eee4902e8bf4f41bfee8133f7edf96533dd175930a12086d6a40d62376b2",
+ "sha256:0562ec748abd230ab87d73384e08fa784f9b9cee89e28696087d2d22c052cc27",
+ "sha256:09e91831e749fbf0f24608694e4573be0ef51430229450c39c83176cc2e2d353",
+ "sha256:1ae4c0722fc70c0d4fba43ae33c2885f705e96dce1db41f75ae14a2d2749b428",
+ "sha256:1c630c083d782cbaf1f7f37f6cac87bda9cff643cf2803a5f180f30d97955cef",
+ "sha256:2fe74e3836bd8c0fa7467ffae05545233c7f37de1eb765cacfda15ad20c6574a",
+ "sha256:37af783c2667ead34a811037bda56a0b142ac8438f7ed29ae93f82ddb812fbd6",
+ "sha256:3f2d9eafbb0b24a33f56acd16f39fc935756524dcb3172892721c54713964c70",
+ "sha256:47d8365a8ef14097aa4c65730689be51851b4ade677285a3b2daa03b37893e26",
+ "sha256:510e904079bc56ea784677348e151e1156040dbfb736f1d8ea4b9e6d0ab2d9f4",
+ "sha256:58d0851da422bba31c7f652a7e9335313cf94a641aa6d73b8f3c67602f75b593",
+ "sha256:7940d5c2185ffb989203dacbb28e6ae88b4f1bb25d04e17f94b0edd82232bcbd",
+ "sha256:7cf39bb3a905579836f7a8f3a45320d9eb22f16ab0c1e112efb940ced4d057a5",
+ "sha256:9563a23c1456c0ab550c087833bc13fcc61013a66c6420921d5b70550ea312bf",
+ "sha256:95b392952935947e0786a90b75cc33388549dcb19af716b525dae65b186138fc",
+ "sha256:983129f3fd3cef5c3cf067adcca56e30a169656c00fcc6c648629dbb850b27fa",
+ "sha256:a0b75b1f1854771844c647c464533def3e0a899dd094a85d1d4ed72ecaaee93d",
+ "sha256:b5db89cc0ef624f3a81214b7961a99f443b8c91e88188376b6b322fd10d5b118",
+ "sha256:c0a7751ba1a4bfbe7831920d98cee3ce748007eab8dfda74593d44079568219a",
+ "sha256:c0c5a7d4aafcc30c9b6d8613a362567e32e5f5b708dc41bc3a81dac56f8af8bb",
+ "sha256:d4d63d85eacc6cb37b459b16061e1f100d154bee89dc8d8f9a6128a5a538e92e",
+ "sha256:da5e7e941d6e71c9c9a717c93725cda0708c2474f532e3680ac5e39ec57d224d",
+ "sha256:dccad2b3c583f036f43f80ac99ee212c2fa9a45151358d55f13004d095e683b2",
+ "sha256:df46307d39f2aeaafa1d25309b8a8d11738b73e9861f72d4d0a092528f498baa",
+ "sha256:e70b5e1cb48828ddd2818f99b1662cb9226dc6f57d07fc75485405c77da17436",
+ "sha256:ea825562b8cd057cbc9810d496b8b5dec37a1e2fc7b27bc7c1e72ce94462a09a"
],
- "version": "==4.3.0"
+ "version": "==4.3.1"
},
"markupsafe": {
"hashes": [
@@ -175,7 +160,6 @@
"sha256:e01d3203230e1786cd91ccfdc8f8454c8069c91bee3962ad93b87a4b2860f537",
"sha256:e170a9e6fcfd19021dd29845af83bb79236068bf5fd4df3327c1be18182b2531"
],
- "index": "pypi",
"version": "==3.13"
},
"requests": {
@@ -216,17 +200,10 @@
},
"wand": {
"hashes": [
- "sha256:3e59e4bda9ef9d643d90e881cc950c8eee1508ec2cde1c150a1cbd5a12c1c007",
- "sha256:52763dbf65d00cf98d7bc910b49329eea15896249c5555d47e169f2b6efbe166"
+ "sha256:7d6b8dc9d4eaccc430b9c86e6b749013220c994970a3f39e902b397e2fa732c3",
+ "sha256:cc0b5c9cd50fecd10dc8888b739dd5984c6f8085d2954f34903b83ca39a91236"
],
"index": "pypi",
- "version": "==0.5.0"
- },
- "webencodings": {
- "hashes": [
- "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78",
- "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"
- ],
"version": "==0.5.1"
}
},
diff --git a/assets/cc-button.svg b/assets/cc-button.svg
new file mode 100644
index 0000000..ffabd4a
--- /dev/null
+++ b/assets/cc-button.svg
@@ -0,0 +1,18 @@
+
+
diff --git a/assets/indieweb-button.svg b/assets/indieweb-button.svg
new file mode 100644
index 0000000..7f17df6
--- /dev/null
+++ b/assets/indieweb-button.svg
@@ -0,0 +1,27 @@
+
+
diff --git a/assets/microformats-button.svg b/assets/microformats-button.svg
new file mode 100644
index 0000000..cba6d05
--- /dev/null
+++ b/assets/microformats-button.svg
@@ -0,0 +1,50 @@
+
+
diff --git a/assets/webmention-button.svg b/assets/webmention-button.svg
new file mode 100644
index 0000000..851f9a0
--- /dev/null
+++ b/assets/webmention-button.svg
@@ -0,0 +1,17 @@
+
+
diff --git a/meta.py b/meta.py
index b51f2e0..5b68e36 100644
--- a/meta.py
+++ b/meta.py
@@ -13,8 +13,6 @@ import requests
import keys
import settings
-from pprint import pprint
-
EXIFDATE = re.compile(
r'^(?P[0-9]{4}):(?P[0-9]{2}):(?P[0-9]{2})\s+'
r'(?P
+'.$uri.'