[debiandoc-sgml-devel] Re: DebianDoc-SGML Alioth project up and running
Osamu Aoki
osamu@debian.org
Sun, 13 Feb 2005 21:23:55 +0100
--mP3DRpeJDSE+ciuQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
On Sun, Feb 13, 2005 at 01:52:50AM +0100, Jens Seidel wrote:
> It is (under the assumption, that template is still readable).
Not too easy but it is quite usable. we can always use diff to
generated files as a review point. I found that merging all similar
codes into one file reduces missed bug fixes for particular output form.
> Is the option -s necessary for debiandoc2latex (you suggested to move this
> functionality to debiandoc2latex but using a common template this should
> not be necessary, right)?
I will retract applying in debiandoc2latex. You are right we can apply
outside of the script.
I actually consolidated all the debioandoc2* codes into one template.
Since texinfo supports dockbook XML, I even added XML conversion.
Option -s is needed not only for latex files but texinfo files. Both
are supported.
As for debiandoc2latex* vs. debiandoc2* issues, there may have papersize
issues due to the bug, but symlinking only fix them. Command
syntax should be the same per manpage and sctipt except bugs in the
script.
By the way, I intensionally made this template not to fix all the minor
bugs but kept old behavior of script as possible to reduce possible
problems. They are marked so, it will be easy to fine tune it later.
I made -s option for latex to have default script : fixlatex since no
one loose by doing this.
Useless if ! ${stdout} are actually removed from source.
Osamu
PS: Attached is the diff from 1.1.84 to new generated debiandoc2* files.
--mP3DRpeJDSE+ciuQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="auto.diff"
--- /usr/bin/debiandoc2html 2004-10-20 05:53:52.000000000 +0200
+++ debiandoc2html 2005-02-13 16:03:10.000000000 +0100
@@ -10,7 +10,7 @@
script=$(basename ${0})
## ----------------------------------------------------------------------
-## print help message
+## print version and usage message
function usage_message
{
cat >&2 <<'END'
--- /usr/bin/debiandoc2info 2004-01-03 02:32:16.000000000 +0100
+++ debiandoc2info 2005-02-13 16:03:10.000000000 +0100
@@ -30,6 +30,7 @@
-e <extension> extension to be used
-k keep intermediate files
-l <locale> locale to be used
+ -s <script> apply script on texinfo generated file
-n <options> nsgmls options to be passed on
-v be verbose
END
@@ -57,12 +58,14 @@
## set default values
basename=''
content=''
+postprocessing=''
declaration=''
extension=''
keep=false
keepopt=''
locale=''
nsgmls=''
+stdout=false
verbose=false
## ----------------------------------------------------------------------
@@ -71,6 +74,7 @@
options="${options}h"
options="${options}b:"
options="${options}c"
+options="${options}s:"
options="${options}d:"
options="${options}e:"
options="${options}k"
@@ -87,6 +91,8 @@
;;
c ) content="-${opt}"
;;
+ s ) postprocessing="${OPTARG}"
+ ;;
d ) declaration="-${opt} ${OPTARG}"
;;
e ) extension="-${opt} ${OPTARG}"
@@ -171,6 +177,10 @@
echo >&2 "${script}: ERROR: ${bsn}.texinfo could not be generated properly"
exit 1
fi
+if [ -n "${postprocessing}" ]
+then
+ "${postprocessing}" ${locale} ${bsn}.texinfo
+fi
if ! ( ${verbose} || exec >/dev/null 2>&1;
makeinfo --no-validate -v -o ${bsn}${cnt}${ext} ${bsn}.texinfo )
then
--- /usr/bin/debiandoc2latex 2004-10-20 05:53:52.000000000 +0200
+++ debiandoc2latex 2005-02-13 16:03:10.000000000 +0100
@@ -10,7 +10,7 @@
script=$(basename ${0})
## ----------------------------------------------------------------------
-## print help message
+## print version and usage message
function usage_message
{
cat >&2 <<'END'
@@ -112,10 +112,6 @@
usage_error "-k not possible with input from stdin"
fi
stdout=true
- if ! ${stdout}
- then
- usage_error "stdin not allowed with debiandoc2latex"
- fi
;;
-?* ) nsgmlsi="./${1}"
;;
--- /usr/bin/debiandoc2latexdvi 2004-01-03 02:32:16.000000000 +0100
+++ debiandoc2latexdvi 2005-02-13 16:03:10.000000000 +0100
@@ -31,6 +31,7 @@
-e <extension> extension to be used
-k keep intermediate files
-l <locale> locale to be used
+ -s <script> apply script on latex generated file
-n <options> nsgmls options to be passed on
-p <papersize> paper size to be used
-v be verbose
@@ -80,6 +81,7 @@
## set default values
basename=''
content=''
+postprocessing='fixlatex'
declaration=''
extension=''
keep=false
@@ -96,6 +98,7 @@
options="${options}O"
options="${options}b:"
options="${options}c"
+options="${options}s:"
options="${options}d:"
options="${options}e:"
options="${options}k"
@@ -115,6 +118,8 @@
;;
c ) content="-${opt}"
;;
+ s ) postprocessing="${OPTARG}"
+ ;;
d ) declaration="-${opt} ${OPTARG}"
;;
e ) extension="-${opt} ${OPTARG}"
@@ -126,8 +131,8 @@
;;
n ) nsgmls="-${opt} ${OPTARG} ${nsgmls}"
;;
- p ) PAPERCONF=${OPTARG}
- export PAPERCONF
+ p ) PAPERSIZE=${OPTARG}
+ export PAPERSIZE
;;
v ) verbose=true
;;
@@ -202,6 +207,10 @@
echo >&2 "${script}: ERROR: ${bsn}.tex could not be generated properly"
exit 1
fi
+if [ -n "${postprocessing}" ]
+then
+ "${postprocessing}" ${locale} ${bsn}.tex
+fi
if [ -e ${bsn}.dvi ] && ( [ -n "${content}" ] || [ -n "${extension}" ] )
then
echo >&2 "${script}: WARNING: overwriting ${bsn}.dvi"
--- /usr/bin/debiandoc2latexpdf 2004-01-03 02:32:16.000000000 +0100
+++ debiandoc2latexpdf 2005-02-13 16:03:10.000000000 +0100
@@ -31,6 +31,7 @@
-e <extension> extension to be used
-k keep intermediate files
-l <locale> locale to be used
+ -s <script> apply script on latex generated file
-n <options> nsgmls options to be passed on
-p <papersize> paper size to be used
-v be verbose
@@ -50,7 +51,7 @@
## check for presence of pdflatex
if ! which pdflatex >/dev/null 2>&1
then
- echo >&2 "${script}: LaTeX documentation system not found"
+ echo >&2 "${script}: LaTeX typesetting system not found"
echo >&2 "${script}: please install the package 'tetex-bin'"
exit 2
fi
@@ -80,6 +81,7 @@
## set default values
basename=''
content=''
+postprocessing='fixlatex'
declaration=''
extension=''
keep=false
@@ -96,6 +98,7 @@
options="${options}O"
options="${options}b:"
options="${options}c"
+options="${options}s:"
options="${options}d:"
options="${options}e:"
options="${options}k"
@@ -115,6 +118,8 @@
;;
c ) content="-${opt}"
;;
+ s ) postprocessing="${OPTARG}"
+ ;;
d ) declaration="-${opt} ${OPTARG}"
;;
e ) extension="-${opt} ${OPTARG}"
@@ -126,8 +131,8 @@
;;
n ) nsgmls="-${opt} ${OPTARG} ${nsgmls}"
;;
- p ) PAPERCONF=${OPTARG}
- export PAPERCONF
+ p ) PAPERSIZE=${OPTARG}
+ export PAPERSIZE
;;
v ) verbose=true
;;
@@ -202,6 +207,10 @@
echo >&2 "${script}: ERROR: ${bsn}.tex could not be generated properly"
exit 1
fi
+if [ -n "${postprocessing}" ]
+then
+ "${postprocessing}" ${locale} ${bsn}.tex
+fi
if [ -e ${bsn}.pdf ] && ( [ -n "${content}" ] || [ -n "${extension}" ] )
then
echo >&2 "${script}: WARNING: overwriting ${bsn}.pdf"
--- /usr/bin/debiandoc2latexps 2004-01-03 02:32:16.000000000 +0100
+++ debiandoc2latexps 2005-02-13 16:03:10.000000000 +0100
@@ -10,7 +10,7 @@
script=$(basename ${0})
## ----------------------------------------------------------------------
-## print help message
+## print version and usage message
function usage_message
{
cat >&2 <<'END'
@@ -31,6 +31,7 @@
-e <extension> extension to be used
-k keep intermediate files
-l <locale> locale to be used
+ -s <script> apply script on latex generated file
-n <options> nsgmls options to be passed on
-p <papersize> paper size to be used
-v be verbose
@@ -47,10 +48,10 @@
}
## ----------------------------------------------------------------------
-## check for presence of latex and dvips
-if ! which latex dvips >/dev/null 2>&1
+## check for presence of latex
+if ! which latex >/dev/null 2>&1
then
- echo >&2 "${script}: LaTeX documentation system not found"
+ echo >&2 "${script}: LaTeX typesetting system not found"
echo >&2 "${script}: please install the package 'tetex-bin'"
exit 2
fi
@@ -80,6 +81,7 @@
## set default values
basename=''
content=''
+postprocessing='fixlatex'
declaration=''
extension=''
keep=false
@@ -97,6 +99,7 @@
options="${options}O"
options="${options}b:"
options="${options}c"
+options="${options}s:"
options="${options}d:"
options="${options}e:"
options="${options}k"
@@ -116,6 +119,8 @@
;;
c ) content="-${opt}"
;;
+ s ) postprocessing="${OPTARG}"
+ ;;
d ) declaration="-${opt} ${OPTARG}"
;;
e ) extension="-${opt} ${OPTARG}"
@@ -127,9 +132,9 @@
;;
n ) nsgmls="-${opt} ${OPTARG} ${nsgmls}"
;;
- p ) PAPERCONF=${OPTARG}
- export PAPERCONF
- paperopt="-t ${PAPERCONF}"
+ p ) PAPERSIZE=${OPTARG}
+ export PAPERSIZE
+ paperopt="-t ${PAPERSIZE}"
;;
v ) verbose=true
;;
@@ -204,7 +209,11 @@
echo >&2 "${script}: ERROR: ${bsn}.tex could not be generated properly"
exit 1
fi
-if [ -e ${bsn}.dvi ]
+if [ -n "${postprocessing}" ]
+then
+ "${postprocessing}" ${locale} ${bsn}.tex
+fi
+if [ -e ${bsn}.dvi ] && ( [ -n "${content}" ] || [ -n "${extension}" ] )
then
echo >&2 "${script}: WARNING: overwriting ${bsn}.dvi"
fi
--- /usr/bin/debiandoc2texinfo 2004-10-20 05:53:52.000000000 +0200
+++ debiandoc2texinfo 2005-02-13 16:03:10.000000000 +0100
@@ -10,7 +10,7 @@
script=$(basename ${0})
## ----------------------------------------------------------------------
-## print help message
+## print version and usage message
function usage_message
{
cat >&2 <<'END'
@@ -112,10 +112,6 @@
usage_error "-k not possible with input from stdin"
fi
stdout=true
- if ! ${stdout}
- then
- usage_error "stdin not allowed with debiandoc2texinfo"
- fi
;;
-?* ) nsgmlsi="./${1}"
;;
--- /usr/bin/debiandoc2text 2004-10-20 05:53:52.000000000 +0200
+++ debiandoc2text 2005-02-13 16:03:10.000000000 +0100
@@ -10,7 +10,7 @@
script=$(basename ${0})
## ----------------------------------------------------------------------
-## print help message
+## print version and usage message
function usage_message
{
cat >&2 <<'END'
@@ -117,10 +117,6 @@
usage_error "-k not possible with input from stdin"
fi
stdout=true
- if ! ${stdout}
- then
- usage_error "stdin not allowed with debiandoc2text"
- fi
;;
-?* ) nsgmlsi="./${1}"
;;
--- /usr/bin/debiandoc2textov 2004-10-20 05:53:52.000000000 +0200
+++ debiandoc2textov 2005-02-13 16:03:10.000000000 +0100
@@ -10,7 +10,7 @@
script=$(basename ${0})
## ----------------------------------------------------------------------
-## print help message
+## print version and usage message
function usage_message
{
cat >&2 <<'END'
@@ -117,10 +117,6 @@
usage_error "-k not possible with input from stdin"
fi
stdout=true
- if ! ${stdout}
- then
- usage_error "stdin not allowed with debiandoc2textov"
- fi
;;
-?* ) nsgmlsi="./${1}"
;;
--mP3DRpeJDSE+ciuQ--