Difference between revisions of "man"

From GeneWeb
Jump to: navigation, search
(man (en) pass 1)
 
(pass 2)
Line 47: Line 47:
 
   -v  verbose
 
   -v  verbose
  
la base définie avec l’option -o doit se trouver dans la même partition que le répertoire courant (pwd).
+
The base as defined by the {{c|-o}} option must be in the same partition or device as the current folder, otherwise, gwc will terminate with the following error message:  
Si ce n’est pas le cas, la compilation se termine avec l’erreur :
+
Uncaught exception: Sys_error("Invalid cross-device link")
Uncaught exception: Sys_error("Invalid cross-device link")
+
 
+
==Importez un fichier gedcom (ged2gwb)==
+
La commande '''ged2gwb''' vous permet de convertir un fichier GEDCOM en base de données GeneWeb.
+
 
+
Le plus simple est d’abord de copier votre fichier GEDCOM dans le répertoire où vous avez installé GeneWeb.
+
  
Si votre fichier GEDCOM s’appelle, par exemple, « toto.ged » et que vous voulez créer une base de nom « dupont », tapez :
+
==Importing a gedcom file (ged2gwb)==
 +
The command '''ged2gwb''' converts a GEDCOM file into a GeneWeb base.
  
 
  ged2gwb toto.ged -o dupont
 
  ged2gwb toto.ged -o dupont
  
<pre>
+
Usage: ged2gwb [<ged>] [options] where options are:
Usage: ged2gwb [<ged>] [options] where options are:
+
 
   -o <file>
 
   -o <file>
 
       Output database (default: "a").
 
       Output database (default: "a").
Line 121: Line 115:
 
       Force given charset decoding, overriding the possible setting in
 
       Force given charset decoding, overriding the possible setting in
 
       GEDCOM
 
       GEDCOM
</pre>
+
 
la base définie avec l’option -o doit se trouver dans la même partition que le répertoire courant (pwd).
+
lThe base as defined by the {{c|-o}} option must be in the same partition or device as the current folder, otherwise, gwc will terminate with the following error message:  
Si ce n’est pas le cas, la compilation se termine avec l’erreur :
+
 
  Uncaught exception: Sys_error("Invalid cross-device link")
 
  Uncaught exception: Sys_error("Invalid cross-device link")
  
==Export un GEDCOM (gwb2ged)==
+
==Exporting a GEDCOM file (gwb2ged)==
Le programme '''gwb2ged''' permet de reconstituer un fichier GEDCOM à partir d’une base GeneWeb.
+
The command '''gwb2ged''' will export GEDCOM file from a GeneWeb base.
  
<pre>
+
Usage: ./gwb2ged <base> [options]
Usage: ./gwb2ged <base> [options]
+
If both options -a and -d are used, intersection is assumed.
If both options -a and -d are used, intersection is assumed.
+
If several options -s are used, union is assumed.
If several options -s are used, union is assumed.
+
Options are:
Options are:
+
 
   -charset [ASCII|ANSEL|UTF-8]: set charset; default is UTF-8.
 
   -charset [ASCII|ANSEL|UTF-8]: set charset; default is UTF-8.
 
   -o <ged>: output file name (default: a.ged)
 
   -o <ged>: output file name (default: a.ged)
Line 146: Line 138:
 
     When a person is born less than <num> years ago, it is not exported unless
 
     When a person is born less than <num> years ago, it is not exported unless
 
     it is Public. All the spouses and descendants are also censored.
 
     it is Public. All the spouses and descendants are also censored.
</pre>
 
  
==Exporter un fichier GW (gwu)==
+
==Exporting GW file (gwu)==
La commande '''gwu''' permet d’afficher le contenu de la base sous forme de texte.
+
  
En redirigeant cet affichage vers un fichier, cela peut constituer une sauvegarde de votre base.
+
The command '''gwu''' will export from a GeneWeb base a textual file following the [[GWformat|GW file format]].
 
+
Si votre base s’appelle « dupont », et que vous pouvez la sauvegarder dans le fichier « toto.gw », tapez :
+
  
 
  gwu dupont > toto.gw
 
  gwu dupont > toto.gw
  
En sauvegardant dans des fichiers différents, après avoir fait des modifications, vous pourrez ainsi comparer différentes versions de votre base, et voir les modifications faites, en utilisant une commande de comparaisons de fichiers. Ceci est particulièrement intéressant si quelqu’un d’autre a fait des modifications dans votre base.
+
If you save a base into different files after modifications, you haev the possibility of comparing the results with standards tools such as {{c|diff}}.
  
