mv conf.sh to verse.conf
This commit is contained in:
parent
f9c5191b7d
commit
b2c8cffc3d
11
README.md
11
README.md
@ -12,15 +12,18 @@ This LaTeX code needs a wrapper LaTeX script with
|
||||
\usepackage{verse, gmverse}
|
||||
```
|
||||
in the preamble and some other features.
|
||||
The path to markdown files, chapter names and other options can be configured in the `conf.sh` file.
|
||||
The `config.sh` file is read by `mkverse.sh`.
|
||||
The path to markdown files, chapter names and other options can be configured in the `verse.conf` file.
|
||||
The `verse.conf file is read by `mkverse.sh`.
|
||||
|
||||
---
|
||||
|
||||
## mkverse.sh
|
||||
The `mkverse.sh` script creates a PDF file out of several easy markdown files.
|
||||
Some options need to be set in `config.sh` file.
|
||||
`config.sh` might be renamed to `verse.conf`.
|
||||
Some options need to be set in `vers.conf` file.
|
||||
A single configuration file can be given to `mkverse.sh` to use instead of `verse.conf`.
|
||||
```
|
||||
cp verse.conf quaderno.conf
|
||||
./mkverse.sh quaderno.conf
|
||||
|
||||
---
|
||||
|
||||
|
23
mkverse.sh
Normal file → Executable file
23
mkverse.sh
Normal file → Executable file
@ -5,12 +5,17 @@
|
||||
#set -x
|
||||
set -e
|
||||
|
||||
CONF="conf.sh"
|
||||
if [ $# -eq 1 ]
|
||||
then
|
||||
CONF=$1
|
||||
else
|
||||
CONF="verse.conf"
|
||||
fi
|
||||
|
||||
TEMPLATE="verse-wrapper-template.tex"
|
||||
CONVERTER="md2verse.sh"
|
||||
|
||||
if ! [[ -f $CONF ]] ; then echo "$CONF not found! Exiting ..." && exit ; fi
|
||||
if ! [[ -f $TEMPLATE ]] ; then echo "$TEMPLATE not found! Exiting ..." && exit ; fi
|
||||
if ! [[ -f $CONVERTER ]] ; then echo "$CONVERTER not found! Exiting ..." && exit ; fi
|
||||
if ! [[ -x $CONVERTER ]] ; then echo "$CONVERTER not executable! Exiting ..." && exit ; fi
|
||||
|
||||
@ -19,7 +24,7 @@ if ! [[ -x $CONVERTER ]] ; then echo "$CONVERTER not executable! Exiting ..." &&
|
||||
WD=$PWD
|
||||
TMPDIR=$(mktemp -d)
|
||||
PATH=$PATH:$WD
|
||||
pushd $TMPDIR
|
||||
pushd $TMPDIR > /dev/null
|
||||
|
||||
# CONVERT MD TO TEX
|
||||
for tex in $( echo $INFILES | grep '.md$' )
|
||||
@ -30,8 +35,11 @@ do
|
||||
mkdir -p $(dirname $tex)
|
||||
$CONVERTER $WD/$tex > $( echo $tex | sed "s/.md/.tex/" )
|
||||
else
|
||||
if [[ $tex == *.md ]]
|
||||
then
|
||||
echo "$WD/$tex does not exist!!!"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# CREATE WRAPPER
|
||||
@ -74,7 +82,12 @@ done
|
||||
echo "$WRAPPER_END" >> $PROJECT.tex
|
||||
|
||||
# CREATE PDF
|
||||
$LATEX_ENGINE $PROJECT.tex
|
||||
$LATEX_ENGINE $PROJECT.tex 2&> /dev/null
|
||||
$LATEX_ENGINE $PROJECT.tex 2&> /dev/null
|
||||
# $LATEX_ENGINE $PROJECT.tex
|
||||
cp $PROJECT.pdf $WD
|
||||
popd
|
||||
echo "File $PROJECT.pdf created at $WD"
|
||||
#cp $PROJECT.tex $WD
|
||||
echo "File $PROJECT.tex created at $WD"
|
||||
popd > /dev/null
|
||||
rm -rf $TMPDIR
|
||||
|
@ -10,4 +10,13 @@ Ladainhas
|
||||
testfiles/verse.md
|
||||
Corridos
|
||||
testfiles/verse.md
|
||||
testfiles/verse.md
|
||||
testfiles/verse.md
|
||||
testfiles/verse.md
|
||||
testfiles/verse.md
|
||||
testfiles/verse.md
|
||||
testfiles/verse.md
|
||||
Corridos
|
||||
testfiles/verse.md
|
||||
testfiles/verse.md
|
||||
"
|
Loading…
Reference in New Issue
Block a user