Warning, /pim/sink/docs/sinksh.md is written in an unsupported language. File is not indexed.

0001 The sink shell is the primary interaction point from the commandline. It can be used for debugging, maintenance and scripting.
0002 
0003 The syntax is:
0004   `sinksh COMMAND TYPE ...`
0005 
0006 # Commands
0007 
0008 ## list
0009 The list command allows to execute queries and retreive results in form of lists.
0010 Eventually you will be able to specify which properties should be retrieved, for now it's a hardcoded list for each type. It's generally useful to check what the database contains and whether queries work.
0011 
0012 ## count
0013 Like list, but only output the result count.
0014 
0015 ## stat
0016 Some statistics how large the database is, how the size is distributed accross indexes, etc.
0017 
0018 ## create/modify/delete
0019 Allows to create/modify/delete entities. Currently this is only of limited use, but works already nicely with resources. Eventually it will allow to i.e. create/modify/delete all kinds of entities such as events/mails/folders/....
0020 
0021 ## clear
0022 Drops all caches of a resource but leaves the config intact. This is useful while developing because it i.e. allows to retry a sync, without having to configure the resource again.
0023 
0024 ## synchronize
0025 Allows to synchronize a resource. For an imap resource that would mean that the remote server is contacted and the local dataset is brought up to date,
0026 for a maildir resource it simply means all data is indexed and becomes queriable by sink.
0027 
0028 Eventually this will allow to specify a query as well to i.e. only synchronize a specific folder.
0029 
0030 ## show
0031 Provides the same contents as "list" but in a graphical tree view. This was really just a way for me to test whether I can actually get data into a view, so I'm not sure if it will survive as a command. For the time being it's nice to compare it's performance to the QML counterpart.
0032 
0033 # Setting up a new resource instance
0034 sink_cmd is already the primary way how you create resource instances:
0035 
0036   `sinksh create resource sink.maildir path /home/developer/maildir1`
0037 
0038 This creates a resource of type "sink.maildir" and a configuration of "path" with the value "home/developer/maildir1". Resources are stored in configuration files, so all this does is write to some config files.
0039 
0040   `sinksh list resource`
0041 
0042 By listing all available resources we can find the identifier of the resource that was automatically assigned.
0043 
0044   `sinksh synchronize sink.maildir.instance1`
0045 
0046 This triggers the actual synchronization in the resource, and from there on the data is available.
0047 
0048   `sinksh list folder sink.maildir.instance1`
0049 
0050 This will get you all folders that are in the resource.
0051 
0052   `sinksh remove resource sink.maildir.instance1`
0053 
0054 And this will finally remove all traces of the resource instance.