C’est enfin une méthode pour reconstituer votre base quand vous prenez une nouvelle version de GeneWeb, dans le cas où la représention interne des bases a changé.
+
The GW file format is the preferred method for archiving a base, and the required method to transfer a base from one version of GeneWeb to another.
 
+
Pour reconstituer votre base, vous devez utiliser la commande gwc. Le fichier sauvegardé doit avoir obligatoirement l’extension ".gw". Pour fabriquer une base de nom « durand » à partir du fichier « toto.gw » ci dessus, tapez :
+
  
 
  gwc toto.gw -o durand
 
  gwc toto.gw -o durand
<pre>
+
 
Usage: ./gwu [options] <base_file>
+
Usage: ./gwu [options] <base_file>
If both options -a and -d are used, intersection is assumed.
+
If both options -a and -d are used, intersection is assumed.
If several options -s are used, union is assumed.
+
If several options -s are used, union is assumed.
Options are:
+
Options are:
 
   -o <file>    output file name (else stdout)
 
   -o <file>    output file name (else stdout)
 
   -odir <dir>  create files from original name in directory (else on -o file)
 
   -odir <dir>  create files from original name in directory (else on -o file)
Line 201: Line 187:
 
     displays them to standard output) if the size of these groups is less
 
     displays them to standard output) if the size of these groups is less
 
     than 21. The present option changes this limit.
 
     than 21. The present option changes this limit.
</pre>
 
  
==Calculer les taux de consanguinité (consang)==
+
==Computing consanguinity (consang)==
La commande '''consang''' calcule les [[consang/fr|consanguinités]] dans une base de données. L’affichage des consanguinités se fait à la consultation de la base, dans les fiches personnelles, et au moment des calculs de parenté.
+
  
Mais pour y avoir accès, il faut précalculer les consanguinités individuelles des personnes de la base. C’est ce que permet consang. Si votre base s’appelle toujours dupont, tapez :
+
The command '''consang''' will compute [[consang/fr|consanguinity]] in a GeneWeb base.  
 +
Display of consanguinity level for each individual is optional and controlled by the variable {{c|show_consang=}} in the {{c|.gwf}} parameter file.
  
 
  consang -i dupont
 
  consang -i dupont
  
Le programme va calculer quelques secondes ou minutes, suivant la taille de votre base, en affichant sans arrêt le nombre de personnes restant à traiter. À la fin, vous reprendrez la main dans la fenêtre interactive et les consanguinités individuelles seront enregistrées.
+
usage: ./consang -i [options] <file_name>
 
+
Pendant ce calcul, si vous n’avez pas arrêté le démon, vous pouvez parfaitement retourner dans votre navigateur et consulter votre base.
+
 
+
Lancez consang de temps en temps, si vous avez fait des modifications dans votre base, surtout si ce sont des ajouts, modifications, suppressions de familles : la consanguinité dépend de la structure des familles. Si celle-ci change, les consanguinités individuelles ne sont plus valables et il faut les recalculer.
+
 
+
En outre consang fait un nettoyage interne de votre base, nécessaire après un certain nombre de mises à jour.
+
 
+
NB : L’option « -i » est obligatoire, dans le cas contraire vos index ne sont pas recalculés et votre base ne fonctionnera pas correctement.
+
 
+
<pre>
+
usage: ./consang [options] <file_name>
+
 
   -q : quiet mode
 
   -q : quiet mode
 
   -i : build the indexes again
 
   -i : build the indexes again
Line 227: Line 201:
 
   -mem : Save memory, but slower when rewritting database
 
   -mem : Save memory, but slower when rewritting database
 
   -nolock : do not lock database.
 
   -nolock : do not lock database.
</pre>
 
  
==Indexation des notes diverses (update_nldb)==
+
NB : Option « -i » is mandatory, otherwise indexes will not be recomputed and the base will not perform adequately.
La commande '''update_nldb''' sert à créer l’index des notes diverses, auquel on accède par la requête m=MISC_NOTES.
+
 
 +
The program executes in seconds or minutes depending on the size of your base, and displays a progress bar.
 +
 
 +
During computation, querying the base is allowed.
 +
If you perform a large number of updates on your base, it is recommended that you perform a consanguinity computation from time to time, which has the added benefit of cleaning the base from unused space resulting from suppressions.
 +
 
 +
==Indexing linked pages (update_nldb)==
 +
The command '''update_nldb''' creates the index of the various auxiliary pages created in notes with the wiki syntax <nowiki>[[[linked_page/displayed text]]]. Listing of these pages is obtained with the gwd command  m=MISC_NOTES (see [[gwd| gwd commands]]).
  
 
  usage: ./update_nldb [options] <file_name>
 
  usage: ./update_nldb [options] <file_name>
  
