diff --git a/src/filters/rcldjvu b/src/filters/rcldjvu index 10fbc741..7e1b3738 100755 --- a/src/filters/rcldjvu +++ b/src/filters/rcldjvu @@ -1,5 +1,5 @@ #!/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 # 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/)$//' |\ awk ' { - printf("BEGIN {s = %s; print s}\n", $0) + printf("BEGIN" " {s = %s; print s}\n", $0) }' | awk -f -` @@ -96,9 +96,11 @@ cat < EOF +# The strange 'BEGIN' setup is to prevent 'file' from thinking this file +# is an awk program djvutxt "$infile" | sed -e 's/[ ][ ]*$//' | \ -awk ' -BEGIN { +awk 'BEGIN'\ +' { cont = "" } { diff --git a/src/filters/rcldoc b/src/filters/rcldoc index 08e0b440..0cf46ec6 100755 --- a/src/filters/rcldoc +++ b/src/filters/rcldoc @@ -1,5 +1,5 @@ #!/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: #================================================================ # Estraier: a personal full-text search system @@ -69,9 +69,11 @@ then fi # output the result +# The strange 'BEGIN' setup is to prevent 'file' from thinking this file +# is an awk program $decoder "$infile" | -awk ' -BEGIN { +awk 'BEGIN'\ +' { print "" print "" print "\n\n

" diff --git a/src/filters/rcldvi b/src/filters/rcldvi index 330d61a6..1b7aa6e0 100755 --- a/src/filters/rcldvi +++ b/src/filters/rcldvi @@ -1,5 +1,5 @@ #!/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 # it under the terms of the GNU General Public License as published by @@ -75,9 +75,11 @@ if test X$decoder = Xdvips ; then exit $? fi +# The strange 'BEGIN' setup is to prevent 'file' from thinking this file +# is an awk program $decoder "$infile" | -awk ' -BEGIN { +awk 'BEGIN'\ +' { printf("\n") printf("\n") printf("\n

"); diff --git a/src/filters/rclpdf b/src/filters/rclpdf index 7ea12703..d6a78cd5 100755 --- a/src/filters/rclpdf +++ b/src/filters/rclpdf @@ -1,5 +1,5 @@ #!/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: #================================================================ # Estraier: a personal full-text search system @@ -76,10 +76,12 @@ checkcmds() checkcmds pdftotext iconv awk # 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" - | iconv -f UTF-8 -t UTF-8 -c -s | -awk ' -BEGIN { +awk 'BEGIN'\ +' { doescape = 0 cont = "" charsetmeta = "" diff --git a/src/filters/rclps b/src/filters/rclps index e92aacf5..875f91e9 100755 --- a/src/filters/rclps +++ b/src/filters/rclps @@ -1,5 +1,5 @@ #!/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: #================================================================ # Estraier: a personal full-text search system @@ -74,9 +74,11 @@ then fi # output the result +# The strange 'BEGIN' setup is to prevent 'file' from thinking this file +# is an awk program $decoder "$infile" | -awk ' -BEGIN { +awk 'BEGIN'\ +' { printf("\n") printf("\n") printf("\n

"); diff --git a/src/filters/rclrtf b/src/filters/rclrtf index 553fc647..19776d93 100755 --- a/src/filters/rclrtf +++ b/src/filters/rclrtf @@ -1,5 +1,5 @@ #!/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 #================================================================ # rclrtf @@ -57,9 +57,11 @@ checkcmds() checkcmds awk unrtf # 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 | -awk ' -BEGIN { +awk 'BEGIN'\ +' { gothead = 0 } /<\/head>/{ diff --git a/src/filters/rclsoff b/src/filters/rclsoff index 2be0d784..fac69cf8 100755 --- a/src/filters/rclsoff +++ b/src/filters/rclsoff @@ -1,5 +1,5 @@ #!/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: #================================================================ # Estraier: a personal full-text search system @@ -122,9 +122,11 @@ echo '' echo '' echo '

' +# 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' |\ -awk ' -BEGIN { +awk 'BEGIN'\ +' { cont = "" } {