Compare commits

..

296 Commits

Author SHA1 Message Date
9f0f9be8ea update NEWS
svn: r23470
2013-11-08 09:25:13 -08:00
870f5334ec Prepare mac build for 4.0.2 release.
svn: r23469
2013-11-08 09:24:53 -08:00
cdbcbd1446 Python3 spacing
svn: r23466
2013-11-07 11:35:21 -08:00
17ac22d959 Python3 spacing
svn: r23464
2013-11-07 11:34:59 -08:00
7e1eb33466 Python3 syntax
svn: r23463
2013-11-07 11:34:31 -08:00
2c266cada1 Missing newline
svn: r23462
2013-11-07 11:34:05 -08:00
92f65f5628 updated german translation
svn: r23460
2013-11-07 11:33:40 -08:00
959162e862 6918: http://lintian.debian.org/tags/old-fsf-address-in-copyright-file.html
svn: r23456
2013-11-07 11:33:16 -08:00
61347c3093 Added callback parameter to __init__ method so that all editors have a uniform signature (called from Note Link)
svn: 23454
2013-11-07 11:32:35 -08:00
dd818829bd Fix long columns of text that span pages
svn: r23453
2013-11-07 11:32:09 -08:00
a4c17b6573 add Greek date handler to NEWS
svn: r23452
2013-11-07 11:31:37 -08:00
4aa97e3ee9 merge gramps34 news
svn: r23451
2013-11-07 11:31:02 -08:00
e127df70c5 updated german translation
svn: r23443
2013-10-30 20:33:47 +00:00
2e28011a25 updated german translation
svn: r23441
2013-10-29 22:14:52 +00:00
5bb0d47b2c 7151: update start of Ramadan in France
svn: r23439
2013-10-29 17:52:02 +00:00
72aae8ea69 typos
svn: r23436
2013-10-29 15:35:14 +00:00
3c55f8c668 updated german translation
svn: r23428
2013-10-27 20:57:33 +00:00
e5586c67da updated german translation
svn: r23427
2013-10-27 13:10:31 +00:00
8015627b30 7154: fix Norwegian Bokmål's header
svn: r23425
2013-10-27 00:54:14 +00:00
5732e96e8b updated Arabic translation (by Muhammad Bashir Al-Noimi)
svn: r23423
2013-10-26 20:56:32 +00:00
6971d583ac RU: translation update
svn: r23403
2013-10-25 11:39:36 +00:00
1541ad9543 RU: translation update for navweb
svn: r23402
2013-10-25 11:38:55 +00:00
18fb7ac41a RU: fix name editor keywords
svn: r23400
2013-10-25 11:15:43 +00:00
88314f3ccd 7154: fix Norwegian Bokmål's header
svn: r23398
2013-10-25 11:01:10 +00:00
e39cb42091 merge some strings (need review) for Breton
svn: r23396
2013-10-25 09:27:20 +00:00
0837003bc9 merge some strings from gramps34 and Devhelp (Gtk/Gnome API)
svn: r23395
2013-10-25 09:11:25 +00:00
d982726200 update template
svn: r23394
2013-10-25 08:39:56 +00:00
395a4f6110 czech translation update
svn: r23379
2013-10-24 08:41:10 +00:00
841f5c261b 7150: crash on backup or export
svn: r23366
2013-10-22 16:52:53 +00:00
47b9144ed1 5098: fix a runaway merge artifact
svn: r23365
2013-10-22 15:07:47 +00:00
940fb10ecc updated dutch translation
svn: r23358
2013-10-20 21:20:21 +00:00
ba541e6c03 7125/7102: port my fix from gramps34
svn: r23355
2013-10-20 16:47:38 +00:00
2bf775fad3 7124: Complete Individual Report does incomplete translation
svn: r23353
2013-10-20 16:46:31 +00:00
e8f7341fb5 fix RU translation of WebCal
svn: r23352
2013-10-20 14:46:09 +00:00
70ad7761e6 RU translation update
svn: r23344
2013-10-20 11:05:06 +00:00
647cc6b50d updated dutch translation
svn: r23342
2013-10-19 20:43:54 +00:00
ccd8490f33 updated dutch translation
svn: r23341
2013-10-19 20:37:27 +00:00
f488b4c33e Fixed new Gtk Drag/Drop names
svn: r23337
2013-10-19 03:02:50 +00:00
902fa3da89 added SVN properties, and SVN "Id" lines if needed
svn: r23333
2013-10-17 19:01:17 +00:00
0f8e1c52e0 6678: Database Differences Report crashes 4.0 beta svn 21228
svn: r23330
2013-10-17 12:07:04 +00:00
196d52c6e5 7129: the Family Group Report doesn't show "family" attributes
svn: r23319
2013-10-13 21:10:46 +00:00
365f8e7c2e updated german translation
svn: r23317
2013-10-13 17:53:34 +00:00
a39ea168ab 7090: wrong age for dead people reported by webcal
svn: r23306
2013-10-11 11:46:06 +00:00
df8ec14bcf either fix apostrophe into 'data/tips.xml.in' to avoid message like 'byte 0xd0 in position 7', or remove unicode_literals from po/update_po.py
svn: r23304
2013-10-11 08:31:40 +00:00
8149b4fe72 7110: alternate possessive form, which will limit issues on parsing
svn: r23303
2013-10-11 08:26:07 +00:00
1577a6d8af 7110: typo on AppData file, improve description; 7092 7110: update template and french translation
svn: r23302
2013-10-11 08:10:55 +00:00
aea3259e63 7092: API for reporting issues ["interim" solution, from Nick Hall]
svn: r23300
2013-10-11 00:00:53 +00:00
fe1f262312 7110: add up-to-date screenshots to AppData file; typo on the french translation
svn: r23295
2013-10-10 15:47:32 +00:00
b5f614df8e updated german translation
svn: r23293
2013-10-09 20:51:48 +00:00
386205877b 7102: XML: Gramps does not export 'very low' value (0) for confidence into citation
svn: r23288
2013-10-09 16:19:47 +00:00
75fe63893f 0007114: GtkSpell: language code in a human readable format
svn: r23283
2013-10-08 17:12:11 +00:00
f060bf400d 7006: double entries in de gendex.txt file
svn: r23282
2013-10-08 16:40:00 +00:00
2b1df84121 7068: back-port from trunk
svn: r23281
2013-10-08 13:05:34 +00:00
63d6fe766f 7100: reapply fix from trunk after CR by dsblank
svn: r23278
2013-10-08 12:10:20 +00:00
98b54ebd8b Add Gallery 'Make Active Media', typo
svn: r23273
2013-10-08 01:29:08 +00:00
eb71691372 Add Gallery 'Make Active Media', typo
svn: r23272
2013-10-08 01:12:44 +00:00
d395c4c515 Add Gallery 'Make Active Media'
svn: r23269
2013-10-08 01:03:54 +00:00
918be87230 Freeze headings when scrolling
svn: r23266
2013-10-07 22:03:12 +00:00
cd01cb92ef 7105: missing event_ref_list into get_citation_child_list method
svn: r23262
2013-10-07 14:41:38 +00:00
13eeb38282 7110: Add AppData file
svn: r23259
2013-10-07 09:38:29 +00:00
38b090de64 7110: Add AppData file
svn: r23258
2013-10-07 09:20:16 +00:00
8f43a5ae44 7110: Add AppData file
svn: r23257
2013-10-07 09:12:16 +00:00
dfde3b7931 7110: Add AppData file
svn: r23253
2013-10-07 08:21:57 +00:00
3f76c8742a minor improvement
svn: r23252
2013-10-06 16:22:03 +00:00
3321252b97 typo
svn: r23251
2013-10-06 16:16:53 +00:00
3947c86636 7081: QuestionDialog module moved to gramps.gui.dialog
svn: r23248
2013-10-05 16:38:57 +00:00
19ac1c6f98 updated dutch translation
svn: r23245
2013-10-03 18:43:47 +00:00
516cea49df updated german translation
svn: r23241
2013-10-02 11:35:40 +00:00
c25d544828 7072: fix level for citationref into person
svn: r23239
2013-10-02 08:17:21 +00:00
556da18dde 7081: No QuestionDialog module into gramps.gui.utils
svn: r23238
2013-10-02 08:13:58 +00:00
c9b5c60634 7071: age on date now displays all individuals, update titles
svn: r23235
2013-10-01 08:54:25 +00:00
48f0826235 7088: remove SDN version reporting
Revert "7066: Reapply from trunk sdn version reporting"

