aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2024-03-18 02:40:29 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2025-06-15 01:30:25 +0200
commitfcf3cbd2bc6250b5431b74a324426838fe9c274b (patch)
tree230c34d9a962d34d9763ffa14bb07d58aea59cac
parentf712ae0e2d5e7422590d640c02bd6655c5b38cd9 (diff)
downloadhaunt-blog-fcf3cbd2bc6250b5431b74a324426838fe9c274b.tar.gz
haunt-blog-fcf3cbd2bc6250b5431b74a324426838fe9c274b.tar.bz2
haunt-blog-fcf3cbd2bc6250b5431b74a324426838fe9c274b.zip
convert.py, markdown: Fix en dash.
Some generated markdown have en dashes, and without this fix, it ends up being displayed as '???' in the generated HTML files. As an example with site/replicant--37c3.html we have: Introduction to Replicant ??? December 28 10:00, Saal D Converting the en dashes into minus fixed it. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rwxr-xr-xconvert.py4
-rw-r--r--markdown/2019_12_replicant-36c3.md8
-rw-r--r--markdown/2023_12_replicant-37c3.md10
3 files changed, 13 insertions, 9 deletions
diff --git a/convert.py b/convert.py
index dd3512b..420f244 100755
--- a/convert.py
+++ b/convert.py
@@ -94,6 +94,9 @@ def fix_lists(string):
def fix_right_single_quotation_mark(string):
return string.replace('’', '\'')
+def fix_en_dash(string):
+ return string.replace('–', '-')
+
def convert(html_file_path):
with open(html_file_path) as html_file:
soup = BeautifulSoup(html_file, features="html5lib").article
@@ -114,6 +117,7 @@ def convert(html_file_path):
text = fix_alignment(text)
text = fix_lists(text)
text = fix_right_single_quotation_mark(text)
+ text = fix_en_dash(text)
return text
diff --git a/markdown/2019_12_replicant-36c3.md b/markdown/2019_12_replicant-36c3.md
index 386146b..5914c3a 100644
--- a/markdown/2019_12_replicant-36c3.md
+++ b/markdown/2019_12_replicant-36c3.md
@@ -20,16 +20,16 @@ DECT: 6506
There will also be a few talks about Replicant and related topics in several
spots around the congress:
-* [Introduction to Replicant][5] – December 27 19:15, Central
+* [Introduction to Replicant][5] - December 27 19:15, Central
Decentralization Cluster (CDC) stage
-* [Android's build system is messier than your distro's][6] – December 28
+* [Android's build system is messier than your distro's][6] - December 28
20:30, Lecture Room M1
-* [Extending the lifetime of smartphones with Replicant][7] – December 28
+* [Extending the lifetime of smartphones with Replicant][7] - December 28
20:50, Open Infrastructure Orbit (OIO) stage
-* [The chromium mess meets Android][8] – December 29 21:00, Lecture Room M1
+* [The chromium mess meets Android][8] - December 29 21:00, Lecture Room M1
[1]: <https://events.ccc.de/congress/2019/wiki/index.php/Main_Page>
diff --git a/markdown/2023_12_replicant-37c3.md b/markdown/2023_12_replicant-37c3.md
index 8870b4c..d6d1c45 100644
--- a/markdown/2023_12_replicant-37c3.md
+++ b/markdown/2023_12_replicant-37c3.md
@@ -23,17 +23,17 @@ ideas. Please drop by if you feel keen to help on any of these field.
There will also be a few talks and gatherings about Replicant and related
topics in several spots around the congress:
-* [Short introduction to Replicant as part of the CDC][5] – December 27
+* [Short introduction to Replicant as part of the CDC][5] - December 27
16:30, Saal E
-* [Introduction to Replicant][6] – December 28 10:00, Saal D
+* [Introduction to Replicant][6] - December 28 10:00, Saal D
-* [Replicant struggle: past and present successes and failures][7] –
+* [Replicant struggle: past and present successes and failures][7] -
December 28 14:00, Saal 3, CDC, Round Table
-* [Smartphones freedom status in 2023][8] – December 30 12:30, Saal E
+* [Smartphones freedom status in 2023][8] - December 30 12:30, Saal E
-* [Replicant Meetup][9] – December 30 14:00, Saal 3, CDC, Round Table
+* [Replicant Meetup][9] - December 30 14:00, Saal 3, CDC, Round Table
[1]: <https://events.ccc.de/congress/2023/wiki/index.php/Main_Page>