Skip to content

Commit

Permalink
better handling of spaces in paths
Browse files Browse the repository at this point in the history
  • Loading branch information
fletcher committed Apr 28, 2011
1 parent a96c704 commit 5dc6fc1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions bin/mmd-xslt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ then
# Need a temporary file # Need a temporary file
file_name=`mktemp mmdtempXXXX.txt` file_name=`mktemp mmdtempXXXX.txt`


cat > $file_name cat > "$file_name"


# Determine stylesheet to use # Determine stylesheet to use
mode=`chooseXsltForFilename "$file_name"` mode=`chooseXsltForFilename "$file_name"`
Expand All @@ -54,16 +54,16 @@ then
then then
multimarkdown "$file_name" multimarkdown "$file_name"
else else
multimarkdown "$file_name" | xsltproc -nonet -novalid $xslt_path/../XSLT/$mode - multimarkdown "$file_name" | xsltproc -nonet -novalid "$xslt_path/../XSLT/$mode" -
fi fi


shift shift
rm $file_name rm "$file_name"
else else
until [ "$*" = "" ] until [ "$*" = "" ]
do do
# process each argument separately # process each argument separately
file_name=`echo $1| sed 's/\.[^.]*$//'` file_name=`echo "$1" | sed 's/\.[^.]*$//'`


# Determine stylesheet to use # Determine stylesheet to use
mode=`chooseXsltForFilename "$1"` mode=`chooseXsltForFilename "$1"`
Expand All @@ -72,7 +72,7 @@ do
then then
multimarkdown "$1" > "$file_name.html" multimarkdown "$1" > "$file_name.html"
else else
multimarkdown "$1" | xsltproc -nonet -novalid $xslt_path/../XSLT/$mode - > "$file_name.html" multimarkdown "$1" | xsltproc -nonet -novalid "$xslt_path/../XSLT/$mode" - > "$file_name.html"
fi fi


shift shift
Expand Down
2 changes: 1 addition & 1 deletion bin/mmd2RTF.pl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
until [ "$*" = "" ] until [ "$*" = "" ]
do do
# process each argument separately # process each argument separately
file_name=`echo $1| sed 's/\.[^.]*$//'` file_name=`echo "$1"| sed 's/\.[^.]*$//'`
multimarkdown "$1" | textutil -convert rtf -stdin -stdout > "$file_name.rtf" multimarkdown "$1" | textutil -convert rtf -stdin -stdout > "$file_name.rtf"
shift shift
done done
Expand Down
4 changes: 2 additions & 2 deletions bin/mmd2tex-xslt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ then
# Determine stylesheet to use # Determine stylesheet to use
mode=`chooseXsltForFilename "$file_name"` mode=`chooseXsltForFilename "$file_name"`


multimarkdown "$file_name" | xsltproc -nonet -novalid $xslt_path/../XSLT/$mode - multimarkdown "$file_name" | xsltproc -nonet -novalid "$xslt_path/../XSLT/$mode" -
shift shift


rm $file_name rm $file_name
Expand All @@ -75,7 +75,7 @@ do
# Determine stylesheet to use # Determine stylesheet to use
mode=`chooseXsltForFilename "$1"` mode=`chooseXsltForFilename "$1"`


multimarkdown "$1" | xsltproc -nonet -novalid $xslt_path/../XSLT/$mode - > "$file_name.tex" multimarkdown "$1" | xsltproc -nonet -novalid "$xslt_path/../XSLT/$mode" - > "$file_name.tex"
shift shift
done done
fi fi
Expand Down
2 changes: 1 addition & 1 deletion bin/opml2mmd
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ else
until [ "$*" = "" ] until [ "$*" = "" ]
do do
# process each argument separately # process each argument separately
file_name=`echo $1| sed 's/\.[^.]*$//'` file_name=`echo "$1"| sed 's/\.[^.]*$//'`


# XSLT to convert OPML to MMD # XSLT to convert OPML to MMD
xsltproc -nonet -novalid "$xslt_path/../XSLT/opml2mmd.xslt" "$1" > "$file_name.txt" xsltproc -nonet -novalid "$xslt_path/../XSLT/opml2mmd.xslt" "$1" > "$file_name.txt"
Expand Down
6 changes: 3 additions & 3 deletions bin/opml2tex
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ then
# No arguments, so use stdin/stdout # No arguments, so use stdin/stdout


# XSLT to convert OPML to MMD, then use MMD to create LaTeX # XSLT to convert OPML to MMD, then use MMD to create LaTeX
xsltproc -nonet -novalid $xslt_path/../XSLT/opml2mmd.xslt - | multimarkdown -t latex xsltproc -nonet -novalid "$xslt_path/../XSLT/opml2mmd.xslt" - | multimarkdown -t latex
shift shift


else else
until [ "$*" = "" ] until [ "$*" = "" ]
do do
# process each argument separately # process each argument separately
file_name=`echo $1| sed 's/\.[^.]*$//'` file_name=`echo "$1" | sed 's/\.[^.]*$//'`


# XSLT to convert OPML to MMD, then use MMD to create LaTeX # XSLT to convert OPML to MMD, then use MMD to create LaTeX
xsltproc -nonet -novalid $xslt_path/../XSLT/opml2mmd.xslt "$1" | multimarkdown -t latex > "$file_name.tex" xsltproc -nonet -novalid "$xslt_path/../XSLT/opml2mmd.xslt" "$1" | multimarkdown -t latex > "$file_name.tex"
shift shift


done done
Expand Down

0 comments on commit 5dc6fc1

Please sign in to comment.