txt2tags

If there's software you need and you can't find, make a request for it.
Post Reply
User avatar
fredg
Posts: 232
Joined: 3. Oct 2009, 16:50
Location: Lyon, France
Contact:

txt2tags

Post by fredg » 26. Oct 2009, 09:49

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.

++

Post Reply