Menu

[r35]: / trunk / docscript / oo2html.include  Maximize  Restore  History

Download this file

104 lines (77 with data), 3.0 kB

#!/bin/bash

# DocScript OpenOffice to DocScript shell functions

# Copyright (C) 2009
# Andreas Harnack (ah8 at freenet dot de)

# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License along
# with this library; see the file COPYING.  If not, write to the Free
# Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
# USA.

# As a special exception, you may use this file as part of a free software
# library without restriction.  Specifically, if other files instantiate
# templates or use macros or inline functions from this file, or you compile
# this file and link it with other files to produce an executable, this
# file does not by itself cause the resulting executable to be covered by
# the GNU General Public License.  This exception does not however
# invalidate any other reasons why the executable file might be covered by
# the GNU General Public License.


source html.include


function debug  { echo "### $@" 1>&2; cat - 1>&2; }
function ignore { cat - >/dev/null; }


function text
{
        TAG="$1"; shift
        if test "$TAG" != ''; then
                text "$@" | eval $TAG
        elif test $# -gt 0; then
                echo -n "$@" | text2html
        else
                text2html
        fi
}


function pagebreak	{ tag hr; }

function paragraph      { eval "$@"; }
function align          { echo "align=$1"; }

function para           { wordwrap | blck "$@"; echo; }
function hl             { wordwrap | blck "$@"; }
function preformatted   { blck pre; echo; }

function column         { blck td; }
function row            { block tr; }
function table          { block table align=center border "$@"; echo; }

function item           { wordwrap | blck li "$@"; echo; }
function list           { eval "$@"; echo; }


function endnoteref	{ blck a "href="/?originalUrl=https%3A%2F%2Fsourceforge.net%2F%26%2339%3B%23%241%26%2339%3B%26%2334%3B%2520%7C%2520blck%2520sup%3B%2520%7Dfunction%2520endnote%2520%7Bbl%2520%26%2334%3B%242%26%2334%3B%2520a%2520%26%2334%3Bname%3D%26%2339%3B%241%26%2339%3B%26%2334%3B%2520%7C%2520blck%2520supwordwrap%3B%2520tag%2520br%7Dfunction%2520endnotes%2520%7Btag%2520hr%2520noshade%2520color%3Dblack%2520size%3D1%2520width%3D100%2520align%3Dleftblock%2520small%2520%7C%2520blck%2520p%7Dfunction%2520bibref%2520%7Blabel%3D%26%2334%3B%241%26%2334%3B%3B%2520shift%3Btext%2520%26%2334%3B%24%40%26%2334%3B%2520%26%2339%3B%26%2339%3B%2520%26%2334%3B%5B%24%7Blabel%7D%5D%26%2334%3B%2520%7C%2520blck%2520a%2520%26%2334%3Bhref%3D%26%2339%3B%23%24%7Blabel%7D%26%2339%3B%26%2334%3B%3B%7Dfunction%2520bibentry%2520%7Bbl%2520%26%2334%3B%5B%24%7BIdentifier%7D%5D%26%2334%3B%2520a%2520%26%2334%3Bname%3D%26%2339%3B%24%7BIdentifier%7D%26%2339%3B%26%2334%3B%2520%7C%2520blck%2520dt(test%2520-n%2520%26%2334%3B%24Author%26%2334%3B%2520%26amp%3B%26amp%3B%2520%7B%2520text%2520bold%2520%26%2339%3B%26%2339%3B%2520%26%2334%3B%24Author%3A%26%2334%3B%3B%2520echo%3B%2520%7Dtest%2520-n%2520%26%2334%3B%24Title%26%2334%3B%2520%26amp%3B%26amp%3B%2520%7B%2520text%2520italic%2520%26%2339%3B%26%2339%3B%2520%26%2334%3B%24Title%26%2334%3B%3B%2520%7Dtest%2520-n%2520%26%2334%3B%24Address%26%2334%3B%2520%26amp%3B%26amp%3B%2520%7B%2520echo%2520%26%2334%3B%2C%26%2334%3B%3B%2520text%2520%26%2339%3B%26%2339%3B%2520%26%2334%3B%24Address%26%2334%3B%3B%2520%7Dtest%2520-n%2520%26%2334%3B%24Publisher%26%2334%3B%2520%26amp%3B%26amp%3B%2520%7B%2520echo%2520%26%2334%3B%2C%26%2334%3B%3B%2520text%2520%26%2339%3B%26%2339%3B%2520%26%2334%3B%24Publisher%26%2334%3B%3B%2520%7Dtest%2520-n%2520%26%2334%3B%24Year%26%2334%3B%2520%26amp%3B%26amp%3B%2520%7B%2520echo%3B%2520text%2520%26%2339%3B%26%2339%3B%2520%26%2334%3B(%24Year)%26%2334%3B%3B%2520%7Dtest%2520-n%2520%26%2334%3B%24ISBN%26%2334%3B%2520%26amp%3B%26amp%3B%2520%7B%2520echo%2520%26%2334%3B%2C%26%2334%3B%3B%2520text%2520%26%2339%3B%26%2339%3B%2520%26%2334%3BISBN%3A%2520%24ISBN%26%2334%3B%3B%2520%7Decho%2520%26%2334%3B.%26%2334%3B)%2520%7C%2520blck%2520dd%7Dfunction%2520bibliography%7Bsort%2520%7C%2520uniq%2520%7C%2520while%2520read%2520para%3B%2520dounset%2520Identifier%2520Author%2520Title%2520Address%2520Publisher%2520Year%2520ISBNeval%2520%24parabibentrydone%2520%7C%2520block%2520dl%7D%253C%2Fpre">
      
    
MongoDB Logo MongoDB