4
Copyright (c) 2007 by Charles Connell <charles@connells.org>
6
Kopete (c) 2007 by the Kopete developers <kopete-devel@kde.org>
8
*************************************************************************
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
15
*************************************************************************
19
#include <QCoreApplication>
24
* This is an example of a program/script that could be used with
25
* the pipes plugin. We read everything from stdin, then perform a
26
* series of transformations on it. The actual work is done in
27
* KopeteXmlParserTests::test*
28
* The final text is then printed to stdout, where it is picked up
29
* by the Pipes plugin.
30
* Please see the real documentation for details on how to write
31
* pipes for the Pipes plugin.
34
int main (int argc, char ** argv)
36
QCoreApplication app (argc, argv);
38
// open standard input
40
input.open (stdin, QIODevice::ReadOnly | QIODevice::Text);
43
QString parsed = KopeteXmlParserTests::test1 ( input.readAll() );
45
// write modified text to standard out
47
output.open (stdout, QIODevice::WriteOnly | QIODevice::Text );
48
output.write ( parsed.toLocal8Bit() );