2005-09-15 09:58:31 -04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
Redo the whole doc/ build thing
You can now use: make {all-docs,pdf,html,man,api,update-man}
instead of: make {all-docs,pdf-docs,html-docs,man-docs}
Away is building into separate dirs. This makes make able to actually get
dependencies right, since there are now a collection of 'common' build
rules, some of which have even been moved to use the cmd infrastructure.
To update the man pages there is a new update-man rule. It builds the
manual pages and copies them to their proper place under man/ while doing
the final preformatting.
As good thing is that the (two) man pages are moved to .txt files and
include the generated content.
The API building thing is also refined. It builds into api/ and builds it's
list of files dynamically by searching throught the .h files in the src/
directory. Documented header files must contain a comment like this:
/* API Doc :: <api-name> */
where <api-name> is the name used for the file under api/, for example
dom-scanner.
2006-01-11 05:02:43 -05:00
|
|
|
# Generate the keymap-actions.txt and keymap-defaults.txt for elinkskeys(5)
|
|
|
|
# manpage.
|
|
|
|
#
|
|
|
|
# Copyright (c) Jonas Fonseca <fonseca@diku.dk>, 2005-2006
|
2005-09-15 09:58:31 -04:00
|
|
|
#
|
|
|
|
|
Redo the whole doc/ build thing
You can now use: make {all-docs,pdf,html,man,api,update-man}
instead of: make {all-docs,pdf-docs,html-docs,man-docs}
Away is building into separate dirs. This makes make able to actually get
dependencies right, since there are now a collection of 'common' build
rules, some of which have even been moved to use the cmd infrastructure.
To update the man pages there is a new update-man rule. It builds the
manual pages and copies them to their proper place under man/ while doing
the final preformatting.
As good thing is that the (two) man pages are moved to .txt files and
include the generated content.
The API building thing is also refined. It builds into api/ and builds it's
list of files dynamically by searching throught the .h files in the src/
directory. Documented header files must contain a comment like this:
/* API Doc :: <api-name> */
where <api-name> is the name used for the file under api/, for example
dom-scanner.
2006-01-11 05:02:43 -05:00
|
|
|
KBDBIND=$1
|
|
|
|
CONFIGDIR=$(dirname "$KBDBIND")
|
2006-01-13 06:02:26 -05:00
|
|
|
OUTPUT=$2
|
2005-09-15 09:58:31 -04:00
|
|
|
|
Redo the whole doc/ build thing
You can now use: make {all-docs,pdf,html,man,api,update-man}
instead of: make {all-docs,pdf-docs,html-docs,man-docs}
Away is building into separate dirs. This makes make able to actually get
dependencies right, since there are now a collection of 'common' build
rules, some of which have even been moved to use the cmd infrastructure.
To update the man pages there is a new update-man rule. It builds the
manual pages and copies them to their proper place under man/ while doing
the final preformatting.
As good thing is that the (two) man pages are moved to .txt files and
include the generated content.
The API building thing is also refined. It builds into api/ and builds it's
list of files dynamically by searching throught the .h files in the src/
directory. Documented header files must contain a comment like this:
/* API Doc :: <api-name> */
where <api-name> is the name used for the file under api/, for example
dom-scanner.
2006-01-11 05:02:43 -05:00
|
|
|
test -d "$CONFIGDIR" || exit
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2006-01-13 06:02:26 -05:00
|
|
|
print_title()
|
|
|
|
{
|
2006-01-14 13:45:40 -05:00
|
|
|
echo
|
2006-01-13 06:02:26 -05:00
|
|
|
echo "$1" | tr 'a-z' 'A-Z'
|
|
|
|
echo "$1" | sed 's/[^~]/~/g'
|
|
|
|
echo
|
|
|
|
}
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
print_keymap_actions()
|
|
|
|
{
|
2006-01-13 06:02:26 -05:00
|
|
|
keymap="$1"
|
|
|
|
|
|
|
|
print_title "$keymap ACTIONS"
|
2005-09-15 09:58:31 -04:00
|
|
|
|
Redo the whole doc/ build thing
You can now use: make {all-docs,pdf,html,man,api,update-man}
instead of: make {all-docs,pdf-docs,html-docs,man-docs}
Away is building into separate dirs. This makes make able to actually get
dependencies right, since there are now a collection of 'common' build
rules, some of which have even been moved to use the cmd infrastructure.
To update the man pages there is a new update-man rule. It builds the
manual pages and copies them to their proper place under man/ while doing
the final preformatting.
As good thing is that the (two) man pages are moved to .txt files and
include the generated content.
The API building thing is also refined. It builds into api/ and builds it's
list of files dynamically by searching throught the .h files in the src/
directory. Documented header files must contain a comment like this:
/* API Doc :: <api-name> */
where <api-name> is the name used for the file under api/, for example
dom-scanner.
2006-01-11 05:02:43 -05:00
|
|
|
echo 'ifdef::backend-xhtml11[]'
|
|
|
|
echo '`----------------------------------`----------------------------------------------------------------------------'
|
|
|
|
echo 'Action Description'
|
|
|
|
echo '----------------------------------------------------------------------------------------------------------------'
|
|
|
|
# open-link-in-new-tab-in-background
|
|
|
|
echo 'endif::backend-xhtml11[]'
|
2005-10-03 18:53:03 -04:00
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
grep ACTION_ "$CONFIGDIR/actions-$keymap.inc" \
|
|
|
|
| while read entry;
|
|
|
|
do
|
|
|
|
action=$(echo "$entry" | sed 's/ACTION_([^,]*, "\([^"]*\)".*/\1/')
|
|
|
|
caption=$(echo "$entry" | sed 's/.*N__("\(.*\)").*/\1/')
|
|
|
|
|
|
|
|
[ "$action" = "none" ] && continue
|
|
|
|
[ "$action" = " *scripting-function*" ] && continue
|
|
|
|
|
Redo the whole doc/ build thing
You can now use: make {all-docs,pdf,html,man,api,update-man}
instead of: make {all-docs,pdf-docs,html-docs,man-docs}
Away is building into separate dirs. This makes make able to actually get
dependencies right, since there are now a collection of 'common' build
rules, some of which have even been moved to use the cmd infrastructure.
To update the man pages there is a new update-man rule. It builds the
manual pages and copies them to their proper place under man/ while doing
the final preformatting.
As good thing is that the (two) man pages are moved to .txt files and
include the generated content.
The API building thing is also refined. It builds into api/ and builds it's
list of files dynamically by searching throught the .h files in the src/
directory. Documented header files must contain a comment like this:
/* API Doc :: <api-name> */
where <api-name> is the name used for the file under api/, for example
dom-scanner.
2006-01-11 05:02:43 -05:00
|
|
|
echo 'ifdef::backend-docbook[]'
|
2006-01-11 23:36:24 -05:00
|
|
|
echo "$action::"
|
|
|
|
echo " $caption."
|
|
|
|
echo
|
Redo the whole doc/ build thing
You can now use: make {all-docs,pdf,html,man,api,update-man}
instead of: make {all-docs,pdf-docs,html-docs,man-docs}
Away is building into separate dirs. This makes make able to actually get
dependencies right, since there are now a collection of 'common' build
rules, some of which have even been moved to use the cmd infrastructure.
To update the man pages there is a new update-man rule. It builds the
manual pages and copies them to their proper place under man/ while doing
the final preformatting.
As good thing is that the (two) man pages are moved to .txt files and
include the generated content.
The API building thing is also refined. It builds into api/ and builds it's
list of files dynamically by searching throught the .h files in the src/
directory. Documented header files must contain a comment like this:
/* API Doc :: <api-name> */
where <api-name> is the name used for the file under api/, for example
dom-scanner.
2006-01-11 05:02:43 -05:00
|
|
|
echo 'endif::backend-docbook[]'
|
|
|
|
echo 'ifdef::backend-xhtml11[]'
|
|
|
|
printf "%-34s %s\n" "$action" "$caption"
|
|
|
|
echo 'endif::backend-xhtml11[]'
|
2005-09-15 09:58:31 -04:00
|
|
|
done
|
2005-10-03 18:53:03 -04:00
|
|
|
|
Redo the whole doc/ build thing
You can now use: make {all-docs,pdf,html,man,api,update-man}
instead of: make {all-docs,pdf-docs,html-docs,man-docs}
Away is building into separate dirs. This makes make able to actually get
dependencies right, since there are now a collection of 'common' build
rules, some of which have even been moved to use the cmd infrastructure.
To update the man pages there is a new update-man rule. It builds the
manual pages and copies them to their proper place under man/ while doing
the final preformatting.
As good thing is that the (two) man pages are moved to .txt files and
include the generated content.
The API building thing is also refined. It builds into api/ and builds it's
list of files dynamically by searching throught the .h files in the src/
directory. Documented header files must contain a comment like this:
/* API Doc :: <api-name> */
where <api-name> is the name used for the file under api/, for example
dom-scanner.
2006-01-11 05:02:43 -05:00
|
|
|
echo 'ifdef::backend-xhtml11[]'
|
|
|
|
echo '---------------------------------------------------------------------------------------------------------------'
|
|
|
|
echo 'endif::backend-xhtml11[]'
|
2005-09-15 09:58:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
print_keymap_defaults()
|
|
|
|
{
|
|
|
|
keymap="$1"
|
|
|
|
KEYMAP=$(echo $1 | tr '[a-z]' '[A-Z]')
|
|
|
|
|
2006-01-13 06:02:26 -05:00
|
|
|
print_title "$keymap KEYS"
|
|
|
|
|
Redo the whole doc/ build thing
You can now use: make {all-docs,pdf,html,man,api,update-man}
instead of: make {all-docs,pdf-docs,html-docs,man-docs}
Away is building into separate dirs. This makes make able to actually get
dependencies right, since there are now a collection of 'common' build
rules, some of which have even been moved to use the cmd infrastructure.
To update the man pages there is a new update-man rule. It builds the
manual pages and copies them to their proper place under man/ while doing
the final preformatting.
As good thing is that the (two) man pages are moved to .txt files and
include the generated content.
The API building thing is also refined. It builds into api/ and builds it's
list of files dynamically by searching throught the .h files in the src/
directory. Documented header files must contain a comment like this:
/* API Doc :: <api-name> */
where <api-name> is the name used for the file under api/, for example
dom-scanner.
2006-01-11 05:02:43 -05:00
|
|
|
echo 'ifdef::backend-xhtml11[]'
|
|
|
|
echo '`-----------`-------------------------------------------------------------------------------'
|
|
|
|
echo 'Key Description (Action)'
|
|
|
|
echo '--------------------------------------------------------------------------------------------'
|
|
|
|
# Ctrl-Insert
|
|
|
|
echo 'endif::backend-xhtml11[]'
|
2005-10-03 18:53:03 -04:00
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
grep ACT_$KEYMAP $KBDBIND | grep '^[[:space:]]{' | grep -v '{ "' \
|
|
|
|
| while read entry
|
|
|
|
do
|
2008-03-02 19:38:54 -05:00
|
|
|
entry=$(echo "$entry" | sed 's/.*{ { //')
|
2024-05-27 12:21:11 -04:00
|
|
|
key=$(echo "$entry" | sed -E "s/(KBD_[^,]*|'.*'),.*/\1/")
|
2005-09-15 09:58:31 -04:00
|
|
|
action=$(echo "$entry" | sed "s/.*,.*\(ACT_$KEYMAP\)_\([A-Z_]*\).*/\2/")
|
2007-01-06 14:38:29 -05:00
|
|
|
# If there are backslashed quotes, remove the backslashes.
|
|
|
|
# (This is not needed in print_keymap_actions because
|
|
|
|
# there the "read" command consumes the backslashes.)
|
2005-09-15 09:58:31 -04:00
|
|
|
action=$(grep " $action," "$CONFIGDIR/actions-$keymap.inc" \
|
2007-01-06 14:38:29 -05:00
|
|
|
| sed "s/.*\"\([^\"]*\)\".*N__(\"\(.*\)\").*/\2 ('\1')/;s/\\\\\"/\"/g")
|
2008-03-02 19:59:01 -05:00
|
|
|
q=
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
case "$key" in
|
|
|
|
KBD_*)
|
|
|
|
key=$(grep $key $KBDBIND \
|
|
|
|
| grep '^[[:space:]]{ "' \
|
|
|
|
| sed 's/.*"\([^"]*\)".*/\1/')
|
|
|
|
;;
|
|
|
|
"' '")
|
|
|
|
key="Space"
|
|
|
|
;;
|
|
|
|
*)
|
2006-01-12 04:29:05 -05:00
|
|
|
key=$(echo "$key" | sed "s/^'\(.*\)'$/\1/" \
|
|
|
|
| sed "s/'/{squote}/")
|
2008-03-02 19:59:01 -05:00
|
|
|
q='"'
|
2005-09-15 09:58:31 -04:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2008-03-02 19:38:54 -05:00
|
|
|
case "$entry" in
|
|
|
|
*KBD_MOD_ALT*) modifier="Alt-" ;;
|
|
|
|
*KBD_MOD_CTRL*) modifier="Ctrl-" ;;
|
|
|
|
*KBD_MOD_SHIFT*) modifier="Shift-" ;;
|
|
|
|
*) modifier="" ;;
|
2005-09-15 09:58:31 -04:00
|
|
|
esac
|
|
|
|
|
Redo the whole doc/ build thing
You can now use: make {all-docs,pdf,html,man,api,update-man}
instead of: make {all-docs,pdf-docs,html-docs,man-docs}
Away is building into separate dirs. This makes make able to actually get
dependencies right, since there are now a collection of 'common' build
rules, some of which have even been moved to use the cmd infrastructure.
To update the man pages there is a new update-man rule. It builds the
manual pages and copies them to their proper place under man/ while doing
the final preformatting.
As good thing is that the (two) man pages are moved to .txt files and
include the generated content.
The API building thing is also refined. It builds into api/ and builds it's
list of files dynamically by searching throught the .h files in the src/
directory. Documented header files must contain a comment like this:
/* API Doc :: <api-name> */
where <api-name> is the name used for the file under api/, for example
dom-scanner.
2006-01-11 05:02:43 -05:00
|
|
|
echo 'ifdef::backend-docbook[]'
|
2008-03-02 19:59:01 -05:00
|
|
|
echo "'$modifier$q$key$q'::"
|
2006-01-11 23:36:24 -05:00
|
|
|
echo " $action"
|
|
|
|
echo
|
Redo the whole doc/ build thing
You can now use: make {all-docs,pdf,html,man,api,update-man}
instead of: make {all-docs,pdf-docs,html-docs,man-docs}
Away is building into separate dirs. This makes make able to actually get
dependencies right, since there are now a collection of 'common' build
rules, some of which have even been moved to use the cmd infrastructure.
To update the man pages there is a new update-man rule. It builds the
manual pages and copies them to their proper place under man/ while doing
the final preformatting.
As good thing is that the (two) man pages are moved to .txt files and
include the generated content.
The API building thing is also refined. It builds into api/ and builds it's
list of files dynamically by searching throught the .h files in the src/
directory. Documented header files must contain a comment like this:
/* API Doc :: <api-name> */
where <api-name> is the name used for the file under api/, for example
dom-scanner.
2006-01-11 05:02:43 -05:00
|
|
|
echo 'endif::backend-docbook[]'
|
|
|
|
echo 'ifdef::backend-xhtml11[]'
|
|
|
|
printf "%-11s %s\n" "$modifier$key" "$action"
|
|
|
|
echo 'endif::backend-xhtml11[]'
|
|
|
|
done
|
2005-09-15 09:58:31 -04:00
|
|
|
|
Redo the whole doc/ build thing
You can now use: make {all-docs,pdf,html,man,api,update-man}
instead of: make {all-docs,pdf-docs,html-docs,man-docs}
Away is building into separate dirs. This makes make able to actually get
dependencies right, since there are now a collection of 'common' build
rules, some of which have even been moved to use the cmd infrastructure.
To update the man pages there is a new update-man rule. It builds the
manual pages and copies them to their proper place under man/ while doing
the final preformatting.
As good thing is that the (two) man pages are moved to .txt files and
include the generated content.
The API building thing is also refined. It builds into api/ and builds it's
list of files dynamically by searching throught the .h files in the src/
directory. Documented header files must contain a comment like this:
/* API Doc :: <api-name> */
where <api-name> is the name used for the file under api/, for example
dom-scanner.
2006-01-11 05:02:43 -05:00
|
|
|
echo 'ifdef::backend-xhtml11[]'
|
|
|
|
echo '--------------------------------------------------------------------------------------------'
|
|
|
|
echo 'endif::backend-xhtml11[]'
|
2005-09-15 09:58:31 -04:00
|
|
|
|
Redo the whole doc/ build thing
You can now use: make {all-docs,pdf,html,man,api,update-man}
instead of: make {all-docs,pdf-docs,html-docs,man-docs}
Away is building into separate dirs. This makes make able to actually get
dependencies right, since there are now a collection of 'common' build
rules, some of which have even been moved to use the cmd infrastructure.
To update the man pages there is a new update-man rule. It builds the
manual pages and copies them to their proper place under man/ while doing
the final preformatting.
As good thing is that the (two) man pages are moved to .txt files and
include the generated content.
The API building thing is also refined. It builds into api/ and builds it's
list of files dynamically by searching throught the .h files in the src/
directory. Documented header files must contain a comment like this:
/* API Doc :: <api-name> */
where <api-name> is the name used for the file under api/, for example
dom-scanner.
2006-01-11 05:02:43 -05:00
|
|
|
}
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2006-01-13 06:02:26 -05:00
|
|
|
print_keymap_doc=
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2006-01-13 06:02:26 -05:00
|
|
|
case "$OUTPUT" in
|
|
|
|
*default*) print_keymap_doc="print_keymap_defaults" ;;
|
|
|
|
*action*) print_keymap_doc="print_keymap_actions" ;;
|
|
|
|
esac
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2006-01-13 06:02:26 -05:00
|
|
|
$print_keymap_doc main
|
|
|
|
$print_keymap_doc edit
|
|
|
|
$print_keymap_doc menu
|