Difference between revisions of "Sq:Gramps 3.0 Wiki Manual - Command Line"

From Gramps
Jump to: navigation, search
(Opening options)
(Import options)
Line 53: Line 53:
 
{{Man tip| Këshillë |Mund të hapet vetëm një skedar i vetëm. Nëse keni nevojë të kombinoni të dhëna nga disa burime, do të duhet të përdorni opsionin për importim.}}
 
{{Man tip| Këshillë |Mund të hapet vetëm një skedar i vetëm. Nëse keni nevojë të kombinoni të dhëna nga disa burime, do të duhet të përdorni opsionin për importim.}}
  
=== Import options ===
+
=== Opsione për importim ===
  
The files destined for import can be specified with the <pre>-i filename</pre> or <pre>--import=filename</pre> option. The format can be specified with the <pre>-f format</pre> or <pre>--format=format</pre> option, immediately following the ''filename'' . If not specified, the guess will be attempted based on the ''filename''.
+
Skedarët e përcaktuar për importim, mund të përcaktohen me opsionin <pre>-i filename</pre> ose <pre>--import=filename</pre>. Formati mund të përvaktohet me opsionin <pre>-f format</pre> ose <pre>--format=format</pre>, menjëherë pas ''emrit të skedarit'' . Nëse nuk përcaktohet, supozimi do të bëjë përpjekje bazuar në ''emrin e skedarit''.
  
Example:  
+
Shembull:  
 
   python gramps.py -i 'Family Tree 1' -i 'Family Tree 2'
 
   python gramps.py -i 'Family Tree 1' -i 'Family Tree 2'
 
   python gramps.py -i test.grdb -i data.gramps
 
   python gramps.py -i test.grdb -i data.gramps
  
{{man tip | Tip |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.}}
+
{{man tip | Këshillë |Më shumë se një skedar mund të importohet në një komandë. Nëse kështu është rasti, GRAMPS do të inkorporojë të dhënat nga skedari i rradhës në bazën e të dhënave e cila është në dispozicion për momentin.}}
  
When more than one input file is given, each has to be preceded by <pre>-i</pre> flag. The files are imported in the specified order, i.e. <pre> -i file1 -i file2 </pre> and <pre> -i file2 -i file1 </pre> might produce different GRAMPS IDs in the resulting database.
+
Ku jipen më shumë se një skedarë, secili duhet të ndiqet me <pre>-i</pre> flag. Skedarët importohen me një rend të caktuar, i.e. <pre> -i file1 -i file2 </pre> dhe <pre> -i file2 -i file1 </pre> mund të japin GRAMPS ID të ndryshme në bazën e të dhënave që vjen si rezultat.
  
 
=== Export options ===
 
=== Export options ===

Revision as of 23:34, 7 November 2008

Kjo pjesë e shtuar siguron referencën e aftësive të linjës komanduese e cila është në dispozicion kur GRAMPS lëshohet nga fundi.

Gramps-notes.png
Shënim

GRAMPS u projektua si një program ndërveprues. Për atë arësye përdor afishim grafik dhe nuk mund të ekzekutojë nga tastiera e vërtetë jografike. Do të duhet një mund i madh për ta aktivizuar atë të ekzekutojë një terminal vetëm tekstual. Për këtë arësye grupi i opsioneve të linjave të komandës nuk ka për qëllim të tërhiqet plotësisht nga varësia e afishimit grafik. Më saktë, thjesht merr disa detyra më të përshtatshme (të zakonshme). Gjtihashtu mundëson që njëri të ekzekutojë këto detyra nga skriptat. Mirëpo, afishimi grafik duhet të jetë i kapshëm në çdo kohë!

Tango-Dialog-information.png
Këshillë

Për të përmbledhur, përdorimi i opsioneve të linjës së komandës siguron sjellje jo ndërvepruese, por nuk tërhiqet nga varësia e afishimit grafik. Merre ose leje!



Gnome-important.png Special copyright notice: All edits to this page need to be under two different copyright licenses:

