Changes

Jump to: navigation, search

Gramps 3.2 Wiki Manual - Command Line

195 bytes added, 09:10, 14 March 2011
Configuration (config) option (Gramps 3.3)
The action to perform on the imported data can be specified with the <pre>-a action</pre> or <pre>--action=action</pre> option. This is done after all imports are successfully completed.
Currently available The following actions areremain the same:
*''summaryreport'': This action is allows producing reports from the same as ''' Reports ->View ->Summary '''. Note: will be removed in 3.2, use '''-a tool -p name=summary''' insteadcommand line.
*''checktool'': This action is allows to run a tool from the same as ''' Tools ->Database Processing ->Check and Repair ''' . Note: will be removed in 3.2, use '''-a report -p name=check''' insteadcommand line.
*''Reports and tools generally have many options of their own, so these actions should be followed by the report/tool'': This action allow to run a tool from a command lineoption string. The string is given using the <pre>-p option_string</pre> or <pre>--options=option_string</pre> option.
The actions available in older versions of Gramps which were relocated in Gramps 3.2 are: *''reportsummary'': This action allows producing reports from was the command linesame as ''' Reports ->View ->Summary '''. In Gramps 3. As reports generally have many options of their own, this action should be followed 2 it was replaced by the (or renamed to) '''-a report option string-p name=summary'''. The string is given using  *''check'': This action was the <presame as ''' Tools ->Database Processing -p option_string</pre> Check and Repair ''' . In Gramps 3.2 it was replaced by (or <pre>renamed to) '''-a tool -optionsp name=option_string</pre> optioncheck'''.
==== report action option ====
You can generate some most reports from the command line using the report action.
An example:
gramps -O "Family Tree 1" -a report -p "name=family_group,style=default,off=html,of=test.html"
gramps -O "Family Tree 1" -a report -p "name=family_group,style=default,off=html,of=test.html,css="
{{man tip| Report option string |The report option string should satisfy the following conditions:It must not contain any spaces(due to the general nature of the command line interface). If some arguments need to include spaces, the string should be enclosed with quotation marks.
Option string must list pairs of option names and values.
Within a pair, option name and value must be separated by the equal sign.
*of : output filename
*off: output format. These are the extension an output format makes available, eg, pdf, html, doc, ...
*style: for text reports, the stylesheet to use. Defaults to 'default'.
*show=all: This will produce the list of names for all options available for a given report.
*show=option_name: This will print the description of the functionality supplied by the option_name, as well as what are the acceptable types and values for this option.
The order of <pre>-i</pre> , <pre>-e</pre> , or <pre>-a</pre> options with respect to each does not matter. The actual execution order always is: all imports (if any) -> all exports (if any) -> all actions (if any).
'{{man note| Note |But opening must always be first!}}
If no <pre>-O</pre> or <pre>-i</pre> option is given, GRAMPS will launch its main window and start the usual interactive session with the empty database, since there is no data to process, anyway.
:<pre>gramps -O 'Family Tree 1' -a report -p name=timeline,off=pdf,of=my_timeline.pdf </pre>
{{man tip|1=Timeline Listing report options |2=Use the <tt>''name=timeline,show=all''</tt> to find out about all available options for the timeline report. To find out details of a particular option, use <tt>''show=option_name''</tt> , e.g. <tt>''name=timeline,show=off''</tt> string. To learn about available report names, use <tt>''name=show''</tt> string.}}
*To convert a grdb on the fly to a .gramps xml file:
27
edits

Navigation menu