Kexi/Plugins/Reports/CLI Export: Difference between revisions
Appearance
No edit summary |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
Details: | Details: | ||
*Started: [[User:Jstaniek|Jstaniek]] ([[User talk:Jstaniek|talk]]) 11:07, 10 August 2015 (UTC) | *Started: [[User:Jstaniek|Jstaniek]] ([[User talk:Jstaniek|talk]]) 11:07, 10 August 2015 (UTC) | ||
*{{wish| | *{{wish|351150}} | ||
*Back this feature at [https://www.bountysource.com/issues/25594791-add-command-line-cli-support-for-exporting-kexi-reports] | |||
*Target: 2.9.7 | *Target: 2.9.7 | ||
*Status: UNASSIGNED | *Status: UNASSIGNED | ||
*https://invent.kde.org/office/kexi/-/issues/136 | |||
Add command line (CLI) support for exporting Kexi Reports. | Add command line (CLI) support for exporting Kexi Reports. |
Latest revision as of 20:48, 13 April 2023
Design document.
Details:
- Started: Jstaniek (talk) 11:07, 10 August 2015 (UTC)
- Wish #351150
- Back this feature at [1]
- Target: 2.9.7
- Status: UNASSIGNED
- https://invent.kde.org/office/kexi/-/issues/136
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"
- Note that " " should be added in the argument because otherwise * will be expanded by the shell.