Hello! I think for debugging it would be useful to have a generic item import/update/export mechanism in the SyncEvolution command line. One use case would be to test backend storages which do no have a complete GUI yet, or where the GUI has no dedicated import/export mechanism.
Below is my proposal for the command line extensions. Does that make sense? Note that reading from stdin is currently not supported by the command line/daemon integration. I would add it based on the InfoRequest/InfoResonse mechanism. SYNOPSIS ======== List items: syncevolution --print-items <config> <source> Export item(s): syncevolution [--delimiter <string>] --export <dir>|<file>|- <config> <source> [<luid> ...] Add item(s): syncevolution [--delimiter <string>|none] --import <dir>|<file>|- <config> <source> Update item(s) syncevolution --update <dir> <config> <source> syncevolution --update <file> <config> <source> [<luid>] syncevolution --update - <config> <source> <luid> USAGE ===== syncevolution --print-items <config> <source> syncevolution [--delimiter <string>] --export <dir>|<file>|- <config> <source> [<luid> ...] syncevolution [--delimiter <string>|none] --import <dir>|<file>|- <config> <source> syncevolution --update <dir> <config> <source> syncevolution --update <file>|- <config> <source> <luid> Restore depends on the specific format of the automatic backups created by SyncEvolution. Arbitrary access to item data is provided with additional options. <luid> here is the unique local identifier assigned to each item in the source, transformed so that it contains only alphanumeric characters, dash and underscore. --print-items shows all existing items using one line per item using the format "<luid>: <short description>". --export writes all items in the source or all items whose <luid> is given into a directory if the --export parameter exists and is a directory. The <luid> of each item is used as file name. Otherwise it creates a new file under that name and writes the selected items separated by the chosen delimiter string. The default are two newline characters for a blank line. stdout can be selected with a dash. --import adds all items found in the directory or input file to the source. When reading from a directory, each file is treated as one item. Otherwise the input is split at the chosen delimiter. "none" as delimiter disables splitting of the input. --update overwrites the content of existing items. Because a <luid> must be known for each item, updating multiple items at once only works when using the one item per directory format with file names being <luid>s. When reading from a specific file, only one item gets updated. The <luid> of if it is the base name of the file or the optional command line parameter. When reading from stdin, the <luid> must be given as parameter. -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter. _______________________________________________ SyncEvolution mailing list [email protected] http://lists.syncevolution.org/listinfo/syncevolution
