aboutsummaryrefslogtreecommitdiff
path: root/plugins/readability/recompute_READABILITY_N.sh
diff options
context:
space:
mode:
authorNunoSempere <nuno.sempere@protonmail.com>2023-02-05 03:11:56 +0100
committerNunoSempere <nuno.sempere@protonmail.com>2023-02-05 03:13:12 +0100
commitbe043958f056264788cb92445890337b2674510c (patch)
tree0d4c2e5202eff13a0c4786436e58b28fc7ff40d9 /plugins/readability/recompute_READABILITY_N.sh
parent9a533b7e2679c6704aa83f53a82a0b51e86da7d8 (diff)
feat: add readability mode, and explain how to enable it.
Diffstat (limited to 'plugins/readability/recompute_READABILITY_N.sh')
-rwxr-xr-xplugins/readability/recompute_READABILITY_N.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/readability/recompute_READABILITY_N.sh b/plugins/readability/recompute_READABILITY_N.sh
new file mode 100755
index 0000000..3ca6e38
--- /dev/null
+++ b/plugins/readability/recompute_READABILITY_N.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+function sedr(){
+ find ./ -type f -exec sed -i -e "$1" {} \;
+} ## e.g., sedr "s/target/replacement/g"
+
+READABILITY_N=$(wc -c ./plugins/*/readability.js | cut -d " " -f 1)
+sedr "s/^#define READABILITY_N .*/#define READABILITY_N $READABILITY_N + 1/g"
+