Difference between revisions of "De:Gramps 3.3 Wiki Handbuch - Kommandozeilen Referenz"
Leonhaeuser (talk | contribs) |
Leonhaeuser (talk | contribs) (→Operation) |
||
Line 238: | Line 238: | ||
Wenn das erste Argument auf der Kommandozeile nicht mit einem Strich beginnt (z.B. kein Parameter), versucht Gramps die Datei mit dem Namen des ersten Arguments zu öffnen und eine interaktive Sitzung zu starten. Der rest der Kommandozeilenargumente wird ignoriert. | Wenn das erste Argument auf der Kommandozeile nicht mit einem Strich beginnt (z.B. kein Parameter), versucht Gramps die Datei mit dem Namen des ersten Arguments zu öffnen und eine interaktive Sitzung zu starten. Der rest der Kommandozeilenargumente wird ignoriert. | ||
− | Wenn der <pre>-O</pre> Parameter gesetzt ist, versucht | + | Wenn der <pre>-O</pre> Parameter gesetzt ist, versucht Gramps den gelieferten Dateinamen zu öffnen und dann mit den Daten wie in weiteren Parametern angegeben zu arbeiten. |
− | {{man note|1=Notiz |2=Pro Aufruf von Gramps kann nur eine Datei geöffnet werden. Wenn du Daten aus mehreren Quellen benötigst, verwende die | + | {{man note|1=Notiz |2=Pro Aufruf von Gramps kann nur eine Datei geöffnet werden. Wenn du Daten aus mehreren Quellen benötigst, verwende die Importoptionen über die <pre>-i</pre> Option.}} |
− | Mit oder ohne den <pre>-O</pre> Parameter, können mehrere Importe, Exporte und Aktionen in der Kommandozeile weiter | + | Mit oder ohne den <pre>-O</pre> Parameter, können mehrere Importe, Exporte und Aktionen in der Kommandozeile weiter spezifiziert werden durch Verwendung der <pre>-i</pre>, <pre>-e</pre>, und <pre>-a</pre> Parameter. |
Die Reihenfolge der <pre>-i</pre> , <pre>-e</pre> , oder <pre>-a</pre> Parameter spielt keine Rolle. Die tatsächliche Ausführungsreihenfolge ist immer: alle Importe (wenn vorhanden) -> alle Exporte (wenn vorhanden) -> alle Aktionen (wenn vorhanden). | Die Reihenfolge der <pre>-i</pre> , <pre>-e</pre> , oder <pre>-a</pre> Parameter spielt keine Rolle. Die tatsächliche Ausführungsreihenfolge ist immer: alle Importe (wenn vorhanden) -> alle Exporte (wenn vorhanden) -> alle Aktionen (wenn vorhanden). | ||
− | '{{man note| Notiz |Aber öffnen | + | '{{man note| Notiz |Aber öffnen muss immer die Erste sein!}} |
− | Wenn kein <pre>-O</pre> oder <pre>-i</pre> Parameter angegeben wird, startet Gramps sein Hauptfenster und startet die gewöhnliche interaktive Sitzung mit der leeren Datenbank, denn es gibt keine Daten zu verarbeiten. ( | + | Wenn kein <pre>-O</pre> oder <pre>-i</pre> Parameter angegeben wird, startet Gramps sein Hauptfenster und startet die gewöhnliche interaktive Sitzung mit der leeren Datenbank, denn es gibt keine Daten zu verarbeiten. (Außer du hast schon eine "Präferenz" gesetzt, das es mit der letzten verwendeten Datenbank starten soll.) |
Wenn kein <pre>-e</pre> oder <pre>-a<pre> Parameter angegeben ist, startet Gramps sein Hauptfenster und startet die gewöhnliche interaktive Sitzung mit der, aus öffnen und allen Importen (wenn vorhanden) resultierenden Datenbank. Die Datenbank liegt dann in der Datei ''import_db.grdb'' in dem Verzeichnis ''~/.gramps/import/''. | Wenn kein <pre>-e</pre> oder <pre>-a<pre> Parameter angegeben ist, startet Gramps sein Hauptfenster und startet die gewöhnliche interaktive Sitzung mit der, aus öffnen und allen Importen (wenn vorhanden) resultierenden Datenbank. Die Datenbank liegt dann in der Datei ''import_db.grdb'' in dem Verzeichnis ''~/.gramps/import/''. | ||
− | Fehler, die während des Imports, Exports oder einer Aktion auftreten, werden entweder auf stdout (wenn es | + | Fehler, die während des Imports, Exports oder einer Aktion auftreten, werden entweder auf stdout (wenn es Fehler sind, die von Gramps behandelt werden) oder auf stderr (wenn sie nicht behandelt werden) geschrieben. Verwende die gewöhnlichen Shell-Umleitungen von stdout und stderr um diese Nachrichten und Fehler in Dateien zu speichern. |
== Beispiele == | == Beispiele == | ||
Line 258: | Line 258: | ||
*To import four databases (whose formats can be determined from their names) and then check the resulting database for errors, one may type: | *To import four databases (whose formats can be determined from their names) and then check the resulting database for errors, one may type: | ||
− | :<pre>gramps -i | + | :<pre>gramps -i Datei1.ged -i Datei2.gpkg -i ~/DB3.gramps -i Datei4.wft -a check</pre> |
− | *To explicitly specify the formats in the above example, append filenames with appropriate -f | + | *To explicitly specify the formats in the above example, append filenames with appropriate -f Optionen: |
− | :<pre>gramps -i | + | :<pre>gramps -i Datei1.ged -f gedcom -i Datei2.gpkg -f gramps-pkg -i ~/DB3.gramps -f gramps-xml -i Datei4.wft -f wft -a check</pre> |
− | *To record the database resulting from all imports, supply -e flag (use -f if the filename does not allow | + | *To record the database resulting from all imports, supply -e flag (use -f if the filename does not allow Gramps to guess the format): |
− | :<pre>gramps -i | + | :<pre>gramps -i Datei1.ged -i Datei2.gpkg -e ~/new-package -f gramps-pkg</pre> |
*To save any error messages of the above example into files outfile and errfile, run: | *To save any error messages of the above example into files outfile and errfile, run: | ||
− | :<pre>gramps -i | + | :<pre>gramps -i Datei1.ged -i file2.dpkg -e ~/new-package -f gramps-pkg >outfile 2>errfile </pre> |
*To import three databases and start interactive GRAMPS session with the result: | *To import three databases and start interactive GRAMPS session with the result: | ||
− | :<pre>gramps -i | + | :<pre>gramps -i Datei1.ged -i Datei2.gpkg -i ~/db3.gramps </pre> |
− | *To open a database and, based on that data, generate timeline report in PDF format putting the output into the | + | *To open a database and, based on that data, generate timeline report in PDF format putting the output into the meine_zeitlinie.pdf file: |
− | :<pre>gramps -O ' | + | :<pre>gramps -O 'Stammbaum 1' -a report -p name=timeline,off=pdf,of=meine_zeitlinie.pdf </pre> |
{{man tip|1=Timeline report options |2=Verwende <tt>''name=timeline,show=all''</tt> um alle Optionen für den Zeitlinien Bericht zu sehen. Um Einzelheiten einer bestimmten Option zu erhalten verwende <tt>''show=Optionsname''<tt>, z.B. <tt>''name=timeline,show=off''</tt>. Um mehr über verfügbare Berichtsnamen zu erfahren, verwende die <tt>''name=show''</tt> Zeichenfolge.}} | {{man tip|1=Timeline report options |2=Verwende <tt>''name=timeline,show=all''</tt> um alle Optionen für den Zeitlinien Bericht zu sehen. Um Einzelheiten einer bestimmten Option zu erhalten verwende <tt>''show=Optionsname''<tt>, z.B. <tt>''name=timeline,show=off''</tt>. Um mehr über verfügbare Berichtsnamen zu erfahren, verwende die <tt>''name=show''</tt> Zeichenfolge.}} | ||
Line 288: | Line 288: | ||
* To generate a web site into an other locale (in german): | * To generate a web site into an other locale (in german): | ||
− | <pre>LANGUAGE=de_DE; LANG=de_DE.UTF-8 gramps -O ' | + | <pre>LANGUAGE=de_DE; LANG=de_DE.UTF-8 gramps -O 'Stammbaum 1' -a report -p name=navwebpage,target=/../de </pre> |
*Finally, to start normal interactive session type: | *Finally, to start normal interactive session type: |
Revision as of 15:14, 15 June 2011
Dieser Anhang liefert eine Referent über die Möglichkeiten, wenn du Gramps aus dem Terminal starten.
Spezielle Copyright Notiz: Alle Änderungen auf dieser Seite müssen unter zwei copyright Lizenzen stehen:
Diese Lizenzen ermöglichen es dem Gramps-Projekt die bestmögliche Verwendung dieses Handbuchs als freien Inhalt in zukünftigen Gramps Versionen. Wenn du mit dieser dual Lizenzierung nicht einverstanden bist, bearbeite diese Seite nicht. Du darfst zu anderen Seiten des Wiki die nur unter die GFDL Lizenz fallen nur über externe Links (verwende die Syntax: [http://www.gramps-project.org/...]), nicht über interne Links verlinken. |
Zurück | Index | Nächste |
Sprachen: |
English • Deutsch • français • македонски • Nederlands • shqip |
Contents
Verfügbare Optionen
Dieser Abschnitt bietet eine Liste aller in Gramps verfügbaren Befehlszeilen Parameter. Wenn du mehr wissen willst als nur eine Liste von Parametern, schaue in die nächsten Abschnitte: Operation und Beispiele. A list is also available on diese Seite.
Listenoptionen
-l, gibt eine Liste bekannter Stammbäume aus -L, gibt eine detaillierte Liste bekannter Stammbäume aus
Versionsoptionen
-v oder --version prints version of Gramps and dependencies, information about environment settings and python and system paths
Formatoptionen
The format of any file destined for opening, importing, or exporting can be specified with the
-f format
option. The acceptable format values are listed below.
Full family tree support
These formats contain all your data that is present in a family tree.
- gramps - GRAMPS XML format: Dieses Format ist für Öffnen, den Import und den Export verfügbar. Falls nicht angegeben wird es gesetzt, wenn der Dateiname mit .gramps endet.
- gpkg - GRAMPS package XML format: Dieses Format ist für den Import und Export verfügbar. Falls nicht angegeben wird es gesetzt, wenn der Dateiname mit .gpkg endet.
- grdb - pre GRAMPS 3.x database: This format is available for import to support the old file format of Gramps. Everything in the grdb file is imported. When not specified, it can be guessed if the filename ends with .grdb
- burn - GNOME iso burning: export, only available on GNOME where burn protocol exists.
Reduced family tree support
These formats contain most, but not all data that can be created in GRAMPS
- ged - GEDCOM format: Dieses Format ist für den Import und den Export verfügbar. Falls nicht angegeben wird es gesetzt, wenn der Dateiname mit .ged endet.
- gw - GeneWeb file: Dieses Format ist für den Import und Export verfügbar. Falls nicht angegeben wird es gesetzt, wenn der Dateiname mit .gw endet.
Subset of your data
These formats contain a specific subset of your data
- csv - Comma Separated Value: This format is available for import and export. Be careful however, import must be as values created by the export function. Only a part of your data is contained in the output.
- vcf - VCard format: import and export
- vcs - VCalandar format: export
- def - old Pro-Gen format: import
- wft - Web Family Tree: Dieses Format ist nur für den Export verfügbar. Falls nichts angegeben wird es gesetzt, wenn der Dateiname mit .wft endet.
Opening options
You can open a family tree, or you can open a file by importing it in an empty family tree. To let GRAMPS handle this automatically, just supply the familytree or filename you want to open:
python gramps.py 'Mein Stammbaum' python gramps.py Mustermann.ged
The first opens a family tree, the second imports a gedcom into an empty family tree.
Additionally, you can pass GRAMPS the name of the family tree to be opened:
- use this option :
-O filename
or--open=filename
-O, Open of a family tree. This can be done also by just typing the name (name or database dir)
Examples:
python gramps.py 'Stammbaum 1' python gramps.py /home/cristina/.gramps/grampsdb/47320f3d python gramps.py -O 'Stammbaum 1' python gramps.py -O /home/cristina/.gramps/grampsdb/47320f3d
Tipp Wenn der Dateiname ohne Option angegeben wird, versucht Gramps die Datei zu öffnen und anschließend eine interaktive Arbeitssitzung gestartet. |
Das Format kann festgelegt werden mit dem
-f format
oder
--format=format
parameter, direkt gefolgt vom Dateinamen. Wenn nicht angegeben, wird versucht es aus dem Dateinamen zu ermitteln.
Tipp Nur Stammbäume können direkt geöffnet werden. Für andere Formate benötigst du die Importoption, welche die leere Datenbank einrichtet und dann die Daten in sie importiert. |
Tipp Es kann nur ein Stammbaum geöffnet werden. Wenn du Daten aus verschiedenen Quellen kombinieren musst, benötigst du die Importoption. |
Importoptionen
Die für den Import vorgesehenen Dateien können mit dem
-i filename
oder
--import=Dateiname
Parameter angegeben werden. Das Format kann mit dem -f oder --format=Format Parameter bestimmt werden, dem sofort der Dateiname folgt. Falls es nicht angegeben wird, wird versucht das Format aus dem Dateiname zu ermitteln.
Example:
python gramps.py -i 'Stammbaum 1' -i 'Stammbaum 2' python gramps.py -i test.grdb -i data.gramps
Tipp More than one file can be imported in one command. If this is the case, GRAMPS will incorporate the data from the next file into the database available at the moment. |
Falls mehr als eine Eingabedatei angegeben wird, muss jeder einem -i folgen. Die Dateien werden in der angegebenen Reihenfolge importiert, z.B.
-i Datei1 -i Datei2
und
-i Datei2 -i Datei1
es können unterschiedliche GRAMPS-ID's in der resultierenden Datenbank entstehen..
Exportoptionen
Die für den Export vorgesehenen Dateien können mit dem Parameter
-e Dateiname
oder
--export=Dateinamean
gegeben werden. Das Format kann mit dem
-f
Parameter bestimmt werden, dem sofort der Dateinamen folgt. Falls es nicht angegeben wird, wird versucht das Format aus dem Dateinamen zu ermitteln. Für iso-Formate, ist der Dateiname der Name des Verzeichnisses, in das die Gramps-Datenbank geschrieben wird. Für gramps-xml, gpkg, gedcom, wft, geneweb und gramps-pkg ist der Dateiname der Name der resultierenden Datei.
-e, export a family tree in required format. It is not possible to export to a family tree.
Example:
python gramps.py -i 'Family Tree 1' -i test.grdb -f grdb -e mergdeDB.gramps
Note that above does not change 'Family Tree 1' as everything happens via a temporary database, whereas:
python gramps.py -O 'Family Tree 1' -i test.grdb -f grdb -e mergdeDB.gramps
will import test.grdb into Family Tree 1, and then export to a file !
Exporting more files More than one file can be exported in one command. If this is the case, GRAMPS will attempt to write several files using the data from the database available at the moment. |
Wenn mehr als eine Ausgabedatei angeben wird, muss jede auf einem -e-Parameter folgen. Diese Dateien werden nacheinander geschrieben, in der angegebenen Reihenfolge.
Action options
The action to perform on the imported data can be specified with the
-a action
or
--action=action
option. This is done after all imports are successfully completed.
The following actions remain the same:
- report: Diese Aktion erlaubt das erstellen von Berichten über die Kommandozeile.
- tool: This action allow to run a tool from a command line.
Da Berichte und Werkzeuge eine Reihe eigener Optionen haben, sollten diese Aktionen die Berichts/Werkzeug Optionenzeichenkette folgen. Die Zeichenkette wird mit der
-p Optionszeichenkette
oder
--options=Optionszeichenkette
Option übergeben.
The actions available in older versions of Gramps which were relocated in Gramps 3.3 are:
- summary: This action was the same as Reports ->View ->Summary . In Gramps 3.3 it was replaced by (or renamed to) -a report -p name=summary.
- check: This action was the same as Tools ->Database Processing ->Check and Repair . In Gramps 3.3 it was replaced by (or renamed to) -a tool -p name=check.
report action option
You can generate 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"
In version 3.3, you can provide the css style to use here with the css option:
gramps -O "Family Tree 1" -a report -p "name=family_group,style=default,off=html,of=test.html,css=Web_Nebraska.css"
or without css in the html output:
gramps -O "Family Tree 1" -a report -p "name=family_group,style=default,off=html,of=test.html,css="
Most of the report options are specific for every report. However, there some common options.
- name=report_name: Diese benötigte Option bestimmt welcher Bericht erzeugt wird. Wenn der übergebene Bericht_Name nicht mit einem verfügbaren Bericht übereinstimmt, wird eine Fehlermeldung gefollgt von einer Liste verfügbarer Berichte ausgegeben.
- 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: Dies erstellt eine Liste der Namen aller verfügbaren Optionen für den angegebenen Bericht.
- show=option_name: Dies zeigt die Beschreibung der funktionalität die durch Option_Name bereit gestellt wird, genauso wie die akzeptierten Arten und Werte für diese Option.
So, to learn to use a report, do for example:
gramps -O "Family Tree 1" -a report -p "name=family_group,show=all"
Wenn mehr als eine Ausgabeaktion angegeben wird, muss jede auf einem -a Parameter folgen. Die Aktionen werden nacheinander in der entsprechenden Reihenfolge durchgeführt.
On the command line such lists must always start with a left square bracket
[
and must always end with a right square bracket
]
but since such square brackets are usually "special" to the "shell" (they mean something to the command interpreter you are typing the command to), you must "escape" them so that they are ignored by your shell. The details vary with each shell but (in linux/UNIX) usually you can precede such a square bracket with a backslash
\
or put quotation marks around the square bracket, usually either "single" or "double" ones.
The Hourglass Graph report allows you to put a "note" at the top of the report and such a "note" is an example of a "list" option. Here is an example: gramps -O "Family Tree 1" -a report -p name=hourglass_graph,note='[line one,line two]' which shows that inside such a list different lines are separated by commas, and that spaces are acceptable since the quotation marks are already there for the square brackets.
But if you want to have a comma inside your report you have to somehow tell GRAMPS that comma is not one which separates lines. You do that by enclosing the line with the comma in quotation marks (either single or double). But if you are already using a set of quotation marks (to enclose your square brackets) you have to use the other type to enclose the line with your comma. Here is an example: gramps -O "Family Tree 1" -a report -p name=hourglass_graph,note="['line one, also line one','line two, also line two']"
It is possible to include any character in a list but the details are beyond the scope of this command-line introduction to GRAMPS. You will need to know the precise methods available in your particular command shell interpreter to include a character which is "special" to your shell or "special" to GRAMPS (like the comma in the example above) but in general you will have to "escape" it twice, once to your shell and once again to GRAMPS, since you don't want your shell to think it is some instruction it should pay attention to and you don't want GRAMPS to think that either.
tool action option
You can run most tools from the command line using the 'tool' action. To see which ones, say: gramps -O "Family Tree 1" -a tool -p show=all To see a tool's available options, for instance the "verify" tool: gramps -O "Family Tree 1" -a tool -p name=verify,show=all To run a tool, for instance the "verify" tool: gramps -O "Family Tree 1" -a tool -p name=verify
Force unlock option
-u, you can extend the -O flag with -u to force a locked family to be unlocked. This allows to recover from a crash that leaves the family tree (database)locked from the command line.
An example (to unlock the "Family Tree 1" database):
gramps -O "Family Tree 1" -a report -u > /dev/null
Note that it is not possible to open family trees that need repair from the command line
Configuration (config) option
The option takes three forms: (the following examples, exept 3.2, use behavior.database-path as the configuration variable to change.)
1) See all config values
-s or --show
2) See a value:
--config=behavior.database-path
or -c behavior.database-path
3) Set a value:
--config=behavior.database-path:'/media/mydb'
or -c behavior.database-path:'/media/mydb'
3.1) Set a value to its default:
--config=behavior.database-path:DEFAULT
or -c behavior.database-path:DEFAULT
3.2) Set more than one value:
--config=behavior.use-tips:False --config=behavior.autoload:True or -c behavior.use-tips:False -c behavior.autoload:True
When all configuration variable(s) are set Gramps will start with these new values.
Operation
Wenn das erste Argument auf der Kommandozeile nicht mit einem Strich beginnt (z.B. kein Parameter), versucht Gramps die Datei mit dem Namen des ersten Arguments zu öffnen und eine interaktive Sitzung zu starten. Der rest der Kommandozeilenargumente wird ignoriert.
Wenn der
-O
Parameter gesetzt ist, versucht Gramps den gelieferten Dateinamen zu öffnen und dann mit den Daten wie in weiteren Parametern angegeben zu arbeiten.
Notiz Pro Aufruf von Gramps kann nur eine Datei geöffnet werden. Wenn du Daten aus mehreren Quellen benötigst, verwende die Importoptionen über die -iOption. |
Mit oder ohne den
-O
Parameter, können mehrere Importe, Exporte und Aktionen in der Kommandozeile weiter spezifiziert werden durch Verwendung der
-i
,
-e
, und
-a
Parameter. Die Reihenfolge der
-i
,
-e
, oder
-a
Parameter spielt keine Rolle. Die tatsächliche Ausführungsreihenfolge ist immer: alle Importe (wenn vorhanden) -> alle Exporte (wenn vorhanden) -> alle Aktionen (wenn vorhanden).
'
Notiz Aber öffnen muss immer die Erste sein! |
Wenn kein
-O
oder
-i
Parameter angegeben wird, startet Gramps sein Hauptfenster und startet die gewöhnliche interaktive Sitzung mit der leeren Datenbank, denn es gibt keine Daten zu verarbeiten. (Außer du hast schon eine "Präferenz" gesetzt, das es mit der letzten verwendeten Datenbank starten soll.) Wenn kein
-e
oder
-a<pre> Parameter angegeben ist, startet Gramps sein Hauptfenster und startet die gewöhnliche interaktive Sitzung mit der, aus öffnen und allen Importen (wenn vorhanden) resultierenden Datenbank. Die Datenbank liegt dann in der Datei ''import_db.grdb'' in dem Verzeichnis ''~/.gramps/import/''.Fehler, die während des Imports, Exports oder einer Aktion auftreten, werden entweder auf stdout (wenn es Fehler sind, die von Gramps behandelt werden) oder auf stderr (wenn sie nicht behandelt werden) geschrieben. Verwende die gewöhnlichen Shell-Umleitungen von stdout und stderr um diese Nachrichten und Fehler in Dateien zu speichern.
== Beispiele ==
- To import four databases (whose formats can be determined from their names) and then check the resulting database for errors, one may type:
- <pre>gramps -i Datei1.ged -i Datei2.gpkg -i ~/DB3.gramps -i Datei4.wft -a check
- To explicitly specify the formats in the above example, append filenames with appropriate -f Optionen:
gramps -i Datei1.ged -f gedcom -i Datei2.gpkg -f gramps-pkg -i ~/DB3.gramps -f gramps-xml -i Datei4.wft -f wft -a check
- To record the database resulting from all imports, supply -e flag (use -f if the filename does not allow Gramps to guess the format):
gramps -i Datei1.ged -i Datei2.gpkg -e ~/new-package -f gramps-pkg
- To save any error messages of the above example into files outfile and errfile, run:
gramps -i Datei1.ged -i file2.dpkg -e ~/new-package -f gramps-pkg >outfile 2>errfile
- To import three databases and start interactive GRAMPS session with the result:
gramps -i Datei1.ged -i Datei2.gpkg -i ~/db3.gramps
- To open a database and, based on that data, generate timeline report in PDF format putting the output into the meine_zeitlinie.pdf file:
gramps -O 'Stammbaum 1' -a report -p name=timeline,off=pdf,of=meine_zeitlinie.pdf
- To convert a grdb on the fly to a .gramps xml file:
gramps -O 'Family Tree 1' -e output.gramps -f gramps-xml
- To generate a web site into an other locale (in german):
LANGUAGE=de_DE; LANG=de_DE.UTF-8 gramps -O 'Stammbaum 1' -a report -p name=navwebpage,target=/../de
- Finally, to start normal interactive session type:
gramps
Environment variables
Gramps can take advantage of these environment variables (but do not change them if you do not know what are you doing):
- GRAMPSHOME - if set, override default path to profile allowing user to use ex. network drive to store data and all settings.
- LANG - is used by GRAMPS to determine which language file should be loaded.
Zurück | Index | Nächste |
Sprachen: |
English • Deutsch • français • македонски • Nederlands • shqip |