Page 1 of 1

txt2tags

Posted: 26. Oct 2009, 09:49
by fredg
Hi,

It would be usefull for writing docs, articles, ... to have this one :
http://txt2tags.sourceforge.net/index.html
Txt2tags is a document generator. It reads a text file with minimal markup as **bold** and //italic// and converts it to the following formats:

* HTML
* XHTML
* SGML
* LaTeX
* Lout
* Man page
* Wikipedia / MediaWiki (NEW)
* Google Code Wiki (NEW)
* DokuWiki (NEW)
* MoinMoin
* MagicPoint
* PageMaker
* Plain text
The SLKBUILD can begin like this :

Code: Select all

#Maintainer: a nice guy

pkgname=txt2tags
pkgver=2.5
pkgrel=1niceguy
arch=noarch
source=(http://txt2tags.googlecode.com/files/$pkgname-$pkgversion.tgz)
docs=("COPYING" "ChangeLog" "TODO")
url=http://txt2tags.sourceforge.net/index.html

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"Txt2tags - a document generator"
"Txt2tags is a document generator. It reads a text file with minimal "
"markup as **bold** and //italic// and converts it to the following "
"formats: HTML, XHTML, SGML, LaTeX, Lout, Man page, MoinMoin "
"MagicPoint, PageMaker, ..."
)

build() {
cd $startdir/src/$pkgname-$pkgver
mkdir -p $startdir/pkg/usr/bin
mkdir -p $startdir/pkg/usr/{man/man1,man/fr/man1}/share/vim/syntax
mkdir -p $stardir/pkg/doc/$pkgname-$pkgversion
# bin
install -m 755 txt2tags $startdir/pkg/usr/bin
# extra
install -m 755 extras/{t2tmake.rb,gensite,html-update.sh} $startdir/pkg/usr/bin
# vim
install -m 644 extras/*.vim $startdir/pkg/usr/share/vim/syntax
# page man en, fr
install -m 644 doc/manpage.man $startdir/pkg/usr/man/man1/txt2tags.1
install -m 644 doc/manpage-fr.man $startdir/pkg/usr/man/fr/man1/txt2tags.1
# doc
install -m 644 doc/{*.pdf,*.t2t} $startdir/pkg/usr/doc/$pkgname-$pkgversion
# locale fr
mkdir -p $startdir/pkg/usr/share/locale/fr/LC_MESSAGES/
cd po
msgfmt -o txt2tags.mo fr.po
install -m 644 txt2tags.mo $startdir/pkg/usr/share/locale/fr/LC_MESSAGES
} 
Like you see, man pages and local ones can be done too for de, es, fi ,it, ... too, I have just written it for the french one ;)

Dep : python, gettext

Thanks.

++