Improved gmi2map logic
This commit is contained in:
+4
-1
@@ -22,8 +22,11 @@ CRLF=$'\r\n'
|
||||
[[ -z "$TSPACES" ]] && TSPACES=0
|
||||
[[ -z "$DELIM" ]] && DELIM=';'
|
||||
|
||||
FORMAT_WIDTH=0 # make formatting width distinct from the target reflow width
|
||||
(( TSPACES > 0 )) && FORMAT_WIDTH="$TARGET_WIDTH" # and only use it if there are trailing spaces
|
||||
|
||||
# format strings to use in different situations:
|
||||
reflowfmt="%-$(( LSPACES ))s%-${TARGET_WIDTH}s%-$(( TSPACES ))s\n" # params: smth, line, smth
|
||||
reflowfmt="%-$(( LSPACES ))s%-${FORMAT_WIDTH}s%-$(( TSPACES ))s\n" # params: smth, line, smth
|
||||
infofmt="i%s${TAB}%s${TAB}%s${TAB}0${CRLF}" # params: line, DELIM, DELIM
|
||||
gopherlinkfmt="%s%s${TAB}%s${TAB}%s${TAB}%d${CRLF}" # params: type, name, selector, host, port
|
||||
extlinkfmt="h%s${TAB}URL:%s${TAB}%s${TAB}0${CRLF}" # params: name, URL, DELIM
|
||||
|
||||
Reference in New Issue
Block a user