Compare commits
296 Commits
Author | SHA1 | Date | |
---|---|---|---|
9f0f9be8ea | |||
870f5334ec | |||
cdbcbd1446 | |||
17ac22d959 | |||
7e1eb33466 | |||
2c266cada1 | |||
92f65f5628 | |||
959162e862 | |||
61347c3093 | |||
dd818829bd | |||
a4c17b6573 | |||
4aa97e3ee9 | |||
e127df70c5 | |||
2e28011a25 | |||
5bb0d47b2c | |||
72aae8ea69 | |||
3c55f8c668 | |||
e5586c67da | |||
8015627b30 | |||
5732e96e8b | |||
6971d583ac | |||
1541ad9543 | |||
18fb7ac41a | |||
88314f3ccd | |||
e39cb42091 | |||
0837003bc9 | |||
d982726200 | |||
395a4f6110 | |||
841f5c261b | |||
47b9144ed1 | |||
940fb10ecc | |||
ba541e6c03 | |||
2bf775fad3 | |||
e8f7341fb5 | |||
70ad7761e6 | |||
647cc6b50d | |||
ccd8490f33 | |||
f488b4c33e | |||
902fa3da89 | |||
0f8e1c52e0 | |||
196d52c6e5 | |||
365f8e7c2e | |||
a39ea168ab | |||
df8ec14bcf | |||
8149b4fe72 | |||
1577a6d8af | |||
aea3259e63 | |||
fe1f262312 | |||
b5f614df8e | |||
386205877b | |||
75fe63893f | |||
f060bf400d | |||
2b1df84121 | |||
63d6fe766f | |||
98b54ebd8b | |||
eb71691372 | |||
d395c4c515 | |||
918be87230 | |||
cd01cb92ef | |||
13eeb38282 | |||
38b090de64 | |||
8f43a5ae44 | |||
dfde3b7931 | |||
3f76c8742a | |||
3321252b97 | |||
3947c86636 | |||
19ac1c6f98 | |||
516cea49df | |||
c25d544828 | |||
556da18dde | |||
c9b5c60634 | |||
48f0826235 | |||
727932794e | |||
74f0259505 | |||
49c89c1022 | |||
98ebecf03c | |||
42462e4bf2 | |||
de6841b6cd | |||
ef02b35311 | |||
17bb3fa639 | |||
f8009903c7 | |||
1d4bb780a2 | |||
736de69fb9 | |||
8b64a00c51 | |||
3e2456b59a | |||
2ad8bb0df2 | |||
0908abf1a2 | |||
9dc5890ca7 | |||
8c25a7e9ce | |||
9f04c31db8 | |||
6df93d7182 | |||
2741628972 | |||
63f022348b | |||
75ca7e1f8c | |||
3c488f4a6d | |||
d06c31dcc3 | |||
35933c6645 | |||
56f1f7f22a | |||
92e5b89b8a | |||
95c805f325 | |||
1cba16a406 | |||
dcf62ff1d9 | |||
67f33a0c69 | |||
132c3c60ac | |||
05b4916e68 | |||
98a1397c35 | |||
02a9501fb9 | |||
e49af1998c | |||
790753e99c | |||
ceea27df84 | |||
acc627b06b | |||
97799c1303 | |||
c4f4bb2128 | |||
648334623e | |||
96438738b9 | |||
a584c5dfed | |||
dcd006b8e6 | |||
5ce28808c6 | |||
71aa77a26c | |||
0f652ce5ef | |||
828408d244 | |||
b26ce84857 | |||
1076baad72 | |||
14d051aaf1 | |||
0b0a37e2d5 | |||
659f868583 | |||
b161383e94 | |||
18539be359 | |||
745bf7d96f | |||
3f32fbcab0 | |||
2a6e1a2f1e | |||
0ddc83fb52 | |||
d88b3dd0d0 | |||
15cf8de5e5 | |||
7bd8ff1f5d | |||
a45839799d | |||
c31b633134 | |||
793e937963 | |||
ad3ccbdfa9 | |||
f088797e9f | |||
4b7c9361e0 | |||
7eb5e86acb | |||
8655414c18 | |||
2f48b52031 | |||
0592f41f2b | |||
c8bcf58315 | |||
78db437ce7 | |||
c771b25cb5 | |||
124eed0ac7 | |||
c8bae282e0 | |||
e6766f5ba1 | |||
824b11fd48 | |||
3a7b78e74f | |||
8cc04c5598 | |||
ad40ffe102 | |||
314bbe6ca0 | |||
21fd8f2cfb | |||
8c3e4701d9 | |||
d9eab10013 | |||
dacf5f4d3b | |||
a474703187 | |||
d1c0be81f8 | |||
1dc39d8c1c | |||
649c105536 | |||
0880f52c44 | |||
1a1420b61d | |||
ca929cfb2f | |||
0e3c01d6aa | |||
207ed2434c | |||
0afdb2e361 | |||
4bfb2e082c | |||
3bec0ee5aa | |||
92ef108c94 | |||
322185b339 | |||
26c3aa31d7 | |||
196ad8feb7 | |||
68ed5a2838 | |||
405db681a6 | |||
fc0749b359 | |||
d78136bf7c | |||
1524c0b7e5 | |||
09d16526e9 | |||
f92f5d08bf | |||
949c41107a | |||
0bba5fcfdb | |||
4d2ae8df74 | |||
9ba12c2e33 | |||
a3a9542f0f | |||
fd53fccf5e | |||
b09ab860b7 | |||
02ca10097a | |||
31e5815ea4 | |||
524348a3d5 | |||
736b13c04f | |||
ebf8dfa311 | |||
8f7723308f | |||
342e6053df | |||
12fd97eaab | |||
8e34bc809b | |||
f2c6833cfc | |||
6a5d9aab86 | |||
e4efaaa7b7 | |||
ee076d2c91 | |||
82ea4e8685 | |||
6473f22f17 | |||
e1cd73c4fb | |||
27cc9e4e6e | |||
aab10936c0 | |||
bbc73d6442 | |||
b54199d7d0 | |||
894701e2f2 | |||
fe98bbd6ff | |||
5a6aa0d259 | |||
76d17ca38d | |||
a145b8b8f2 | |||
ceffc5750f | |||
b2d09de02f | |||
a2f01e1a7d | |||
c075bea146 | |||
b4c1863683 | |||
df82eb9629 | |||
0fd947e202 | |||
d07666ae91 | |||
c8c0164038 | |||
adb63c0c5e | |||
15538da4a1 | |||
cabbcead8f | |||
66d3dde97a | |||
297e9906a9 | |||
561886f41e | |||
471b6beace | |||
dcd8757a77 | |||
056d82895e | |||
a9cad8c0d2 | |||
d5eb5ec8f1 | |||
0f8ff56fbe | |||
b7c5c77676 | |||
183e985747 | |||
d6ff126d5a | |||
62ca742313 | |||
fa21fde40c | |||
e15963f9f6 | |||
ca7ca5bc8d | |||
9fa2057154 | |||
32b559c623 | |||
b5b6a59f4f | |||
8da09bd9f3 | |||
e880bd9e10 | |||
88092e89eb | |||
d71131840f | |||
ff667d774f | |||
7922f1ad61 | |||
7d9f42dc90 | |||
127567278e | |||
7301dccc55 | |||
1f90437ca3 | |||
4e0cad08b2 | |||
0f86ee2044 | |||
3eb71e18a7 | |||
8eed4a3d0d | |||
6e895bacf4 | |||
b5c3cf70ea | |||
66b9e798ed | |||
6a45bc4a40 | |||
a8307d21aa | |||
666f6d5b1a | |||
9f37049777 | |||
ad79a3f1bb | |||
a3b7807233 | |||
bdc77e74ab | |||
4e00345ff6 | |||
485798010d | |||
99e0bd6c42 | |||
214132889a | |||
ca5d0f39a5 | |||
d79cf3a9dc | |||
cb2621e73c | |||
94e161cff1 | |||
5578efc16c | |||
7b67220a4f | |||
f64e256bcb | |||
8232f4ee4d | |||
f892473c24 | |||
3231d71fd1 | |||
cab8525520 | |||
10be3da71f | |||
66b6683a4a | |||
a23408c7a5 | |||
fdc766db72 | |||
58fdfa622b | |||
e3f6ed1f17 | |||
c3b82c944e | |||
0d70aae90e | |||
f6a473ed51 | |||
71abad6b6a | |||
eb1c153280 |
@ -1,11 +0,0 @@
|
||||
import os
|
||||
|
||||
from distutils2.util import find_packages
|
||||
|
||||
exclude_list = ('src.gui.glade', 'src.guiQML', 'src.guiQML.views', 'src.images', 'src.plugins',
|
||||
'src.webapp', 'src.webapp.grampsdb', 'src.webapp.grampsdb.templatetags', 'src.webapp.grampsdb.view', )
|
||||
|
||||
packages = sorted(find_packages(exclude=exclude_list))
|
||||
|
||||
for package in packages:
|
||||
print(" '%s'," % package)
|
3
.gitignore
vendored
@ -10,3 +10,6 @@ dist/
|
||||
data/tips.xml
|
||||
gramps/plugins/lib/holidays.xml
|
||||
po/.intltool-merge-cache
|
||||
|
||||
# Editor
|
||||
tags
|
||||
|
2
COPYING
@ -2,7 +2,7 @@
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
2
LICENSE
@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
32
NEWS
@ -1,3 +1,35 @@
|
||||
2013-11-08
|
||||
Version 4.0.2, "Welcome to our humble abode", a maintenance release.
|
||||
* Citation merge works better for all objects with citations
|
||||
* Fixed citations attached to family events
|
||||
* Fixed several crashes, hangs, and data corruption scenarios
|
||||
* Fixed bugs in determining whether a person is alive, potentially resolving private data leak via export or report
|
||||
* Fixed bugs on proxies
|
||||
* VCF export/import now support gender information
|
||||
* Several bugs with filtering fixed, most filters now support regular expressions
|
||||
* Fixed bug in Hebrew calendar date calculations
|
||||
* Fix some regressions on GEDCOM file format export and enhancement on CONT/CONC handling
|
||||
* Multiple fixes and improvements on gramplets
|
||||
* Multiple fixes in the narrated website and web calendar reports
|
||||
* Enhancements on date and calendar
|
||||
* Some fixes and improvements of the webapp
|
||||
* Fix on Database Differences module
|
||||
* Enhancements of the citation tree view (Sources category)
|
||||
* Improvements on User classes
|
||||
* Polish and consistency on Gramps XML export
|
||||
* Bump XML schema to 1.5.1
|
||||
* Fixed several long-standing problems with report generation
|
||||
* Better support of RTL locales (Arabic, Hebrew, etc.) in GUI
|
||||
* Better support for selected lang on some reports
|
||||
* Better way for displaying missing dependencies
|
||||
* Better Spell support
|
||||
* Platform-specific fixes for Mac and Windows
|
||||
* Add printing functionality for all geography views
|
||||
* New date handlers for Arabic and Greek
|
||||
* Translation updates (ar, cs, de, fr, lt, nb, nl, ru, sv) and translation-related fixes
|
||||
* Repaired and enhanced tests broken since 3.3.x, resulting in overall reliability improvements
|
||||
* Add a support for AppData
|
||||
|
||||
2013-06-24
|
||||
Version 4.0.1, the "What is washing when we are on the verge of a great scientific breakthrough?", a maintenance release.
|
||||
* Gtk3: fix menu on person editor and Geography views, convert deprecated code for the indicator in entryfield
|
||||
|
19
data/gramps.appdata.xml.in
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<application>
|
||||
<id type="desktop">gramps.desktop</id>
|
||||
<licence>CC0</licence>
|
||||
<description>
|
||||
<_p>Gramps is a genealogy program that is both intuitive for hobbyists and feature-complete for professional genealogists.
|
||||
It gives you the ability to record the many details of the life of an individual as well as the complex relationships between various people, places and events.
|
||||
All of your research is kept organized, searchable and as precise as you need it to be.
|
||||
</_p>
|
||||
</description>
|
||||
<url type="homepage">http://gramps-project.org/</url>
|
||||
<screenshots>
|
||||
<screenshot width="1226" height="740">http://www.gramps-project.org/wiki/images/5/5f/AppData1.png</screenshot>
|
||||
<screenshot width="1226" height="740">http://www.gramps-project.org/wiki/images/6/68/AppData2.png</screenshot>
|
||||
<screenshot type="default" width="1226" height="740">http://www.gramps-project.org/wiki/images/e/e9/AppData3.png</screenshot>
|
||||
<screenshot width="1226" height="740">http://www.gramps-project.org/wiki/images/6/68/AppData4.png</screenshot>
|
||||
<screenshot width="1226" height="740">http://www.gramps-project.org/wiki/images/5/50/AppData5.png</screenshot>
|
||||
</screenshots>
|
||||
</application>
|
@ -25,15 +25,15 @@
|
||||
-->
|
||||
|
||||
<!--
|
||||
This is the Document Type Definition file for v1.5.0
|
||||
This is the Document Type Definition file for v1.5.1
|
||||
of the GRAMPS XML genealogy data format.
|
||||
Please use the following formal public identifier to identify it:
|
||||
|
||||
"-//GRAMPS//DTD GRAMPS XML V1.5.0//EN"
|
||||
"-//GRAMPS//DTD GRAMPS XML V1.5.1//EN"
|
||||
|
||||
For example:
|
||||
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.5.0//EN"
|
||||
"http://gramps-project.org/xml/1.5.0/grampsxml.dtd"
|
||||
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.5.1//EN"
|
||||
"http://gramps-project.org/xml/1.5.1/grampsxml.dtd"
|
||||
[...]>
|
||||
-->
|
||||
|
||||
@ -62,7 +62,7 @@ DATABASE
|
||||
<!ELEMENT database (header, name-formats?, tags?, events?, people?, families?,
|
||||
citations?, sources?, places?, objects?, repositories?,
|
||||
notes?, bookmarks?, namemaps?)>
|
||||
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.5.0/">
|
||||
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.5.1/">
|
||||
|
||||
|
||||
<!-- ************************************************************
|
||||
@ -367,7 +367,7 @@ CITATIONS
|
||||
|
||||
<!ELEMENT citations (citation)*>
|
||||
|
||||
<!ELEMENT citation ((daterange|datespan|dateval|datestr)?, page?, confidence?,
|
||||
<!ELEMENT citation ((daterange|datespan|dateval|datestr)?, page?, confidence,
|
||||
noteref*, objref*, data_item*, sourceref)>
|
||||
<!ATTLIST citation
|
||||
id CDATA #IMPLIED
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
<grammar
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
|
||||
ns="http://gramps-project.org/xml/1.5.0/"
|
||||
ns="http://gramps-project.org/xml/1.5.1/"
|
||||
xmlns="http://relaxng.org/ns/structure/1.0">
|
||||
|
||||
<start><element name="database">
|
||||
@ -434,7 +434,7 @@
|
||||
<ref name="primary-object"/>
|
||||
<optional><ref name="date-content"/></optional>
|
||||
<optional><element name="page"><text/></element></optional>
|
||||
<optional><element name="confidence"><text/></element></optional>
|
||||
<element name="confidence"><text/></element>
|
||||
<zeroOrMore><element name="noteref">
|
||||
<ref name="noteref-content"/>
|
||||
</element></zeroOrMore>
|
||||
|
BIN
data/images/Web_Gender_Female.png
Normal file
After Width: | Height: | Size: 457 B |
BIN
data/images/Web_Gender_Male.png
Normal file
After Width: | Height: | Size: 454 B |
BIN
data/images/Web_Mainz_Bkgd.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/Web_Mainz_Header.png
Normal file
After Width: | Height: | Size: 338 KiB |
BIN
data/images/Web_Mainz_Mid.png
Normal file
After Width: | Height: | Size: 111 KiB |
BIN
data/images/Web_Mainz_MidLight.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
data/images/blank.gif
Normal file
After Width: | Height: | Size: 43 B |
BIN
data/images/crosshairs.png
Normal file
After Width: | Height: | Size: 193 B |
BIN
data/images/favicon.ico
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
data/images/favicon2.ico
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
data/images/gramps-geo-altmap.png
Normal file
After Width: | Height: | Size: 654 B |
BIN
data/images/gramps-geo-birth.png
Normal file
After Width: | Height: | Size: 969 B |
BIN
data/images/gramps-geo-death.png
Normal file
After Width: | Height: | Size: 957 B |
BIN
data/images/gramps-geo-mainmap.png
Normal file
After Width: | Height: | Size: 678 B |
BIN
data/images/gramps-geo-marriage.png
Normal file
After Width: | Height: | Size: 951 B |
BIN
data/images/somerights20.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 620 B |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 964 B After Width: | Height: | Size: 964 B |
Before Width: | Height: | Size: 942 B After Width: | Height: | Size: 942 B |
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 90 B |
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
||||
gramps (4.0.1-2) precise; urgency=low
|
||||
|
||||
* bug 6918: make package more compliant according to Debian policy
|
||||
|
||||
-- Jérôme Rapinat <romjerome@yahoo.fr> Mon, 29 Jul 2013 18:00:11 +0200
|
||||
|
||||
gramps (3.3.0-1) lucid; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
4
debian/control
vendored
@ -1,5 +1,5 @@
|
||||
Source: gramps
|
||||
Maintainer: Gramps Development Team
|
||||
Maintainer: Gramps Development Team <gramps-devel@lists.sourceforge.net>
|
||||
Section: python
|
||||
Priority: optional
|
||||
Build-Depends-Indep: libxml-parser-perl, gettext, intltool
|
||||
@ -12,6 +12,6 @@ Architecture: all
|
||||
Depends: ${misc:Depends}, ${python:Depends}, python-gobject (>= 3.3.2), librsvg2-2
|
||||
Recommends: python-pyicu, python-osmgpsmap, graphviz, xdg-utils
|
||||
Suggests: ttf-freefont, python-gtkspell, libgexiv2-1, rcs, python-imaging, python-pygoocanvas
|
||||
Description: Gramps (Genealogical Research and Analysis Management
|
||||
Description: (Genealogical Research and Analysis Management
|
||||
Programming System) is a full featured genealogy program supporting
|
||||
a Python based plugin system.
|
||||
|
@ -7,7 +7,7 @@ Code Documentation
|
||||
The :mod:`gen` Module
|
||||
=======================
|
||||
|
||||
.. automodule:: gen
|
||||
.. automodule:: gramps.gen
|
||||
|
||||
Contents:
|
||||
|
||||
|
11
docs/conf.py
@ -18,13 +18,8 @@ import sys, os
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.append(os.path.abspath('.'))
|
||||
|
||||
#documentation in root/docs, allow import from root/src where GRAMPS modules life
|
||||
sourcedir = (os.path.abspath('.')).split(os.sep)[:-1] + ['gramps']
|
||||
sys.path.append((os.sep).join(sourcedir))
|
||||
#make it possible to add plugins --> walk the plugin dir and add to sys.path.append
|
||||
for (dirpath, dirnames, filenames) in os.walk((os.sep).join(sourcedir + ['plugins'])):
|
||||
# add the directory to the python search path
|
||||
sys.path.append(dirpath)
|
||||
#documentation in root/docs, allow import from root
|
||||
sys.path.append(os.path.abspath(os.pardir))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
@ -46,7 +41,7 @@ master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'Gramps'
|
||||
copyright = u'2012, The Gramps Project'
|
||||
copyright = u'2013, The Gramps Project'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
|
@ -2,12 +2,12 @@
|
||||
The :mod:`cli` Module
|
||||
##########################
|
||||
|
||||
.. automodule:: cli
|
||||
.. automodule:: gramps.cli
|
||||
|
||||
*****************************
|
||||
Argument Handler
|
||||
*****************************
|
||||
.. automodule:: cli.arghandler
|
||||
.. automodule:: gramps.cli.arghandler
|
||||
.. autoclass:: ArgHandler
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -16,7 +16,7 @@ Argument Handler
|
||||
*****************************
|
||||
Argument Parser
|
||||
*****************************
|
||||
.. automodule:: cli.argparser
|
||||
.. automodule:: gramps.cli.argparser
|
||||
.. autoclass:: ArgParser
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -25,7 +25,7 @@ Argument Parser
|
||||
*****************************
|
||||
CLI DB manager
|
||||
*****************************
|
||||
.. automodule:: cli.clidbman
|
||||
.. automodule:: gramps.cli.clidbman
|
||||
.. autoclass:: CLIDbManager
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -34,7 +34,7 @@ CLI DB manager
|
||||
*****************************
|
||||
Gramps CLI
|
||||
*****************************
|
||||
.. automodule:: cli.grampscli
|
||||
.. automodule:: gramps.cli.grampscli
|
||||
.. autoclass:: CLIDbLoader
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -47,7 +47,7 @@ Gramps CLI
|
||||
*****************************
|
||||
User
|
||||
*****************************
|
||||
.. automodule:: cli.user
|
||||
.. automodule:: gramps.cli.user
|
||||
.. autoclass:: User
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
@ -1,6 +1,6 @@
|
||||
##########################
|
||||
############################
|
||||
The :mod:`gramps.gui` Module
|
||||
##########################
|
||||
############################
|
||||
|
||||
.. automodule:: gramps.gui
|
||||
|
||||
@ -156,12 +156,12 @@ Filter Editor
|
||||
*****************************
|
||||
Gramps Bar
|
||||
*****************************
|
||||
.. automodule:: gramps.gui.grampsbar
|
||||
.. automodule:: gramps.gui.widgets.grampletbar
|
||||
.. autoclass:: DetachedWindow
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: GrampsBar
|
||||
.. autoclass:: GrampletBar
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
@ -4,7 +4,7 @@ The :class:`Date Handler` Classes
|
||||
|
||||
DateParser
|
||||
====================================
|
||||
.. automodule:: gen.datehandler._dateparser
|
||||
.. automodule:: gramps.gen.datehandler._dateparser
|
||||
.. autoclass:: DateParser
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -12,7 +12,7 @@ DateParser
|
||||
|
||||
DateDisplay
|
||||
====================================
|
||||
.. automodule:: gen.datehandler._datedisplay
|
||||
.. automodule:: gramps.gen.datehandler._datedisplay
|
||||
.. autoclass:: DateDisplay
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -24,14 +24,14 @@ DateDisplay
|
||||
|
||||
DateUtils
|
||||
====================================
|
||||
.. automodule:: gen.datehandler._dateutils
|
||||
.. automodule:: gramps.gen.datehandler._dateutils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
DateHandler
|
||||
====================================
|
||||
.. automodule:: gen.datehandler._datehandler
|
||||
.. automodule:: gramps.gen.datehandler._datehandler
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -42,11 +42,11 @@ Localized Date Handlers
|
||||
*****************************
|
||||
DateHandler (Bulgarian)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_bg.DateParserBG
|
||||
.. autoclass:: gramps.gen.datehandler._date_bg.DateParserBG
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_bg.DateDisplayBG
|
||||
.. autoclass:: gramps.gen.datehandler._date_bg.DateDisplayBG
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -54,11 +54,11 @@ DateHandler (Bulgarian)
|
||||
*****************************
|
||||
DateHandler (Catalan)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_ca.DateParserCA
|
||||
.. autoclass:: gramps.gen.datehandler._date_ca.DateParserCA
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_ca.DateDisplayCA
|
||||
.. autoclass:: gramps.gen.datehandler._date_ca.DateDisplayCA
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -66,11 +66,11 @@ DateHandler (Catalan)
|
||||
*****************************
|
||||
DateHandler (Czech)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_cs.DateParserCZ
|
||||
.. autoclass:: gramps.gen.datehandler._date_cs.DateParserCZ
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_cs.DateDisplayCZ
|
||||
.. autoclass:: gramps.gen.datehandler._date_cs.DateDisplayCZ
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -78,11 +78,11 @@ DateHandler (Czech)
|
||||
*****************************
|
||||
DateHandler (German)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_de.DateParserDE
|
||||
.. autoclass:: gramps.gen.datehandler._date_de.DateParserDE
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_de.DateDisplayDE
|
||||
.. autoclass:: gramps.gen.datehandler._date_de.DateDisplayDE
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -90,11 +90,11 @@ DateHandler (German)
|
||||
*****************************
|
||||
DateHandler (Spanish)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_es.DateParserES
|
||||
.. autoclass:: gramps.gen.datehandler._date_es.DateParserES
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_es.DateDisplayES
|
||||
.. autoclass:: gramps.gen.datehandler._date_es.DateDisplayES
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -102,11 +102,11 @@ DateHandler (Spanish)
|
||||
*****************************
|
||||
DateHandler (Finnish)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_fi.DateParserFI
|
||||
.. autoclass:: gramps.gen.datehandler._date_fi.DateParserFI
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_fi.DateDisplayFI
|
||||
.. autoclass:: gramps.gen.datehandler._date_fi.DateDisplayFI
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -114,11 +114,11 @@ DateHandler (Finnish)
|
||||
*****************************
|
||||
DateHandler (French)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_fr.DateParserFR
|
||||
.. autoclass:: gramps.gen.datehandler._date_fr.DateParserFR
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_fr.DateDisplayFR
|
||||
.. autoclass:: gramps.gen.datehandler._date_fr.DateDisplayFR
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -126,11 +126,11 @@ DateHandler (French)
|
||||
*****************************
|
||||
DateHandler (Croatian)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_hr.DateParserHR
|
||||
.. autoclass:: gramps.gen.datehandler._date_hr.DateParserHR
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_hr.DateDisplayHR
|
||||
.. autoclass:: gramps.gen.datehandler._date_hr.DateDisplayHR
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -138,11 +138,11 @@ DateHandler (Croatian)
|
||||
*****************************
|
||||
DateHandler (Italian)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_it.DateParserIT
|
||||
.. autoclass:: gramps.gen.datehandler._date_it.DateParserIT
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_it.DateDisplayIT
|
||||
.. autoclass:: gramps.gen.datehandler._date_it.DateDisplayIT
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -150,11 +150,11 @@ DateHandler (Italian)
|
||||
*****************************
|
||||
DateHandler (Lituanian)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_lt.DateParserLT
|
||||
.. autoclass:: gramps.gen.datehandler._date_lt.DateParserLT
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_lt.DateDisplayLT
|
||||
.. autoclass:: gramps.gen.datehandler._date_lt.DateDisplayLT
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -162,11 +162,11 @@ DateHandler (Lituanian)
|
||||
*****************************
|
||||
DateHandler (Norwegian)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_nb.DateParserNb
|
||||
.. autoclass:: gramps.gen.datehandler._date_nb.DateParserNb
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_nb.DateDisplayNb
|
||||
.. autoclass:: gramps.gen.datehandler._date_nb.DateDisplayNb
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -174,11 +174,11 @@ DateHandler (Norwegian)
|
||||
*****************************
|
||||
DateHandler (Dutch)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_nl.DateParserNL
|
||||
.. autoclass:: gramps.gen.datehandler._date_nl.DateParserNL
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_nl.DateDisplayNL
|
||||
.. autoclass:: gramps.gen.datehandler._date_nl.DateDisplayNL
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -186,11 +186,11 @@ DateHandler (Dutch)
|
||||
*****************************
|
||||
DateHandler (Polish)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_pl.DateParserPL
|
||||
.. autoclass:: gramps.gen.datehandler._date_pl.DateParserPL
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_pl.DateDisplayPL
|
||||
.. autoclass:: gramps.gen.datehandler._date_pl.DateDisplayPL
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -198,11 +198,11 @@ DateHandler (Polish)
|
||||
*****************************
|
||||
DateHandler (Portuguese)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_pt.DateParserPT
|
||||
.. autoclass:: gramps.gen.datehandler._date_pt.DateParserPT
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_pt.DateDisplayPT
|
||||
.. autoclass:: gramps.gen.datehandler._date_pt.DateDisplayPT
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -210,11 +210,11 @@ DateHandler (Portuguese)
|
||||
*****************************
|
||||
DateHandler (Russian)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_ru.DateParserRU
|
||||
.. autoclass:: gramps.gen.datehandler._date_ru.DateParserRU
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_ru.DateDisplayRU
|
||||
.. autoclass:: gramps.gen.datehandler._date_ru.DateDisplayRU
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -222,11 +222,11 @@ DateHandler (Russian)
|
||||
*****************************
|
||||
DateHandler (Slovak)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_sk.DateParserSK
|
||||
.. autoclass:: gramps.gen.datehandler._date_sk.DateParserSK
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_sk.DateDisplaySK
|
||||
.. autoclass:: gramps.gen.datehandler._date_sk.DateDisplaySK
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -234,11 +234,11 @@ DateHandler (Slovak)
|
||||
*****************************
|
||||
DateHandler (Slovenian)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_sl.DateParserSL
|
||||
.. autoclass:: gramps.gen.datehandler._date_sl.DateParserSL
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_sl.DateDisplaySL
|
||||
.. autoclass:: gramps.gen.datehandler._date_sl.DateDisplaySL
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -246,11 +246,11 @@ DateHandler (Slovenian)
|
||||
*****************************
|
||||
DateHandler (Serbian)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_sr.DateParserSR
|
||||
.. autoclass:: gramps.gen.datehandler._date_sr.DateParserSR
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_sr.DateDisplaySR_latin
|
||||
.. autoclass:: gramps.gen.datehandler._date_sr.DateDisplaySR_latin
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -258,11 +258,11 @@ DateHandler (Serbian)
|
||||
*****************************
|
||||
DateHandler (Swedish)
|
||||
*****************************
|
||||
.. autoclass:: gen.datehandler._date_sv.DateParserSv
|
||||
.. autoclass:: gramps.gen.datehandler._date_sv.DateParserSv
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. autoclass:: gen.datehandler._date_sv.DateDisplaySv
|
||||
.. autoclass:: gramps.gen.datehandler._date_sv.DateDisplaySv
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
@ -1,13 +1,13 @@
|
||||
##########################
|
||||
The :mod:`gen` Module
|
||||
##########################
|
||||
############################
|
||||
The :mod:`gramps.gen` Module
|
||||
############################
|
||||
|
||||
.. automodule:: gen
|
||||
.. automodule:: gramps.gen
|
||||
|
||||
*****************************
|
||||
Database State
|
||||
*****************************
|
||||
.. automodule:: gen.dbstate
|
||||
.. automodule:: gramps.gen.dbstate
|
||||
.. autoclass:: DbState
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -16,7 +16,7 @@ Database State
|
||||
*****************************
|
||||
Errors
|
||||
*****************************
|
||||
.. automodule:: gen.errors
|
||||
.. automodule:: gramps.gen.errors
|
||||
.. autoclass:: DatabaseError
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -35,7 +35,7 @@ TODO
|
||||
*****************************
|
||||
Recent Files
|
||||
*****************************
|
||||
.. automodule:: gen.recentfiles
|
||||
.. automodule:: gramps.gen.recentfiles
|
||||
.. autoclass:: RecentFiles
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -52,7 +52,7 @@ Recent Files
|
||||
*****************************
|
||||
Sort
|
||||
*****************************
|
||||
.. automodule:: gen.sort
|
||||
.. automodule:: gramps.gen.sort
|
||||
.. autoclass:: Sort
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -61,7 +61,7 @@ Sort
|
||||
*****************************
|
||||
Update callback
|
||||
*****************************
|
||||
.. automodule:: gen.updatecallback
|
||||
.. automodule:: gramps.gen.updatecallback
|
||||
.. autoclass:: UpdateCallback
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -70,7 +70,7 @@ Update callback
|
||||
*****************************
|
||||
User
|
||||
*****************************
|
||||
.. automodule:: gen.user
|
||||
.. automodule:: gramps.gen.user
|
||||
.. autoclass:: User
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
@ -1,78 +1,78 @@
|
||||
##########################
|
||||
The :mod:`gen.db` Module
|
||||
##########################
|
||||
###############################
|
||||
The :mod:`gramps.gen.db` Module
|
||||
###############################
|
||||
|
||||
.. automodule:: gen.db
|
||||
.. automodule:: gramps.gen.db
|
||||
|
||||
GrampsDbBase
|
||||
====================================
|
||||
.. automodule:: gen.db.base
|
||||
.. automodule:: gramps.gen.db.base
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GrampsDbRead
|
||||
====================================
|
||||
.. automodule:: gen.db.read
|
||||
.. automodule:: gramps.gen.db.read
|
||||
:members:
|
||||
:show-inheritance:
|
||||
|
||||
GrampsDbWrite
|
||||
====================================
|
||||
.. automodule:: gen.db.write
|
||||
.. automodule:: gramps.gen.db.write
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GrampsCursor
|
||||
====================================
|
||||
.. automodule:: gen.db.cursor
|
||||
.. automodule:: gramps.gen.db.cursor
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
BSDDBtxn
|
||||
====================================
|
||||
.. automodule:: gen.db.bsddbtxn
|
||||
.. automodule:: gramps.gen.db.bsddbtxn
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GrampsDbTxn
|
||||
====================================
|
||||
.. automodule:: gen.db.txn
|
||||
.. automodule:: gramps.gen.db.txn
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
GrampsDbUndo
|
||||
====================================
|
||||
.. automodule:: gen.db.undoredo
|
||||
.. automodule:: gramps.gen.db.undoredo
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
DbConst
|
||||
====================================
|
||||
.. automodule:: gen.db.dbconst
|
||||
.. automodule:: gramps.gen.db.dbconst
|
||||
:members:
|
||||
|
||||
GrampsDbException
|
||||
====================================
|
||||
.. automodule:: gen.db.exceptions
|
||||
.. automodule:: gramps.gen.db.exceptions
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Upgrade utilities
|
||||
====================================
|
||||
.. automodule:: gen.db.upgrade
|
||||
.. automodule:: gramps.gen.db.upgrade
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
Backup
|
||||
====================================
|
||||
.. automodule:: gen.db.backup
|
||||
.. automodule:: gramps.gen.db.backup
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
@ -1,12 +1,12 @@
|
||||
#############################
|
||||
The :mod:`gen.display` Module
|
||||
#############################
|
||||
####################################
|
||||
The :mod:`gramps.gen.display` Module
|
||||
####################################
|
||||
|
||||
.. automodule:: gen.display
|
||||
.. automodule:: gramps.gen.display
|
||||
|
||||
Name
|
||||
====================================
|
||||
.. automodule:: gen.display.name
|
||||
.. automodule:: gramps.gen.display.name
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
@ -1,8 +1,8 @@
|
||||
##########################
|
||||
The :mod:`gen.lib` Module
|
||||
##########################
|
||||
################################
|
||||
The :mod:`gramps.gen.lib` Module
|
||||
################################
|
||||
|
||||
.. automodule:: gen.lib
|
||||
.. automodule:: gramps.gen.lib
|
||||
|
||||
*****************************
|
||||
Base objects
|
||||
@ -10,15 +10,15 @@ Base objects
|
||||
|
||||
BaseObject
|
||||
====================================
|
||||
.. automodule:: gen.lib.baseobj
|
||||
.. autoclass:: gen.lib.baseobj.BaseObject
|
||||
.. automodule:: gramps.gen.lib.baseobj
|
||||
.. autoclass:: gramps.gen.lib.baseobj.BaseObject
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
AddressBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.addressbase
|
||||
.. automodule:: gramps.gen.lib.addressbase
|
||||
.. autoclass:: AddressBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -26,7 +26,7 @@ AddressBase
|
||||
|
||||
AttributeBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.attrbase
|
||||
.. automodule:: gramps.gen.lib.attrbase
|
||||
.. autoclass:: AttributeBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -34,7 +34,7 @@ AttributeBase
|
||||
|
||||
CitationBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.citationbase
|
||||
.. automodule:: gramps.gen.lib.citationbase
|
||||
.. autoclass:: CitationBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -42,7 +42,7 @@ CitationBase
|
||||
|
||||
DateBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.datebase
|
||||
.. automodule:: gramps.gen.lib.datebase
|
||||
.. autoclass:: DateBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -50,7 +50,7 @@ DateBase
|
||||
|
||||
LdsOrdBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.ldsordbase
|
||||
.. automodule:: gramps.gen.lib.ldsordbase
|
||||
.. autoclass:: LdsOrdBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -58,7 +58,7 @@ LdsOrdBase
|
||||
|
||||
LocationBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.locationbase
|
||||
.. automodule:: gramps.gen.lib.locationbase
|
||||
.. autoclass:: LocationBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -66,7 +66,7 @@ LocationBase
|
||||
|
||||
MediaBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.mediabase
|
||||
.. automodule:: gramps.gen.lib.mediabase
|
||||
.. autoclass:: MediaBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -74,7 +74,7 @@ MediaBase
|
||||
|
||||
NoteBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.notebase
|
||||
.. automodule:: gramps.gen.lib.notebase
|
||||
.. autoclass:: NoteBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -82,7 +82,7 @@ NoteBase
|
||||
|
||||
PlaceBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.placebase
|
||||
.. automodule:: gramps.gen.lib.placebase
|
||||
.. autoclass:: PlaceBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -90,7 +90,7 @@ PlaceBase
|
||||
|
||||
PrivacyBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.privacybase
|
||||
.. automodule:: gramps.gen.lib.privacybase
|
||||
.. autoclass:: PrivacyBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -98,7 +98,7 @@ PrivacyBase
|
||||
|
||||
RefBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.refbase
|
||||
.. automodule:: gramps.gen.lib.refbase
|
||||
.. autoclass:: RefBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -106,7 +106,7 @@ RefBase
|
||||
|
||||
SurnameBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.surnamebase
|
||||
.. automodule:: gramps.gen.lib.surnamebase
|
||||
.. autoclass:: SurnameBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -114,7 +114,7 @@ SurnameBase
|
||||
|
||||
TagBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.tagbase
|
||||
.. automodule:: gramps.gen.lib.tagbase
|
||||
.. autoclass:: TagBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -122,7 +122,7 @@ TagBase
|
||||
|
||||
UrlBase
|
||||
====================================
|
||||
.. automodule:: gen.lib.urlbase
|
||||
.. automodule:: gramps.gen.lib.urlbase
|
||||
.. autoclass:: UrlBase
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -134,7 +134,7 @@ Primary objects
|
||||
|
||||
BasicPrimaryObject
|
||||
====================================
|
||||
.. automodule:: gen.lib.primaryobj
|
||||
.. automodule:: gramps.gen.lib.primaryobj
|
||||
.. autoclass:: BasicPrimaryObject
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -149,7 +149,7 @@ PrimaryObject
|
||||
|
||||
Person
|
||||
====================================
|
||||
.. automodule:: gen.lib.person
|
||||
.. automodule:: gramps.gen.lib.person
|
||||
.. autoclass:: Person
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -157,7 +157,7 @@ Person
|
||||
|
||||
Family
|
||||
====================================
|
||||
.. automodule:: gen.lib.family
|
||||
.. automodule:: gramps.gen.lib.family
|
||||
.. autoclass:: Family
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -165,7 +165,7 @@ Family
|
||||
|
||||
Event
|
||||
====================================
|
||||
.. automodule:: gen.lib.event
|
||||
.. automodule:: gramps.gen.lib.event
|
||||
.. autoclass:: Event
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -173,7 +173,7 @@ Event
|
||||
|
||||
Place
|
||||
====================================
|
||||
.. automodule:: gen.lib.place
|
||||
.. automodule:: gramps.gen.lib.place
|
||||
.. autoclass:: Place
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -181,7 +181,7 @@ Place
|
||||
|
||||
Source
|
||||
====================================
|
||||
.. automodule:: gen.lib.src
|
||||
.. automodule:: gramps.gen.lib.src
|
||||
.. autoclass:: Source
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -189,7 +189,7 @@ Source
|
||||
|
||||
Citation
|
||||
====================================
|
||||
.. automodule:: gen.lib.citation
|
||||
.. automodule:: gramps.gen.lib.citation
|
||||
.. autoclass:: Citation
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -197,7 +197,7 @@ Citation
|
||||
|
||||
Media Object
|
||||
====================================
|
||||
.. automodule:: gen.lib.mediaobj
|
||||
.. automodule:: gramps.gen.lib.mediaobj
|
||||
.. autoclass:: MediaObject
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -205,7 +205,7 @@ Media Object
|
||||
|
||||
Repository
|
||||
====================================
|
||||
.. automodule:: gen.lib.repo
|
||||
.. automodule:: gramps.gen.lib.repo
|
||||
.. autoclass:: Repository
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -213,7 +213,7 @@ Repository
|
||||
|
||||
Note
|
||||
====================================
|
||||
.. automodule:: gen.lib.note
|
||||
.. automodule:: gramps.gen.lib.note
|
||||
.. autoclass:: Note
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -225,7 +225,7 @@ Secondary objects
|
||||
|
||||
Secondary Object
|
||||
====================================
|
||||
.. automodule:: gen.lib.secondaryobj
|
||||
.. automodule:: gramps.gen.lib.secondaryobj
|
||||
.. autoclass:: SecondaryObject
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -233,7 +233,7 @@ Secondary Object
|
||||
|
||||
Address
|
||||
====================================
|
||||
.. automodule:: gen.lib.address
|
||||
.. automodule:: gramps.gen.lib.address
|
||||
.. autoclass:: Address
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -241,7 +241,7 @@ Address
|
||||
|
||||
Attribute
|
||||
====================================
|
||||
.. automodule:: gen.lib.attribute
|
||||
.. automodule:: gramps.gen.lib.attribute
|
||||
.. autoclass:: Attribute
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -249,7 +249,7 @@ Attribute
|
||||
|
||||
LdsOrd
|
||||
====================================
|
||||
.. automodule:: gen.lib.ldsord
|
||||
.. automodule:: gramps.gen.lib.ldsord
|
||||
.. autoclass:: LdsOrd
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -257,7 +257,7 @@ LdsOrd
|
||||
|
||||
Location
|
||||
====================================
|
||||
.. automodule:: gen.lib.location
|
||||
.. automodule:: gramps.gen.lib.location
|
||||
.. autoclass:: Location
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -265,7 +265,7 @@ Location
|
||||
|
||||
Name
|
||||
====================================
|
||||
.. automodule:: gen.lib.name
|
||||
.. automodule:: gramps.gen.lib.name
|
||||
.. autoclass:: Name
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -273,7 +273,7 @@ Name
|
||||
|
||||
Surname
|
||||
====================================
|
||||
.. automodule:: gen.lib.surname
|
||||
.. automodule:: gramps.gen.lib.surname
|
||||
.. autoclass:: Surname
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -281,7 +281,7 @@ Surname
|
||||
|
||||
Url
|
||||
====================================
|
||||
.. automodule:: gen.lib.url
|
||||
.. automodule:: gramps.gen.lib.url
|
||||
.. autoclass:: Url
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -293,7 +293,7 @@ Reference objects
|
||||
|
||||
ChildRef
|
||||
====================================
|
||||
.. automodule:: gen.lib.childref
|
||||
.. automodule:: gramps.gen.lib.childref
|
||||
.. autoclass:: ChildRef
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -301,7 +301,7 @@ ChildRef
|
||||
|
||||
EventRef
|
||||
====================================
|
||||
.. automodule:: gen.lib.eventref
|
||||
.. automodule:: gramps.gen.lib.eventref
|
||||
.. autoclass:: EventRef
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -309,7 +309,7 @@ EventRef
|
||||
|
||||
MediaRef
|
||||
====================================
|
||||
.. automodule:: gen.lib.mediaref
|
||||
.. automodule:: gramps.gen.lib.mediaref
|
||||
.. autoclass:: MediaRef
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -317,7 +317,7 @@ MediaRef
|
||||
|
||||
PersonRef
|
||||
====================================
|
||||
.. automodule:: gen.lib.personref
|
||||
.. automodule:: gramps.gen.lib.personref
|
||||
.. autoclass:: PersonRef
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -325,7 +325,7 @@ PersonRef
|
||||
|
||||
RepoRef
|
||||
====================================
|
||||
.. automodule:: gen.lib.reporef
|
||||
.. automodule:: gramps.gen.lib.reporef
|
||||
.. autoclass:: RepoRef
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -337,7 +337,7 @@ Table object
|
||||
|
||||
Table object
|
||||
====================================
|
||||
.. automodule:: gen.lib.tableobj
|
||||
.. automodule:: gramps.gen.lib.tableobj
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -345,7 +345,7 @@ Table object
|
||||
*****************************
|
||||
Date objects
|
||||
*****************************
|
||||
.. automodule:: gen.lib.date
|
||||
.. automodule:: gramps.gen.lib.date
|
||||
|
||||
Date
|
||||
====================================
|
||||
@ -371,7 +371,7 @@ Text objects
|
||||
|
||||
StyledTextTag
|
||||
===================
|
||||
.. automodule:: gen.lib.styledtexttag
|
||||
.. automodule:: gramps.gen.lib.styledtexttag
|
||||
.. autoclass:: StyledTextTag
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -379,7 +379,7 @@ StyledTextTag
|
||||
|
||||
StyledText
|
||||
===========
|
||||
.. automodule:: gen.lib.styledtext
|
||||
.. automodule:: gramps.gen.lib.styledtext
|
||||
.. autoclass:: StyledText
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -392,7 +392,7 @@ Meta data
|
||||
GenderStats
|
||||
============
|
||||
|
||||
.. automodule:: gen.lib.genderstats
|
||||
.. automodule:: gramps.gen.lib.genderstats
|
||||
.. autoclass:: GenderStats
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -400,7 +400,7 @@ GenderStats
|
||||
|
||||
Researcher
|
||||
===========
|
||||
.. automodule:: gen.lib.researcher
|
||||
.. automodule:: gramps.gen.lib.researcher
|
||||
.. autoclass:: Researcher
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -409,7 +409,7 @@ Researcher
|
||||
*****************************
|
||||
Type classes
|
||||
*****************************
|
||||
.. automodule:: gen.lib.grampstype
|
||||
.. automodule:: gramps.gen.lib.grampstype
|
||||
.. autoclass:: GrampsTypeMeta
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -424,21 +424,21 @@ GrampsType
|
||||
|
||||
AttributeType
|
||||
=============
|
||||
.. automodule:: gen.lib.attrtype
|
||||
.. automodule:: gramps.gen.lib.attrtype
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
ChildRefType
|
||||
=============
|
||||
.. automodule:: gen.lib.childreftype
|
||||
.. automodule:: gramps.gen.lib.childreftype
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
EventType
|
||||
===========
|
||||
.. automodule:: gen.lib.eventtype
|
||||
.. automodule:: gramps.gen.lib.eventtype
|
||||
.. autoclass:: EventType
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -446,70 +446,70 @@ EventType
|
||||
|
||||
EventRoleType
|
||||
==============
|
||||
.. automodule:: gen.lib.eventroletype
|
||||
.. automodule:: gramps.gen.lib.eventroletype
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
FamilyRelType
|
||||
=============
|
||||
.. automodule:: gen.lib.familyreltype
|
||||
.. automodule:: gramps.gen.lib.familyreltype
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
MarkerType
|
||||
==========
|
||||
.. automodule:: gen.lib.markertype
|
||||
.. automodule:: gramps.gen.lib.markertype
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
NameType
|
||||
===========
|
||||
.. automodule:: gen.lib.nametype
|
||||
.. automodule:: gramps.gen.lib.nametype
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
NameOriginType
|
||||
==============
|
||||
.. automodule:: gen.lib.nameorigintype
|
||||
.. automodule:: gramps.gen.lib.nameorigintype
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
NoteType
|
||||
=========
|
||||
.. automodule:: gen.lib.notetype
|
||||
.. automodule:: gramps.gen.lib.notetype
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
RepositoryType
|
||||
==============
|
||||
.. automodule:: gen.lib.repotype
|
||||
.. automodule:: gramps.gen.lib.repotype
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
SourceMediaType
|
||||
================
|
||||
.. automodule:: gen.lib.srcmediatype
|
||||
.. automodule:: gramps.gen.lib.srcmediatype
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
StyledTextTagType
|
||||
==================
|
||||
.. automodule:: gen.lib.styledtexttagtype
|
||||
.. automodule:: gramps.gen.lib.styledtexttagtype
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
UrlType
|
||||
========
|
||||
.. automodule:: gen.lib.urltype
|
||||
.. automodule:: gramps.gen.lib.urltype
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -521,7 +521,7 @@ Privacy
|
||||
PrivateSourceNote
|
||||
============
|
||||
|
||||
.. automodule:: gen.lib.privsrcnote
|
||||
.. automodule:: gramps.gen.lib.privsrcnote
|
||||
.. autoclass:: PrivateSourceNote
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
@ -1,119 +1,119 @@
|
||||
############################
|
||||
The :mod:`gen.plug` Module
|
||||
############################
|
||||
#################################
|
||||
The :mod:`gramps.gen.plug` Module
|
||||
#################################
|
||||
|
||||
.. automodule:: gen.plug
|
||||
.. automodule:: gramps.gen.plug
|
||||
|
||||
Plugin
|
||||
====================================
|
||||
.. automodule:: gen.plug._plugin
|
||||
.. automodule:: gramps.gen.plug._plugin
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
BaseManager
|
||||
====================================
|
||||
.. automodule:: gen.plug._manager
|
||||
.. automodule:: gramps.gen.plug._manager
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Export
|
||||
====================================
|
||||
.. automodule:: gen.plug._export
|
||||
.. automodule:: gramps.gen.plug._export
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Gramplet
|
||||
====================================
|
||||
.. automodule:: gen.plug._gramplet
|
||||
.. automodule:: gramps.gen.plug._gramplet
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Import
|
||||
====================================
|
||||
.. automodule:: gen.plug._import
|
||||
.. automodule:: gramps.gen.plug._import
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Menu
|
||||
====================================
|
||||
.. automodule:: gen.plug.menu._menu
|
||||
.. automodule:: gramps.gen.plug.menu._menu
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._boolean
|
||||
.. automodule:: gramps.gen.plug.menu._boolean
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._booleanlist
|
||||
.. automodule:: gramps.gen.plug.menu._booleanlist
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._color
|
||||
.. automodule:: gramps.gen.plug.menu._color
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._destination
|
||||
.. automodule:: gramps.gen.plug.menu._destination
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._enumeratedlist
|
||||
.. automodule:: gramps.gen.plug.menu._enumeratedlist
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._family
|
||||
.. automodule:: gramps.gen.plug.menu._family
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._filter
|
||||
.. automodule:: gramps.gen.plug.menu._filter
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._media
|
||||
.. automodule:: gramps.gen.plug.menu._media
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._note
|
||||
.. automodule:: gramps.gen.plug.menu._note
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._number
|
||||
.. automodule:: gramps.gen.plug.menu._number
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._option
|
||||
.. automodule:: gramps.gen.plug.menu._option
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._person
|
||||
.. automodule:: gramps.gen.plug.menu._person
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._personlist
|
||||
.. automodule:: gramps.gen.plug.menu._personlist
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._placelist
|
||||
.. automodule:: gramps.gen.plug.menu._placelist
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._string
|
||||
.. automodule:: gramps.gen.plug.menu._string
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._style
|
||||
.. automodule:: gramps.gen.plug.menu._style
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._surnamecolor
|
||||
.. automodule:: gramps.gen.plug.menu._surnamecolor
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.menu._text
|
||||
.. automodule:: gramps.gen.plug.menu._text
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -121,38 +121,38 @@ Menu
|
||||
*****************************
|
||||
Options
|
||||
*****************************
|
||||
.. automodule:: gen.plug._options
|
||||
.. automodule:: gramps.gen.plug._options
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Reports
|
||||
====================================
|
||||
.. automodule:: gen.plug.report._options
|
||||
.. automodule:: gramps.gen.plug.report._options
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.report._bibliography
|
||||
.. automodule:: gramps.gen.plug.report._bibliography
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.report._constants
|
||||
.. automodule:: gramps.gen.plug.report._constants
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.report.endnotes
|
||||
.. automodule:: gramps.gen.plug.report.endnotes
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.report._paper
|
||||
.. automodule:: gramps.gen.plug.report._paper
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.report._reportbase
|
||||
.. automodule:: gramps.gen.plug.report._reportbase
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.report.utils
|
||||
.. automodule:: gramps.gen.plug.report.utils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -160,7 +160,7 @@ Reports
|
||||
*****************************
|
||||
Docgen
|
||||
*****************************
|
||||
.. automodule:: gen.plug._docgenplugin
|
||||
.. automodule:: gramps.gen.plug._docgenplugin
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -168,47 +168,47 @@ Docgen
|
||||
*****************************
|
||||
Generators
|
||||
*****************************
|
||||
.. automodule:: gen.plug.docgen.basedoc
|
||||
.. automodule:: gramps.gen.plug.docgen.basedoc
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.docgen.drawdoc
|
||||
.. automodule:: gramps.gen.plug.docgen.drawdoc
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.docgen.fontscale
|
||||
.. automodule:: gramps.gen.plug.docgen.fontscale
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.docgen.fontstyle
|
||||
.. automodule:: gramps.gen.plug.docgen.fontstyle
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.docgen.graphdoc
|
||||
.. automodule:: gramps.gen.plug.docgen.graphdoc
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.docgen.graphicstyle
|
||||
.. automodule:: gramps.gen.plug.docgen.graphicstyle
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.docgen.paperstyle
|
||||
.. automodule:: gramps.gen.plug.docgen.paperstyle
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.docgen.paragraphstyle
|
||||
.. automodule:: gramps.gen.plug.docgen.paragraphstyle
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.docgen.stylesheet
|
||||
.. automodule:: gramps.gen.plug.docgen.stylesheet
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.docgen.tablestyle
|
||||
.. automodule:: gramps.gen.plug.docgen.tablestyle
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.docgen.textdoc
|
||||
.. automodule:: gramps.gen.plug.docgen.textdoc
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
@ -216,25 +216,25 @@ Generators
|
||||
*****************************
|
||||
Doc Backend
|
||||
*****************************
|
||||
.. automodule:: gen.plug.docbackend.cairobackend
|
||||
.. automodule:: gramps.gen.plug.docbackend.cairobackend
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.plug.docbackend.docbackend
|
||||
.. automodule:: gramps.gen.plug.docbackend.docbackend
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Register
|
||||
====================================
|
||||
.. automodule:: gen.plug._pluginreg
|
||||
.. automodule:: gramps.gen.plug._pluginreg
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Utils
|
||||
====================================
|
||||
.. automodule:: gen.plug.utils
|
||||
.. automodule:: gramps.gen.plug.utils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
@ -1,40 +1,40 @@
|
||||
############################
|
||||
The :mod:`gen.proxy` Module
|
||||
############################
|
||||
##################################
|
||||
The :mod:`gramps.gen.proxy` Module
|
||||
##################################
|
||||
|
||||
.. automodule:: gen.proxy
|
||||
.. automodule:: gramps.gen.proxy
|
||||
|
||||
Proxy Base
|
||||
====================================
|
||||
.. automodule:: gen.proxy.proxybase
|
||||
.. automodule:: gramps.gen.proxy.proxybase
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Filter
|
||||
====================================
|
||||
.. automodule:: gen.proxy.filter
|
||||
.. automodule:: gramps.gen.proxy.filter
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Living
|
||||
====================================
|
||||
.. automodule:: gen.proxy.living
|
||||
.. automodule:: gramps.gen.proxy.living
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Private
|
||||
====================================
|
||||
.. automodule:: gen.proxy.private
|
||||
.. automodule:: gramps.gen.proxy.private
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
References
|
||||
====================================
|
||||
.. automodule:: gen.proxy.referencedbyselection
|
||||
.. automodule:: gramps.gen.proxy.referencedbyselection
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
@ -1,76 +1,76 @@
|
||||
############################
|
||||
The :mod:`gen.utils` Module
|
||||
############################
|
||||
##################################
|
||||
The :mod:`gramps.gen.utils` Module
|
||||
##################################
|
||||
|
||||
.. automodule:: gen.utils
|
||||
.. automodule:: gramps.gen.utils
|
||||
|
||||
Utils
|
||||
====================================
|
||||
.. automodule:: gen.utils.alive
|
||||
.. automodule:: gramps.gen.utils.alive
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.callback
|
||||
.. automodule:: gramps.gen.utils.callback
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.callman
|
||||
.. automodule:: gramps.gen.utils.callman
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.cast
|
||||
.. automodule:: gramps.gen.utils.cast
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.config
|
||||
.. automodule:: gramps.gen.utils.config
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.configmanager
|
||||
.. automodule:: gramps.gen.utils.configmanager
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.db
|
||||
.. automodule:: gramps.gen.utils.db
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.file
|
||||
.. automodule:: gramps.gen.utils.file
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.id
|
||||
.. automodule:: gramps.gen.utils.grampslocale
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.image
|
||||
.. automodule:: gramps.gen.utils.id
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.keyword
|
||||
.. automodule:: gramps.gen.utils.image
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.lds
|
||||
.. automodule:: gramps.gen.utils.keyword
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.mactrans
|
||||
.. automodule:: gramps.gen.utils.lds
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.place
|
||||
.. automodule:: gramps.gen.utils.maclocale
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.string
|
||||
.. automodule:: gramps.gen.utils.place
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.trans
|
||||
.. automodule:: gramps.gen.utils.string
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
.. automodule:: gen.utils.unknown
|
||||
.. automodule:: gramps.gen.utils.unknown
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
@ -4,8 +4,8 @@ The :class:`Html` Class
|
||||
|
||||
Contents:
|
||||
|
||||
.. automodule:: libhtml
|
||||
.. automodule:: gramps.plugins.lib.libhtml
|
||||
.. autoclass:: Html
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
:show-inheritance:
|
||||
|
@ -2,7 +2,7 @@
|
||||
The :class:`RelationshipCalculator` Class
|
||||
#########################################
|
||||
|
||||
.. automodule:: gen.relationship
|
||||
.. automodule:: gramps.gen.relationship
|
||||
.. autoclass:: RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
@ -14,119 +14,119 @@ Localized Handlers
|
||||
|
||||
Relationship (Czech)
|
||||
====================================
|
||||
.. autoclass:: rel_cs.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_cs.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Danish)
|
||||
====================================
|
||||
.. autoclass:: rel_da.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_da.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (German)
|
||||
====================================
|
||||
.. autoclass:: rel_de.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_de.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Spanish)
|
||||
====================================
|
||||
.. autoclass:: rel_es.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_es.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Finnish)
|
||||
====================================
|
||||
.. autoclass:: rel_fi.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_fi.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (French)
|
||||
====================================
|
||||
.. autoclass:: rel_fr.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_fr.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Croatian)
|
||||
====================================
|
||||
.. autoclass:: rel_hr.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_hr.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Hungarian)
|
||||
====================================
|
||||
.. autoclass:: rel_hu.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_hu.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Italian)
|
||||
====================================
|
||||
.. autoclass:: rel_it.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_it.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Dutch)
|
||||
====================================
|
||||
.. autoclass:: rel_nl.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_nl.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Norwegian)
|
||||
====================================
|
||||
.. autoclass:: rel_no.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_no.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Polish)
|
||||
====================================
|
||||
.. autoclass:: rel_pl.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_pl.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Portuguese)
|
||||
====================================
|
||||
.. autoclass:: rel_pt.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_pt.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Russian)
|
||||
====================================
|
||||
.. autoclass:: rel_ru.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_ru.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Slovak)
|
||||
====================================
|
||||
.. autoclass:: rel_sk.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_sk.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Slovenian)
|
||||
====================================
|
||||
.. autoclass:: rel_sl.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_sl.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Relationship (Swedish)
|
||||
====================================
|
||||
.. autoclass:: rel_sv.RelationshipCalculator
|
||||
.. autoclass:: gramps.plugins.rel.rel_sv.RelationshipCalculator
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
@ -2,25 +2,25 @@
|
||||
The :class:`Simple` Classes
|
||||
###########################
|
||||
|
||||
.. automodule:: gen.simple
|
||||
.. automodule:: gramps.gen.simple
|
||||
|
||||
Simple Access
|
||||
====================================
|
||||
.. automodule:: gen.simple._simpleaccess
|
||||
.. automodule:: gramps.gen.simple._simpleaccess
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Simple Doc
|
||||
====================================
|
||||
.. automodule:: gen.simple._simpledoc
|
||||
.. automodule:: gramps.gen.simple._simpledoc
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Simple Table
|
||||
====================================
|
||||
.. automodule:: gen.simple._simpletable
|
||||
.. automodule:: gramps.gen.simple._simpletable
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
@ -54,7 +54,6 @@ from .clidbman import CLIDbManager, NAME_FILE, find_locker_name
|
||||
from gramps.gen.plug import BasePluginManager
|
||||
from gramps.gen.plug.report import CATEGORY_BOOK, CATEGORY_CODE, BookList
|
||||
from .plug import cl_report, cl_book
|
||||
from .user import User
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
|
||||
@ -153,10 +152,15 @@ class ArgHandler(object):
|
||||
|
||||
def __init__(self, dbstate, parser, sessionmanager,
|
||||
errorfunc=None, gui=False):
|
||||
from .user import User
|
||||
|
||||
self.dbstate = dbstate
|
||||
self.sm = sessionmanager
|
||||
self.errorfunc = errorfunc
|
||||
self.gui = gui
|
||||
self.user = User(error=self.__error,
|
||||
auto_accept=parser.auto_accept,
|
||||
quiet=parser.quiet)
|
||||
if self.gui:
|
||||
self.actions = []
|
||||
self.list = False
|
||||
@ -283,19 +287,12 @@ class ArgHandler(object):
|
||||
else:
|
||||
fullpath = os.path.abspath(os.path.expanduser(fname))
|
||||
if os.path.exists(fullpath):
|
||||
self.__error(_("WARNING: Output file already exists!\n"
|
||||
"WARNING: It will be overwritten:\n %s") %
|
||||
fullpath)
|
||||
try:
|
||||
if sys.version_info[0] < 3:
|
||||
ask = raw_input
|
||||
else:
|
||||
ask = input
|
||||
answer = ask(_('OK to overwrite? (yes/no) '))
|
||||
except EOFError:
|
||||
print()
|
||||
sys.exit(0)
|
||||
if answer.upper() in ('Y', 'YES', _('YES').upper()):
|
||||
message = _("WARNING: Output file already exists!\n"
|
||||
"WARNING: It will be overwritten:\n %s"
|
||||
) % fullpath
|
||||
accepted = self.user.prompt(_('OK to overwrite?'), message,
|
||||
_('yes'), _('no'))
|
||||
if accepted:
|
||||
self.__error(_("Will overwrite the existing file: %s")
|
||||
% fullpath)
|
||||
else:
|
||||
@ -366,7 +363,7 @@ class ArgHandler(object):
|
||||
if not db_path:
|
||||
# Apparently it is not a database. See if it is a file that
|
||||
# can be imported.
|
||||
db_path, title = self.dbman.import_new_db(self.open_gui, None)
|
||||
db_path, title = self.dbman.import_new_db(self.open_gui, self.user)
|
||||
|
||||
if db_path:
|
||||
# Test if not locked or problematic
|
||||
@ -551,7 +548,7 @@ class ArgHandler(object):
|
||||
for plugin in pmgr.get_import_plugins():
|
||||
if family_tree_format == plugin.get_extension():
|
||||
import_function = plugin.get_import_function()
|
||||
import_function(self.dbstate.db, filename, User())
|
||||
import_function(self.dbstate.db, filename, self.user)
|
||||
|
||||
if not self.cl:
|
||||
if self.imp_db_path:
|
||||
@ -573,7 +570,7 @@ class ArgHandler(object):
|
||||
for plugin in pmgr.get_export_plugins():
|
||||
if family_tree_format == plugin.get_extension():
|
||||
export_function = plugin.get_export_function()
|
||||
export_function(self.dbstate.db, filename, User(error=self.__error))
|
||||
export_function(self.dbstate.db, filename, self.user)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
@ -8,7 +8,7 @@
|
||||
# Copyright (C) 2008 Raphael Ackermann
|
||||
# Copyright (C) 2008 Brian G. Matherly
|
||||
# Copyright (C) 2012 Doug Blank
|
||||
# Copyright (C) 2012 Paul Franklin
|
||||
# Copyright (C) 2012-2013 Paul Franklin
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -48,12 +48,11 @@ import logging
|
||||
#-------------------------------------------------------------------------
|
||||
from gramps.gen.const import LONGOPTS, SHORTOPTS
|
||||
from gramps.gen.config import config
|
||||
from gramps.gen.utils.configmanager import safe_eval
|
||||
from gramps.gen.utils.cast import get_type_converter
|
||||
from gramps.gen.utils.file import get_unicode_path_from_env_var
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
|
||||
# Note: Make sure to edit const.py.in POPT_TABLE too!
|
||||
_HELP = _("""
|
||||
Usage: gramps.py [OPTION...]
|
||||
--load-modules=MODULE1,MODULE2,... Dynamic modules to load
|
||||
@ -77,6 +76,8 @@ Application options
|
||||
-u, --force-unlock Force unlock of Family Tree
|
||||
-s, --show Show config settings
|
||||
-c, --config=[config.setting[:value]] Set config setting(s) and start Gramps
|
||||
-y, --yes Don't ask to confirm dangerous actions (non-GUI mode only)
|
||||
-q, --quiet Suppress progress indication output (non-GUI mode only)
|
||||
-v, --version Show versions
|
||||
""")
|
||||
|
||||
@ -183,6 +184,8 @@ class ArgParser(object):
|
||||
self.force_unlock = False
|
||||
self.create = None
|
||||
self.runqml = False
|
||||
self.quiet = False
|
||||
self.auto_accept = False
|
||||
|
||||
self.errors = []
|
||||
self.parse_args()
|
||||
@ -198,19 +201,21 @@ class ArgParser(object):
|
||||
|
||||
Possible:
|
||||
1/ Just the family tree (name or database dir)
|
||||
2/ -O, --open: Open of a family tree
|
||||
3/ -i, --import: Import a family tree of any format understood by
|
||||
2/ -O --open: Open of a family tree
|
||||
3/ -i --import: Import a family tree of any format understood by
|
||||
an importer, optionally provide -f to indicate format
|
||||
4/ -e, --export: export a family tree in required format, optionally
|
||||
4/ -e --export: export a family tree in required format, optionally
|
||||
provide -f to indicate format
|
||||
5/ -f, --format=FORMAT : format after a -i or -e option
|
||||
6/ -a, --action: An action (possible: 'report', 'tool')
|
||||
7/ -p, --options=OPTIONS_STRING : specify options
|
||||
8/ -u, --force-unlock: A locked database can be unlocked by giving
|
||||
5/ -f --format=FORMAT : format after a -i or -e option
|
||||
6/ -a --action: An action (possible: 'report', 'tool')
|
||||
7/ -p --options=OPTIONS_STRING : specify options
|
||||
8/ -u --force-unlock: A locked database can be unlocked by giving
|
||||
this argument when opening it
|
||||
9/ -s --show : Show config settings
|
||||
10/ -c --config=config.setting:value : Set config.setting and start
|
||||
Gramps without :value, the actual config.setting is shown
|
||||
11/ -y --yes: assume user's acceptance of any CLI prompt (see cli.user.User.prompt)
|
||||
12/ -q --quiet: suppress extra noise on sys.stderr, such as progress indicators
|
||||
|
||||
"""
|
||||
try:
|
||||
@ -259,23 +264,23 @@ class ArgParser(object):
|
||||
need_to_quit = False
|
||||
for opt_ix in range(len(options)):
|
||||
option, value = options[opt_ix]
|
||||
if option in ( '-O', '--open'):
|
||||
if option in ['-O', '--open']:
|
||||
self.open = value
|
||||
elif option in ( '-C', '--create'):
|
||||
elif option in ['-C', '--create']:
|
||||
self.create = value
|
||||
elif option in ( '-i', '--import'):
|
||||
elif option in ['-i', '--import']:
|
||||
family_tree_format = None
|
||||
if opt_ix < len(options) - 1 \
|
||||
and options[opt_ix + 1][0] in ( '-f', '--format'):
|
||||
family_tree_format = options[opt_ix + 1][1]
|
||||
self.imports.append((value, family_tree_format))
|
||||
elif option in ( '-e', '--export' ):
|
||||
elif option in ['-e', '--export']:
|
||||
family_tree_format = None
|
||||
if opt_ix < len(options) - 1 \
|
||||
and options[opt_ix + 1][0] in ( '-f', '--format'):
|
||||
family_tree_format = options[opt_ix + 1][1]
|
||||
self.exports.append((value, family_tree_format))
|
||||
elif option in ( '-a', '--action' ):
|
||||
elif option in ['-a', '--action']:
|
||||
action = value
|
||||
if action not in ('report', 'tool', 'book'):
|
||||
print(_("Unknown action: %s. Ignoring.") % action,
|
||||
@ -286,18 +291,18 @@ class ArgParser(object):
|
||||
and options[opt_ix+1][0] in ( '-p', '--options' ):
|
||||
options_str = options[opt_ix+1][1]
|
||||
self.actions.append((action, options_str))
|
||||
elif option in ('-d', '--debug'):
|
||||
elif option in ['-d', '--debug']:
|
||||
print(_('setup debugging'), value, file=sys.stderr)
|
||||
logger = logging.getLogger(value)
|
||||
logger.setLevel(logging.DEBUG)
|
||||
cleandbg += [opt_ix]
|
||||
elif option in ('-l'):
|
||||
elif option in ['-l']:
|
||||
self.list = True
|
||||
elif option in ('-L'):
|
||||
elif option in ['-L']:
|
||||
self.list_more = True
|
||||
elif option in ('-t'):
|
||||
elif option in ['-t']:
|
||||
self.list_table = True
|
||||
elif option in ('-s','--show'):
|
||||
elif option in ['-s','--show']:
|
||||
print(_("Gramps config settings from %s:")
|
||||
% config.filename)
|
||||
for section in config.data:
|
||||
@ -307,7 +312,7 @@ class ArgParser(object):
|
||||
repr(config.data[section][setting])))
|
||||
print()
|
||||
sys.exit(0)
|
||||
elif option in ('-c', '--config'):
|
||||
elif option in ['-c', '--config']:
|
||||
setting_name = value
|
||||
set_value = False
|
||||
if setting_name:
|
||||
@ -320,11 +325,14 @@ class ArgParser(object):
|
||||
% (setting_name, repr(setting_value)),
|
||||
file=sys.stderr)
|
||||
if set_value:
|
||||
if new_value == "DEFAULT":
|
||||
# does a user want the default config value?
|
||||
if new_value in ("DEFAULT", _("DEFAULT")):
|
||||
new_value = config.get_default(setting_name)
|
||||
else:
|
||||
new_value = safe_eval(new_value)
|
||||
converter = get_type_converter(setting_value)
|
||||
new_value = converter(new_value)
|
||||
config.set(setting_name, new_value)
|
||||
# translators: indent "New" to match "Current"
|
||||
print(_(" New Gramps config setting: %s:%s")
|
||||
% (setting_name,
|
||||
repr(config.get(setting_name))),
|
||||
@ -336,14 +344,18 @@ class ArgParser(object):
|
||||
% setting_name, file=sys.stderr)
|
||||
need_to_quit = True
|
||||
cleandbg += [opt_ix]
|
||||
elif option in ('-h', '-?', '--help'):
|
||||
elif option in ['-h', '-?', '--help']:
|
||||
self.help = True
|
||||
elif option in ('-u', '--force-unlock'):
|
||||
elif option in ['-u', '--force-unlock']:
|
||||
self.force_unlock = True
|
||||
elif option in ('--usage'):
|
||||
elif option in ['--usage']:
|
||||
self.usage = True
|
||||
elif option in ('--qml'):
|
||||
elif option in ['--qml']:
|
||||
self.runqml = True
|
||||
elif option in ['-y', '--yes']:
|
||||
self.auto_accept = True
|
||||
elif option in ['-q', '--quiet']:
|
||||
self.quiet = True
|
||||
|
||||
#clean options list
|
||||
cleandbg.reverse()
|
||||
|
@ -336,28 +336,30 @@ class CLIDbManager(object):
|
||||
or (None, None) if no import was performed.
|
||||
"""
|
||||
pmgr = BasePluginManager.get_instance()
|
||||
# Allow URL names here; make temp file if necessary
|
||||
url = urlparse(filename)
|
||||
if url.scheme != "":
|
||||
if url.scheme == "file":
|
||||
filename = url2pathname(filename[7:])
|
||||
else:
|
||||
url_fp = urlopen(filename) # open URL
|
||||
# make a temp local file:
|
||||
ext = os.path.splitext(url.path)[1]
|
||||
fd, filename = tempfile.mkstemp(suffix=ext)
|
||||
temp_fp = os.fdopen(fd, "w")
|
||||
# read from URL:
|
||||
data = url_fp.read()
|
||||
# write locally:
|
||||
temp_fp.write(data)
|
||||
url_fp.close()
|
||||
from gen.db.dbconst import BDBVERSFN
|
||||
versionpath = os.path.join(name, BDBVERSFN)
|
||||
_LOG.debug("Write bsddb version %s" % str(dbase.version()))
|
||||
with open(versionpath, "w") as version_file:
|
||||
version_file.write(str(dbase.version()))
|
||||
temp_fp.close()
|
||||
# check to see if it isn't a filename directly:
|
||||
if not os.path.isfile(filename):
|
||||
# Allow URL names here; make temp file if necessary
|
||||
url = urlparse(filename)
|
||||
if url.scheme != "":
|
||||
if url.scheme == "file":
|
||||
filename = url2pathname(filename[7:])
|
||||
else:
|
||||
url_fp = urlopen(filename) # open URL
|
||||
# make a temp local file:
|
||||
ext = os.path.splitext(url.path)[1]
|
||||
fd, filename = tempfile.mkstemp(suffix=ext)
|
||||
temp_fp = os.fdopen(fd, "w")
|
||||
# read from URL:
|
||||
data = url_fp.read()
|
||||
# write locally:
|
||||
temp_fp.write(data)
|
||||
url_fp.close()
|
||||
from gen.db.dbconst import BDBVERSFN
|
||||
versionpath = os.path.join(name, BDBVERSFN)
|
||||
_LOG.debug("Write bsddb version %s" % str(dbase.version()))
|
||||
with open(versionpath, "w") as version_file:
|
||||
version_file.write(str(dbase.version()))
|
||||
temp_fp.close()
|
||||
|
||||
(name, ext) = os.path.splitext(os.path.basename(filename))
|
||||
format = ext[1:].lower()
|
||||
|
@ -422,7 +422,7 @@ class CommandLineReport(object):
|
||||
self.options_help[name].append(option.get_help())
|
||||
else:
|
||||
print(_("Unknown option: %s") % option, file=sys.stderr)
|
||||
print(_(" Valid options are:"),
|
||||
print(_(" Valid options are:") +
|
||||
", ".join(list(self.options_dict.keys())),
|
||||
file=sys.stderr)
|
||||
print(_(" Use '%(donottranslate)s' to see description "
|
||||
|
0
gramps/cli/test/__init__.py
Normal file
88
gramps/cli/test/argparser_test.py
Normal file
@ -0,0 +1,88 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2013 Vassilii Khachaturov <vassilii@tarunz.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id$
|
||||
|
||||
""" Unittest for argparser.py """
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import unittest
|
||||
from ..argparser import ArgParser
|
||||
import sys
|
||||
|
||||
try:
|
||||
if sys.version_info < (3,3):
|
||||
from mock import Mock
|
||||
else:
|
||||
from unittest.mock import Mock
|
||||
|
||||
MOCKING = True
|
||||
|
||||
except:
|
||||
MOCKING = False
|
||||
print ("Mocking disabled", sys.exc_info()[0:2])
|
||||
|
||||
class TestArgParser(unittest.TestCase):
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def create_parser(*self_and_args):
|
||||
return ArgParser(list(self_and_args))
|
||||
|
||||
def triggers_option_error(self, option):
|
||||
ap = self.create_parser(option)
|
||||
return (str(ap.errors).find("option "+option)>=0, ap)
|
||||
|
||||
def test_wrong_argument_triggers_option_error(self):
|
||||
bad,ap = self.triggers_option_error('--I-am-a-wrong-argument')
|
||||
assert bad, ap.__dict__
|
||||
|
||||
def test_y_shortopt_sets_auto_accept(self):
|
||||
bad,ap = self.triggers_option_error('-y')
|
||||
assert not bad, ap.errors
|
||||
assert ap.auto_accept
|
||||
|
||||
def test_yes_longopt_sets_auto_accept(self):
|
||||
bad,ap = self.triggers_option_error('--yes')
|
||||
assert not bad, ap.errors
|
||||
assert ap.auto_accept
|
||||
|
||||
def test_q_shortopt_sets_quiet(self):
|
||||
bad,ap = self.triggers_option_error('-q')
|
||||
assert not bad, ap.errors
|
||||
assert ap.quiet
|
||||
|
||||
def test_quiet_longopt_sets_quiet(self):
|
||||
bad,ap = self.triggers_option_error('--quiet')
|
||||
assert not bad, ap.errors
|
||||
assert ap.quiet
|
||||
|
||||
def test_quiet_exists_by_default(self):
|
||||
ap = self.create_parser()
|
||||
assert hasattr(ap,'quiet')
|
||||
|
||||
def test_auto_accept_unset_by_default(self):
|
||||
ap = self.create_parser()
|
||||
assert not ap.auto_accept
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
@ -18,7 +18,6 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# test/gramps_cli_test.py
|
||||
# $Id$
|
||||
|
||||
""" CLI tests for gramps """
|
||||
@ -27,11 +26,6 @@ import os
|
||||
import unittest
|
||||
import re
|
||||
|
||||
from .test import test_util as tu
|
||||
|
||||
pdir = tu.path_append_parent()
|
||||
ddir = tu.make_subdir( "cli_test_data")
|
||||
|
||||
test_ged = """0 HEAD
|
||||
1 SOUR min1r.ged min 1-rec
|
||||
1 SUBM @SUBM1@
|
||||
@ -42,17 +36,29 @@ test_ged = """0 HEAD
|
||||
0 @I1@ INDI
|
||||
0 TRLR
|
||||
"""
|
||||
|
||||
ddir = os.path.dirname(__file__)
|
||||
min1r = os.path.join(ddir,"min1r.ged")
|
||||
out_ged = os.path.join(ddir,"test_out.ged")
|
||||
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
def setUp(self):
|
||||
if not os.path.exists(min1r):
|
||||
open(min1r,"wb").write(test_ged)
|
||||
self.tearDown()
|
||||
|
||||
def tearDown(self):
|
||||
if os.path.exists(out_ged):
|
||||
os.remove(out_ged)
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
if not os.path.exists(min1r):
|
||||
open(min1r,"wb").write(test_ged)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
if os.path.exists(min1r):
|
||||
os.remove(min1r)
|
||||
|
||||
# silly test just to illustrate unittest setUp behavior
|
||||
def test1_setup_works(self):
|
||||
self.assertTrue(os.path.exists(ddir), "data dir %r exists" % ddir)
|
||||
@ -65,9 +71,9 @@ class Test(unittest.TestCase):
|
||||
def test2_exec_CLI(self):
|
||||
ifile = min1r
|
||||
ofile = out_ged
|
||||
gcmd = "./gramps.py -i%s -o%s" % (ifile, ofile)
|
||||
rc = os.system("cd %s && python %s" % (pdir, gcmd))
|
||||
self.assertEquals(rc,0, tu.msg(rc,0, "executed CLI cmmand %r" % gcmd))
|
||||
gcmd = "Gramps.py -i %s -e %s" % (ifile, ofile)
|
||||
rc = os.system("python %s" % gcmd)
|
||||
self.assertEquals(rc, 0, "executed CLI cmmand %r" % gcmd)
|
||||
# simple validation o output
|
||||
self.assertTrue(os.path.isfile(ofile), "output file created")
|
||||
content = open(ofile).read()
|
||||
@ -89,9 +95,9 @@ class Test(unittest.TestCase):
|
||||
# ~same as test 2
|
||||
ifile = min1r
|
||||
ofile = out_ged
|
||||
gcmd = "./gramps.py -i%s -o%s" % (ifile, ofile)
|
||||
rc = os.system("cd %s && python %s" % (pdir, gcmd))
|
||||
self.assertEquals(rc,0, tu.msg(rc,0, "executed CLI cmmand %r" % gcmd))
|
||||
gcmd = "Gramps.py -i %s -e %s" % (ifile, ofile)
|
||||
rc = os.system("python %s" % gcmd)
|
||||
self.assertEquals(rc, 0, "executed CLI cmmand %r" % gcmd)
|
||||
|
||||
for fn in bogofiles:
|
||||
self.assertFalse(os.path.exists(fn))
|
190
gramps/cli/test/user_test.py
Normal file
@ -0,0 +1,190 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2013 Vassilii Khachaturov <vassilii@tarunz.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id$
|
||||
|
||||
""" Unittest for user.py """
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import unittest
|
||||
from .. import user
|
||||
from ...gen.test.user_test import TestUser
|
||||
import sys
|
||||
|
||||
try:
|
||||
if sys.version_info < (3,3):
|
||||
from mock import Mock, patch
|
||||
else:
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
MOCKING = True
|
||||
|
||||
except:
|
||||
MOCKING = False
|
||||
print ("Mocking disabled", sys.exc_info()[0:2])
|
||||
|
||||
class TestUser_prompt(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.real_user = user.User()
|
||||
if MOCKING:
|
||||
self.user = user.User()
|
||||
self.user._fileout = Mock(spec=sys.stderr)
|
||||
self.user._input = Mock(spec=input)
|
||||
|
||||
def test_default_fileout_has_write(self):
|
||||
assert hasattr(self.real_user._fileout, 'write')
|
||||
|
||||
def test_default_input(self):
|
||||
assert self.real_user._input.__name__.endswith('input')
|
||||
|
||||
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
|
||||
def test_prompt_returns_True_if_ACCEPT_entered(self):
|
||||
self.user._input.configure_mock(return_value = TestUser.ACCEPT)
|
||||
assert self.user.prompt(
|
||||
TestUser.TITLE, TestUser.MSG, TestUser.ACCEPT, TestUser.REJECT
|
||||
), "True expected!"
|
||||
self.user._input.assert_called_once_with()
|
||||
|
||||
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
|
||||
def test_prompt_returns_False_if_REJECT_entered(self):
|
||||
self.user._input.configure_mock(return_value = TestUser.REJECT)
|
||||
assert not self.user.prompt(
|
||||
TestUser.TITLE, TestUser.MSG, TestUser.ACCEPT, TestUser.REJECT
|
||||
), "False expected!"
|
||||
self.user._input.assert_called_once_with()
|
||||
|
||||
def assert_prompt_contains_text(self, text,
|
||||
title=TestUser.TITLE, msg=TestUser.MSG,
|
||||
accept=TestUser.ACCEPT, reject=TestUser.REJECT):
|
||||
self.user._input.configure_mock(return_value = TestUser.REJECT)
|
||||
self.user.prompt(title, msg, accept, reject)
|
||||
for call in self.user._fileout.method_calls:
|
||||
name, args, kwargs = call
|
||||
for a in args:
|
||||
if a.find(text) >= 0:
|
||||
return
|
||||
self.assertTrue(False,
|
||||
"'{}' never printed in prompt: {}".format(
|
||||
text, self.user._fileout.method_calls))
|
||||
|
||||
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
|
||||
def test_prompt_contains_title_text(self):
|
||||
self.assert_prompt_contains_text(TestUser.TITLE)
|
||||
|
||||
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
|
||||
def test_prompt_contains_msg_text(self):
|
||||
self.assert_prompt_contains_text(TestUser.MSG)
|
||||
|
||||
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
|
||||
def test_prompt_contains_accept_text(self):
|
||||
self.assert_prompt_contains_text(TestUser.ACCEPT)
|
||||
|
||||
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
|
||||
def test_prompt_contains_reject_text(self):
|
||||
self.assert_prompt_contains_text(TestUser.REJECT)
|
||||
|
||||
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
|
||||
def test_prompt_strips_underscore_in_accept(self):
|
||||
self.assert_prompt_contains_text("accepT", accept="accep_T")
|
||||
|
||||
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
|
||||
def test_prompt_strips_underscore_in_reject(self):
|
||||
self.assert_prompt_contains_text("reJect", reject="re_Ject")
|
||||
|
||||
if not MOCKING: #don't use SKIP, to avoid counting a skipped test
|
||||
def test_manual_run(self):
|
||||
b = self.real_user.prompt(
|
||||
TestUser.TITLE, TestUser.MSG, TestUser.ACCEPT, TestUser.REJECT)
|
||||
print ("Returned: {}".format(b))
|
||||
|
||||
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
|
||||
def test_auto_accept_accepts_without_prompting(self):
|
||||
u = user.User(auto_accept=True)
|
||||
u._fileout = Mock(spec=sys.stderr)
|
||||
assert u.prompt(
|
||||
TestUser.TITLE, TestUser.MSG, TestUser.ACCEPT, TestUser.REJECT
|
||||
), "True expected!"
|
||||
assert len(u._fileout.method_calls) == 0, list(u._fileout.method_calls)
|
||||
|
||||
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
|
||||
def test_EOFError_in_prompt_caught_as_False(self):
|
||||
self.user._input.configure_mock(
|
||||
side_effect = EOFError,
|
||||
return_value = TestUser.REJECT)
|
||||
assert not self.user.prompt(
|
||||
TestUser.TITLE, TestUser.MSG, TestUser.ACCEPT, TestUser.REJECT
|
||||
), "False expected!"
|
||||
self.user._input.assert_called_once_with()
|
||||
|
||||
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
|
||||
class TestUser_quiet(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.user = user.User(quiet=True)
|
||||
self.user._fileout = Mock(spec=sys.stderr)
|
||||
|
||||
def test_progress_can_begin_step_end(self):
|
||||
self.user.begin_progress("Foo", "Bar", 0)
|
||||
for i in range(10):
|
||||
self.user.step_progress()
|
||||
self.user.end_progress()
|
||||
|
||||
def tearDown(self):
|
||||
assert len(self.user._fileout.method_calls
|
||||
) == 0, list(self.user._fileout.method_calls)
|
||||
|
||||
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
|
||||
class TestUser_progress(unittest.TestCase):
|
||||
_progress_begin_step_end = \
|
||||
TestUser_quiet.test_progress_can_begin_step_end.__func__
|
||||
|
||||
def setUp(self):
|
||||
self.user = user.User()
|
||||
self.user._fileout = Mock(spec=sys.stderr)
|
||||
|
||||
def test_can_step_using_with(self):
|
||||
# Collect baseline output from the old-style interface (begin/step/end)
|
||||
self._progress_begin_step_end()
|
||||
self.expected_output = list(self.user._fileout.method_calls)
|
||||
self.user._fileout.reset_mock()
|
||||
self.assertTrue(
|
||||
len(self.user._fileout.method_calls) == 0,
|
||||
list(self.user._fileout.method_calls))
|
||||
|
||||
with self.user.progress("Foo", "Bar", 0) as step:
|
||||
for i in range(10):
|
||||
step()
|
||||
|
||||
# Output using `with' differs from one with `progress_...'
|
||||
self.assertEqual(self.expected_output,
|
||||
list(self.user._fileout.method_calls))
|
||||
|
||||
def test_ends_progress_upon_exception_in_with(self):
|
||||
with patch('gramps.cli.user.User.end_progress') as MockEP:
|
||||
try:
|
||||
with self.user.progress("Foo", "Bar", 0) as step:
|
||||
raise Exception()
|
||||
except Exception:
|
||||
pass
|
||||
self.assertTrue(MockEP.called)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
@ -30,7 +30,6 @@ The User class provides basic interaction with the user.
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
@ -40,7 +39,7 @@ import sys
|
||||
#------------------------------------------------------------------------
|
||||
from gramps.gen.const import GRAMPS_LOCALE as glocale
|
||||
_ = glocale.translation.gettext
|
||||
from gramps.gen.user import User
|
||||
from gramps.gen import user
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
@ -54,16 +53,31 @@ _SPINNER = ['|', '/', '-', '\\']
|
||||
# User class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class User(User):
|
||||
class User(user.User):
|
||||
"""
|
||||
This class provides a means to interact with the user via CLI.
|
||||
It implements the interface in gramps.gen.user.User()
|
||||
"""
|
||||
def __init__(self, callback=None, error=None):
|
||||
def __init__(self, callback=None, error=None, auto_accept=False, quiet=False):
|
||||
"""
|
||||
Init.
|
||||
|
||||
@param error: If given, notify_error delegates to this callback
|
||||
@type error: function(title, error)
|
||||
"""
|
||||
user.User.__init__(self, callback, error)
|
||||
self.steps = 0;
|
||||
self.current_step = 0;
|
||||
self.callback_function = callback
|
||||
self.error_function = error
|
||||
self._input = raw_input if sys.version_info[0] < 3 else input
|
||||
|
||||
def yes(*args):
|
||||
return True
|
||||
|
||||
if auto_accept:
|
||||
self.prompt = yes
|
||||
if quiet:
|
||||
self.begin_progress = self.end_progress = self.step_progress = \
|
||||
self._default_callback = yes
|
||||
|
||||
def begin_progress(self, title, message, steps):
|
||||
"""
|
||||
@ -79,13 +93,13 @@ class User(User):
|
||||
@type steps: int
|
||||
@returns: none
|
||||
"""
|
||||
print(message)
|
||||
self._fileout.write(message)
|
||||
self.steps = steps
|
||||
self.current_step = 0;
|
||||
if self.steps == 0:
|
||||
sys.stdout.write(_SPINNER[self.current_step])
|
||||
self._fileout.write(_SPINNER[self.current_step])
|
||||
else:
|
||||
sys.stdout.write("00%")
|
||||
self._fileout.write("00%")
|
||||
|
||||
def step_progress(self):
|
||||
"""
|
||||
@ -94,45 +108,47 @@ class User(User):
|
||||
self.current_step += 1
|
||||
if self.steps == 0:
|
||||
self.current_step %= 4
|
||||
sys.stdout.write("\r %s " % _SPINNER[self.current_step])
|
||||
self._fileout.write("\r %s " % _SPINNER[self.current_step])
|
||||
else:
|
||||
percent = int((float(self.current_step) / self.steps) * 100)
|
||||
sys.stdout.write("\r%02d%%" % percent)
|
||||
|
||||
def callback(self, percentage, text=None):
|
||||
"""
|
||||
Display the precentage.
|
||||
"""
|
||||
if self.callback_function:
|
||||
if text:
|
||||
self.callback_function(percentage, text)
|
||||
else:
|
||||
self.callback_function(percentage)
|
||||
else:
|
||||
if text is None:
|
||||
sys.stdout.write("\r%02d%%" % percentage)
|
||||
else:
|
||||
sys.stdout.write("\r%02d%% %s" % (percentage, text))
|
||||
self._fileout.write("\r%02d%%" % percent)
|
||||
|
||||
def end_progress(self):
|
||||
"""
|
||||
Stop showing the progress indicator to the user.
|
||||
"""
|
||||
sys.stdout.write("\r100%\n")
|
||||
self._fileout.write("\r100%\n")
|
||||
|
||||
def prompt(self, title, question):
|
||||
def prompt(self, title, message, accept_label, reject_label):
|
||||
"""
|
||||
Ask the user a question. The answer must be "yes" or "no".
|
||||
The user will be forced to answer the question before proceeding.
|
||||
Prompt the user with a message to select an alternative.
|
||||
|
||||
@param title: the title of the question
|
||||
@param title: the title of the question, e.g.: "Undo history warning"
|
||||
@type title: str
|
||||
@param question: the question
|
||||
@param message: the message, e.g.: "Proceeding with the tool will
|
||||
erase the undo history. If you think you may want to revert
|
||||
running this tool, please stop here and make a backup of the DB."
|
||||
@type question: str
|
||||
@param accept_label: what to call the positive choice, e.g.: "Proceed"
|
||||
@type accept_label: str
|
||||
@param reject_label: what to call the negative choice, e.g.: "Stop"
|
||||
@type reject_label: str
|
||||
@returns: the user's answer to the question
|
||||
@rtype: bool
|
||||
"""
|
||||
return False
|
||||
accept_label = accept_label.replace("_", "")
|
||||
reject_label = reject_label.replace("_", "")
|
||||
text = "{t}\n{m} ([{y}]/{n}): ".format(
|
||||
t = title,
|
||||
m = message,
|
||||
y = accept_label,
|
||||
n = reject_label)
|
||||
print (text, file = self._fileout) # TODO python3 add flush=True
|
||||
try:
|
||||
reply = self._input()
|
||||
return reply == "" or reply == accept_label
|
||||
except EOFError:
|
||||
return False
|
||||
|
||||
def warn(self, title, warning=""):
|
||||
"""
|
||||
@ -144,7 +160,7 @@ class User(User):
|
||||
@type warning: str
|
||||
@returns: none
|
||||
"""
|
||||
print("%s %s" % (title, warning))
|
||||
self._fileout.write("%s %s" % (title, warning))
|
||||
|
||||
def notify_error(self, title, error=""):
|
||||
"""
|
||||
@ -159,7 +175,7 @@ class User(User):
|
||||
if self.error_function:
|
||||
self.error_function(title, error)
|
||||
else:
|
||||
print("%s %s" % (title, error))
|
||||
self._fileout.write("%s %s" % (title, error))
|
||||
|
||||
def notify_db_error(self, error):
|
||||
"""
|
||||
@ -180,5 +196,5 @@ class User(User):
|
||||
"""
|
||||
Displays information to the CLI
|
||||
"""
|
||||
print(msg1)
|
||||
print(infotext)
|
||||
self._fileout.write(msg1)
|
||||
self._fileout.write(infotext)
|
||||
|
@ -212,6 +212,8 @@ register('interface.filter-editor-height', 350)
|
||||
register('interface.fullscreen', False)
|
||||
register('interface.grampletbar-close', False)
|
||||
register('interface.height', 500)
|
||||
register('interface.ignore-gexiv2', False)
|
||||
register('interface.ignore-osmgpsmap', False)
|
||||
register('interface.lds-height', 450)
|
||||
register('interface.lds-width', 600)
|
||||
register('interface.location-height', 250)
|
||||
|
@ -194,6 +194,7 @@ LICENSE_FILE = os.path.join(_resources.doc_dir, 'COPYING')
|
||||
from gramps.gen.utils.grampslocale import GrampsLocale
|
||||
GRAMPS_LOCALE = GrampsLocale(localedir=_resources.locale_dir)
|
||||
_ = GRAMPS_LOCALE.translation.sgettext
|
||||
GTK_GETTEXT_DOMAIN = 'gtk30'
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -203,8 +204,8 @@ _ = GRAMPS_LOCALE.translation.sgettext
|
||||
COPYRIGHT_MSG = "© 2001-2006 Donald N. Allingham\n" \
|
||||
"© 2007-2013 The Gramps Developers"
|
||||
COMMENTS = _("Gramps (Genealogical Research and Analysis "
|
||||
"Management Programming System) is a personal "
|
||||
"genealogy program.")
|
||||
"Management Programming System)\n"
|
||||
"is a personal genealogy program.")
|
||||
AUTHORS = [
|
||||
"Alexander Roitman",
|
||||
"Benny Malengier",
|
||||
@ -302,8 +303,10 @@ LONGOPTS = [
|
||||
"usage",
|
||||
"version",
|
||||
"qml",
|
||||
"yes",
|
||||
"quiet",
|
||||
]
|
||||
|
||||
SHORTOPTS = "O:C:i:e:f:a:p:d:c:lLthuv?s"
|
||||
SHORTOPTS = "O:C:i:e:f:a:p:d:c:lLthuv?syq"
|
||||
|
||||
GRAMPS_UUID = uuid.UUID('516cd010-5a41-470f-99f8-eb22f1098ad6')
|
||||
|
@ -132,15 +132,15 @@ def has_display():
|
||||
temp, sys.argv = sys.argv, sys.argv[:1]
|
||||
try:
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
except:
|
||||
return False
|
||||
|
||||
try:
|
||||
test = Gtk.init_check(temp)
|
||||
test = Gtk.init_check(temp) and \
|
||||
Gdk.Display.get_default()
|
||||
sys.argv = temp
|
||||
if test:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return bool(test)
|
||||
except:
|
||||
sys.argv = temp
|
||||
return False
|
||||
|
@ -38,11 +38,13 @@ from ._datehandler import (LANG, LANG_SHORT, LANG_TO_PARSER, LANG_TO_DISPLAY,
|
||||
register_datehandler)
|
||||
|
||||
# Import all the localized handlers
|
||||
from . import _date_ar
|
||||
from . import _date_bg
|
||||
from . import _date_ca
|
||||
from . import _date_cs
|
||||
from . import _date_da
|
||||
from . import _date_de
|
||||
from . import _date_el
|
||||
from . import _date_es
|
||||
from . import _date_fi
|
||||
from . import _date_fr
|
||||
|
217
gramps/gen/datehandler/_date_ar.py
Normal file
@ -0,0 +1,217 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2004-2006 Donald N. Allingham
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id$
|
||||
|
||||
"""
|
||||
Arabic-specific classes for parsing and displaying dates.
|
||||
"""
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from __future__ import unicode_literals
|
||||
import re
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from ..lib.date import Date
|
||||
from ._dateparser import DateParser
|
||||
from ._datedisplay import DateDisplay
|
||||
from ._datehandler import register_datehandler
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Arabic parser class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateParserAR(DateParser):
|
||||
"""
|
||||
Convert a text string into a Date object. If the date cannot be
|
||||
converted, the text string is assigned.
|
||||
"""
|
||||
|
||||
# modifiers before the date
|
||||
modifier_to_int = {
|
||||
'قبل' : Date.MOD_BEFORE,
|
||||
'قبل' : Date.MOD_BEFORE,
|
||||
'قبل.' : Date.MOD_BEFORE,
|
||||
'بعد' : Date.MOD_AFTER,
|
||||
'بعد' : Date.MOD_AFTER,
|
||||
'بعد.' : Date.MOD_AFTER,
|
||||
'حوالي' : Date.MOD_ABOUT,
|
||||
'حوالي.' : Date.MOD_ABOUT,
|
||||
'حوالي' : Date.MOD_ABOUT,
|
||||
'حوالي' : Date.MOD_ABOUT,
|
||||
'حوالي.' : Date.MOD_ABOUT,
|
||||
'حوالي' : Date.MOD_ABOUT,
|
||||
}
|
||||
# in some languages some of above listed modifiers are after the date,
|
||||
# in that case the subclass should put them into this dictionary instead
|
||||
modifier_after_to_int = {}
|
||||
|
||||
islamic_to_int = {
|
||||
"محرّم" : 1, "محرّم الحرام" : 1,
|
||||
"صفر" : 2, "ربيع الأول" : 3,
|
||||
"ربيع 1" : 3, "ربيع الأخير" : 4,
|
||||
"ربيع الثاني" : 4, "ربيع الثاني" : 4,
|
||||
"ربيع الثاني" : 4, "ربيع الثاني" : 4,
|
||||
"ربيع 2" : 4, "جمادى الأولى" : 5,
|
||||
"جمادى الأول" : 5, "جمادى 1" : 5,
|
||||
"جمادى الثانية" : 6, "جمادى الأخير" : 6,
|
||||
"جمادى الثاني" : 6, "جمادى 2" : 5,
|
||||
"رجب" : 7, "شعبان" : 8,
|
||||
"شعبان" : 8, "رمضان" : 9,
|
||||
"رمضان" : 9, "شوال" : 10,
|
||||
"ذو القعدة" : 11, "ذو القعدة" : 11,
|
||||
"ذو القعدة" : 11, "ذو الحجة" : 12,
|
||||
"ذو الحجة" : 12, "ذو الحجة" : 12,
|
||||
}
|
||||
|
||||
bce = ["قبل الميلاد", "قبل الميلاد", "قبل الميلاد", "قبل الميلاد", "قبل الميلاد", "قبل الميلاد" ]
|
||||
|
||||
calendar_to_int = {
|
||||
'غريغوري' : Date.CAL_GREGORIAN,
|
||||
'غريغوري' : Date.CAL_GREGORIAN,
|
||||
'يوليوسي' : Date.CAL_JULIAN,
|
||||
'يوليوسي' : Date.CAL_JULIAN,
|
||||
'عبري' : Date.CAL_HEBREW,
|
||||
'عبري' : Date.CAL_HEBREW,
|
||||
'إسلامي' : Date.CAL_ISLAMIC,
|
||||
'إسلامي' : Date.CAL_ISLAMIC,
|
||||
'فرنسي' : Date.CAL_FRENCH,
|
||||
'فرنسي جمهوري': Date.CAL_FRENCH,
|
||||
'فرنسي' : Date.CAL_FRENCH,
|
||||
'فارسي' : Date.CAL_PERSIAN,
|
||||
'فارسي' : Date.CAL_PERSIAN,
|
||||
'سويدي' : Date.CAL_SWEDISH,
|
||||
'سويدي' : Date.CAL_SWEDISH,
|
||||
}
|
||||
|
||||
quality_to_int = {
|
||||
'متوقع' : Date.QUAL_ESTIMATED,
|
||||
'متوقع.' : Date.QUAL_ESTIMATED,
|
||||
'متوقع' : Date.QUAL_ESTIMATED,
|
||||
'محسوب.' : Date.QUAL_CALCULATED,
|
||||
'محسوب' : Date.QUAL_CALCULATED,
|
||||
'محسوب' : Date.QUAL_CALCULATED,
|
||||
}
|
||||
|
||||
def init_strings(self):
|
||||
"""
|
||||
This method compiles regular expression strings for matching dates.
|
||||
"""
|
||||
DateParser.init_strings(self)
|
||||
_span_1 = ['من']
|
||||
_span_2 = ['إلى']
|
||||
_range_1 = ['بين']
|
||||
_range_2 = ['و']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Arabic display
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateDisplayAR(DateDisplay):
|
||||
"""
|
||||
Arabic language date display class.
|
||||
"""
|
||||
# this is used to display the 12 gregorian months
|
||||
long_months = ( "", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار",
|
||||
"حزيران", "تموز", "آب", "أيلول", "تشرين الأول",
|
||||
"تشرين الثاني", "كانون الأول" )
|
||||
|
||||
short_months = ( "", "كانون2", "شباط", "آذار", "نيسان", "أيار", "حزيران",
|
||||
"تموز", "آب", "أيلول", "تشرين1", "تشرين2", "كانون1" )
|
||||
|
||||
islamic = (
|
||||
"", "محرّم", "صفر", "ربيع الأول", "ربيع الثاني",
|
||||
"جمادى الأولى", "جمادى الثانية", "رجب", "شعبان",
|
||||
"رمضان", "شوال", "ذو القعدة", "ذو الحجة"
|
||||
)
|
||||
|
||||
formats = (
|
||||
"YYYY-MM-DD (قياسي)", "عددي", "شهر يوم, سنة",
|
||||
"شهر يوم, سنة", "يوم شهر سنة", "يوم شهر سنة"
|
||||
)
|
||||
# this must agree with DateDisplayEn's "formats" definition
|
||||
# (since no locale-specific _display_gregorian exists, here)
|
||||
|
||||
calendar = (
|
||||
"", "يوليوسي", "عبري", "فرنسي",
|
||||
"فارسي", "إسلامي", "سويدي"
|
||||
)
|
||||
|
||||
_mod_str = ("", "قبل ", "بعد ", "حوالي ", "", "", "")
|
||||
|
||||
_qual_str = ("", "متوقع ", "محسوب ")
|
||||
|
||||
_bce_str = "%s قبل الميلاد."
|
||||
|
||||
def display(self, date):
|
||||
"""
|
||||
Return a text string representing the date.
|
||||
"""
|
||||
mod = date.get_modifier()
|
||||
cal = date.get_calendar()
|
||||
qual = date.get_quality()
|
||||
start = date.get_start_date()
|
||||
newyear = date.get_new_year()
|
||||
|
||||
qual_str = self._qual_str[qual]
|
||||
|
||||
if mod == Date.MOD_TEXTONLY:
|
||||
return date.get_text()
|
||||
elif start == Date.EMPTY:
|
||||
return ""
|
||||
elif mod == Date.MOD_SPAN:
|
||||
d1 = self.display_cal[cal](start)
|
||||
d2 = self.display_cal[cal](date.get_stop_date())
|
||||
scal = self.format_extras(cal, newyear)
|
||||
return "%s%s %s %s %s%s" % (qual_str, 'من', d1, 'إلى', d2, scal)
|
||||
elif mod == Date.MOD_RANGE:
|
||||
d1 = self.display_cal[cal](start)
|
||||
d2 = self.display_cal[cal](date.get_stop_date())
|
||||
scal = self.format_extras(cal, newyear)
|
||||
return "%s%s %s %s %s%s" % (qual_str, 'بين', d1, 'و', d2, scal)
|
||||
else:
|
||||
text = self.display_cal[date.get_calendar()](start)
|
||||
scal = self.format_extras(cal, newyear)
|
||||
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Register classes
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
register_datehandler(('ar_AR', 'ar', 'Arabic', 'arabic'),
|
||||
DateParserAR, DateDisplayAR)
|
@ -168,7 +168,7 @@ class DateParserBG(DateParser):
|
||||
_span_2 = ['до']
|
||||
_range_1 = ['между']
|
||||
_range_2 = ['и']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
@ -211,6 +211,8 @@ class DateDisplayBG(DateDisplay):
|
||||
formats = (
|
||||
"ГГГГ-ММ-ДД (ISO)", "Числов", "Месец Ден, Година", "Мес. Ден, Година", "Ден Месец Година", "Ден Мес. Година"
|
||||
)
|
||||
# this must agree with DateDisplayEn's "formats" definition
|
||||
# (since no locale-specific _display_gregorian exists, here)
|
||||
|
||||
hebrew = ( "",
|
||||
"Тишрей",
|
||||
|
@ -102,7 +102,7 @@ class DateParserCA(DateParser):
|
||||
_span_2 = ['fins a']
|
||||
_range_1 = ['entre', 'ent\.', 'ent']
|
||||
_range_2 = ['i']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
@ -156,6 +156,8 @@ class DateDisplayCA(DateDisplay):
|
||||
"AAAA-MM-DD (ISO)", "Numèrica", "Mes Dia, Any",
|
||||
"MES Dia, Any", "Dia Mes, Any", "Dia MES, Any"
|
||||
)
|
||||
# this must agree with DateDisplayEn's "formats" definition
|
||||
# (since no locale-specific _display_gregorian exists, here)
|
||||
|
||||
def display(self, date):
|
||||
"""
|
||||
|
@ -218,7 +218,8 @@ class DateDisplayCZ(DateDisplay):
|
||||
"den. měsíc rok",
|
||||
"den. měs rok"
|
||||
)
|
||||
|
||||
# this must agree with DateDisplayEn's "formats" definition
|
||||
# (since no locale-specific _display_gregorian exists, here)
|
||||
|
||||
def display(self, date):
|
||||
"""
|
||||
|
@ -121,6 +121,8 @@ class DateDisplayDa(DateDisplay):
|
||||
"Dag måned år",
|
||||
"Dag md År",
|
||||
)
|
||||
# this must agree with DateDisplayEn's "formats" definition
|
||||
# (since no locale-specific _display_gregorian exists, here)
|
||||
|
||||
calendar = (
|
||||
"",
|
||||
|
@ -221,12 +221,18 @@ class DateDisplayDE(DateDisplay):
|
||||
"JJJJ-MM-DD (ISO)", "Numerisch", "Monat Tag Jahr",
|
||||
"MONAT Tag Jahr", "Tag. Monat Jahr", "Tag. MONAT Jahr"
|
||||
)
|
||||
# this definition must agree with its "_display_gregorian" method
|
||||
|
||||
def _display_gregorian(self, date_val):
|
||||
"""
|
||||
display gregorian calendar date in different format
|
||||
"""
|
||||
# this must agree with its locale-specific "formats" definition
|
||||
year = self._slash_year(date_val[2], date_val[3])
|
||||
if self.format == 0:
|
||||
return self.display_iso(date_val)
|
||||
elif self.format == 1:
|
||||
# day.month_number.year
|
||||
if date_val[3]:
|
||||
return self.display_iso(date_val)
|
||||
else:
|
||||
@ -237,7 +243,7 @@ class DateDisplayDE(DateDisplay):
|
||||
value = value.replace('%d', str(date_val[0]))
|
||||
value = value.replace('%Y', str(date_val[2]))
|
||||
elif self.format == 2:
|
||||
# Month Day, Year
|
||||
# month_name day, year
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = year
|
||||
@ -247,7 +253,7 @@ class DateDisplayDE(DateDisplay):
|
||||
value = "%s %d, %s" % (self.long_months[date_val[1]],
|
||||
date_val[0], year)
|
||||
elif self.format == 3:
|
||||
# MON Day, Year
|
||||
# month_abbreviation day, year
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = year
|
||||
@ -257,7 +263,7 @@ class DateDisplayDE(DateDisplay):
|
||||
value = "%s %d, %s" % (self.short_months[date_val[1]],
|
||||
date_val[0], year)
|
||||
elif self.format == 4:
|
||||
# Day Month Year
|
||||
# day. month_name year
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = year
|
||||
@ -267,7 +273,7 @@ class DateDisplayDE(DateDisplay):
|
||||
value = "%d. %s %s" % (date_val[0],
|
||||
self.long_months[date_val[1]], year)
|
||||
else:
|
||||
# Day MON Year
|
||||
# day. month_abbreviation year
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = year
|
||||
|
252
gramps/gen/datehandler/_date_el.py
Normal file
@ -0,0 +1,252 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2004-2006 Donald N. Allingham
|
||||
# Copyright (C) 2013 Zissis Papadopoulos <zissis@mail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id$
|
||||
|
||||
"""
|
||||
Greek-specific classes for parsing and displaying dates.
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import re
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# GRAMPS modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from ..lib.date import Date
|
||||
from ._dateparser import DateParser
|
||||
from ._datedisplay import DateDisplay
|
||||
from ._datehandler import register_datehandler
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Greek parser class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateParserEL(DateParser):
|
||||
"""
|
||||
Convert a text string into a Date object. If the date cannot be
|
||||
converted, the text string is assigned.
|
||||
"""
|
||||
|
||||
# modifiers before the date
|
||||
modifier_to_int = {
|
||||
'προ του' : Date.MOD_BEFORE,
|
||||
'πριν το' : Date.MOD_BEFORE,
|
||||
'πριν από τις' : Date.MOD_BEFORE,
|
||||
'πριν από την' : Date.MOD_BEFORE,
|
||||
'πριν από το' : Date.MOD_BEFORE,
|
||||
'πριν από τον' : Date.MOD_BEFORE,
|
||||
'προ' : Date.MOD_BEFORE,
|
||||
'πρ.' : Date.MOD_BEFORE,
|
||||
'μετά το' : Date.MOD_AFTER,
|
||||
'μετά από τις' : Date.MOD_AFTER,
|
||||
'μετά από την' : Date.MOD_AFTER,
|
||||
'μετά από το' : Date.MOD_AFTER,
|
||||
'μετά από τον' : Date.MOD_AFTER,
|
||||
'μετά' : Date.MOD_AFTER,
|
||||
'μετ.' : Date.MOD_AFTER,
|
||||
'γύρω στο' : Date.MOD_ABOUT,
|
||||
'γύρω στον' : Date.MOD_ABOUT,
|
||||
'γύρω στις' : Date.MOD_ABOUT,
|
||||
'περίπου το' : Date.MOD_ABOUT,
|
||||
'περ.' : Date.MOD_ABOUT,
|
||||
'γυρ.' : Date.MOD_ABOUT,
|
||||
'~' : Date.MOD_ABOUT,
|
||||
}
|
||||
# in some languages some of above listed modifiers are after the date,
|
||||
# in that case the subclass should put them into this dictionary instead
|
||||
modifier_after_to_int = {}
|
||||
|
||||
bce = ["π.Χ.", "π.Κ.Χ.", "π.Κ.Ε.", "π.Χ" ]
|
||||
|
||||
calendar_to_int = {
|
||||
'γρηγοριανό' : Date.CAL_GREGORIAN,
|
||||
'γ' : Date.CAL_GREGORIAN,
|
||||
'ιουλιανό' : Date.CAL_JULIAN,
|
||||
'ι' : Date.CAL_JULIAN,
|
||||
'εβραϊκό' : Date.CAL_HEBREW,
|
||||
'ε' : Date.CAL_HEBREW,
|
||||
'ισλαμικό' : Date.CAL_ISLAMIC,
|
||||
'ισλ' : Date.CAL_ISLAMIC,
|
||||
'γαλλικό' : Date.CAL_FRENCH,
|
||||
'γαλλικής δημοκρατίας': Date.CAL_FRENCH,
|
||||
'γ' : Date.CAL_FRENCH,
|
||||
'περσικό' : Date.CAL_PERSIAN,
|
||||
'π' : Date.CAL_PERSIAN,
|
||||
'σουηδικό' : Date.CAL_SWEDISH,
|
||||
'σ' : Date.CAL_SWEDISH,
|
||||
}
|
||||
|
||||
quality_to_int = {
|
||||
'κατʼ εκτίμηση' : Date.QUAL_ESTIMATED,
|
||||
'εκτιμώμενη' : Date.QUAL_ESTIMATED,
|
||||
'εκτ.' : Date.QUAL_ESTIMATED,
|
||||
'εκτ' : Date.QUAL_ESTIMATED,
|
||||
'υπολογ' : Date.QUAL_CALCULATED,
|
||||
'υπολογ.' : Date.QUAL_CALCULATED,
|
||||
'υπολογισμένη' : Date.QUAL_CALCULATED,
|
||||
'με υπολογισμό' : Date.QUAL_CALCULATED,
|
||||
}
|
||||
|
||||
def init_strings(self):
|
||||
"""
|
||||
This method compiles regular expression strings for matching dates.
|
||||
"""
|
||||
DateParser.init_strings(self)
|
||||
_span_1 = ['από']
|
||||
_span_2 = ['έως']
|
||||
_range_1 = ['μετ', 'μετ\.', 'μεταξύ']
|
||||
_range_2 = ['και']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_range_1), '|'.join(_range_2)),
|
||||
re.IGNORECASE)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Greek display
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class DateDisplayEL(DateDisplay):
|
||||
"""
|
||||
Greek language date display class.
|
||||
"""
|
||||
# this is used to display the 12 gregorian months
|
||||
long_months = ( "", "Ιανουάριος", "Φεβρουάριος", "Μάρτιος",
|
||||
"Απρίλιος", "Μάιος", "Ιούνιος",
|
||||
"Ιούλιος", "Αύγουστος", "Σεπτέμβριος",
|
||||
"Οκτώβριος", "Νοέμβριος", "Δεκέμβριος" )
|
||||
|
||||
short_months = ( "", "Ιαν", "Φεβ", "Μαρ", "Απρ", "Μάι", "Ιουν",
|
||||
"Ιουλ", "Αύγ", "Σεπ", "Οκτ", "Νοε", "Δεκ" )
|
||||
|
||||
_mod_str = ("", "προ του ", "μετά το ", "γύρω στο ", "", "", "")
|
||||
|
||||
_qual_str = ("", "εκτιμώμενη ", "υπολογισμένη ")
|
||||
|
||||
_bce_str = "%s π.Χ."
|
||||
|
||||
formats = (
|
||||
"ΕΕΕΕ-ΜΜ-ΗΗ (ISO)", "ΗΗ-ΜΜ-ΕΕΕΕ", "ΗΗ/ΜΜ/ΕΕΕΕ",
|
||||
"ΗΗ Μήνας ΕΕΕΕ", "ΗΗ Μήν ΕΕΕΕ"
|
||||
)
|
||||
# this definition must agree with its "_display_gregorian" method
|
||||
|
||||
def _display_gregorian(self, date_val):
|
||||
"""
|
||||
display gregorian calendar date in different format
|
||||
"""
|
||||
# this must agree with its locale-specific "formats" definition
|
||||
year = self._slash_year(date_val[2], date_val[3])
|
||||
if self.format == 0:
|
||||
return self.display_iso(date_val)
|
||||
elif self.format == 1:
|
||||
# day-month_number-year
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = year
|
||||
else:
|
||||
value = "%s-%s" % (date_val[1], year)
|
||||
else:
|
||||
value = "%d-%s-%s" % (date_val[0], date_val[1], year)
|
||||
elif self.format == 2:
|
||||
# day/month_number/year
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = year
|
||||
else:
|
||||
value = "%s/%s" % (date_val[1], year)
|
||||
else:
|
||||
value = "%d/%s/%s" % (date_val[0], date_val[1], year)
|
||||
elif self.format == 3:
|
||||
# day month_name year
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = year
|
||||
else:
|
||||
value = "%s %s" % (self.long_months[date_val[1]], year)
|
||||
else:
|
||||
value = "%d %s %s" % (date_val[0],
|
||||
self.long_months[date_val[1]], year)
|
||||
else:
|
||||
# day month_abbreviation year
|
||||
if date_val[0] == 0:
|
||||
if date_val[1] == 0:
|
||||
value = year
|
||||
else:
|
||||
value = "%s %s" % (self.short_months[date_val[1]], year)
|
||||
else:
|
||||
value = "%d %s %s" % (date_val[0],
|
||||
self.short_months[date_val[1]], year)
|
||||
if date_val[2] < 0:
|
||||
return self._bce_str % value
|
||||
else:
|
||||
return value
|
||||
|
||||
def display(self, date):
|
||||
"""
|
||||
Return a text string representing the date.
|
||||
"""
|
||||
mod = date.get_modifier()
|
||||
cal = date.get_calendar()
|
||||
qual = date.get_quality()
|
||||
start = date.get_start_date()
|
||||
newyear = date.get_new_year()
|
||||
|
||||
qual_str = self._qual_str[qual]
|
||||
|
||||
if mod == Date.MOD_TEXTONLY:
|
||||
return date.get_text()
|
||||
elif start == Date.EMPTY:
|
||||
return ""
|
||||
elif mod == Date.MOD_SPAN:
|
||||
d1 = self.display_cal[cal](start)
|
||||
d2 = self.display_cal[cal](date.get_stop_date())
|
||||
scal = self.format_extras(cal, newyear)
|
||||
return "%s%s %s %s %s%s" % (qual_str, 'από', d1, 'έως', d2, scal)
|
||||
elif mod == Date.MOD_RANGE:
|
||||
d1 = self.display_cal[cal](start)
|
||||
d2 = self.display_cal[cal](date.get_stop_date())
|
||||
scal = self.format_extras(cal, newyear)
|
||||
return "%s%s %s %s %s%s" % (qual_str, 'μεταξύ', d1, 'και', d2, scal)
|
||||
else:
|
||||
text = self.display_cal[date.get_calendar()](start)
|
||||
scal = self.format_extras(cal, newyear)
|
||||
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Register classes
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
register_datehandler(('el_GR', 'el_CY', 'el', 'Greek', 'greek'),
|
||||
DateParserEL, DateDisplayEL)
|
@ -101,7 +101,7 @@ class DateParserES(DateParser):
|
||||
_span_2 = ['a']
|
||||
_range_1 = ['entre', 'ent\.', 'ent']
|
||||
_range_2 = ['y']
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
('|'.join(_span_1), '|'.join(_span_2)),
|
||||
re.IGNORECASE)
|
||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||
@ -140,6 +140,8 @@ class DateDisplayES(DateDisplay):
|
||||
"AAAA-MM-DD (ISO)", "Numérica", "Mes Día, Año",
|
||||
"MES Día, Año", "Día Mes, Año", "Día MES, Año"
|
||||
)
|
||||
# this must agree with DateDisplayEn's "formats" definition
|
||||
# (since no locale-specific _display_gregorian exists, here)
|
||||
|
||||
def display(self, date):
|
||||
"""
|
||||
|