These licenses allow the Gramps project to maximally use this wiki manual as free content in future Gramps versions. If you do not agree with this dual license, then do not edit this page. You may only link to other pages within the wiki which fall only under the GFDL license via external links (using the syntax: [https://www.gramps-project.org/...]), not via internal links.
Also, only use the known Typographical conventions

Paraprak [[Sq:Gramps {{{3}}} Wiki Manual| Indeks]] Tjetri



Opsione të mundshme

Ky seksion siguron listën e referencës të të gjitha opsioneve të linjës së komandës që janë në dispozicion në GRAMPS. Nëse doni të dini më shumë se vetëm një listë opsionesh, shih seksionin tjetër: Operacione dhe Shembuj.

Opsione të formatit

Formati i cilitdo skedar i përcaktuar për t'u hapur, importuar apo eksportuar, mund të caktohet me opsionin

-f format

. Vlerat e pranueshme format janë të vëna në listë më poshtë.

  • Baza e të dhënave grdb e GRAMPS: Ky format është i mundshëm për hapje, importim dhe ekspotim. Ku nuk është i përcaktuar, mund të supozohet nëse emri i skedarit mbaron me .grdb
  • Baza e të dhënave gramps-xml e GRAMPS XML: Ky format është i mundshëm për hapje, importim dhe eksportim. Kur nuk është i përcaktuar, mund të supozohet nëse emri i skedarit mbaron me .gramps
  • Skedari gedcom i GEDCOM: Ky format është i mundshëm për hapje, importim dhe eksportim. Kur nuk është i përcaktuar, mund të supozohet nëse emri i skedarit mbaron me .ged
  • Paketa gramps-pkg e GRAMPS: Ky format është i mundshëm për importim dhe eksportim. Kur nuk është i përcaktuar, mund të supozohet nëse emri i skedarit mbaron me .gpkg
  • Skedari geneweb i GeneWeb: Ky format është i mundshëm për importim dhe eksportim. Kur nuk është i përcaktuar, mund të supozohet nëse emri i skedarit mbaron me .gw
  • wft Veb Pemë familjarë: Ky format është i mundshëm vetëm për eksportim. Kur nuk është i përcaktuar, mund të supozohet nëse emri i skedarit mbaron me .wft
  • Imazhi iso i CD: Ky format është i mundshëm vetëm për eksport. Gjithmonë duhet të përcaktohet saktë.

Opsione për hapje

Ka dy mënyra për t'i dhënë GRAMPS emrin e skedarit që duhet të hapet:

  • plotëso emër të thjeshtë të skedarit
  • përdor këtë osion :
    -O filename
    or
    --open=filename 

-O, Hap një pemë familjare. Kjo gjithashtu mund të bëhet vetëm duke shtypur emrin (emri ose direktoriumi i bazës së të dhënave)

Shembuj:

python gramps.py 'Family Tree 1'
python gramps.py /home/cristina/.gramps/grampsdb/47320f3d
python gramps.py -O 'Family Tree 1'
python gramps.py -O /home/cristina/.gramps/grampsdb/47320f3d

Nëse është i dhënë emri i skedarit pa ndonjë flamur të opsionit, do të bëhet përpjekje për të hapur skedarin, dhe pastaj do të lëshohet sesioni ndërveprues i GRAMPS.

Tango-Dialog-information.png
Këshillë

Nëse nuk jipet asnjë opsion, por vetëm emri i skedarit, GRAMPS do të injorojë pjesën tjetër të argumenteve të linjës së komandës. Përdor -O flamurin për të hapur skedarin dhe për të bërë diçka me të dhënat.


Formati mund të përcaktohet me opsionin

-f format

or

--format=format

, menjëherë duke ndjekur emrin e skedarit . Nëse nuk përcaktohet, do të bëhet përpjekje për supozimin bazuar në emrin e skedarit. Format i mundshëm: 'gedcom','gramps-xml','gramps-pkg', 'grdb','geneweb'.

Tango-Dialog-information.png
Këshillë

Vetëm formatet grdb, gramps-xml, dhe gedcom mund të hapen në mënyrë direkte. Për formate të tjera, do të duhet të përdorni opsionin për importim i cili do të vendosë bazën e zbraët të të dhënave dhe pastaj do të importojë të dhënat në të.


Tango-Dialog-information.png
Këshillë

Mund të hapet vetëm një skedar i vetëm. Nëse keni nevojë të kombinoni të dhëna nga disa burime, do të duhet të përdorni opsionin për importim.


Opsione për importim

Skedarët e përcaktuar për importim, mund të përcaktohen me opsionin

-i filename

ose

--import=filename

. Formati mund të përvaktohet me opsionin

-f format

ose

--format=format

, menjëherë pas emrit të skedarit . Nëse nuk përcaktohet, supozimi do të bëjë përpjekje bazuar në emrin e skedarit.

Shembull:

  python gramps.py -i 'Family Tree 1' -i 'Family Tree 2'
  python gramps.py -i test.grdb -i data.gramps
Tango-Dialog-information.png
Këshillë

Më shumë se një skedar mund të importohet në një komandë. Nëse kështu është rasti, GRAMPS do të inkorporojë të dhënat nga skedari i rradhës në bazën e të dhënave e cila është në dispozicion për momentin.


Ku jipen më shumë se një skedarë, secili duhet të ndiqet me

-i

flag. Skedarët importohen me një rend të caktuar, i.e.

 -i file1 -i file2 

dhe

 -i file2 -i file1 

mund të japin GRAMPS ID të ndryshme në bazën e të dhënave që vjen si rezultat.

Export options

The files destined for export can be specified with the

-o filename

or

--output=filename

option. The format can be specified with the

-f

option immediately following the filename . If not specified, the guess will be attempted based on the filename . For iso format, the filename is actually the name of directory the GRAMPS database will be written into. For grdb, gramps-xml, gedcom, wft, geneweb, and gramps-pkg, the filename is the name of the resulting file.

-o, output 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 -o 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 -o mergdeDB.gramps

will import test.grdb into Family Tree 1, and then export to a file !

Tango-Dialog-information.png
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.


When more than one output file is given, each has to be preceded by

-o

flag. The files are written one by one, in the specified order.

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.

Currently available actions are:

  • summary: This action is the same as Reports ->View ->Summary
  • check: This action is the same as Tools ->Database Processing ->Check and Repair .
  • tool: This action allow to run a tool from a command line.
  • report: This action allows producing reports from the command line. As reports generally have many options of their own, this action should be followed by the report option string. The string is given using the
    -p option_string
    or
    --options=option_string
    option.
Tango-Dialog-information.png
Report option string

The report option string should satisfy the following conditions:It must not contain any spaces. 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. Different pairs must be separated by commas.


Most of the report options are specific for every report. However, there some common options.

  • name=report_name: This mandatory option determines which report will be generated. If the supplied report_name does not correspond to any available report, the error message will be printed followed by the list of available reports.
  • 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.

Use the above options to find out everything about a given report.

Tango-Dialog-information.png
Tip

If an option is not supplied, the last used value will be used. If this report has never been generated before, then the value from last generated report will be used when applicable. Otherwise, the default value will be used.


When more than one output action is given, each has to be preceded by

-a

flag. The actions are performed one by one, in the specified order.

List option

-l, print a list of known family trees

Operation

If the first argument on the command line does not start with dash (i.e. no flag), GRAMPS will attempt to open the file with the name given by the first argument and start interactive session, ignoring the rest of the command line arguments.

If the

-O

flag is given, then GRAMPS will try opening the supplied file name and then work with that data, as instructed by the further command line parameters.

Gramps-notes.png
Note

Only one file can be opened in a single invocation of GRAMPS. If you need to get data from multiple sources, use the importing options by using
-i
flag.

With or without the

-O

flag, there could be multiple imports, exports, and actions specified further on the command line by using

-i

,

-o

, and

-a

flags. The order of

-i

,

-o

, or

-a

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).

'

Gramps-notes.png
Note

But opening must always be first!

If no

-O

or

-i

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. If no

-o

or

-a

options are given, GRAMPS will launch its main window and start the usual interactive session with the database resulted from opening and all imports (if any). This database resides in the import_db.grdb file under the ~/.gramps/import/ directory.

Any errors encountered during import, export, or action, will be either dumped to stdout (if these are exceptions handled by GRAMPS) or to stderr (if these are not handled). Use usual shell redirections of stdout and stderr to save messages and errors in files.

Examples

  • To import four databases (whose formats can be determined from their names) and then check the resulting database for errors, one may type:
gramps -i file1.ged -i file2.gpkg -i ~/db3.gramps -i file4.wft -a check
  • To explicitly specify the formats in the above example, append filenames with appropriate -f options:
gramps -i file1.ged -f gedcom -i file2.gpkg -f gramps-pkg -i ~/db3.gramps -f gramps-xml -i file4.wft -f wft -a check
  • To record the database resulting from all imports, supply -o flag (use -f if the filename does not allow GRAMPS to guess the format):
gramps -i file1.ged -i file2.gpkg -o ~/new-package -f gramps-pkg
  • To save any error messages of the above example into files outfile and errfile, run:
gramps -i file1.ged -i file2.dpkg -o ~/new-package -f gramps-pkg >outfile 2>errfile 
  • To import three databases and start interactive GRAMPS session with the result:
gramps -i file1.ged -i file2.gpkg -i ~/db3.gramps 
  • To open a database and, based on that data, generate timeline report in PDF format putting the output into the my_timeline.pdf file:
gramps -O file.grdb -a report -p name=timeline,off=pdf,of=my_timeline.pdf 
Tango-Dialog-information.png
Timeline report options

Use the name=timeline,show=all to find out about all available options for the timeline report. To find out details of a particular option, use show=option_name , e.g. name=timeline,show=off string. To learn about available report names, use name=show string.


  • To convert a grdb on the fly to a .gramps xml file:
gramps -O myoriginal.grdb -o output.gramps -f gramps-xml
  • 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.
Paraprak [[Sq:Gramps {{{3}}} Wiki Manual| Indeks]] Tjetri