summaryrefslogtreecommitdiff
path: root/src/texinfo/get_title
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2023-09-15 10:11:41 -0400
committerLouie S <louie@example.com>2023-09-15 10:11:41 -0400
commitd44e7f620f4970ab72bd7979cd8751857f683915 (patch)
tree72518b296a6877ce063430779687ee9896640974 /src/texinfo/get_title
parentd4bd46635fe9a74bf35812ee5b635af177e74cfc (diff)
Improve design, fix guide names for info-reader targetHEADmaster
Diffstat (limited to 'src/texinfo/get_title')
-rw-r--r--src/texinfo/get_title8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/texinfo/get_title b/src/texinfo/get_title
new file mode 100644
index 0000000..b501501
--- /dev/null
+++ b/src/texinfo/get_title
@@ -0,0 +1,8 @@
+get_title() {
+ FILE="$1"
+
+ pup -p -f "$FILE" 'title text{}' | \
+ tr -d \\n | \
+ sed 's/ (GNU[^)]*)$//' | \
+ sed 's/\"/\"\"/g'
+}