diff options
author | Case Duckworth | 2023-01-06 22:40:47 -0600 |
---|---|---|
committer | Case Duckworth | 2023-01-06 22:40:47 -0600 |
commit | 7a1d22f60b234be0ad6bdb736a998eb6ab451cd4 (patch) | |
tree | 9c5cec32f76de34e0c2d3d2a1f2aa68df43269f7 | |
parent | Change domain in 'vienna preview' (diff) | |
download | vienna-7a1d22f60b234be0ad6bdb736a998eb6ab451cd4.tar.gz vienna-7a1d22f60b234be0ad6bdb736a998eb6ab451cd4.zip |
Shorten 'meta'
-rwxr-xr-x | vienna | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/vienna b/vienna index 59201df..f40f027 100755 --- a/vienna +++ b/vienna | |||
@@ -296,9 +296,7 @@ meta() { # meta FIELD [FILE] | |||
296 | # | 296 | # |
297 | # Metadata should exist as colon-separated data in an HTML comment at | 297 | # Metadata should exist as colon-separated data in an HTML comment at |
298 | # the beginning of an input file. | 298 | # the beginning of an input file. |
299 | field="$1" | 299 | sed -n "s/^[ \t]*$1:[ \t]*//p" <"${2:-$META}" |
300 | file="${2:-$META}" | ||
301 | sed -n "s/^[ \t]*$field:[ \t]*//p" <"$file" | ||
302 | } | 300 | } |
303 | 301 | ||
304 | ## Customizable bits | 302 | ## Customizable bits |