Line data Source code
1 : /**
2 : * @file
3 : *
4 : * @brief
5 : *
6 : * @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
7 : */
8 :
9 : #ifndef CONVERT_HPP
10 : #define CONVERT_HPP
11 :
12 : #include <command.hpp>
13 :
14 : #include <kdb.hpp>
15 :
16 : class ConvertCommand : public Command
17 : {
18 : kdb::KeySet ks;
19 :
20 : public:
21 : ConvertCommand ();
22 : ~ConvertCommand ();
23 :
24 0 : virtual std::string getShortOptions () override
25 : {
26 0 : return "";
27 : }
28 :
29 0 : virtual std::string getSynopsis () override
30 : {
31 0 : return "[<import-format>] [<export-format>] [<import-file>] [export-file]";
32 : }
33 :
34 78 : virtual std::string getShortHelpText () override
35 : {
36 234 : return "Convert configuration.";
37 : }
38 :
39 0 : virtual std::string getLongHelpText () override
40 : {
41 : return "The convert command allows you to convert\n"
42 : "any file format supported by Elektra to any other.\n"
43 : "\n"
44 : "The key database is not touched.\n"
45 : "\n"
46 : "Example:\n"
47 : "cat sw.ecf | kdb convert dump xml > sw.xml\n"
48 0 : "To convert an Elektra dump file to xml.";
49 : }
50 :
51 : virtual int execute (Cmdline const & cmdline) override;
52 : };
53 :
54 : #endif
|