En ocasiones se puede necesitar realizar conversiones de documentos a otros formatos, pero no resulta posible o se precisa realizarlo de una forma automática.
Pues bien, disponemos de un potente comando para poderlo ejecutar a través de un script o a mano desde, desde un terminal. Este conversor se llama unoconv.
Este conversor es capaz transformar un documento en muchos formatos. Entre ellos están los siguientes formatos:
Documento odt -> doc
Documento png -> jpg
Documento csv -> xls
Solo tenemos que instalar el paquete unoconv a través del synaptic, aptitude o apt.
La forma de convertir los casos descritos antes es de la forma:
$> unoconv -f pdf <fichero.odt>
$> unoconv -f doc <fichero.odt>
$> unoconv -f jpg <fichero.png>
$> unoconv -f xls <fichero.csv>
El resultado es un fichero con el mismo nombre que el origen pero con la extensión correspondiente.
La lista completa de formatos que es capaz de convertir se presenta a continuación:
bib – BibTeX [.bib]
bmp – Windows Bitmap [.bmp]
csv – Text CSV [.csv]
dbf – dBase [.dbf]
dif – Data Interchange Format [.dif]
doc6 – Microsoft Word 6.0 [.doc]
doc95 – Microsoft Word 95 [.doc]
docbook – DocBook [.xml]
doc – Microsoft Word 97/2000/XP [.doc]
emf – Enhanced Metafile [.emf]
eps – Encapsulated PostScript [.eps]
gif – Graphics Interchange Format [.gif]
html – HTML Document (OpenOffice.org Calc) [.html]
html – HTML Document (OpenOffice.org Draw) [.html]
html – HTML Document (OpenOffice.org Impress) [.html]
html – HTML Document (OpenOffice.org Writer) [.html]
jpg – Joint Photographic Experts Group [.jpg]
latex – LaTeX 2e [.ltx]
met – OS/2 Metafile [.met]
odd – OpenDocument Drawing (Impress) [.odd]
odd – OpenDocument Drawing [.odd]
odg – OpenOffice.org 1.0 Drawing (OpenOffice.org Impress) [.odg]
odp – OpenDocument Presentation [.odp]
ods – Open Document Spreadsheet [.ods]
odt – Open Document Text [.odt]
ooxml – Microsoft Excel 2003 XML [.xml]
ooxml – Microsoft Office Open XML [.xml]
otg – OpenDocument Drawing Template [.otg]
otp – OpenDocument Presentation Template [.otp]
ott – Open Document Text [.ott]
pbm – Portable Bitmap [.pbm]
pct – Mac Pict [.pct]
pdb – AportisDoc (Palm) [.pdb]
pdf – Portable Document Format [.pdf]
pgm – Portable Graymap [.pgm]
png – Portable Network Graphic [.png]
pot – Microsoft PowerPoint 97/2000/XP Template [.pot]
ppm – Portable Pixelmap [.ppm]
ppt – Microsoft PowerPoint 97/2000/XP [.ppt]
psw – Pocket Word [.psw]
pts – OpenDocument Spreadsheet Template [.pts]
pwp – PlaceWare [.pwp]
pxl – Pocket Excel [.pxl]
ras – Sun Raster Image [.ras]
rtf – Rich Text Format [.rtf]
sda – StarDraw 5.0 (OpenOffice.org Impress) [.sda]
sdc3 – StarCalc 3.0 [.sdc]
sdc4 – StarCalc 4.0 [.sdc]
sdc – StarCalc 5.0 [.sdc]
sdd3 – StarDraw 3.0 (OpenOffice.org Impress) [.sdd]
sdd4 – StarImpress 4.0 [.sdd]
sdd – StarImpress 5.0 [.sdd]
sdw3 – StarWriter 3.0 [.sdw]
sdw4 – StarWriter 4.0 [.sdw]
sdw – StarWriter 5.0 [.sdw]
slk – SYLK [.slk]
stc – OpenOffice.org 1.0 Spreadsheet Template [.stc]
std – OpenOffice.org 1.0 Drawing Template [.std]
sti – OpenOffice.org 1.0 Presentation Template [.sti]
stp – OpenDocument Presentation Template [.stp]
stw – Open Office.org 1.0 Text Document Template [.stw]
svg – Scalable Vector Graphics [.svg]
svm – StarView Metafile [.svm]
swf – Macromedia Flash (SWF) [.swf]
sxc – OpenOffice.org 1.0 Spreadsheet [.sxc]
sxd3 – StarDraw 3.0 [.sxd]
sxd5 – StarDraw 5.0 [.sxd]
sxd – OpenOffice.org 1.0 Drawing [.sxd]
sxi – OpenOffice.org 1.0 Presentation [.sxi]
sxw – Open Office.org 1.0 Text Document [.sxw]
text – Text Encoded [.txt]
tiff – Tagged Image File Format [.tiff]
txt – Plain Text [.txt]
vor3 – StarCalc 3.0 Template [.vor]
vor3 – StarDraw 3.0 Template (OpenOffice.org Impress) [.vor]
vor3 – StarDraw 3.0 Template [.vor]
vor3 – StarWriter 3.0 Template [.vor]
vor4 – StarCalc 4.0 Template [.vor]
vor4 – StarImpress 4.0 Template [.vor]
vor4 – StarWriter 4.0 Template [.vor]
vor5 – StarDraw 5.0 Template (OpenOffice.org Impress) [.vor]
vor – StarCalc 5.0 Template [.vor]
vor – StarDraw 5.0 Template [.vor]
vor – StarImpress 5.0 Template [.vor]
vor – StarWriter 5.0 Template [.vor]
wmf – Windows Metafile [.wmf]
xhtml – XHTML Document [.html]
xhtml – XHTML [.xhtml]
xhtml – XHTML [.xml]
xls5 – Microsoft Excel 5.0 [.xls]
xls95 – Microsoft Excel 95 [.xls]
xls – Microsoft Excel 97/2000/XP [.xls]
xlt5 – Microsoft Excel 5.0 Template [.xlt]
xlt95 – Microsoft Excel 95 Template [.xlt]
xlt – Microsoft Excel 97/2000/XP Template [.xlt]
xpm – X PixMap [.xpm]