hide awk BEGIN statements - make debian linda happy
This commit is contained in:
parent
953a67c49c
commit
4f0c17d2e6
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# @(#$Id: rcldjvu,v 1.2 2006-04-04 16:03:28 dockes Exp $ (C) 2005 J.F.Dockes
|
# @(#$Id: rcldjvu,v 1.3 2007-01-30 11:36:02 dockes Exp $ (C) 2005 J.F.Dockes
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -82,7 +82,7 @@ title=`djvused "$infile" -e 'select 1;output-ant' | \
|
|||||||
grep ' (title ' | sed -e 's/^.* (title //' -e 's/)$//' |\
|
grep ' (title ' | sed -e 's/^.* (title //' -e 's/)$//' |\
|
||||||
awk '
|
awk '
|
||||||
{
|
{
|
||||||
printf("BEGIN {s = %s; print s}\n", $0)
|
printf("BEGIN" " {s = %s; print s}\n", $0)
|
||||||
}' | awk -f -`
|
}' | awk -f -`
|
||||||
|
|
||||||
|
|
||||||
@ -96,9 +96,11 @@ cat <<EOF
|
|||||||
<pre>
|
<pre>
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
|
||||||
|
# is an awk program
|
||||||
djvutxt "$infile" | sed -e 's/[ ][ ]*$//' | \
|
djvutxt "$infile" | sed -e 's/[ ][ ]*$//' | \
|
||||||
awk '
|
awk 'BEGIN'\
|
||||||
BEGIN {
|
' {
|
||||||
cont = ""
|
cont = ""
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# @(#$Id: rcldoc,v 1.5 2006-01-27 13:37:31 dockes Exp $ (C) 2004 J.F.Dockes
|
# @(#$Id: rcldoc,v 1.6 2007-01-30 11:36:02 dockes Exp $ (C) 2004 J.F.Dockes
|
||||||
# Parts taken from Estraier:
|
# Parts taken from Estraier:
|
||||||
#================================================================
|
#================================================================
|
||||||
# Estraier: a personal full-text search system
|
# Estraier: a personal full-text search system
|
||||||
@ -69,9 +69,11 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# output the result
|
# output the result
|
||||||
|
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
|
||||||
|
# is an awk program
|
||||||
$decoder "$infile" |
|
$decoder "$infile" |
|
||||||
awk '
|
awk 'BEGIN'\
|
||||||
BEGIN {
|
' {
|
||||||
print "<html><head><title></title>"
|
print "<html><head><title></title>"
|
||||||
print "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">"
|
print "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">"
|
||||||
print "</head>\n<body>\n<p>"
|
print "</head>\n<body>\n<p>"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# @(#$Id: rcldvi,v 1.2 2006-02-03 11:47:47 dockes Exp $ (C) 2006 J.F.Dockes
|
# @(#$Id: rcldvi,v 1.3 2007-01-30 11:36:02 dockes Exp $ (C) 2006 J.F.Dockes
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -75,9 +75,11 @@ if test X$decoder = Xdvips ; then
|
|||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
|
||||||
|
# is an awk program
|
||||||
$decoder "$infile" |
|
$decoder "$infile" |
|
||||||
awk '
|
awk 'BEGIN'\
|
||||||
BEGIN {
|
' {
|
||||||
printf("<html><head><title></title>\n")
|
printf("<html><head><title></title>\n")
|
||||||
printf("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n")
|
printf("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n")
|
||||||
printf("</head>\n<body><p>");
|
printf("</head>\n<body><p>");
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# @(#$Id: rclpdf,v 1.6 2006-01-27 13:37:31 dockes Exp $ (C) 2004 J.F.Dockes
|
# @(#$Id: rclpdf,v 1.7 2007-01-30 11:36:02 dockes Exp $ (C) 2004 J.F.Dockes
|
||||||
# This is copied almost verbatim from Estraier:
|
# This is copied almost verbatim from Estraier:
|
||||||
#================================================================
|
#================================================================
|
||||||
# Estraier: a personal full-text search system
|
# Estraier: a personal full-text search system
|
||||||
@ -76,10 +76,12 @@ checkcmds()
|
|||||||
checkcmds pdftotext iconv awk
|
checkcmds pdftotext iconv awk
|
||||||
|
|
||||||
# Run pdftotext and fix the result (add a charset tag and fix the html escaping
|
# Run pdftotext and fix the result (add a charset tag and fix the html escaping
|
||||||
|
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
|
||||||
|
# is an awk program
|
||||||
pdftotext $optionraw -htmlmeta -enc UTF-8 -eol unix -q "$infile" - |
|
pdftotext $optionraw -htmlmeta -enc UTF-8 -eol unix -q "$infile" - |
|
||||||
iconv -f UTF-8 -t UTF-8 -c -s |
|
iconv -f UTF-8 -t UTF-8 -c -s |
|
||||||
awk '
|
awk 'BEGIN'\
|
||||||
BEGIN {
|
' {
|
||||||
doescape = 0
|
doescape = 0
|
||||||
cont = ""
|
cont = ""
|
||||||
charsetmeta = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">"
|
charsetmeta = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# @(#$Id: rclps,v 1.7 2006-04-04 16:03:28 dockes Exp $ (C) 2004 J.F.Dockes
|
# @(#$Id: rclps,v 1.8 2007-01-30 11:36:02 dockes Exp $ (C) 2004 J.F.Dockes
|
||||||
# Parts taken from Estraier:
|
# Parts taken from Estraier:
|
||||||
#================================================================
|
#================================================================
|
||||||
# Estraier: a personal full-text search system
|
# Estraier: a personal full-text search system
|
||||||
@ -74,9 +74,11 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# output the result
|
# output the result
|
||||||
|
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
|
||||||
|
# is an awk program
|
||||||
$decoder "$infile" |
|
$decoder "$infile" |
|
||||||
awk '
|
awk 'BEGIN'\
|
||||||
BEGIN {
|
' {
|
||||||
printf("<html><head><title></title>\n")
|
printf("<html><head><title></title>\n")
|
||||||
printf("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n")
|
printf("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n")
|
||||||
printf("</head>\n<body><p>");
|
printf("</head>\n<body><p>");
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# @(#$Id: rclrtf,v 1.2 2005-11-23 10:17:53 dockes Exp $ (C) 2004 J.F.Dockes
|
# @(#$Id: rclrtf,v 1.3 2007-01-30 11:36:02 dockes Exp $ (C) 2004 J.F.Dockes
|
||||||
# Some inspiration from estraier
|
# Some inspiration from estraier
|
||||||
#================================================================
|
#================================================================
|
||||||
# rclrtf
|
# rclrtf
|
||||||
@ -57,9 +57,11 @@ checkcmds()
|
|||||||
checkcmds awk unrtf
|
checkcmds awk unrtf
|
||||||
|
|
||||||
# output the result
|
# output the result
|
||||||
|
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
|
||||||
|
# is an awk program
|
||||||
unrtf --nopict --html "$infile" 2> /dev/null |
|
unrtf --nopict --html "$infile" 2> /dev/null |
|
||||||
awk '
|
awk 'BEGIN'\
|
||||||
BEGIN {
|
' {
|
||||||
gothead = 0
|
gothead = 0
|
||||||
}
|
}
|
||||||
/<\/head>/{
|
/<\/head>/{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# @(#$Id: rclsoff,v 1.7 2007-01-21 16:41:40 dockes Exp $ (C) 2004 J.F.Dockes
|
# @(#$Id: rclsoff,v 1.8 2007-01-30 11:36:02 dockes Exp $ (C) 2004 J.F.Dockes
|
||||||
# Parts taken from Estraier:
|
# Parts taken from Estraier:
|
||||||
#================================================================
|
#================================================================
|
||||||
# Estraier: a personal full-text search system
|
# Estraier: a personal full-text search system
|
||||||
@ -122,9 +122,11 @@ echo '<meta name="description" content="' "$description $subject" '">'
|
|||||||
echo '<meta name="keywords" content="' "$keywords" '">'
|
echo '<meta name="keywords" content="' "$keywords" '">'
|
||||||
echo '</head><body><p>'
|
echo '</head><body><p>'
|
||||||
|
|
||||||
|
# The strange 'BEGIN' setup is to prevent 'file' from thinking this file
|
||||||
|
# is an awk program
|
||||||
echo "$content" | sed -e "s/'/'/g" -e 's/"/"/g' |\
|
echo "$content" | sed -e "s/'/'/g" -e 's/"/"/g' |\
|
||||||
awk '
|
awk 'BEGIN'\
|
||||||
BEGIN {
|
' {
|
||||||
cont = ""
|
cont = ""
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user