aboutsummaryrefslogtreecommitdiff
path: root/src/wrappers/common.sh
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-12-22 20:16:03 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-12-22 20:16:03 +0000
commitd829c4820adbe7a7634f1c1d825d0d206512e6e7 (patch)
tree2de3d3459e6f2788b3a9aede93add68503f5a588 /src/wrappers/common.sh
parentcfaf0c178c422e00706eb04daea88d21a7fe9429 (diff)
downloadpandoc-d829c4820adbe7a7634f1c1d825d0d206512e6e7.tar.gz
Merged changes from branches/wrappers since r177.
Summary of main changes: + Added -o/--output and -d/--debug options to pandoc. + Modified pandoc to behave differently depending on the name of the program. For example, if the program name is 'html2latex', the default reader will be html and the default writer latex. + Removed most of the old wrappers, replacing them with symlinks to pandoc. + Rewrote markdown2pdf and created a new wrapper web2markdown, with the functionality of the old html2markdown script. These new scripts exploit pandoc's -d option to avoid having to do complex command-line parsing. + Revised man pages and documentation appropriately. git-svn-id: https://pandoc.googlecode.com/svn/trunk@279 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/wrappers/common.sh')
-rw-r--r--src/wrappers/common.sh27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/wrappers/common.sh b/src/wrappers/common.sh
index 99a83be50..3481affff 100644
--- a/src/wrappers/common.sh
+++ b/src/wrappers/common.sh
@@ -8,22 +8,6 @@ WRAPPEE_ARGS=
err () { echo "$*" | fold -s -w ${COLUMNS:-110} >&2; }
errn () { printf "$*" | fold -s -w ${COLUMNS:-110} >&2; }
-usage () {
- synopsis="$@"
- err "Usage: $THIS $synopsis"
- err "See $THIS(1) man file for details."
-}
-
-runpandoc () {
- if [ -n "$WRAPPEE_ARGS" ]; then
- # Unpack arguments that will be passed to pandoc.
- oldifs="$IFS"; IFS="$NEWLINE"; set -- $WRAPPEE_ARGS "$@"; IFS="$oldifs"
- case "$1" in --) shift;; esac # tolerate the existence of a leading '--'
- fi
-
- pandoc "$@"
-}
-
# Portable which(1).
pathfind () {
oldifs="$IFS"; IFS=':'
@@ -37,17 +21,6 @@ pathfind () {
return 1
}
-HAVE_ICONV=
-if pathfind iconv; then
- HAVE_ICONV=1
- alias to_utf8='iconv -t utf-8'
- alias from_utf8='iconv -f utf-8'
-else
- err "Warning: iconv not present. Assuming UTF-8 character encoding."
- alias to_utf8='cat'
- alias from_utf8='cat'
-fi
-
for p in pandoc $REQUIRED; do
pathfind $p || {
err "You need '$p' to use this program!"