You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koffice/filters/generic_wrapper
Michele Calgaro fb6b4d204d
Replaced various '#define' with actual strings - part 5
5 months ago
..
Makefile.am Renaming of files in preparation for code style tools. 3 years ago
README Update XDG information in support of bug report 892. 12 years ago
generic_filter.cpp Replaced various '#define' with actual strings - part 5 5 months ago
generic_filter.desktop Fix ServiceTypes, ExcludeServiceTypes, and DocPath desktop file entries to match XDG specifications 10 years ago
generic_filter.h Replace Q_OBJECT with TQ_OBJECT 9 months ago

README

KOffice Filter Wrapper
======================

This is a generic framework for developing KOffice import and export
filters in a scripting language of your choice (Python, Perl, etc).

Requirements for your filter:
-----------------------------
- do whatever you want with your script, it just has to take two
  parameters, the input file and the output file
- provide a .desktop files, containing these mandatory fields:

Name=My cool filter in Perl
Type=Service
ServiceTypes=KOfficeGenericFilter
Exec=my_filter.pl
X-TDE-Wrapper-Export=<MIME type of the exported file>
X-TDE-Wrapper-Import=<MIME type of the imported file>

- write a suitable Makefile.am

bin_SCRIPTS = my_filter.pl
service_DATA = my_filter.desktop
servicedir = $(kde_servicesdir)

- if not already present, write a .desktop file for the external MIME
  type

In doubt, have a look at an example filter in
filters/kpresenter/magicpoint.

The only shortcoming at the moment is that you have to add these MIME
types to filters/generic_wrapper/generic_filter.desktop file (in the
fields X-TDE-Export resp. X-TDE-Import).

---
That's it, have fun :-)

Lukas Tinkl <lukas@kde.org>
SuSE Labs, Czech Republic