Retour à la [[Manual/fr|page principale]] du manuel.
+
Return to the [[Manual|main page]] of the manual.

Revision as of 21:41, 20 October 2015

150px-Geographylogo svg.png Language: English • français

Using GeneWeb with command lines assumes that you are familiar with the notions of files, folders and that you are not afraid of entering commands directly in a terminal window. If this was not the case, you should limit yourself to the use of gwsetup which provides a web based interface for most of the needed actions.

Starting a terminal window under Windows 7.

In order to configure and launch GeneWeb, you may use interactive commands in terminal window:

  • a xterm virtual console under Unix/Linux,
  • with cmd.exe under Windows (various ways to start cmd.exe depending on Windows version).

In this window, type the command to position yourself in the folder where GeneWeb is installed (see GeneWeb installation) which could be:

  • under Unix or OSX:
cd /home/user/geneweb/gw/
  • under Windows,:
cd c:\program files (x86)\geneweb\gw

Creating a base (gwc, gwc1, gwc2)

The command gwc, with no parameter, will create an empty base names a in which you can start entering families and persons.

Choosing between gwc, gwc1 ou gwc2 :

  • gwc1 is an alias for gwc ;
  • gwc produces bases using an earlier data format :
  • gwc2 (existing since GeneWeb 5) creates a base using a newer format with separate files for each table, optimized for larger bases.
Usage: gwc|gwc1|gwc2 [options] [files]
where [files] are a list of files:
  source files end with .gw
  object files end with .gwo
and [options] are:
  -c Only compiling
  -o <file> Output database (default: a.gwb)
  -f  Remove database if already existing
  -stats Print statistics
  -nc No consistency check
  -cg Compute consanguinity
  -sep  Separate all persons in next file
  -sh <int> Shift all persons numbers in next files
  -ds <str> Set the source field for persons and families without source data
  -part <file> Particles file (default = predefined particles)
  -mem  Save memory, but slower
  -nolock  do not lock database.
  -nofail  no failure in case of error.
  -q  no verbose
  -v  verbose

The base as defined by the -o option must be in the same partition or device as the current folder, otherwise, gwc will terminate with the following error message:

Uncaught exception: Sys_error("Invalid cross-device link")

Importing a gedcom file (ged2gwb)

The command ged2gwb converts a GEDCOM file into a GeneWeb base.

ged2gwb toto.ged -o dupont
Usage: ged2gwb [<ged>] [options] where options are:
 -o <file>
      Output database (default: "a").
 -f 
      Remove database if already existing
 -log <file>
      Redirect log trace to this file.
 -lf    - Lowercase first names -
      Convert first names to lowercase letters, with initials in
      uppercase.
 -ls    - Lowercase surnames -
      Convert surnames to lowercase letters, with initials in
      uppercase. Try to keep lowercase particles.
 -us    - Uppercase surnames -
      Convert surnames to uppercase letters.
 -fne be - First names enclosed -
      When creating a person, if the GEDCOM first name part holds
      a part between 'b' (any character) and 'e' (any character), it
      is considered to be the usual first name: e.g. -fne '""' or
      -fne "()".
 -efn   - Extract first names -
      When creating a person, if the GEDCOM first name part holds several
      names, the first of this names becomes the person "first name" and
      the complete GEDCOM first name part a "first name alias".
 -no_efn   - Dont extract first names - [default]
      Cancels the previous option.
 -epn   - Extract public names - [default]
      When creating a person, if the GEDCOM first name part looks like a
      public name, i.e. holds:
      * a number or a roman number, supposed to be a number of a
        nobility title,
      * one of the words: "der", "den", "die", "el", "le", "la",
        "the", supposed to be the beginning of a qualifier,
      then the GEDCOM first name part becomes the person "public name" 
      and its first word his "first name".
 -no_epn 
      Cancels the previous option.
 -no_pit  - No public if titles -
      Do not consider persons having titles as public
 -tnd   - Try negative dates -
      Set negative dates when inconsistency (e.g. birth after death)
 -no_nd  - No negative dates -
      Don't interpret a year preceded by a minus sign as a negative year
 -udi x-y   - Undefined death interval -
      Set the interval for persons whose death part is undefined:
      - if before x years, they are considered as alive
      - if after y year, they are considered as death
      - between x and y year, they are considered as "don't know" 
      Default x is 80 and y is 120
 -uin  - Untreated in notes -
      Put untreated GEDCOM tags in notes
 -ds  - Default source -
      Set the source field for persons and families without source data
 -dates_dm 
      Interpret months-numbered dates as day/month/year
 -dates_md 
      Interpret months-numbered dates as month/day/year
 -charset [ANSEL|ASCII|MSDOS] - charset decoding -
      Force given charset decoding, overriding the possible setting in
      GEDCOM

