Je viens de trouver un script qui m'est vraiment très très utile pour convertir en ligne de commande un document d'un format reconnu par OOo vers un autre format (connu aussi).
C'est sur http://www.thomas-guettler.de/scripts/ooo2any.py.txt
Ca s'utilise assez simplement, par exemple, pour convertir les odt du rep courant en rtf ça donne
ooo2any.py --extension rtf --format "Rich Text Format" *.odt
pour doc2pdf
ooo2any.py --extension pdf --format writer_pdf_Export *.doc
etc… Le script le précise qu'il faut lancer auparavant openoffice avec la commande :
openoffice "-accept=socket,host=localhost,port=2002;urp;"
Il faut juste connaitre la chaine du format à préciser (si on en met une mauvaise, le script plante sans dire qu'il ne connait pas le format.
Pour trouver les formats dispo, il faut regarder dans les fichiers xcu, contenu dans un dossier TypeDetection
Chez moi (Debian etch), il a fallu
cd /usr/lib/openoffice/share/registry/modules/org/openoffice/TypeDetection grep -ri 'node oor:name' .
et pour avoir les formats d'export, sans le xml autour
grep -ri 'node oor:name' .|sed -e 's/[^"]*"\([^"]*\)".*/\1/'|sort -u
Pour restreindre aux formats writer
grep -ri 'node oor:name' */*writer*|sed -e 's/[^"]*"\([^"]*\)".*/\1/'|sort -u
AportisDoc Palm DB bmp_Export bmp_Import bmp_MS_Windows BMP - MS Windows calc8 calc8_template calc_dBase calc_DIF calc_HTML_WebQuery calc_Lotus calc_MS_Excel_2003_XML calc_MS_Excel_40 calc_MS_Excel_40_VorlageTemplate calc_MS_Excel_5095 calc_MS_Excel_5095_VorlageTemplate calc_MS_Excel_95 calc_MS_Excel_95_VorlageTemplate calc_MS_Excel_97 calc_MS_Excel_97_VorlageTemplate calc_pdf_Export calc_Pocket_Excel_File calc_QPro calc_StarCalc_10 calc_StarCalc_30 calc_StarCalc_30_VorlageTemplate calc_StarCalc_40 calc_StarCalc_40_VorlageTemplate calc_StarCalc_50 calc_StarCalc_50_VorlageTemplate calc_StarOffice_XML_Calc calc_StarOffice_XML_Calc_Template calc_SYLK calc_Text_txt_csv_StarCalc CGM - Computer Graphics Metafile chart2_StarOffice_XML_Chart chart8 chart_StarChart_30 chart_StarChart_40 chart_StarChart_50 chart_StarOffice_XML_Chart component_Bibliography component_DB com.sun.star.comp.chart2.ChartFrameLoader com.sun.star.comp.framework.SoundHandler com.sun.star.drawing.DrawingDocument com.sun.star.formula.FormulaProperties com.sun.star.frame.Bibliography com.sun.star.presentation.PresentationDocument com.sun.star.sdb.ContentLoader com.sun.star.sheet.SpreadsheetDocument com.sun.star.text.GlobalDocument com.sun.star.text.TextDocument com.sun.star.text.WebDocument ContentHandlers dBase DIF DocBook File draw8 draw8_template draw_bmp_Export draw_emf_Export draw_eps_Export draw_flash_Export draw_gif_Export draw_html_Export draw_jpg_Export draw_met_Export draw_pbm_Export draw_PCD_Photo_CD_Base draw_PCD_Photo_CD_Base16 draw_PCD_Photo_CD_Base4 draw_pct_Export draw_pdf_Export draw_pgm_Export draw_png_Export draw_ppm_Export draw_ras_Export draw_StarDraw_30 draw_StarDraw_30_Vorlage draw_StarDraw_50 draw_StarDraw_50_Vorlage draw_StarOffice_XML_Draw draw_StarOffice_XML_Draw_Template draw_svg_Export draw_svm_Export draw_tif_Export draw_wmf_Export draw_xpm_Export dxf_AutoCAD_Interchange DXF - AutoCAD Interchange dxf_Import emf_Export emf_Import emf_MS_Windows_Metafile EMF - MS Windows Metafile eps_Encapsulated_PostScript EPS - Encapsulated PostScript eps_Export eps_Import Filters FrameLoaders gif_Export gif_Graphics_Interchange GIF - Graphics Interchange gif_Import graphic_HTML graphic_SWF HTML HTML (StarCalc) HTML (StarWriter) impress8 impress8_draw impress8_template impress_bmp_Export impress_CGM_Computer_Graphics_Metafile impress_emf_Export impress_eps_Export impress_flash_Export impress_gif_Export impress_html_Export impress_jpg_Export impress_met_Export impress_MS_PowerPoint_97 impress_MS_PowerPoint_97_Vorlage impress_pbm_Export impress_pct_Export impress_pdf_Export impress_pgm_Export impress_png_Export impress_ppm_Export impress_ras_Export impress_StarImpress_40 impress_StarImpress_40_Vorlage impress_StarImpress_50 impress_StarImpress_50_packed impress_StarImpress_50_Vorlage impress_StarOffice_XML_Draw impress_StarOffice_XML_Impress impress_StarOffice_XML_Impress_Template impress_svg_Export impress_svm_Export impress_tif_Export impress_wmf_Export impress_xpm_Export jpg_Export jpg_Import jpg_JPEG JPG - JPEG Lotus Lotus 1-2-3 1.0 (DOS) (StarWriter) Lotus 1-2-3 1.0 (WIN) (StarWriter) LotusWordPro math8 math_MathML_XML_Math math_MathType_3x MathML XML (Math) math_pdf_Export math_StarMath_20 math_StarMath_30 math_StarMath_40 math_StarMath_50 math_StarOffice_XML_Math MathType 3.x met_Export met_Import met_OS2_Metafile MET - OS/2 Metafile ModuleDependendFilterOrder MS Excel 2003 XML MS Excel 4.0 MS Excel 4.0 (StarWriter) MS Excel 4.0 Vorlage/Template MS Excel 5.0/95 MS Excel 5.0/95 Vorlage/Template MS Excel 5.0 (StarWriter) MS Excel 95 MS Excel 95 (StarWriter) MS Excel 95 Vorlage/Template MS Excel 97 MS Excel 97 Vorlage/Template MS PowerPoint 97 MS PowerPoint 97 Vorlage MS WinWord 5 MS WinWord 6.0 MS Word 2003 XML MS Word 95 MS Word 95 Vorlage MS Word 97 MS Word 97 Vorlage org.openoffice.comp.dbflt.DBContentLoader2 pbm_Export pbm_Import pbm_Portable_Bitmap PBM - Portable Bitmap pcd_Import_Base pcd_Import_Base16 pcd_Import_Base4 pcd_Photo_CD_Base pcd_Photo_CD_Base16 pcd_Photo_CD_Base4 pct_Export pct_Import pct_Mac_Pict PCT - Mac Pict pcx_Import pcx_Zsoft_Paintbrush PCX - Zsoft Paintbrush pdf_Portable_Document_Format pgm_Export pgm_Import pgm_Portable_Graymap PGM - Portable Graymap placeware_Export png_Export png_Import png_Portable_Network_Graphic PNG - Portable Network Graphic Pocket Excel PocketWord File ppm_Export ppm_Import ppm_Portable_Pixelmap PPM - Portable Pixelmap psd_Adobe_Photoshop PSD - Adobe Photoshop psd_Import pwp_PlaceWare Quattro Pro 6.0 ras_Export ras_Import ras_Sun_Rasterfile RAS - Sun Rasterfile Rich Text Format Rich Text Format (StarCalc) sgf_Import sgf_StarOffice_Writer_SGF SGF - StarOffice Writer SGF sgv_Import sgv_StarDraw_20 SGV - StarDraw 2.0 StarBase StarCalc 1.0 StarCalc 3.0 StarCalc 3.0 Vorlage/Template StarCalc 4.0 StarCalc 4.0 Vorlage/Template StarCalc 5.0 StarCalc 5.0 Vorlage/Template StarChart 3.0 StarChart 4.0 StarChart 5.0 StarDraw 3.0 StarDraw 3.0 (StarImpress) StarDraw 3.0 Vorlage StarDraw 3.0 Vorlage (StarImpress) StarDraw 5.0 StarDraw 5.0 (StarImpress) StarDraw 5.0 Vorlage StarDraw 5.0 Vorlage (StarImpress) StarImpress 4.0 StarImpress 4.0 Vorlage StarImpress 5.0 StarImpress 5.0 (packed) StarImpress 5.0 Vorlage StarMath 2.0 StarMath 3.0 StarMath 4.0 StarMath 5.0 StarOffice XML (Base) StarOffice XML (Calc) StarOffice XML (Chart) StarOffice XML (Draw) StarOffice XML (Impress) StarOffice XML (Math) StarOffice XML (Writer) StarWriter 1.0 StarWriter 2.0 StarWriter 3.0 StarWriter 3.0 (StarWriter/GlobalDocument) StarWriter 3.0 (StarWriter/Web) StarWriter 3.0 Vorlage/Template StarWriter 4.0 StarWriter 4.0/GlobalDocument StarWriter 4.0 (StarWriter/GlobalDocument) StarWriter 4.0 (StarWriter/Web) StarWriter 4.0 Vorlage/Template StarWriter 5.0 StarWriter 5.0/GlobalDocument StarWriter 5.0 (StarWriter/GlobalDocument) StarWriter 5.0 (StarWriter/Web) StarWriter 5.0 Vorlage/Template StarWriter DOS StarWriter/Web 4.0 Vorlage/Template StarWriter/Web 5.0 Vorlage/Template svg_Export svg_Scalable_Vector_Graphics svm_Export svm_Import svm_StarView_Metafile SVM - StarView Metafile SYLK Text Text (encoded) Text (encoded) (StarWriter/GlobalDocument) Text (encoded) (StarWriter/Web) Text (StarWriter/Web) Text - txt - csv (StarCalc) tga_Import tga_Truevision_TARGA TGA - Truevision TARGA tif_Export tif_Import tif_Tag_Image_File TIF - Tag Image File Types wav_Wave_Audio_File wmf_Export wmf_Import wmf_MS_Windows_Metafile WMF - MS Windows Metafile WordPerfect writer8 writer8_template writer_AportisDoc_PalmDB_File writer_DocBook_File writerglobal8 writerglobal8_HTML writerglobal8_writer writer_globaldocument_pdf_Export writer_globaldocument_StarOffice_XML_Writer writer_globaldocument_StarOffice_XML_Writer_GlobalDocument writer_globaldocument_StarWriter_40GlobalDocument writer_globaldocument_StarWriter_50GlobalDocument writer_JustSystem_Ichitaro_10 writer_JustSystem_Ichitaro_10_template writer_Lotus_1_2_3_10_DOS_StarWriter writer_Lotus_1_2_3_10_WIN_StarWriter writer_LotusWordPro_Document writer_MIZI_Hwp_97 writer_MS_WinWord_5 writer_MS_WinWord_60 writer_MS_Word_2003_XML writer_MS_Word_95 writer_MS_Word_95_Vorlage writer_MS_Word_97 writer_MS_Word_97_Vorlage writer_pdf_Export writer_PocketWord_File writer_Rich_Text_Format writer_StarOffice_XML_Writer writer_StarOffice_XML_Writer_Template writer_StarWriter_10 writer_StarWriter_20 writer_StarWriter_30 writer_StarWriter_30_VorlageTemplate writer_StarWriter_40 writer_StarWriter_40_VorlageTemplate writer_StarWriter_50 writer_StarWriter_50_VorlageTemplate writer_StarWriter_DOS writer_Text writer_Text_encoded writerweb8_writer writerweb8_writer_template writer_web_HTML writer_web_HTML_help writer_web_pdf_Export writer_web_StarOffice_XML_Writer writer_web_StarOffice_XML_Writer_Web_Template writer_web_StarWriterWeb_40_VorlageTemplate writer_web_StarWriterWeb_50_VorlageTemplate writer_WordPerfect_Document writer_WPSSystem_WPS2000_10 xbm_Import xbm_X_Consortium XBM - X-Consortium XHTML Calc File XHTML Draw File XHTML_File XHTML Impress File XHTML Writer File XPM xpm_Export xpm_Import xpm_XPM