Kexi/Plugins/Reports/CLI Export: Difference between revisions
(Created page with "Design document. Details: *Started: ~~~~ *{{wish|????}} *Target: 2.9.7 *Status: UNASSIGNED Add command line (CLI) support for exporting Kexi Reports. General command line s...") |
No edit summary |
||
Line 10: | Line 10: | ||
General command line schema: | General command line schema: | ||
kexi --export report:NAME [--format=FORMAT] [--overwrite] [--open-after-export] | kexi --export report:NAME [--format=FORMAT] [--overwrite] [--open-after-export] [--output=FILE] project.kexi | ||
Where: | Where: | ||
Line 22: | Line 22: | ||
* --overwrite - if the destination file exists, overwrite it; off by default | * --overwrite - if the destination file exists, overwrite it; off by default | ||
* --open-after-export - open associated file viewer after a successful export, e.g. for HTML web browser is used | * --open-after-export - open associated file viewer after a successful export, e.g. for HTML web browser is used | ||
* FILE - output file | |||
** If not specified, NAME.EXTENSION is used, where NAME is the report name and EXTENSION is an extension depending on the format, e.g. pdf for the PDF format | |||
** Use "-" for standard output, useful for using in scripts; use wit hcare when multiple reports are listed in --export because the output will be concatenated | |||
** Export will fail if FILE is specified and multiple reports are listed in --export | |||
* project.kexi - actual project to export from | |||
==Requirements== | ==Requirements== | ||
Line 30: | Line 33: | ||
==TODOs== | ==TODOs== | ||
*Nice to have: support export of multiple reports in one go by specifying | *Nice to have: support export of multiple reports in one go by specifying, e.g. --export report:NAME1,NAME2,.... | ||
*Nice to have: support regular expressions for NAME, e.g. --export "report:.*" for all reports or --export "report:a.*z" for reports with name starting with "a" and ending with "z" |
Revision as of 11:33, 10 August 2015
Design document.
Details:
- Started: Jstaniek (talk) 11:07, 10 August 2015 (UTC)
- Wish #????
- Target: 2.9.7
- Status: UNASSIGNED
Add command line (CLI) support for exporting Kexi Reports.
General command line schema:
kexi --export report:NAME [--format=FORMAT] [--overwrite] [--open-after-export] [--output=FILE] project.kexi
Where:
- NAME - report name (not caption), required
- FORMAT: One of PDF, ODT, ODS, HTML, OLDHTML. Case-insensitive.
- The default format is PDF
- ODT means OpenDocument Text (available is Kexi has support for handling this format installed)
- ODS means OpenDocument Sheet (available is Kexi has support for handling this format installed)
- HTML means HTML web page with use of CSS and DIV elements
- OLDHTML means a traditional HTML web page with use of TABLE elements
- --overwrite - if the destination file exists, overwrite it; off by default
- --open-after-export - open associated file viewer after a successful export, e.g. for HTML web browser is used
- FILE - output file
- If not specified, NAME.EXTENSION is used, where NAME is the report name and EXTENSION is an extension depending on the format, e.g. pdf for the PDF format
- Use "-" for standard output, useful for using in scripts; use wit hcare when multiple reports are listed in --export because the output will be concatenated
- Export will fail if FILE is specified and multiple reports are listed in --export
- project.kexi - actual project to export from
Requirements
- Do not require any interaction
- Support sane defaults
TODOs
- Nice to have: support export of multiple reports in one go by specifying, e.g. --export report:NAME1,NAME2,....
- Nice to have: support regular expressions for NAME, e.g. --export "report:.*" for all reports or --export "report:a.*z" for reports with name starting with "a" and ending with "z"