lThe base as defined by the -o option must be in the same partition or device as the current folder, otherwise, gwc will terminate with the following error message:

Uncaught exception: Sys_error("Invalid cross-device link")

Exporting a GEDCOM file (gwb2ged)

The command gwb2ged will export GEDCOM file from a GeneWeb base.

Usage: ./gwb2ged <base> [options]
If both options -a and -d are used, intersection is assumed.
If several options -s are used, union is assumed.
Options are:
 -charset [ASCII|ANSEL|UTF-8]: set charset; default is UTF-8.
 -o <ged>: output file name (default: a.ged)
 -mem : save memory space, but slower
 -a "<1st_name>" [num] "<surname>": select ancestors of
 -d "<1st_name>" [num] "<surname>": select descendants of
 -aws "<1st_name>" [num] "<surname>" : select ancestors with siblings
 -s "<surname>" : select this surname (option usable several times)
 -nsp : no spouses' parents (for options -s and -d)
 -nn : no (database) notes
 -c <num> :
    When a person is born less than <num> years ago, it is not exported unless
    it is Public. All the spouses and descendants are also censored.

Exporting GW file (gwu)

The command gwu will export from a GeneWeb base a textual file following the GW file format.

gwu dupont > toto.gw

If you save a base into different files after modifications, you haev the possibility of comparing the results with standards tools such as diff.

The GW file format is the preferred method for archiving a base, and the required method to transfer a base from one version of GeneWeb to another.

gwc toto.gw -o durand
Usage: ./gwu [options] <base_file>
If both options -a and -d are used, intersection is assumed.
If several options -s are used, union is assumed.
Options are:
 -o <file>    output file name (else stdout)
 -odir <dir>  create files from original name in directory (else on -o file)
 -mem         save memory space, but slower
 -a "<1st_name>" [num] "<surname>" : select ancestors of...
 -d "<1st_name>" [num] "<surname>" : select descendants of...
 -ad "<1st_name>" [num] "<surname>" : select ancestors of...
   and all their descendants (has no effect if -a and/or -d used,
   option -nsp is forced).
 -aws "<1st_name>" [num] "<surname>" : select ancestors with siblings
 -s "<surname>" : select this surname (option usable several times)
 -maxlev "<level>" : maximum level of generations of descendants
 -nsp : no spouses' parents (for options -s and -d)
 -nn : no (database) notes
 -nopicture : Don't extract individual picture.
 -c <num> :
    When a person is born less than <num> years ago, it is not exported unless
    it is Public. All the spouses and descendants are also censored.
 -old_gw : Do not export additional fields (for backward compatibility: < 7.00)
 -raw raw output (without possible utf-8 conversion)
 -v verbose
 -sep "1st_name.num surname" :
    To use together with the option "-odir": separate this person and
    all his ancestors and descendants sharing the same surname. All the
    concerned families are displayed on standard output instead of their
    associated files. This option can be used several times.
 -sep_only_file <file> :
    With option "-sep", tells to separate only groups of that file.
 -sep_limit <num> :
    When using the option "-sep", groups of families can become isolated
    in the files. Gwu reconnects them to the separated families (i.e.
    displays them to standard output) if the size of these groups is less
    than 21. The present option changes this limit.

Computing consanguinity (consang)

The command consang will compute consanguinity in a GeneWeb base. Display of consanguinity level for each individual is optional and controlled by the variable {{{1}}} in the .gwf parameter file.

consang -i dupont
usage: ./consang -i [options] <file_name>
 -q : quiet mode
 -i : build the indexes again
 -scratch : from scratch
 -mem : Save memory, but slower when rewritting database
 -nolock : do not lock database.

NB : Option « -i » is mandatory, otherwise indexes will not be recomputed and the base will not perform adequately.

The program executes in seconds or minutes depending on the size of your base, and displays a progress bar.

During computation, querying the base is allowed. If you perform a large number of updates on your base, it is recommended that you perform a consanguinity computation from time to time, which has the added benefit of cleaning the base from unused space resulting from suppressions.

Indexing linked pages (update_nldb)

The command update_nldb creates the index of the various auxiliary pages created in notes with the wiki syntax [[[linked_page/displayed text]]]. Listing of these pages is obtained with the gwd command m=MISC_NOTES (see [[gwd| gwd commands]]). usage: ./update_nldb [options] <file_name> Return to the [[Manual|main page]] of the manual.