This reverts commit dc5f50175abcdaa41ff07eccc688af047bc877e9.

svn: r23231
2013-09-30 19:29:04 +00:00
727932794e 7066: Fix hebrew calendar and remove sdn import
svn: r23228
2013-09-30 17:41:01 +00:00
74f0259505 Move missing Gtk Spell warning
svn: r23223
2013-09-30 12:44:43 +00:00
49c89c1022 7088: rm warning on `import sdn' failure
svn: r23220
2013-09-30 11:45:01 +00:00
98ebecf03c Revert change to suppress warnings
svn: r23217
2013-09-28 14:00:29 +00:00
42462e4bf2 7089: same bug in 3 more reports
reapply r23214 from trunk

svn: r23215
2013-09-28 00:00:37 +00:00
de6841b6cd 7089: webcal mistreats non-gregorian event dates
svn: r23208
2013-09-26 22:05:16 +00:00
ef02b35311 7088: provide a config option to suppress the warning about missing "sdn"
svn: r23206
2013-09-26 21:52:44 +00:00
17bb3fa639 7037: proxy crash with complex person filter
svn: r23200
2013-09-25 22:23:37 +00:00
f8009903c7 friendlier test failure diags
svn: r23198
2013-09-25 15:51:47 +00:00
1d4bb780a2 skip MatchDateTest on non-English locales
svn: r23196
2013-09-25 14:50:39 +00:00
736de69fb9 6881: latin_american broken for partial families
svn: r23192
2013-09-25 11:11:24 +00:00
8b64a00c51 enable Arabic date handler in gramps40
svn: r23190
2013-09-24 16:28:46 +00:00
3e2456b59a 0006802: In Narrative Web report most Family Maps are missing. Problem due to single apostrophe (closing single quotation mark) which needs to be escaped.
svn: r23188
2013-09-24 11:29:51 +00:00
2ad8bb0df2 7037: proxy crash with complex person filter
filter parameter shadowed the global filter :-)

svn: r23183
2013-09-23 15:56:46 +00:00
0908abf1a2 7045: enable cal switch in editor on empty dates
svn: r23178
2013-09-21 08:58:00 +00:00
9dc5890ca7 6940: ErrorReportAssistant_Test.test_buffer_recall
reapply from trunk

svn: r23170
2013-09-20 11:27:45 +00:00
8c25a7e9ce updated german translation
svn: r23165
2013-09-19 17:02:56 +00:00
9f04c31db8 updated dutch translation
svn: r23164
2013-09-19 07:40:10 +00:00
6df93d7182 7063: endless loop in probably_alive_range
Port from gramps34 branch my fix after retest by the bug submitter.

    Add a hack protection for descendants like we already have
    for ancestors, and add a debug printout.

svn: r23161
2013-09-18 14:48:13 +00:00
2741628972 AgeOnDate: backported changes that show reasoning for dead/alive status and age estimate
svn: r23158
2013-09-17 23:52:11 +00:00
63f022348b 7034,7045,7065: back-merge my fixes from trunk
Back-merge from trunk changes to date.py and date_test.py
from the following commits (cumulative, clean apply).

Tests pass (but need to block the CAL_FRENCH on date_test.py:199,
because of bug# 7068 -- skipping it wasn't back-ported in this commit as
it is about the fully fixed issues only!)

	commit fa49752824bd58802773439b35faa39f2d34b151
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 15:44:04 2013 +0000

		provide sensible defautls for all Date.set params

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23126 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 3f32597699f3b372324ad87e6f7a04abac6d19e7
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 15:11:09 2013 +0000

		7045: Setting an invalid date does not raise

		do the sanity checks on a separate date object,
		so that the uncertainty expressed with 0 d/m isn't removed

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23124 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 12edf7e97626e01931c4063b2d94bec3b299a2ed
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 14:23:58 2013 +0000

		7065: Calendar conversion broken for negative date

		fixed, repro steps work as expected now
		date_test still broken due to further blocking issues,
		see #7045

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23123 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 091d4461e9715ab06f1ef6ab3b67517d6608daf3
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 13:24:40 2013 +0000

		7045: Date.set on invalid date does not raise

		refactor _zero_adjust_ymd out of 3 cut-and-paste cases
		the bug with the code inside it remains -- the negative years
		should not be clamped to positive ones!!!!

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23122 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 5987046ac4cac407a4be506da9242f7a5000d878
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 13:00:19 2013 +0000

		7045: Date.set on invalid date does not raise

		Now it does, but another test breaks:

		Traceback (most recent call last):
		  File "/usr/lib/python2.7/unittest/loader.py", line 252, in _find_tests
			module = self._get_module_from_name(name)
		  File "/usr/lib/python2.7/unittest/loader.py", line 230, in _get_module_from_name
			__import__(name)
		  File "/home/vassilii/Gramps/gramps/gen/lib/test/date_test.py", line 136, in <module>
			d.set(quality,modifier,calendar,(4,11,-90,False),"Text comment")
		  File "/home/vassilii/Gramps/gramps/gen/lib/date.py", line 1600, in set
			format(original, value))
		DateError: Invalid year -90 passed in value (4, 11, -90, False)

		because the corresponding year gets adjusted from -90 to 1...

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23121 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit d8876cceb64629ce0a025ff714e4875768ab88a6
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 11:50:58 2013 +0000

		7034: fix test_copy_ymd_preserves_orig

		broken in r23083

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23120 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 7c163636c8e48149a5b09c211ff3dc146ebd84b2
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Tue Sep 10 17:19:16 2013 +0000

		7034: add remove_stop_date parameter

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23083 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit b45e20da3bd67d864420f99cf59fbb9929c58851
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Mon Sep 9 19:31:13 2013 +0000

		7034: probably_alive() failing when no birth-death

		further refactoring of set_.../set2_... common code
		added accessor get_stop_ymd analogous to get_ymd

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23068 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit f13a3fc23e7f0763c49e605b428b6a175c3f9eeb
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Mon Sep 9 19:31:00 2013 +0000

		7034: probably_alive() failing when no birth-death

		docstring update

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23067 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 9ee312d7ed02520b99d2ca1b28f75c87846aa3c6
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:35:15 2013 +0000

		refactor test

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23059 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 07ca997ebd885ad4d1b205907a00509099ac8f9a
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:23:23 2013 +0000

		consistency between offset and non-offset setters

		added ugly parameter _update2 to set_yr_mon_day, needs refactoring

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23058 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 67a904c529642668fbe34bfc97ef2915278ecbdb
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:23:12 2013 +0000

		fix set_yr_mon_day_offset for compound dates

		now calls set2_yr_mon_day_offset

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23057 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 3db06c36d6449ec75cde49b433349cddad40d596
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:23:02 2013 +0000

		refactor set_yr_mon_day and set2_yr_mon_day

		refactor common base

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23056 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 4192680c72cc0028c22fa207fe3f1ff0940358b3
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:22:52 2013 +0000

		raise DateError in set2_... if not is_compound()

		refactor Date to always use is_compound instead of repeating
		its logic everywhere

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23055 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 44195ede18c5a887d4440b4132bd5321f76ce5ff
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:22:40 2013 +0000

		Add some UT for Date.set2_... and fix bugs

		Cut and paste is evil ;-) fix bugs before I refactor the code...

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23054 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	commit 14f6e3a3f35e0ff7b67006bf4996ce63ae665098
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sun Sep 8 19:22:30 2013 +0000

		7034: probably_alive() failing when no birth-death

		docstring fix

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23053 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

svn: r23156
2013-09-17 18:58:06 +00:00
75ca7e1f8c update template and french translation
svn: r23155
2013-09-17 15:22:01 +00:00
3c488f4a6d provide a default null handler for logging; rename locale debug with leading dot
svn: r23154
2013-09-17 15:15:26 +00:00
d06c31dcc3 $ intltool-update -m
svn: r23152
2013-09-17 15:03:10 +00:00
35933c6645 7069: Narrated Web Site media pages do not include multiple references
svn: r23147
2013-09-17 10:35:14 +00:00
56f1f7f22a Fix citation filters so they no longer try to filter citations with a sources filter. Citation filter now allows specification of both source and citation data. When a citation is shown in a search or a filtered citation tree view, the corresponding source is also shown.
svn: r23142
2013-09-16 21:39:09 +00:00
92e5b89b8a 6774: Recursive call in GEDCOM export preview calculation
svn: r23136
2013-09-15 03:01:44 +00:00
95c805f325 7066: Reapply from trunk sdn version reporting
Merged from
	commit dbae40dd1edad52023b828d5eef0fe7eb3684fb6
	Author: Vassilii Khachaturov <vassilii@tarunz.org>
	Date:   Sat Sep 14 19:42:48 2013 +0000

		7066: use sdn module from Calendar package on pypi

		Unfortunately, no package on ubuntu for sdn...

		Bug fixed on trunk, when sdn is present on the system.
		Verified that sdn roundtrip works.
		date_test now fails on 1789-13-4(French) recognized as invalid,
		as it probably should -- I guess this one is a test bug.

		git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@23127 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

	M       gramps/gen/lib/calendar.py
--->M       gramps/grampsapp.py

svn: r23132
2013-09-14 23:24:20 +00:00
1cba16a406 7066: fix our algorithm based on jewish.c in sdn
It looks like we had an earlier fork of the same code,
and the upstream had some bugs fixed.

svn: r23131
2013-09-14 23:18:44 +00:00
dcf62ff1d9 Cope with UnicodeDecodeError on git svn output
svn: r23130
2013-09-14 23:18:33 +00:00
67f33a0c69 add get_git_svn_revision and fall back to it
reapply from trunk

svn: r23119
2013-09-13 21:43:58 +00:00
132c3c60ac wrap description on about dialog
svn: r23114
2013-09-13 13:01:02 +00:00
05b4916e68 6028: gen module should be gramps.gen
svn: r23113
2013-09-13 10:46:43 +00:00
98a1397c35 test: wrap on about dialog?
svn: r23112
2013-09-13 09:47:26 +00:00
02a9501fb9 5098: refactor to use User.progress
Re-apply the reverted commit now that the underlying problem
in gramps/gui/user.py is fixed.

svn: r23108
2013-09-13 08:30:27 +00:00
e49af1998c 7061: docstring update
svn: r23107
2013-09-13 08:08:15 +00:00
790753e99c add Arabic date handler to gramps40, for further testing
svn: r23105
2013-09-13 00:08:20 +00:00
ceea27df84 7061: rename gui.user.User.progress to ._progress
it shadowed the gen.user.User.progress (the context manager),
breaking the ``with user.progress() ... as step:'' idiom!

svn: r23103
2013-09-12 21:30:22 +00:00
acc627b06b Revert "5098: refactor to use User.progress"
OOPS. This was tested only with "runtest.sh", but turns out
things are broken with GUI :-) Reverting for now @gramps40,
will investigate on trunk!

svn: r23098
2013-09-12 20:20:19 +00:00
97799c1303 5098: refactor old code to use User.progress
Reapply from trunk.
    Now that #7061 is done, all the old code should no longer use
    User.begin_.../step_.../end_progress directly any more, preferring
    the context manager instead.
The only reject is on gramps/gen/merge/diff.py that doesn't have
any progress callbacks on gramps40. I'm leaving it untouched.

svn: r23097
2013-09-12 19:50:15 +00:00
c4f4bb2128 7061: Add User.progress context manager
reapply from trunk

svn: r23094
2013-09-12 17:56:50 +00:00
648334623e updated german translation
svn: r23088
2013-09-11 17:42:05 +00:00
96438738b9 living proxy did not exclude living people with iter_people()
svn: r23085
2013-09-11 02:13:11 +00:00
a584c5dfed Ignore meaningless @IDENT@ on CONT or CONC line as detailed at http://www.tamurajones.net/IdentCONT.xhtml
svn: r23079
2013-09-10 16:49:29 +00:00
dcd006b8e6 7013: strip underscores from accept/reject labels
reapply from trunk

svn: r23078
2013-09-10 12:42:36 +00:00
5ce28808c6 7053: Narrated Website report crashes; check for family == None on lookup
svn: r23075
2013-09-10 10:09:46 +00:00
71aa77a26c updated dutch translation
svn: r23072
2013-09-10 06:43:02 +00:00
0f652ce5ef enable suppression of minor missing-package warning (spell checking)
svn: r23069
2013-09-09 20:55:05 +00:00
828408d244 Geography : bug#0006930 : incorrect string in geoplaces
svn: r23065
2013-09-09 15:31:46 +00:00
b26ce84857 Fix error where displaying Date or Confidence in Citation Tree View gave AttributeError: 'NoneType' object has no attribute 'encode'
svn: r23062
2013-09-09 11:27:53 +00:00
1076baad72 6028: same change for cli (thank you Nick); still something wrong with my config (GrampsLocale init)
svn: r23050
2013-09-07 09:36:28 +00:00
14d051aaf1 6028: Fix imports for documentation generation
svn: r23048
2013-09-06 23:09:27 +00:00
0b0a37e2d5 [r23046]Bug 7040: 4.0.2 svn 23029M fails to start catastrophically
svn: r23047
2013-09-06 19:10:32 +00:00
659f868583 czech translation update
svn: r23044
2013-09-06 13:54:25 +00:00
b161383e94 7040: gramps40 svn fails to start catastrophically
indentation fix

svn: r23043
2013-09-06 11:32:30 +00:00
18539be359 6028: try to update API(s) documentation
svn: r23042
2013-09-06 09:25:17 +00:00
745bf7d96f Fix bug listing gramplets already in gramplet bar
svn: r23040
2013-09-05 22:46:46 +00:00
3f32fbcab0 add __main__ for stand-alone test runs
svn: r23038
2013-09-05 08:32:00 +00:00
2a6e1a2f1e rm obsolete utility pre-gramps40 file
svn: r23037
2013-09-05 08:31:49 +00:00
0ddc83fb52 [r23030]Bug 7040: 4.0.2 svn 23029M fails to start catastrophically
svn: r23031
2013-09-04 14:06:00 +00:00
d88b3dd0d0 7034 and 6965: missing method
svn: r23027
2013-09-04 10:39:26 +00:00
15cf8de5e5 update french translation
svn: r23026
2013-09-04 09:05:43 +00:00
7bd8ff1f5d 7034: probably_alive() failing when no birth-death dates specified; 6965: Probably Alive fails when birth date is a range
svn: r23022
2013-09-04 02:49:34 +00:00
a45839799d [r20136]Change grampslocale logger to use __name__ instead of 'grampslocale'
Attempt to suppress 'No handler for logger grampslocale' messages by enrolling the logger in the module hierarchy.

svn: r23020
2013-09-03 23:31:20 +00:00
c31b633134 [r23015]Simplify display_url to just use htmlview or webbrowser
svn: r23019
2013-09-03 23:31:07 +00:00
793e937963 [r23014]Avoid bogus rel-calc translation error message in C locale
svn: r23018
2013-09-03 23:30:53 +00:00
ad3ccbdfa9 [r23013]minor cleanup
svn: r23017
2013-09-03 23:30:37 +00:00
f088797e9f [r23011]Bug 7036: [Win32]Setting LANG crashes Gramps
Also fixes Bug 6919: No automatic language selection in Windows
Thanks to Helge Herz.

svn: r23012
2013-09-03 17:44:14 +00:00
4b7c9361e0 [r23009]Bug 7017: Consolidate run_file into open_file_with_default_application
svn: r23010
2013-09-03 16:36:00 +00:00
7eb5e86acb update french translation
svn: r23000
2013-09-01 15:44:41 +00:00
8655414c18 update template
svn: r22999
2013-09-01 15:31:58 +00:00
2f48b52031 Webapp: update empty.sql to latest db design
svn: r22996
2013-09-01 13:04:06 +00:00
0592f41f2b Webapp: search refinements
svn: r22994
2013-09-01 12:32:44 +00:00
c8bcf58315 updated german translation
svn: r22991
2013-09-01 12:01:52 +00:00
78db437ce7 Webapp: use cuni for python3 compatibility
svn: r22990
2013-09-01 11:42:43 +00:00
c771b25cb5 Use cuni rather than unicode
svn: r22987
2013-09-01 11:20:14 +00:00
124eed0ac7 7025: issue with python3 and unicode string
svn: r22985
2013-09-01 11:05:02 +00:00
c8bae282e0 clean up tmp test files in the end
reapply from trunk

svn: r22984
2013-09-01 07:39:30 +00:00
e6766f5ba1 [r22981]Fix misguided change to poll_external signature
svn: r22982
2013-09-01 04:34:29 +00:00
824b11fd48 7025: 4.0.2 svn 22976M fails to start catastrophically
svn: r22979
2013-09-01 02:34:16 +00:00
3a7b78e74f Webapp: put .distinct() last to remove duplicate matches in queries
svn: r22978
2013-09-01 02:12:13 +00:00
8cc04c5598 Webapp changes to properly show unicode data in html
svn: r22976
2013-08-31 13:46:31 +00:00
ad40ffe102 Remove tagging code introduced in error
svn: r22973
2013-08-31 10:15:36 +00:00
314bbe6ca0 6960: Error merging citations
Reapply from trunk these commits:
commit 1594f61ea2dbd9eddb44a800c26f170ff5702491
Author: vassilii <vassilii@4ae1f11a-8b86-4847-b8af-ab372f36d1fd>
Date:   Fri Aug 30 22:33:58 2013 +0000

    6960: Bless Source with an IndirectCitationBase

    git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22970
4ae1f11a-8b86-4847-b8af-ab372f36d1fd

commit 6ec4b56d6530bd98638cb66365e6205d057f48ca
Author: vassilii <vassilii@4ae1f11a-8b86-4847-b8af-ab372f36d1fd>
Date:   Fri Aug 30 22:03:14 2013 +0000

    6960: mergecitations has broken copy of MCQ

    The MergeCitations batch tool had a cut-and-pasted code
    replicating MergeCitationQuery logic. Naturally, it diverged :-)
    Removed MergeCitations.Merge and use MergeCitationQuery instead.

    git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22969
4ae1f11a-8b86-4847-b8af-ab372f36d1fd

svn: r22971
2013-08-30 22:43:57 +00:00
21fd8f2cfb Fix regular expressions in sidebar filters
svn: r22967
2013-08-30 20:34:01 +00:00
8c3e4701d9 Finish merging bug# 6960 fix from trunk
I don't know why git diff didn't pick up citation.py :(

svn: r22963
2013-08-30 19:14:58 +00:00
d9eab10013 6960: Error merging citations
Merge back to gramps40 my work on the bug fix.

svn: r22962
2013-08-30 19:00:39 +00:00
dacf5f4d3b flags HAS_CLIMERGE and HAS_EXPORTRAW to skip tests
Reapply from trunk my commit r22948

svn: r22961
2013-08-30 19:00:23 +00:00
a474703187 6874: Use shorter names in add gramplet list. Remove old attributes gramplet.
svn: r22958
2013-08-30 18:09:35 +00:00
d1c0be81f8 6786: Invoke editor on double-click in backlinks gramplet
svn: r22955
2013-08-30 16:06:31 +00:00
1dc39d8c1c [r22949]Bug 7017 GUI stuck when external viewer launched
subprocess.checked_call seems to wait on the process that xdg-open
starts, but subprocess.wait doesn't.

svn: r22951
2013-08-29 23:31:33 +00:00
649c105536 [r22842]Clean up some leftovers from 22841
svn: r22950
2013-08-29 23:31:26 +00:00
0880f52c44 Fix dbdjango to be up to date with bsddb of gramps40: added checksum for Media; SourceAttribute and CitationAttribute gained a private flag; all primary objects got tags
svn: r22946
2013-08-29 19:14:52 +00:00
1a1420b61d 0006849: citationtreeview with search bar only searches in sources, not citation data
0006848: citationtreeview corrupts when search bar open and edit occurs
0006829: Searching into source/citation selector disallows to select all related citations, only matching rows

by fixing treebasemodel so it properly deals with secondary objects, and also citationtreemodel so it adds secondary odes even when the parent is not present.

svn: r22940
2013-08-29 18:06:12 +00:00
ca929cfb2f 6960: error merging citations
merge_ref_test still fails...

svn: r22937
2013-08-29 16:20:29 +00:00
0e3c01d6aa Back-merge the UT for gui.user as well
svn: r22934
2013-08-29 12:54:10 +00:00
207ed2434c 7021: pass ArgHandler.user to import_new_db
reapply r22929 from trunk

svn: r22933
2013-08-29 12:44:55 +00:00
0afdb2e361 7016: new cmdline switches -y/--yes and -q/--quiet
reapply r22916 from trunk

testing on gramps40: UT

svn: r22932
2013-08-29 12:41:31 +00:00
4bfb2e082c 7013: Impl. User.prompt based on QuestionDialog2
Reapply r22914 from trunk

Unit tests pass

svn: r22931
2013-08-29 12:35:18 +00:00
3bec0ee5aa languages was set to a list; should be a :-separated string
svn: r22928
2013-08-29 01:19:58 +00:00
92ef108c94 Move css, javascript and web images to data so that they can be found by webapp
svn: r22927
2013-08-28 23:51:42 +00:00
322185b339 4735: Check for updates in a separate thread
svn: r22925
2013-08-28 23:34:20 +00:00
26c3aa31d7 Changes for webapp to work with gramps40
svn: r22923
2013-08-28 23:08:21 +00:00
196ad8feb7 7020: Date filtering fails to work on Family Events in 3.4.6 or 4.0.2; typo, missing 'not'; changed date before and after max to be 9999
svn: r22917
2013-08-28 11:52:48 +00:00
68ed5a2838 7009: endless exception loop starting w/o DISPLAY
constfunc.has_display() was using check_init(),
which, on Gtk3, was happy to initalize even that the display was N/A.
Amended the test with an attempt to actually get the Gdk default display.

svn: r22909
2013-08-22 22:39:31 +00:00
405db681a6 7009: endless exception loop starting w/o DISPLAY
Building testing ground for the bug investigation,
after reading the grampsgui.py code...

svn: r22908
2013-08-22 22:39:17 +00:00
fc0749b359 updated german translation
svn: r22907
2013-08-22 17:20:25 +00:00
d78136bf7c Add date validation to filters
svn: r22904
2013-08-22 17:13:25 +00:00
1524c0b7e5 6878: CLI import/export plugins broken w/o DISPLAY
Replace a hardwired ProgressMeter with proper calls to User

Tested with impex.sh with and without DISPLAY env

svn: r22901
2013-08-21 18:54:21 +00:00
09d16526e9 6957: support gender in vcard import
forgotten merge cleanup

svn: r22900
2013-08-21 18:54:05 +00:00
f92f5d08bf 6953: remove "undo history warning" under CLI
Port my fix from gramps34.
In addition, the Check tool now has a hardwired dependency
on ProgressMeter. Make a nullifying mock locally and
only set it to the real thing only under GUI.

Tested with impex.sh (further stages after check still fail,
see bug #6878).

svn: r22899
2013-08-21 17:24:41 +00:00
949c41107a action 'tool' CLI handler broken w/o DISPLAY
Preparing to port my fix for 6953: remove "undo history warning"
when the BatchTool run from cli (e.g., "check")
from gramps34, the ground state was worse in gramps40...

svn: r22898
2013-08-21 17:24:18 +00:00
0bba5fcfdb add and enable Greek date handler (from Zissis Papadopoulos)
svn: r22896
2013-08-21 16:55:05 +00:00
4d2ae8df74 6871: workaround gtk RTL bug in MultiTreeView
optimizing cleanup

svn: r22890
2013-08-21 07:32:23 +00:00
9ba12c2e33 6871: workaround gtk RTL bug in MultiTreeView
Blend of Nick's and my fix for the bug.

svn: r22887
2013-08-20 21:51:44 +00:00
a3a9542f0f Add datehandler unit test
svn: r22884
2013-08-20 19:46:40 +00:00
fd53fccf5e 6871: Remove vertical grid lines for RTL display
svn: r22882
2013-08-20 16:06:14 +00:00
b09ab860b7 updated dutch translation
svn: r22874
2013-08-16 20:36:05 +00:00
02ca10097a Simplify status bar and fix justification of filter status
svn: r22871
2013-08-15 22:08:12 +00:00
31e5815ea4 6998: Descendant Tree Report crashes gramps 4.0.2 svn 22863M
svn: r22868
2013-08-14 22:43:47 +00:00
524348a3d5 updated german translation
svn: r22866
2013-08-14 18:26:01 +00:00
736b13c04f update Lithuanian translation (contribution by Mindaugas Baranauskas)
svn: r22864
2013-08-14 10:00:52 +00:00
ebf8dfa311 Revised Norwegian bokmål
svn: r22863
2013-08-13 20:38:25 +00:00
8f7723308f Fix bug in note filters
svn: r22861
2013-08-13 18:39:28 +00:00
342e6053df 6995: Fix bug in event citation filter
svn: r22858
2013-08-13 18:23:43 +00:00
12fd97eaab Automatic update for old rules using regular expressions
svn: r22854
2013-08-11 14:12:24 +00:00
8e34bc809b 6909: Gedcom export adds birth place/date in death
_remaining_events method did the _dump_event_stats indiscriminately,
even if the event in question was skipped during processing as
a birth/death one. Moving the call into the _process_person_event
thus aligning the logic with _remaining_events's docstring.

svn: r22851
2013-08-11 13:32:34 +00:00
f2c6833cfc give the graphvizdialog's format_str a more-unique name
(to help distinguish it from the name displayer's format_str)


svn: r22845
2013-08-10 18:37:38 +00:00
6a5d9aab86 [r22840]Consolidate mslocales and self._lang_map
into a single dict for easier maintenance

Thanks to Paul Franklin for suggesting it

svn: r22841
2013-08-09 22:19:16 +00:00
e4efaaa7b7 Remove redundant imports
svn: r22838
2013-08-09 21:36:57 +00:00
ee076d2c91 [r22833]Fix crash when Gramps is passed an invalid locale
svn: r22836
2013-08-09 20:01:42 +00:00
82ea4e8685 [r22832]Ensure en_US encoding is UTF-8
svn: r22835
2013-08-09 20:01:37 +00:00
6473f22f17 [r22831]GrampsLocale:Add Greek and English to MSlocales
svn: r22834
2013-08-09 20:01:31 +00:00
e1cd73c4fb Convert old rules to use regular expression code in the base class
svn: r22829
2013-08-09 17:31:25 +00:00
27cc9e4e6e Combine three new rules with existing rules
svn: r22827
2013-08-09 14:06:27 +00:00
aab10936c0 Some Swedish updates.
svn: r22825
2013-08-09 12:52:52 +00:00
bbc73d6442 Add regular expressions to rules
svn: r22822
2013-08-08 22:51:03 +00:00
b54199d7d0 python3 fix
svn: r22820
2013-08-08 13:01:57 +00:00
894701e2f2 Fix for Windows line separator
svn: r22818
2013-08-08 12:45:01 +00:00
fe98bbd6ff 6950: Add new rule for events with places matching filter
svn: r22815
2013-08-07 23:25:57 +00:00
5a6aa0d259 comment/docstring fixes
svn: r22812
2013-08-07 08:20:32 +00:00
76d17ca38d 6883: non-Western fonts broken in PS reports
Port my fix from gramps34 branch.
Ditches old PSDrawDoc code, instead we have a common backend
for PDF and PS generation using Cairo.
Added bonus: PS is now an available backend for text reports, too!

svn: r22810
2013-08-06 22:26:05 +00:00
a145b8b8f2 Added tags file
svn: r22809
2013-08-06 22:25:52 +00:00
ceffc5750f Convert VCard unit tests to use ElementTree
svn: r22806
2013-08-06 18:47:27 +00:00
b2d09de02f update Lithuanian translation (contribution by Mindaugas Baranauskas)
svn: r22802
2013-08-06 10:29:26 +00:00
a2f01e1a7d 6969: Connect to switch-page signal after the initial gramplets have been added
svn: r22800
2013-08-05 18:35:32 +00:00
c075bea146 Close database files before removing them
svn: r22793
2013-08-03 16:46:10 +00:00
b4c1863683 Add unit test for latitide/longitude conversion
svn: r22791
2013-08-01 20:45:37 +00:00
df82eb9629 Convert callback test to use assert methods
svn: r22788
2013-07-31 20:11:47 +00:00
0fd947e202 Add command to run unit tests from setup.py
svn: r22786
2013-07-31 18:21:33 +00:00
d07666ae91 Move rotate handler test
svn: r22784
2013-07-31 16:47:28 +00:00
c8c0164038 Unit test python3 fixes
svn: r22782
2013-07-30 22:06:29 +00:00
adb63c0c5e Fix date unit test
svn: r22780
2013-07-30 19:59:44 +00:00
15538da4a1 Remove superfluous console output in unit tests
svn: r22778
2013-07-30 16:58:13 +00:00
cabbcead8f Remove redundant import
svn: r22776
2013-07-30 16:51:38 +00:00
66d3dde97a 6663: RecentFiles.do_save() doesn't do XML escape
ported my fix from gramps34, changes to gtk3 negligible

svn: r22774
2013-07-30 15:10:02 +00:00
297e9906a9 Fix merge ref unit test
svn: r22771
2013-07-30 00:20:37 +00:00
561886f41e Fix bug in unit test script
svn: r22769
2013-07-29 16:52:30 +00:00
471b6beace Fix and move db unit tests
svn: r22767
2013-07-29 16:34:16 +00:00
dcd8757a77 .deb package more compliant according to Debian policy
svn: r22765
2013-07-29 16:28:34 +00:00
056d82895e 6957: VCF export/import should support [x-]gender
port from gramps34

svn: r22763
2013-07-29 08:53:08 +00:00
a9cad8c0d2 Convert db unit test to use unittest module
svn: r22760
2013-07-28 18:54:14 +00:00
d5eb5ec8f1 Fix and move keyword unit test
svn: r22758
2013-07-28 18:10:27 +00:00
0f8ff56fbe Fix and move config unit test
svn: r22756
2013-07-28 17:33:55 +00:00
b7c5c77676 Fix and move CLI unit test
svn: r22754
2013-07-28 16:20:14 +00:00
183e985747 Fix unit tests
svn: r22752
2013-07-28 14:57:22 +00:00
d6ff126d5a 6954: Output command line messages and progress information to stderr rather than stdout
svn: r22750
2013-07-28 14:21:43 +00:00
62ca742313 6951: import/export test suite runner broken
Ported from gramps34 my commits r22744,5.
Adjusted for gramps40 path layout changes.

svn: r22746
2013-07-28 13:50:03 +00:00
fa21fde40c 6952: in RU locale, gramps --help is wrong for -u
svn: r22742
2013-07-28 09:47:52 +00:00
e15963f9f6 6946: global name 'UNITYPE' is not defined - can't open old database
svn: r22738
2013-07-26 19:12:55 +00:00
ca7ca5bc8d show more LDS temples on the screen
svn: r22735
2013-07-24 19:11:56 +00:00
9fa2057154 6872: wrong size of svg image in Family Lines Graph
svn: r22732
2013-07-24 16:27:09 +00:00
32b559c623 Reviving RunAllTests.py on gramps40/trunk
Porting from gramps34 my fix for 6935, 6937, 6938.

Import with full "gramps." qualification from the tests,
to overcome the relative import problem (see bug# 6938 for context).

All testing code has been adjusted to the filename and paths
changes since gramps34.
Same as on gramps34, one test fails still, will investigate if
it is a test or a code bug:
    ERROR: test_buffer_recall
    (ErrorReportAssistant_Test.ErrorReportAssistantTest)
    Test that simple recall of messages works.
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "./GrampsLogger/ErrorReportAssistant_Test.py", line 60, in
    test_buffer_recall
        rotate_handler=rh)
      File "../gramps/gui/logger/_errorreportassistant.py", line 81, in
    __init__
        self.build_page1()
      File "../gramps/gui/logger/_errorreportassistant.py", line 267, in
    build_page1
        self._reset_error_details()
      File "../gramps/gui/logger/_errorreportassistant.py", line 178, in
    _reset_error_details
        self._error_detail.get_record()))
    AttributeError: 'str' object has no attribute 'get_record'

svn: r22729
2013-07-24 06:23:33 +00:00
b5b6a59f4f CLI --config values should be enterable in gramps.ini form (e.g. 0 or 1)
svn: r22727
2013-07-24 00:01:12 +00:00
8da09bd9f3 updated german translation
svn: r22725
2013-07-23 16:34:12 +00:00
e880bd9e10 6936: spelling and other fixes in RU rel calc
svn: r22721
2013-07-22 21:03:45 +00:00
88092e89eb 6932: check for broken GTK install on linux only
svn: r22716
2013-07-22 12:00:31 +00:00
d71131840f Translated three new strings.
svn: r22715
2013-07-22 09:09:47 +00:00
ff667d774f add the missing import to the 3139 fix I added, sigh
svn: r22712
2013-07-21 20:48:45 +00:00
7922f1ad61 [r22710]GrampsLocale: Don't set to 'C' if LANG is en_US
Not required, Gtk has an 'en' translation

Ref. http://www.gramps-project.org/bugs/view.php?id=6867

svn: r22711
2013-07-21 20:24:40 +00:00
7d9f42dc90 3139: boolean command line options have to be specified as foo=true ...
The solution was suggested by Doug Blank.


svn: r22708
2013-07-21 20:04:05 +00:00
127567278e [r22705]Bug 6928: Windows: If LANG not equal en_GB Graphic Reports
in some cases produce empty PDF sheets or force graphviz to crash

Problem was due to calling localized float() when parsing a C-locale xml file

svn: r22706
2013-07-21 19:28:20 +00:00
7301dccc55 2974: .rtf docgen doesn't escape backslashes
svn: r22703
2013-07-21 11:08:38 +00:00
1f90437ca3 6864: change warning to a more user-friendly one
s/Gramps ignored namemap value/Gramps ignored a name grouping/g

svn: r22700
2013-07-21 06:57:33 +00:00
4e0cad08b2 6884: RTF reports broken for intl chars
Re-applied my fix from trunk

svn: r22697
2013-07-20 16:33:14 +00:00
0f86ee2044 updated german translation
svn: r22693
2013-07-17 18:04:04 +00:00
3eb71e18a7 6915: not related tool treats siblings as not rel.
Applied patch from ennoborg, thanks!
(merge from trunk)

svn: r22691
2013-07-16 17:21:33 +00:00
8eed4a3d0d 6923: runtest.sh broken in gramps40/trunk
Merged fix from trunk:
    Fixed the file locations to work for the gramps40/trunk layout.

    Also porting my fix from gramps34 branch for
    6837: runtest.sh runs some reports that no longer exist

    git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22684 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

svn: r22686
2013-07-16 11:21:07 +00:00
6e895bacf4 6867: warn on gtk translation missing
Merge the fix from trunk:
    Give a dev-oriented warning on console and pop up a UI
    warning dialog for the user, when an inconsistent
    translation configuration is detected between gramps and gtk
    (happens when a langpack is missing on Ubuntu systems, e.g.)

    git-svn-id: svn+ssh://svn.code.sf.net/p/gramps/code/trunk@22683 4ae1f11a-8b86-4847-b8af-ab372f36d1fd

svn: r22685
2013-07-16 11:20:56 +00:00
b5c3cf70ea 6922: Export gpkg crashes in svn 22654M
svn: r22681
2013-07-15 18:37:50 +00:00
66b9e798ed Bug #6917 : Gtk2 to Gtk3 port of colorsel to get_color_selection()
svn: r22679
2013-07-14 12:25:02 +00:00
6a45bc4a40 revert the Finnish date-format change (remove the four I added)
svn: r22677
2013-07-13 20:56:24 +00:00
a8307d21aa correct the Finnish date-format choices (add the other four)
svn: r22674
2013-07-13 20:02:32 +00:00
666f6d5b1a added and/or clarified various date handler comments
also slightly reformatted a few date handler lines
and fixed one (locale-specific) date handler typo


svn: r22671
2013-07-13 18:00:38 +00:00
9f37049777 updated german translation
svn: r22668
2013-07-09 17:16:28 +00:00
ad79a3f1bb standardize date handler's internal argument names, for easier comparisons
svn: r22666
2013-07-09 01:31:42 +00:00
a3b7807233 ignore bad Record Gramplet/Report data (the data-verification tool catches them)
svn: r22663
2013-07-08 21:52:38 +00:00
bdc77e74ab Update after some user input.
svn: r22659
2013-07-08 11:27:21 +00:00
4e00345ff6 Span maximums and minimums must always be positive numbers
svn: r22656
2013-07-08 01:44:17 +00:00
485798010d Geography : add Id property to cairoprint.py
svn: r22654
2013-07-05 18:08:30 +00:00
99e0bd6c42 Geography : add printing functionality for all geography views.
svn: r22651
2013-07-05 17:30:41 +00:00
214132889a updated german translation
svn: r22648
2013-07-03 21:32:43 +00:00
ca5d0f39a5 Undo changes for 6878
svn: r22646
2013-07-03 20:23:01 +00:00
d79cf3a9dc 6081: Crash after double-click on .gpkg file
svn: r22644
2013-07-03 12:54:42 +00:00
cb2621e73c 6878: Running CLI options when DISPLAY not set barfs
svn: r22641
2013-07-03 01:09:15 +00:00
94e161cff1 6818: Enable Relationships support on RelationshipGraph (GraphViz)
svn: r22637
2013-07-01 16:59:30 +00:00
5578efc16c GTK3 wants to deprecate unicode menu
svn: r22635
2013-07-01 08:42:22 +00:00
7b67220a4f make sure relationship calculator's relationships are in the UI language
svn: r22632
2013-06-30 17:51:55 +00:00
f64e256bcb 6807: validatedmaskedentry: no attribute '_block_changed'
svn: r22631
2013-06-30 15:52:18 +00:00
8232f4ee4d GTK3: make sure menu shows up
svn: r22629
2013-06-30 13:41:29 +00:00
f892473c24 GTK 3.9 removes unicode-menu
svn: r22626
2013-06-30 07:54:21 +00:00
3231d71fd1 updated german translation
svn: r22625
2013-06-29 00:33:03 +00:00
cab8525520 enable suppression of two minor missing-package warnings
svn: r22623
2013-06-28 17:53:19 +00:00
10be3da71f 6841: Fix RTL text style bug
svn: r22617
2013-06-27 13:08:16 +00:00
66b6683a4a 6848: citationtreeview corrupts when search bar open and edit occurs
svn: r22609
2013-06-25 22:10:51 +00:00
a23408c7a5 In case of errors with fg_color, enormous amount of error messages. This patch
grabs wrong fg_color, and skips action, avoiding the error messages. Error goes to debug.


svn: r22608
2013-06-25 22:07:43 +00:00
fdc766db72 avoid critical gdk error by processing events only when window visible :
Gdk-CRITICAL **: gdk_error_trap_pop_internal: assertion `trap != NULL' failed


