summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2020-07-25 20:44:36 -0400
committerrsiddharth <s@ricketyspace.net>2020-07-25 20:46:36 -0400
commit219b86dfe891f6072577889f75525367a399e101 (patch)
tree4c62b2ea40bb0044ba8ffb5074d6317e48676813 /bin
parent1ce235f959ba7ef352134f16c4030504ae557230 (diff)
bin/html: add langmap.
* bin/html (langmap): New function.
Diffstat (limited to 'bin')
-rw-r--r--bin/html18
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/html b/bin/html
index 4ada99f..2554287 100644
--- a/bin/html
+++ b/bin/html
@@ -158,6 +158,24 @@ def html(sec, f):
return s, h, l
+def langmap(sec):
+ lm = {}
+ for f in files(sec):
+ s, l = slug(f.path)
+
+ if not s in lm:
+ lm[s] = []
+
+ if not l:
+ lm[s].append('en')
+ else:
+ lm[s].append(l)
+
+ lm[s].sort()
+
+ return lm
+
+
def process(sec):
for f in files(sec):
s, h, l = html(sec, f)