]> git.phdru.name Git - bookmarks_db.git/commitdiff
Feat: Cleanup redirects
authorOleg Broytman <phd@phdru.name>
Wed, 24 Jul 2024 02:26:03 +0000 (05:26 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 24 Jul 2024 02:26:03 +0000 (05:26 +0300)
Remove verbiage.

bkmk-chk
cleanup_redirects [new file with mode: 0755]

index 60821e1ea971ed6ab9c65ee17d3456a1c980ca57..cfb2d65074fedb843befad13623c1aa64696e7fb 100755 (executable)
--- a/bkmk-chk
+++ b/bkmk-chk
@@ -24,6 +24,7 @@ check_urls_db.py -e &&
 BKMK_WRITER=flad db2bkmk.py &&
 check_dups.py -s -l check_dups.txt >/dev/null &&
 check_redirects.py -s -l check_redirects.txt &&
+cleanup_redirects &&
 check_title.py -s -l check_title.txt &&
 bkmk-sort &&
 
diff --git a/cleanup_redirects b/cleanup_redirects
new file mode 100755 (executable)
index 0000000..d2313f0
--- /dev/null
@@ -0,0 +1,13 @@
+#! /bin/sh
+# Cleanup redirects
+#
+# This file is a part of Bookmarks database and Internet robot.
+#
+# __author__ = "Oleg Broytman <phd@phdru.name>"
+# __copyright__ = "Copyright (C) 2024 PhiloSoft Design"
+# __license__ = "GNU GPL"
+
+exec sed \
+    -e 's/^(\(perm\|temp\)[0-9]\.) to //' \
+    -e 's/^(html) to \+\(.\+\) ([0-9]\+ sec)/\1/' \
+check_redirects.txt >set_redirects.txt