svn: r22607
2013-06-25 22:06:32 +00:00
58fdfa622b added GPL "boilerplate", SVN properties, and SVN Id line as needed
svn: r22597
2013-06-24 19:30:56 +00:00
e3f6ed1f17 6838: report cli crash ignoring unknown param
Port my fix from gramps34

svn: r22595
2013-06-24 18:14:42 +00:00
c3b82c944e Update for Gramps-4.0.1
svn: r22594
2013-06-24 18:14:11 +00:00
0d70aae90e Fixed some fuzzy strings.
svn: r22590
2013-06-24 12:49:24 +00:00
f6a473ed51 std propset for a new file.
svn: r22589
2013-06-24 12:23:30 +00:00
71abad6b6a 4571: RTL support in fanchart
Merge my work on trunk to gramps40 now that 4.0.1 is out,
as this fix is targeted for 4.0.2.

svn: r22588
2013-06-24 12:12:41 +00:00
eb1c153280 bump to 4.0.2
svn: r22587
2013-06-24 10:18:17 +00:00
408 changed files with 55732 additions and 54819 deletions

View File

@ -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
View File

@ -10,3 +10,6 @@ dist/
data/tips.xml
gramps/plugins/lib/holidays.xml
po/.intltool-merge-cache
# Editor
tags

View File

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

View File

@ -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
View File

@ -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

View 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>

View File

@ -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

View File

@ -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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
data/images/blank.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

BIN
data/images/crosshairs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

BIN
data/images/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
data/images/favicon2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 620 B

After

Width:  |  Height:  |  Size: 620 B

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 964 B

After

Width:  |  Height:  |  Size: 964 B

6
debian/changelog vendored
View File

@ -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
View File

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

View File

@ -7,7 +7,7 @@ Code Documentation
The :mod:`gen` Module
=======================
.. automodule:: gen
.. automodule:: gramps.gen
Contents:

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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)
#-------------------------------------------------------------------------
#

View File

@ -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()

View File

@ -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()

View File

@ -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 "

View File

View 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()

View File

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

View 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()

View File

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

View File

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

View File

@ -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')

View File

@ -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

View File

@ -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

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

View File

@ -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 = ( "",
"Тишрей",

View File

@ -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):
"""

View File

@ -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):
"""

View File

@ -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 = (
"",

View File

@ -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

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

View File

@ -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):
"""

Some files were not shown because too many files have changed in this diff Show More