summaryrefslogtreecommitdiff
path: root/lulua/report.py
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2021-10-19 14:33:15 +0200
committerLars-Dominik Braun <lars@6xq.net>2021-10-27 15:36:58 +0200
commit8315da395a2a99111bf3e9d0ab3846f7ddbf9732 (patch)
tree45513f69c0dd19e2a753b5e8d9d56d4d44df4556 /lulua/report.py
parente0405e731713ff6ab8e99b58f6d3a5a7256251de (diff)
downloadlulua-8315da395a2a99111bf3e9d0ab3846f7ddbf9732.tar.gz
lulua-8315da395a2a99111bf3e9d0ab3846f7ddbf9732.tar.bz2
lulua-8315da395a2a99111bf3e9d0ab3846f7ddbf9732.zip
report: Remove example sentences.
I feel they don’t really convey which parts of a layout are difficult to use and the sentences used were quite arbitrary. They should be replaced by something better.
Diffstat (limited to 'lulua/report.py')
-rw-r--r--lulua/report.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/lulua/report.py b/lulua/report.py
index b25201d..7d0294a 100644
--- a/lulua/report.py
+++ b/lulua/report.py
@@ -60,21 +60,6 @@ def arabnum (s):
m = {'0': '٠', '1': '١', '2': '٢', '3': '٣', '4': '٤', '5': '٥', '6': '٦', '7': '٧', '8': '٨', '9': '٩', ',': '٬', '.': '٫'}
return ''.join (map (lambda x: m.get (x, x), s))
-def clamp (v, lower, upper):
- return max (min (v, upper), lower)
-
-def blend (v, a, b):
- v = clamp (v, 0, 1)
- return (b-a)*v+a
-
-def blendn (v, *l):
- assert 0 <= v <= 1
- n = len (l)
- step = 1/(n-1)
- i = min (int (math.floor (v/step)), n-2)
- stretchedv = (v-i*step)/step
- return [blend (stretchedv, x, y) for x, y in zip (l[i], l[i+1])]
-
def render ():
parser = argparse.ArgumentParser(description='Create lulua report.')
parser.add_argument('-c', '--corpus', nargs='+', metavar='FILE', help='Corpus metadata files')
@@ -88,7 +73,6 @@ def render ():
env.filters['approx'] = approx
env.filters['numspace'] = numspace
env.filters['arabnum'] = arabnum
- env.filters['blendn'] = blendn
env.filters['fraction'] = fraction
corpus = []