|
|
(28 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | {{DISPLAYTITLE:Using GeneWeb with command lines}} | + | {{DISPLAYTITLE:Starting GeneWeb and its components}} |
| {{languages|man}} | | {{languages|man}} |
| | | |
| {{toc right}} | | {{toc right}} |
− | 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|gwsetup]] which provides a web based interface for most of the needed actions. | + | |
| + | GeneWeb's distribution comes with standard tools for starting GeneWeb in a minimal configuration. |
| + | To start Geneweb: |
| + | * start '''gwd'''. |
| + | * start '''gwsetup'''. |
| + | * open the '''START.html''' page with your preferred browser. |
| + | |
| + | In the tree below, the scripts have extension {{c|.bat}} for Windows, and {{c|.command}} for macOS. |
| + | {{arbre début}} |
| + | * |
| + | ** {{d}} gw |
| + | ** {{f}} CHANGES.txt: [[changelog]] |
| + | ** {{s}} geneweb: (macOS only) launch script for gwsetup, gwd and START.html page in a single command. |
| + | ** {{s}} gwd: minimal launch script for gwd |
| + | ** {{s}} gwsetup: minimal launch script for gwsetup |
| + | ** {{f}} LICENSE.txt |
| + | ** {{f}} LIZEZMOI.txt |
| + | ** {{f}} README.txt |
| + | ** {{branche finale}}{{f}} START.htm : a minimal start page (assumes that gwd and gwsetup have been started) |
| + | {{arbre fin}} |
| + | |
| + | Alternatively, you may launch the execution of the various components of GeneWeb with command lines in a terminal window as described below. |
| + | |
| + | == Command lines operation == |
| + | 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. |
| | | |
| [[File:Command prompt.png|thumb|350px|right|Starting a terminal window under Windows 7.]] | | [[File:Command prompt.png|thumb|350px|right|Starting a terminal window under Windows 7.]] |
| | | |
| In order to configure and launch GeneWeb, you may use interactive commands in terminal window: | | In order to configure and launch GeneWeb, you may use interactive commands in terminal window: |
− | * a xterm virtual console under Unix/Linux or a terminal window under OS X, | + | * with a xterm virtual console under Unix/Linux or a terminal window under OS X, |
| * with cmd.exe under Windows (various ways to start cmd.exe depending on Windows version). | | * 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: | | 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: | | *under Unix or OSX: |
− | cd /home/user/geneweb/gw/ | + | cd /home/user/gw-7.00-alpha-linux/gw/ |
| *under Windows,: | | *under Windows,: |
− | cd c:\program files (x86)\geneweb\gw | + | cd c:\"program files (x86)"\gw-7.00-alpha-win\gw |
− | | |
− | == Starting a GeneWeb server (gwd) ==
| |
− | GeneWeb server '''gwd''' is a web server listening for requests on TCP port 2317 by default, in the same way a standard HTTP server, such as Apache, would do on port 80 or 8080. Gwd accepts a [[gwd|specific set of URL following a precise syntax]] describing all the commands it can perform. To facilitate things, it opens up by displaying a standard welcome page on default web browser on which a lot of text capture zones and clickable buttons provides a convenient way to build complex requests URLs loaded with parameters. Results are returned as text and if the URL request was sent from a web browser or any HTTP compatible program, the text will be treated as HTML code.
| |
− | | |
− | Usage: gwd [options] where options are:
| |
− | -hd <dir>
| |
− | Directory where the directory lang is installed.
| |
− | -dd <dir>
| |
− | Directory where the documentation is installed.
| |
− | -bd <dir>
| |
− | Directory where the databases are installed.
| |
− | -wd <dir>
| |
− | Directory for socket communication (Windows) and access count.
| |
− | -cgi
| |
− | Force [[CGI|CGI mode]].
| |
− | -images_url <url>
| |
− | URL for GeneWeb images (default: gwd send them)
| |
− | -images_dir <dir>
| |
− | Same than previous but directory name relative to current
| |
− | -a <address>
| |
− | Select a specific address (default = any address of this computer)
| |
− | -p <number>
| |
− | Select a port number (default = 2317); > 1024 for normal users.
| |
− | -setup_link
| |
− | Display a link to local gwsetup in bottom of pages.
| |
− | -allowed_tags <file>
| |
− | HTML tags which are allowed to be displayed. One tag per line in file.
| |
− | -wizard <passwd>
| |
− | Set a wizard password: access to all dates and updating.
| |
− | -friend <passwd>
| |
− | Set a friend password: access to all dates.
| |
− | -wjf
| |
− | Wizard just friend (permanently)
| |
− | -lang <lang>
| |
− | Set a default language (default: fr).
| |
− | -blang
| |
− | Select the user browser language if any.
| |
− | -only <address>
| |
− | Only inet address accepted.
| |
− | -auth <file>
| |
− | Authorization file to restrict access. The file must hold lines
| |
− | of the form "user:password".
| |
− | -no_host_address
| |
− | Force no reverse host by address
| |
− | -digest
| |
− | Use Digest authorization scheme (more secure on passwords)
| |
− | -add_lexicon <lexicon>
| |
− | Add file as lexicon.
| |
− | -log <file>
| |
− | Redirect log trace to this file.
| |
− | -robot_xcl <cnt>,<sec>
| |
− | Exclude connections when more than <cnt> requests in <sec> seconds.
| |
− | -min_disp_req
| |
− | Minimum number of requests in robot trace (default: 6)
| |
− | -login_tmout <sec>
| |
− | Login timeout for entries with passwords in CGI mode (default 1800s)
| |
− | -redirect <addr>
| |
− | Send a message to say that this service has been redirected to <addr>
| |
− | -trace_failed_passwd
| |
− | Print the failed passwords in log (except if option -digest is set)
| |
− | -nolock
| |
− | Do not lock files before writing.
| |
− | -max_clients <num>
| |
− | Max number of clients treated at the same time (default: no limit)
| |
− | (not cgi).
| |
− | -conn_tmout <sec>
| |
− | Connection timeout (default 120s; 0 means no limit)
| |
− | -daemon
| |
− | Unix daemon mode.
| |
− | -chwd <comm>
| |
− | Call command when wdoc changed
| |
− | | |
− | ==Creating a base (gwc, gwc1, gwc2)==
| |
− | The simple command '''gwc''' with no parameter, will create an empty base named {{c|a}} (in folder {{c|a.gwb}}) in which you can start entering families and persons.
| |
− | | |
− | Choosing between gwc, gwc1 ou gwc2 :
| |
− | *gwc produces bases using an earlier data format :
| |
− | *gwc1 is an alias for gwc ;
| |
− | *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 {{c|-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
| |
− | | |
− | 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:
| |
− | 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 a GW file (gwu)==
| |
− | | |
− | The command '''gwu''' will export a textual file following the [[GWformat|GW file format]] from a GeneWeb base.
| |
− | | |
− | gwu dupont > toto.gw
| |
− | | |
− | If you save a base into successive files after sets of modifications, you have the possibility of comparing the results with standards tools such as {{c|diff}}.
| |
− | | |
− | The GW file format is the ''preferred'' method for [[save|archiving]] a base, and the <u>''required''</u> method to [[recover|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 [[consang/fr|consanguinity]] in a GeneWeb base.
| |
− | Display of consanguinity level for each individual is optional and controlled by the variable {{c|1=show_consang=}} in the {{c|.gwf}} parameter file.
| |
− | | |
− | consang -i dupont
| |
| | | |
− | usage: ./consang -i [options] <file_name>
| + | {{c|./program -help}} will return the help documentation with a list of possible parameters. |
− | -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.
| + | ===Main components=== |
| | | |
− | The program executes in seconds or minutes depending on the size of your base, and displays a progress bar. | + | The following programs perform the following tasks: |
| | | |
− | During computation, querying the base is allowed.
| + | * '''[[Gwd|gwd]]''': act as a HTTP server processing requests end returning results. |
− | 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.
| + | * '''[[Gwc|gwc]]''': read a [[GWformat]] file to create a GeneWeb base. |
| + | * '''[[GED|ged2gwb]]''': read a GED file to create a GeneWeb base |
| + | * '''[[Gwu|gwu]]''': outputs the content of a base in the [[GWformat|GeneWeb format]] |
| + | * '''[[GED|gwb2ged]]''': outputs the content of a base in the GED format. |
| | | |
− | ==Indexing linked pages (update_nldb)== | + | ===Utilities=== |
− | The command '''update_nldb''' creates the index of the various auxiliary pages created in notes with the wiki syntax <nowiki>[[[linked_page/displayed text]]]</nowiki>. Listing of these pages is obtained with the [[links|link]] {{c|1=m=MISC_NOTES}} in URL.
| + | * '''[[Consang|consang]]''': computes the consanguinity in a base and performs a base clean-up. |
| + | * '''update_nldb''': create the index of the various auxiliary pages created in notes with the wiki syntax <nowiki>[[[linked_page/displayed text]]]</nowiki> (see [[wikitext#Internal_links|wikitext]]). A listing of these pages is obtained with the {{c|1=m=MISC_NOTES}} command. Usage: {{c|./update_nldb <base_name>}}. |
| | | |
− | usage: ./update_nldb [options] <file_name>
| + | {{manual}} |
| | | |
− | Return to the [[Manual|main page]] of the manual.
| + | [[Category:Manual]] |