Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 15. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Dev Resources  »  Converting files from command line

How to convert files from OOo formats to other formats via the command line

Autor: Michal P. | Sekcia: Dev Resources | Dátum: 2006-04-18

When publishing to website, it is sometimes desired to have these files published in different formats, eg sxw and pdf format. We will show you how to do this from command line using openoffice and oooconv library.

Neccessary elements:

  1. openoffice.org set up and running
  2. macro from oooconv website installed in main part (not only in file) in Standard.Module2
  3. convert.sh script installed

usage is then easy: convert.sh PDF test.sxw or convert.sh PDF *.sxw

convert.sh script:

#!/bin/sh

# # convert.sh # # Developed by Michal Palenik # Copyright (c) 2006 Platon Group, http://platon.sk/ # Licensed under terms of GNU General Public License. # All rights reserved. # # Changelog: # 2006-04-18 - created #

# $Platon$ # readme # usage basename to_what(PDF,MSXP,...) what(file) # download macro from http://oooconv.free.fr/oooconv/oooconv_en.html # and save it as Standard.Module2 (global) under user you will convert it under # beware: it is _very_ time consuming operation # # todo: switch to OOo2, more cpu effectivenes, less display

to=$1; eval "unset $1;"; for i in $* do if [ "$i" != "$to" ] then echo "converting $i"; ooffice -minimized -headless "macro:///Standard.Module2.Exporte("$PWD/$i","$to","")" else echo "not converting $i" fi; done;

Čo je Platón?
Platón bol veľmi doležitý filozof starovekého Grécka, študent Sokratesa a učiteľ Aristotela. viac info...

Platon Group zastrešuje slovenskú skupinu vývojárov otvoreného softvéru. Vyvíja, spravuje, dokumentuje niekoľko úspešných open-source projektov.

Platon Technologies, s.r.o. je mladá a dynamicky rozvíjajúca sa spoločnosť, ktorá má za cieľ prinášať otvorené technológie do komerčnej a verejnej sféry.

Podporte nás

Výkonný webhosting
a multihosting

Platon Webhosting

Super rýchle servery
a profesionálna administrácia

Virtuálne, dedikované a manažované servery

Vývoj
Diskusia k článku
Diskusia k článku How to convert files from OOo formats to other formats via the command line zatiaľ neobsahuje žiadne príspevky.

 
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov