Compare commits

...
702 Commits
Author SHA1 Message Date
SNoiraud f5e53e53bc FR10850 V2: freeze/unfreeze button per gramplet
Fixes #10850

This is the second method to avoid reloading gramplet automaticaly.
2018-10-31 20:36:45 +01:00
prculley 263a082afe Merge in changes from Gramps50 2018-10-29 09:32:35 -05:00
SNoiraudandNick Hall f2bc982c3d NarrativeWeb fixes
Space between place, description and the event note when there are
many sources.
Change the css order between print and screen.
The chosen theme can erase prior values.
Add a width for the source column in all themes.

Fixes #10810
2018-10-21 18:43:11 +01:00
Richard ClayandNick Hall dd9ddab849 In personsidebarfilter, search on each part of name
Instead of requiring that the entire search string matches a single one of the Person's names, the function will require that each word in the search string matches any of the Person's name fields.

Fixes #7950
2018-10-20 21:30:20 +01:00
niememat 3046b0586c Fix translation in Finnish 2018-10-17 11:31:54 +03:00
Malte RenkenandNick Hall cfa278886b RelGraphReport: Add an option to omit "irrelevant" family nodes 2018-10-12 20:58:04 +01:00
MJBMZandNick Hall 1c430a6b91 Replace rounded corners checkbox by dropdown
It now allows rounded corners to be set more explicitly for
different genders (None/Male/Female/Both).
2018-10-12 20:25:51 +01:00
jose1711andNick Hall b0eb712933 Do not use hyphen for living persons in hourglass graph 2018-10-12 19:36:42 +01:00
Jgon6andNick Hall 51a7ad9483 Include death anniversaries as an option in the birthdays report
Added the optional ability to list the anniversry of peoples deaths in
the birthday and anniversary report

Resolves #3540
2018-10-12 19:19:59 +01:00
Jgon6andNick Hall d6e9d62fad Add an option to show years in the birthday report
Added an option to the birthday report that allows for the year of birth
(or in the case of a wedding it's year) to be printed in the report.

Resolves #5948
2018-10-12 19:19:59 +01:00
Jgon6andNick Hall 3bac4a1036 Added symbols to the birthdays report showing the type of event
Issue #3540
2018-10-12 19:19:59 +01:00
Jgon6andNick Hall 1995a7068c Birthday report dead indicator now user defineable
Fixed the birthday report so the dead icon is able to be set within the
options window
2018-10-12 19:19:59 +01:00
Jgon6andNick Hall 5dc06d023d Indicate if a person is dead in the birthdays report
Added a text option to have a string that will show after a persons name
in the birthday and anniversary report. This works for both birthdays
and anniversaries.

Issue #3540
2018-10-12 19:19:43 +01:00
SNoiraudandNick Hall d98a1857dc Make relationships optional in narrative web
Fixes #10454
2018-10-12 18:46:39 +01:00
Paul Franklin 7da8811327 Setting the year as an ordinal number in Croatian
With this commit, the "master" version of the Statistics Chart
report will show a year as an ordinal number in Croatian.

So our translators will have until 5.1.0 is released to translate
the two new strings, in all the supported gramps languages.

Issue #10822
2018-10-07 23:45:40 -07:00
Paul Franklin 375773d657 Setting the year as an ordinal number in Croatian
With this commit, two more reports now show a year as an
ordinal number in Croatian, and a year I missed before in
webcal.py is now fixed.

This commit also reverts the Croatian ordinal year fix in
the gramps50 statisticschart.py since upon reflection I
feel it would be better done in master, since then our
translators will have until 5.1.0 is released to do the
two new strings the fix requires.

Issue #10822
2018-10-07 23:43:36 -07:00
Paul Franklin 01060f0b0d name-note is not being cleared in Complete Individual report
I ran gramps with a fresh copy of the example.gramps tree,
then ran the Complete Individual report.  The options which
matter are "Entire Database" and "Include Notes" but I also
included the gramps-ID since that speeds up my work.

Then I noticed that hundreds of names at the end of the
output file all had the same note (N0001), whose text said
it referred to a specific person.

So I looked higher and the note inclusion started with I0044,
the default person.  It was real for him but not for the next
person after him, or all the people after her.

I introduced the problem when I fixed 10033, in d6a97cf90e.

Note that this bug is independent of the CIR fix in p.r. 676
and still happens even after that pull request is applied.
2018-10-07 23:36:32 -07:00
prculleyandNick Hall 36779c1229 Fix View Column sizing so last column size setting is maintained
Fixes #10800
2018-10-07 18:14:01 +01:00
prculleyandNick Hall 5b7f5164db Fix view so column widths are preserved when using filters
Fixes #10725
2018-10-07 18:13:51 +01:00
prculleyandNick Hall 15db2dd603 Disable OSX specific menu items, added in 'Gramps' menu 2018-10-07 16:49:12 +01:00
prculleyandNick Hall 97b15322d4 Add config option to use Toolbar Text 2018-10-07 16:49:12 +01:00
prculleyandNick Hall 824bf7e40f Geps044 - Replace deprecated Gtk.UIManager, Gtk.Actions etc. 2018-10-07 16:49:12 +01:00
milotypeandNick Hall 56fa261ef2 Better typography in graph reports
Replace hyphen with en-dash.
2018-10-07 16:16:19 +01:00
vantu5z 1e9a3841cd update Russian translation 2018-10-05 14:10:57 +03:00
Paul Franklin e6ddedf6c6 fix typo
in cbac98894b
2018-10-04 17:49:35 -07:00
Paul Franklin 325c3f22cc fix the place-format option in DDR and DAR
The place-format option was added to the Detailed Descendant
and Detailed Ancestor text reports in cbac98894b

But those two reports use the Narrator class to show many of
their places (and dates), and that class was not modified to
use the user's custom place format.

So if a user had created a custom place format and ran
either of those two reports, their places would be shown
inconsistently.  This commit fixes that.

(The non-detailed ancestor text report also uses Narrator to
show its places but that report has not had the place-format
option added to it, so this commit doesn't touch it.)
2018-10-04 09:23:38 -07:00
Paul Franklin 54be8d62f3 Setting the year as an ordinal number in Croatian
With this commit, three more reports now show a year as an
ordinal number in Croatian.

Issue #10822
2018-10-04 09:21:29 -07:00
prculleyandNick Hall a40eca36d9 Fix bsddb for person sort with empty Surname list
Fixes #10078, #10577
2018-10-03 19:32:36 +01:00
Paul Franklin 4b17ca4724 Setting the year as an ordinal number in Croatian
When I started investigating 10822, I saw some Croatian dates
didn't seem to be working in 5.0.0, to my surprise.  I believe
I fixed that in the previous commit.

With this commit, the three reports now show a year as an
ordinal number in Croatian, so I consider 10822 fixed.

If there are any additional problems displaying Croatian,
please file additional bug reports ("one bug, one report").

Fixes #10822
2018-10-01 11:01:18 -07:00
Paul Franklin 69aaec11a5 Setting the year as an ordinal number in Croatian
When I started investigating 10822 I saw some Croatian dates
didn't seem to be working in 5.0.0, to my surprise.  There
seems to have been some kind of regression from 4.2.8.

But the Croatian translation for gramps hasn't been updated
in about three years -- except by non-Croatians.  So I don't
know why some "translated" strings which control how dates
are displayed were disabled (marked as "fuzzy") in this:
6c67053e1f

Also, I saw some code in the 4.2.8 Croatian date handler
which was not in the 5.0.0 Croatian date handler -- somehow.

So I believe this commit fixes the Croatian date handler.

Issue #10822
2018-10-01 10:59:51 -07:00
Serge NoiraudandGitHub 896b77a165 Webcal: link problems in some cases (#661)
* Webcal: link problems in some cases

Year 2016 is highlighted by default instead of current year.

Fixes #10801

* Webcal: Missing links when muliyear unselected
2018-09-30 10:20:09 +02:00
Serge NoiraudandGitHub 1b60193f77 Geoclose: exception when a family has no father (#662) 2018-09-29 19:20:50 +02:00
Robin van der VlietandSam Manzi 1efab19f1e Esperanto Translation Update eo.po (#660)
Made a lot of corrections and other stylistic improvements to the Esperanto file.
2018-09-27 11:21:15 +10:00
Paul Franklin e667431dd5 Report plugin krasch
Load data.gramps, start with the default person (I0037,
Edwin Michael Smith), run Family Descendant Tree, choose
"Start with the parent(s) of the selected first", hit OK:

.../descendtree.py", line 881, in start
    family2 = self.database.get_family_from_handle(family2_h)
...

Or start with I0057 (Anna Louise Smith), run Family Descendant
Tree, choose "Start with the parent(s) ...", hit OK:

.../descendtree.py", line 773, in start
    family2 = self.database.get_family_from_handle(family2_h)
...

Fixes #10811
2018-09-26 17:11:42 -07:00
Paul Franklin cc7e4fda85 [unhandled exception parsing "future dates" in some locales]
There is already a check in the MonitoredDate class for years
which are more than one year in the future, so such a date is
already going to be shown in red.

But some locales use the "datetime" library to parse typed-in
dates and that has a maximum year of datetime.MAXYEAR, 9999
currently, so dates greater than that produce a ValueError.

Besides adding checks for that, I have also made it so that
locales which don't need that library don't use it.

Fixes #10815
2018-09-26 14:04:52 -07:00
Paul Franklin 2490e2d07d Julian/Gregorian calendar issue when entering only year as date
when running gramps in Norwegian

Fixes #10687
2018-09-24 10:13:48 -07:00
Serge NoiraudandGitHub e5c5a210b4 Events difficult to read (screen and mobile) (#658) 2018-09-23 12:27:55 +02:00
Paul Franklin 04a40c7a50 fix typo
in cf42e5a4b8 and cbac98894b

Fixes #10782
2018-09-17 21:33:44 -07:00
Leonhaeuser 44c8e3c0f0 update German translation 2018-09-08 17:03:48 +02:00
niememat 6f7242a773 New update for Finnish translation 2018-09-06 22:11:47 +03:00
niememat 358c3fc967 Update finnish translation 2018-09-06 21:58:36 +03:00
Paul CulleyandSam Manzi f1ca280441 Fix and restore Statistics Gramplet to 4.2.x status (#653)
Fixes #10754

A bit of history. bug 2060 was filed a long time ago (2008), and a patch was added to close it in 2016. I believe that the bug had already been patched by then, although I cannot be sure. The patch caused the Gramplet to update anytime the active-changed signal occurred on a person view. I suspect that this caused a fair amount of overhead on very large dbs as the entire person list was rescanned.

In any event, Doug Blank recently removed the original scan code, as well as some useful functionality. And left behind a bug where a value was always zero. The users email list had some complaints about the lost functionality, and I also saw some recent complaints that the gender statistics were incorrect. Turns out that the db's genderstats data was incorrect, probably due to crashes after db updates. The Genderstats don't get saved until db closes normally. In addition, running the Genderstats rebuild tool, did not immediately appear to correct the situation, Gramps had to be restarted to show the updated results.

I added the original statistics code back into the Gramplet, suitably updated for 5.0.x. So the Gramplet no longer depends on dbs genderstats, it scans for it now on its own.

I removed the update on active-changed function, so overhead is only present on actual db updates (which have their own signals). I tested that the add, edit, and delete person changes do properly cause the statistics to update now. So the active-changed signal is not necessary.
2018-09-06 08:59:41 +10:00
Paul CulleyandSam Manzi 482cecaa7e Fix Check and Repair to deal with bad references empty handle string (#657)
Fixes #10783

Check and Repair tool doesn't fix bad references when the reference handle is an empty string.
Found when rewriting the backlinks scan on same tool. I assumed that the prior checks had already corrected any bad forward references, and did not put in a test for them in my new code. The Travis test failed and when I debugged, I found that the tool had an exception on a handle that consisted of an empty string.

Its interesting to note that when I changed the code, a lot more citation and source references were fixed in the test.
2018-09-05 12:07:03 +10:00
Paul CulleyandSam Manzi b6c57ab3c3 Speed up Check and Repair, backlinks check stage. (#656)
Fixes #10618

* Speed up Check and Repair, backlinks check stage.

* Fix Check and repair; backlinks scan to deal with bad references
which should have been fixed in earlier checks!
2018-09-05 11:40:57 +10:00
Paul CulleyandSam Manzi f3b5f75e37 Fix strings containing deprecated illegal escape sequences (#648)
Python 3.6 and above has deprecated illegal string escape sequences. Escape sequences are preceded by a '\' and valid ones are "\n\t\r" etc. Illegal ones are not in the list https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals.

Previous to Python 3.6 these illegal sequences were ignored and the '\' was left in place. Pylint has been noting these for a while now.

This PR corrects these sequences in Gramps. I used

find . -name "*.py" | xargs -t -n 1 python3 -Wd -m py_compile 2>&1 | grep Depre

to locate the failing strings.
2018-09-04 12:03:17 +10:00
IvanandSam Manzi 7d9f4dcc80 [Whatsnext] check if db is open (#651)
Fixes #10732
2018-09-04 11:38:42 +10:00
Paul CulleyandSam Manzi 224748eb96 Fix usage of posixpath; should be os.path for os independence (#650)
Fixes #10740
2018-09-04 11:20:34 +10:00
Paul CulleyandSam Manzi 2aec83f057 Fix generate_checksum routine to avoid MemoryError crash (#649)
with very large files and 32-bit OS

Issue #10690
2018-09-04 10:41:27 +10:00
Paul CulleyandSam Manzi fd399323a6 Fix corrupted Bookmarks that can happen after Gramps crash (#655)
Fixes #10759
2018-09-04 10:16:21 +10:00
Paul CulleyandSam Manzi bb6b3edee2 Fix Merge Family when same parent is missing from both families (#654)
Fixes #10760
2018-09-04 10:02:39 +10:00
Paul CulleyandSam Manzi 3f7ea4418c Fix <ctrl>c in view to get selected item to clipboard (#652)
Fixes #10682
2018-09-04 09:43:49 +10:00
Paul CulleyandSam Manzi efcc115aa7 Fix Quickview Gramplet so updates work when changing active (#642)
Fixes #10713
2018-09-04 09:22:27 +10:00
Paul CulleyandSam Manzi 893c715a61 Fix place reference editor for bad cut/paste on set_latlongitude (#644)
Fixes #10719
2018-09-04 09:08:50 +10:00
Paul CulleyandSam Manzi 6bab78df21 Fix Find Database Loop Tool (bad import of _collections) (#643)
Fixes #10722
2018-09-04 08:53:22 +10:00
niememat 29019eed98 Fix translation in Finnish 2018-09-03 22:09:37 +03:00
Bernard Banko d8c006e0f7 Slovenian translation fixed to allow building mo 2018-08-25 22:27:31 +02:00
Bernard Banko b8438dddeb Slovenian translation updated 2018-08-25 22:14:42 +02:00
niememat 4ba28c637e Fix translation in Finnish 2018-08-18 12:29:06 +03:00
niememat ae84040bc7 Fix translation in Finnish 2018-08-11 18:25:28 +03:00
prculley 51e294f748 Fix up bad translation files after merge 2018-08-09 10:54:12 -05:00
Leonhaeuserandprculley cb65fd93ca Reviewed German translation Thanks to bmendl 2018-08-09 10:35:49 -05:00
niemematandprculley 5b9600d835 Fix translation in Finnish 2018-08-09 10:35:15 -05:00
John Rallsandprculley cf80d17040 File copy doesn't work if the glob can match directories. 2018-08-09 10:35:14 -05:00
John Rallsandprculley d4f906f22d Install the docs/gramps directory in the bundle.
Fixes bug #10705.
2018-08-09 10:35:14 -05:00
niemematandprculley d189e334d8 Fix and updated translation in Finnish 2018-08-09 10:35:14 -05:00
Ross Gammonandprculley a48a94d872 Update the Debian changelog after the 5.0.0 release 2018-08-09 10:35:13 -05:00
John Rallsandprculley 8e5dc220dc Release Gramps-5.0.0 on Mac. 2018-08-09 10:35:13 -05:00
Nick Hallandprculley dca2f610dc Bump to 5.0.1 2018-08-09 10:34:31 -05:00
Nick Hallandprculley 3d1833e307 Release Gramps 5.0.0 2018-08-09 10:33:57 -05:00
Nick Hallandprculley aa221cc3c7 Update Changelog and NEWS files 2018-08-09 10:33:19 -05:00
Nick Hallandprculley 51b7d1c420 Update translation template for new release 2018-08-09 10:30:58 -05:00
niemematandprculley 674d286f87 Fix translation in Finnish 2018-08-09 10:30:58 -05:00
John Rallsandprculley 0161c4b917 Correct binary test logic for primary mask.
state & get_primary_mask(another) tested (state & (primary | other)),
which will be true if state matches *either* primary *or* other, but
what is wanted in a not-negated test is state matching all bits of
(primary | other). match_primary_mask does that.

On the other hand there are also cases of "not state & (primary | other)".
no_match_primary_mask handles that, returning true if state matches none
 of the bits in (primary | other).

Fixes #10646.
2018-08-09 10:30:57 -05:00
prculley de31a42fc8 Fix BaseSelector to avoid long delay before display on large trees
Fixes #10634
2018-08-09 10:30:57 -05:00
SNoiraudandprculley 9c508de5fd Export options > Gui alignment issue
Fixes #10576
2018-08-09 10:30:57 -05:00
niemematandprculley 1b00d95ce4 New fix translation in Finnish 2018-08-09 10:30:57 -05:00
Espen Bergandprculley 78870decb8 Revised Norwegian bokmål 2018-08-09 10:30:56 -05:00
Espen Bergandprculley 1a5696eb2c Revised Norwegian bokmål 2018-08-09 10:30:24 -05:00
niemematandprculley 269d38da2c Fix translation in Finnish 2018-08-09 10:27:26 -05:00
Nick Hallandprculley 99f77b0a88 Fix dialog button order on non-Mac systems
Resolves #10585.
2018-08-09 10:27:25 -05:00
De Tranandprculley 264fdda4d0 Fix and update Vietnamese translation
Resolves #10681.
2018-08-09 10:27:24 -05:00
Sveinn í Felliandprculley 8092b88ad4 Update Icelandic translation 2018-08-09 10:12:17 -05:00
jose1711andprculley 3251e2ae88 Fix and update Slovak translation 2018-08-09 10:09:53 -05:00
jose1711andprculley f718c5f8b4 Fix typo in translation 2018-08-09 10:09:53 -05:00
niemematandprculley a96a446b47 Fix translation in Finnish 2018-08-09 10:09:53 -05:00
niemematandprculley 5658411acf Fix translation in Finnish 2018-08-09 10:09:53 -05:00
niemematandprculley a4403d719e Fix translation in Finnish 2018-08-09 10:09:52 -05:00
Luigi Toscanoandprculley 8597a10c40 Update Italian translation 2018-08-09 10:09:52 -05:00
Nick Hallandprculley d0c0045dc1 Update English (British) translation 2018-08-09 10:09:52 -05:00
De Tranandprculley 868abdc0d9 Update Vietnamese translation 2018-08-09 10:08:37 -05:00
Kaj Mikkelsenandprculley ebf88bf5c5 Update Danish translation 2018-08-09 10:08:35 -05:00
Lajos Nemesériandprculley c3814a4e42 Update Hungarian translation 2018-08-09 10:07:53 -05:00
John Ralls 2a0b3afa4b Switch included moduleset to gitlab.gnome.org.
Fixes bug #10733.
2018-08-09 07:24:39 -07:00
John Ralls 52fe365919 Switch included moduleset to gitlab.gnome.org.
Fixes bug #10733.
2018-08-09 07:21:18 -07:00
Leonhaeuser 414aac4c7e Reviewed German translation Thanks to bmendl 2018-08-08 23:33:21 +02:00
niememat 037e26a5a3 Fix translation in Finnish 2018-08-08 14:43:17 +03:00
John Ralls 158d3a993b File copy doesn't work if the glob can match directories. 2018-08-05 13:18:01 -07:00
John Ralls 2ef35174d1 Install the docs/gramps directory in the bundle.
Fixes bug #10705.
2018-08-05 10:03:26 -07:00
niememat 3249938b88 Fix and updated translation in Finnish 2018-08-05 16:45:06 +03:00
Ross Gammon 9b18083e48 Update the Debian changelog after the 5.0.0 release 2018-07-25 21:56:42 +02:00
John Ralls 04bdeb8321 Release Gramps-5.0.0 on Mac. 2018-07-25 07:53:42 -07:00
Nick Hall 67061d58e2 Bump to 5.0.1 2018-07-24 15:11:18 +01:00
Nick Hall 0a66bad41a Release Gramps 5.0.0 2018-07-24 15:07:47 +01:00
Nick Hall e79535fe23 Update Changelog and NEWS files 2018-07-24 15:03:19 +01:00
Nick Hall 3c5c34d0c5 Update development status for new release 2018-07-24 14:20:41 +01:00
Nick Hall c9abe49d1e Update translation template for new release 2018-07-24 14:19:54 +01:00
niememat ca20641cb9 Fix translation in Finnish 2018-07-22 21:09:26 +03:00
John RallsandNick Hall c558b8530b Correct binary test logic for primary mask.
state & get_primary_mask(another) tested (state & (primary | other)),
which will be true if state matches *either* primary *or* other, but
what is wanted in a not-negated test is state matching all bits of
(primary | other). match_primary_mask does that.

On the other hand there are also cases of "not state & (primary | other)".
no_match_primary_mask handles that, returning true if state matches none
 of the bits in (primary | other).

Fixes #10646.
2018-07-22 18:50:06 +01:00
prculleyandNick Hall efb2a63492 Fix BaseSelector to avoid long delay before display on large trees
Fixes #10634
2018-07-22 18:46:07 +01:00
SNoiraudandNick Hall 1642757eb8 Export options > Gui alignment issue
Fixes #10576
2018-07-22 18:40:12 +01:00
niememat b0ee4684a1 New fix translation in Finnish 2018-07-22 13:53:17 +03:00
Espen Berg 4a561f44c7 Revised Norwegian bokmål 2018-07-22 11:19:51 +02:00
Espen Berg 4211dbf9f5 Merge branch 'maintenance/gramps50' of github.com:gramps-project/gramps into gramps50 2018-07-22 10:29:23 +02:00
Espen Berg 23c62de0d0 Revised Norwegian bokmål 2018-07-22 10:28:02 +02:00
niememat 4179cf4792 Fix translation in Finnish 2018-07-22 09:30:41 +03:00
Nick Hall 4c20cbd48a Fix dialog button order on non-Mac systems
Resolves #10585.
2018-07-21 23:28:05 +01:00
De TranandNick Hall 5a98236239 Fix and update Vietnamese translation
Resolves #10681.
2018-07-21 23:16:29 +01:00
Sveinn í FelliandNick Hall 792caf73b7 Update Icelandic translation 2018-07-21 19:59:26 +01:00
jose1711andNick Hall cfb9a4f664 Fix and update Slovak translation 2018-07-21 19:33:45 +01:00
jose1711andNick Hall 59021550e2 Fix typo in translation 2018-07-21 19:11:06 +01:00
niememat acf775ea90 Fix translation in Finnish 2018-07-20 23:01:59 +03:00
niememat f4199b494c Fix translation in Finnish 2018-07-20 14:33:01 +03:00
niememat 6fc7f4e0af Fix translation in Finnish 2018-07-18 17:34:24 +03:00
Luigi Toscano d508ce7fb9 Update Italian translation 2018-07-15 16:41:10 +02:00
Nick Hall a4aa8f90c3 Update English (British) translation 2018-07-13 18:36:28 +01:00
De TranandNick Hall b33d7af284 Update Vietnamese translation 2018-07-13 14:53:02 +01:00
Kaj MikkelsenandNick Hall e4e1f4ca05 Update Danish translation 2018-07-13 14:35:15 +01:00
Lajos NemesériandNick Hall 72bedf0af7 Update Hungarian translation 2018-07-13 14:29:26 +01:00
prculley bc39dda9e7 Use msgcat merged po files instead of git merge versions 2018-07-13 07:35:36 -05:00
prculley 257275f169 Merge from gramps50 2018-07-12 11:10:22 -05:00
Fedik 60ba912100 Update Ukrainian translation for Gramps 2018-07-07 17:54:52 +03:00
RossGammonandSam Manzi 2a8240b26d Update Debian directory after Gramps 5.0.0-rc1 release. (#634) 2018-07-06 07:58:39 +10:00
Leonhaeuser c33fc7b240 Fix not matching translation csv import/export 2018-07-02 20:33:10 +02:00
Zdeněk Hataš 404647be05 Update Czech translation 2018-07-02 19:09:06 +02:00
Pier Luigi CinquantiniandNick Hall 0af818b0c1 Update Esperanto translation 2018-07-02 15:14:46 +01:00
niememat 8da84aaf23 Fix translation in Finnish 2018-07-01 12:14:58 +03:00
Paulo Henrique Paiva de MoraesandNick Hall d15a1376d3 Update Brazilian Portuguese translation 2018-06-30 17:04:42 +01:00
vantu5z 57bbe542b5 update Russian translation
substantially just merge with latest template
2018-06-30 18:44:23 +03:00
Nick Hall cbdb0d5431 Merge translation files with the latest template 2018-06-29 16:46:10 +01:00
Paul CulleyandSam Manzi ff129e2f64 Fix Custom filter update when created via sidebar (#630)
Fixes #10620

Adding a filter via the sidebar editor originally only updated the current view, other associated views did not see the new filter. First noticed in People views. This causes the 'filters-changed' to be emitted which updates all associated view.
2018-06-22 11:19:00 +10:00
Paul CulleyandSam Manzi 663745c7e8 Fix Gramplet configure (View/Configure) for large options (#629)
When a Gramplet uses a BooleanListOption with a lot of entries, along with other options, all the options take on the size of the large BooleanListOption, which doesn't work well at all.
2018-06-22 11:04:30 +10:00
Serge NoiraudandSam Manzi 5df6ad564b Statistics Charts crashes with IndexError (#627)
Fixes #010626

In statistics charts, get_month is only localized and the calendar is unused.
If we have an Extra (Sansculottides) month in the french republican calendar
(index 13), we have this IndexError because the gregorian calendar is always
used and contains only 12 values.
2018-06-22 10:48:02 +10:00
John Ralls 1f3e516780 [Mac] Change accel for Undo History.
So that it doesn't conflict with a system binding for hiding the window.
Fixes #10619.
2018-06-10 20:09:41 -07:00
Paul CulleyandSam Manzi 25841f9540 Fix Family Lines/Family Colors picker for bad transient parent (#625)
Fixes #10623
2018-06-10 14:48:51 +10:00
Paul CulleyandSam Manzi 94bd8470d7 Fix import_as_dict to utilize user gramps_id prefixes (#626)
Issue #10622

Found when comparing dbs with large prefixes 'I%05d'; using database differences or import_merge addons.
2018-06-10 14:27:56 +10:00
Paul CulleyandSam Manzi 21408ab9d2 Fix error when opening bsddb db in read-only mode (#624)
Fixes #10615

BSDDB had errors when trying to open in read-only mode.
2018-06-10 14:11:33 +10:00
Paul CulleyandSam Manzi 31eecac590 Fix dbapi dbs for closeing read-only db crash (#623)
Fixes #10613

The sqlite (and other dbapi dbs) tried to save their metadata on a close operation, which doesn't work for read-only dbs.
2018-06-10 13:55:07 +10:00
Paul CulleyandSam Manzi 58c6da3fb5 Fix menus when operating with read-only db (#622)
Fixes #10614

An earlier attempt to deal with closed dbs messed up the read-only ActionGroup settings. This corrects that situation.
2018-06-10 13:40:36 +10:00
Sam ManziandGitHub 9c21b98601 Fix Name formats to show all parts (#608)
Fixes #10420

Allows reports to use the name format specified by the user.
2018-06-02 10:26:23 +10:00
Paul CulleyandSam Manzi 8735f8a014 Fix dialogs for crash when canceling via 'x' (#620)
* Fix import dialog for crash when canceling via 'x'

Fixes #10607

* Fix 'Make Backup' dialog for crash on 'x' close

Issue #10607

* Fix Family Lines/Family Colors/add dialog crash on close with 'x'

Issue #10607
2018-06-02 09:58:06 +10:00
niememat 9acf512663 Fix translation in Finnish 2018-05-28 14:43:08 +03:00
John Ralls 50e8161984 Release 5.0.0-rc1 on Mac. 2018-05-22 18:11:13 -07:00
John Ralls 69be94843c Remove obsolete omeat-python-modules dependencies. 2018-05-20 14:28:45 -07:00
prculley ac5ed9fde0 Bump to v5.0.0-rc2 2018-05-20 15:49:27 -05:00
prculley 2869e4d8a3 Release Gramps v5.0.0-rc1 2018-05-20 15:44:15 -05:00
Paul CulleyandSam Manzi f2392f910d Fix merge persons when removed person was the Home (default) person (#619)
Fixes #10597

If a person merge removes the default (Home) person, the previous code started having HandleError crashes.
This checks for and corrects this issue.
Did not see the issue with 4.2.x because there were no HandleErrors.
2018-05-20 13:31:41 +10:00
Espen Berg 9e61809b17 Received revised Norsk Nynorsk from Sigmund Lorentsen 2018-05-01 2018-05-17 21:30:15 +02:00
Espen Berg 9e2b935db1 revised Norwegian bokmål 2018-05-17 21:28:34 +02:00
niememat aa47410902 Update finnish translation 2018-05-15 11:39:16 +03:00
vantu5z c72af598b1 Update Russian translation 2018-05-15 09:40:06 +03:00
Nick Hall 9a386574d8 Revert "Clone event w/o references (2nd pass, part B)"
This reverts commit 208feceb03.

Changes requested in the PR not made.  Such a change requires
discussion on the list first.
2018-05-12 23:09:27 +01:00
Nick Hall 90bdb0a840 Revert "Embedded Clone Event w. references (2nd pass, part A)"
This reverts commit ae322dbdc8.

Changes requested in the PR not made.  Such a change requires
discussion on the list first.
2018-05-12 22:59:52 +01:00
Paul CulleyandSam Manzi 4daf7a9c29 Fix FanChartDesc for typo (copy/paste error). (#611)
Fixes #10565

- Bug occurs when selected person has more than 4 parents.
2018-05-09 13:21:37 +10:00
Paul CulleyandSam Manzi 0452848f57 Fix Tag editor for multiple tag removes (#601)
Fixes #10552
2018-05-02 14:29:40 +10:00
Serge NoiraudandSam Manzi db92ab7d5a In Narweb, Relationship to Center person reversed (#606)
Fixes #10553
2018-05-01 10:46:29 +10:00
Paul CulleyandSam Manzi 4dc67910fd Fix Citation Tree view for crash after plugin reload (#602)
Fixes #10541
2018-05-01 10:31:29 +10:00
Paul CulleyandSam Manzi ebc0f25bc7 Fix 'References' Gramplet for issue when activated during an import (#584)
* Fix 'References' Gramplet for issue when activated during an import

Fixes #10507

* disable Application Menu during import
2018-05-01 09:36:23 +10:00
Paul CulleyandSam Manzi 67dcffee20 Fix Person/Family/Event view updates on various associated changes (#603)
* Fix Person/Family/Event view updates on various associated changes

Fixes #10532

* Fix Event view for changes in Main Participants

* Fix Person/Event/Place views for update to a Place or enclosing place
2018-05-01 09:09:49 +10:00
Alois Poettker ae322dbdc8 Embedded Clone Event w. references (2nd pass, part A) 2018-04-23 11:00:26 +02:00
Alois Poettker 208feceb03 Clone event w/o references (2nd pass, part B)
Feature request #9604

This functionality in the Event list doubles an event with all the tags, citations, media, attributes and notes, but without the references. Its like an event addition, but with default values.
2018-04-23 11:00:26 +02:00
Paul CulleyandSam Manzi b4946dee9c Fix Person views to update on changes in birth/death event/place (#597)
Fixes #10532
2018-04-18 07:58:51 +10:00
vantu5z 8f33163510 update Russian translation 2018-04-13 09:11:17 +03:00
niememat a3d43fdc32 Update finnish translation 2018-04-12 10:09:07 +03:00
Leonhaeuser befebe8b0c update German translation 2018-04-11 19:27:52 +02:00
Nick Hall 9ee777274c Allow unicode characters in json export 2018-04-10 18:36:46 +01:00
SNoiraudandNick Hall d3892c0e82 Filtering problems in the geography view 2018-04-10 18:31:32 +01:00
SNoiraudandNick Hall 17ffc5460c Crash when looking for a place within an area
Fixes #10531
2018-04-10 18:31:11 +01:00
Joachim KuebartandNick Hall 09ca223f1b Bugfix: use same box margin for SVG and PDF
When drawing text boxes in SVG, the text is often placed too far to the right and touches the right frame. For an example, generate a »Descendent tree« in SVG format. In the PDF version, the text does not touch the frame of any boxes.

This PR fixes the problem by using the same text displacement (margin) inside the box as the PDF driver. The code is taken from gramps/plugins/lib/libcairodoc.py.
2018-04-10 17:31:43 +01:00
SNoiraudandNick Hall 1223cbda1f Webcal crashes after Narrative Web site exists
+ multiyear select option problem

Fixes #10524
2018-04-10 17:15:29 +01:00
Nick Hall 01ce73fc04 Catch exceptions when loading recent files 2018-04-10 17:11:07 +01:00
Nick Hall e53603a1fc Check that backend exists before loading database 2018-04-10 17:11:07 +01:00
Nick Hall 04d6ca3a49 Disable family tree manager features when a backend is unavailable
If the default backend is unavailable, then reset it to bsddb.
2018-04-10 17:11:07 +01:00
vantu5z 9e668a528d update Russian translation 2018-04-03 08:28:32 +03:00
niememat 96a903c57f Update finnish translation 2018-04-01 11:41:24 +03:00
Nick Hall 75921ceaf4 Enclose tree report image path and file name in braces
Fixes #10495.
2018-03-31 16:34:36 +01:00
Leonhaeuser 310bece2bc fix syntax error in German translation file 2018-03-30 21:21:40 +02:00
Leonhaeuser 565e570a71 update German translation 2018-03-30 21:13:25 +02:00
SNoiraudandNick Hall 29735eef7d Crash when selecting an old note, event, media, ...
Try to sort on another column.

Fixes #10519
2018-03-29 15:56:49 +01:00
Nick Hall cb0bd32aa3 Merge pull request #589 from sam-m888/fixhelplinks50. 2018-03-29 15:46:32 +01:00
Sam Manzi 469739633c [NewRepositoryEditor]Fix help link 2018-03-28 12:59:09 +11:00
Sam Manzi 495c7f310a [ReorderGrampsID]Fix broken help link 2018-03-28 12:52:23 +11:00
Paul CulleyandSam Manzi 353fc50770 Fix FTM for delete tree, followed by close; Title etc. shows old tree (#587)
Fixes #10513
2018-03-27 13:43:56 +11:00
Paul CulleyandSam Manzi ca9df38b11 Fix Relationship path between filter for silent fail (#586)
Fixes #10509
2018-03-27 13:18:56 +11:00
Herb Miller JrandNick Hall fd55f0abff Add configuration flag --no-compress-manpages. 2018-03-26 19:50:32 +01:00
vantu5z e1ca8303e5 update Russian translation 2018-03-26 11:29:55 +03:00
niememat a2879f1717 Update finnish translation 2018-03-25 19:39:59 +03:00
John Ralls 89ad092ac1 Don't strip newlines from builder files.
Fixes #10514.
2018-03-25 08:59:51 -07:00
Leonhaeuser 6c8de19fc5 update German translation 2018-03-25 08:33:37 +02:00
vantu5z dcf3caf946 update Russian translation 2018-03-24 09:37:34 +03:00
Sam ManziandGitHub f1e28c1e28 List sort by number for citation confidence level (#583)
* Fix confidence level sort in list views

-based on the date-sort code.

Fixes #10506

* Fix confidence level tooltip

-Stop run on text.

Resolves #10506
2018-03-22 15:40:53 +11:00
Nick Hall 0d1aef889e Fix error in place displayer when offset is outside valid range
Resolves #10493.
2018-03-21 20:43:13 +00:00
vantu5z cec9f55769 update Russian translation 2018-03-15 09:28:08 -03:00
Paulo Henrique MoraesandSam Manzi 32dd3a2e14 [pt_BR]Translation updates and corrections (#582)
- Portuguese (Brazil)
2018-03-15 11:26:59 +11:00
Sam ManziandGitHub 23f69f5bc2 Fix places in example.gramps (#578)
- Moved Greek places into top level Greece entry & added English names.

- Removed Puerto Rico as a country as part of USA
2018-03-14 10:53:38 +11:00
Sam ManziandGitHub ec6e9d7ef8 Use sgettext for Name Format dialog (#580)
Fixes #10484
2018-03-14 10:20:23 +11:00
Sam ManziandGitHub 6f52d7371e Enable copying the birth & death fields for relationship view (#579)
...I did something similar(as in #575) for the relationship view...

Resolves #7874
2018-03-11 10:51:51 +11:00
Sam ManziandGitHub e5a5f212bc Allow Copying of text fields for Details tabs (#575)
Allow selection of text fields from details tab in selected views with Details gramplets.

-  Person Details
-  Place Details
-  Repository Details

Resolves #7874
2018-03-11 10:32:19 +11:00
Serge NoiraudandSam Manzi 2a297623f2 Geography: KML media objects not shown on map. (#577)
Geography doesn't conform to the relative paths
If a place has no coordinates, KML files are not displayed.

Fixes #10487
2018-03-10 13:25:25 +11:00
Paul CulleyandSam Manzi ae11eceef7 Fix Fan charts for scrolling/resizing of window; bad rendering (#572)
Fixes #10381
2018-03-10 12:53:34 +11:00
Paul CulleyandSam Manzi babe13f811 Fix up Clipboard for various issues (#569)
* Fix Clipboard for HandleErrors during db changes

Fixes #10475

* Clipboard pylint

* Fix Clipboard for Drop/Edit of Surname group in People Tree view
2018-03-10 11:39:18 +11:00
Paul CulleyandSam Manzi a668f0d04f Fix Relationship Graph for extraneous families when using filter (#576)
Fixes #10492
2018-03-09 09:26:00 +11:00
prculleyandNick Hall 8c1a244b1e Fix export gpkg when media files have fractional timestamps.
Fixes #10424
2018-03-07 23:03:28 +00:00
Nick Hall 7aa4258046 Remove reference to postgresql in core code 2018-03-07 16:50:01 +00:00
Nick Hall 1c5ae89d86 Move dbapi-specific code out of DbGeneric 2018-03-07 16:11:45 +00:00
Nick Hall 75bf103429 Create _schema_exists method 2018-03-07 15:52:12 +00:00
Nick HallandSam Manzi cf42e5a4b8 Fix place format option in place report (#561)
* Fix place format option in place report

Resolves #10467.

* Use -1 instead of None for default place format

* adds New [Place format:] option on the [Report Options (2)] tab
2018-03-07 09:53:21 +11:00
Serge NoiraudandSam Manzi 433677c905 [Narrative Web Report]Incorrect heading for stepmother or stepfather (#567)
Fixes #10478
2018-03-07 09:33:27 +11:00
Paul CulleyandSam Manzi 6cbd6ed8d3 Fix Book TOC and Index numbering and placement (#565)
Fixes #10452
2018-03-07 09:12:28 +11:00
Paul CulleyandSam Manzi 51df2c188d Fix Fan Chart(s) so they don't crash when opened as last view (#571)
Fixes #10440
2018-03-05 14:34:55 +11:00
Paul CulleyandSam Manzi 7180806afd Fix Organize Tag editor for exception on 'x' close (#570)
Fix Organize Tags editor for exception on 'x' close
2018-03-05 14:18:51 +11:00
niememat 8fc8668921 Fix and updated translation in Finnish 2018-03-03 21:04:55 +02:00
prculleyandNick Hall 5dfcf2266f Change BaseSelector so that selection is kept during Find/Clear
Fixes #10421
2018-03-03 18:41:54 +00:00
Jgon6andNick Hall 0ae51c9522 Changed behavior of "Look up with Map Services"
Removed the section that looked up by city, and country from the Map
Services lookup for Google and Open Street Map.

Resolves #9486
2018-03-03 17:35:51 +00:00
Nick Hall 59bd9f040d Merge branch 'gramps50' 2018-03-03 17:29:32 +00:00
Paul CulleyandSam Manzi 1687616519 Fix multi-page Graph output to pdf with filenames containg spaces (#560)
Fixes #10470
2018-03-03 09:00:00 +11:00
Paul CulleyandSam Manzi 6bf33ab899 Fix Clipboard for right-click on empty clipboard (#566)
Issues #10473
2018-03-01 09:18:36 +11:00
Sam ManziandGitHub 41a2a46713 Fix ImportError & update API docs year 2018 (#564)
- Fixes ImportError: No module named 'gramps.plugins.db.dummydb'

-  Update Copyright to 2018
2018-02-28 16:53:37 +11:00
Zdeněk Hataš fd4344bc07 Update Czech translation 2018-02-26 15:08:44 +01:00
vantu5z ef395f49fe update Russian translation 2018-02-24 10:48:54 -03:00
Serge NoiraudandGitHub f0719c9eff Privacy problem with the relation to the center person. (#555)
Bug #12345
2018-02-24 08:34:58 +01:00
Paul CulleyandSam Manzi 9c5951a9e9 Fix Report Options when used with empty db (#554)
Fixes #10457
2018-02-24 09:37:36 +11:00
arnaullvandNick Hall 05dd44cfe2 Updated Catalan translation 2018-02-23 18:08:11 +00:00
Paulo Henrique MoraesandGitHub df00dd1f32 Brazilian portuguese update 2018-02-23 14:58:38 -03:00
Nick Hall 7b6f46d595 Merge pull request #552 from RossGammon/update_deb_dir. 2018-02-23 17:57:04 +00:00
Ross GammonandNick Hall fbcbdfa991 Finalise debian/changelog for beta1 release.
Also fix old syntax & trailing whitespace issues
2018-02-23 17:54:22 +00:00
Ross GammonandNick Hall 8335bbf20f Enable extra tests that were failing for alpha3 2018-02-23 17:54:22 +00:00
Ross GammonandNick Hall 2084bb5d0e Patch person_rules_test.py
To remove hard coded build path from import. Fixes FTBFS due to test failure.
2018-02-23 17:54:22 +00:00
Ross GammonandNick Hall dfe530fdd1 Delete debian/NEWS file, only really applies in Debian 2018-02-23 17:54:22 +00:00
Ross GammonandNick Hall 910d7199a2 First beta release of gramps 5.0
* First beta release of gramps 5.0
* Sync debian directory with Debian experimental branch on salsa
* Point Vcs URLs at the Gramps Project on Github
* Correct spelling in debian/rules, node > nose
* Delete gbp.conf, not required as gbp not used to build package
2018-02-23 17:54:22 +00:00
Ross GammonandNick Hall b208b7a240 Remove gbp.conf, will not be using gbp to build deb package
Avoids updating it for every branch used to build it
2018-02-23 17:54:22 +00:00
Ross GammonandNick Hall ee470deaca Fix spelling in d/rules node > nose 2018-02-23 17:54:21 +00:00
Ross GammonandNick Hall c149c5f2fa Update Vcs URLs to point at Gramps Github repo 2018-02-23 17:54:21 +00:00
Ross GammonandNick Hall fd5433363e Resync debian dir from Debian 5.0 experimental branch 2018-02-23 17:54:21 +00:00
Ross GammonandNick Hall 1ca875a2be Update debian/changelog with releases since 4.0.3 2018-02-23 17:54:21 +00:00
Ross GammonandNick Hall 43646e592b Fix testsuite failure when build happens out of the source tree.
Build path was hardcoded in an import in:
gramps/gen/filters/rules/test/person_rules_test.py

Fixes #10450.
2018-02-20 18:02:00 +00:00
niememat ca49b56774 Update finnish translation 2018-02-20 18:22:28 +02:00
prculley c4bc2d6823 Some POTFILES fixes 2018-02-20 09:56:07 -06:00
Leonhaeuser 854ff911a3 update German translation 2018-02-19 19:34:54 +01:00
John Ralls 965f7f7554 Release Gramps 5.0.0-beta1 on MacOS. 2018-02-18 22:13:48 -08:00
prculley 6c279945e0 Bump to 5.0.0-beta2 2018-02-18 08:24:13 -06:00
prculley 6ca3821f81 Release Gramps 5.0.0-beta1 2018-02-18 08:18:09 -06:00
niememat caf47940c7 Update finnish translation 2018-02-18 09:11:12 +02:00
Sam ManziandGitHub 6a78d5196d Update README for Gramps50 (#550)
* Update wiki links to 5.0
* Mention undocumented prerequisites
2018-02-18 13:15:43 +11:00
prculley fc0fdec25c Update Translation template and POTFILES.in 2018-02-17 16:36:19 -06:00
vantu5z 2adcc7d5a3 update Russian translation 2018-02-17 08:30:01 -03:00
Nick Hall fcaea3e1bb Replace backslash in image path for Windows 2018-02-16 19:33:46 +00:00
Nick Hall fc99f12568 Escape special LaTeX characters 2018-02-16 19:33:46 +00:00
Serge NoiraudandGitHub 1e5a6e1f87 crash in narrative web if no unused media (#549) 2018-02-16 19:20:02 +01:00
Serge NoiraudandGitHub db263ff905 Apply places changes to the narrativeweb. (#547)
* Apply places changes to the narrativeweb.

Also change order between locations and locations alternate names.

Fixes #10427

* Put the alternate locations back.

* Suppress extra line in Alternate Names section.
2018-02-16 11:10:01 +01:00
Nick Hall e202f5cd19 Copy output file from temporary directory 2018-02-14 22:43:40 +00:00
Nick Hall 2fbb9878c2 Fix character encoding for new tree category reports
Fixes #10418.
2018-02-14 18:41:45 +00:00
Leonhaeuser ba4453213a update German translation 2018-02-13 17:53:33 +01:00
prculleyandNick Hall 5f133ffaf2 Fix Place Tree view for proper display after filter cleared.
Fixes #10416
2018-02-13 14:07:35 +00:00
Nick Hall cbac98894b Implement place formats 2018-02-13 13:58:23 +00:00
Serge NoiraudandGitHub 3f368b2e02 Some dates are not translated in webcal (#545)
* Some dates are not translated in webcal

Fixes #10425

* Webcal link problem in the year glance page

* Link problems depending on LANGUAGES.
2018-02-13 10:01:17 +01:00
Sam Manzi 1e73ab5be7 Increment year to 2018 for About box. 2018-02-13 13:21:28 +11:00
niememat f428069ac6 Fix and updated translation in Finnish 2018-02-11 13:04:08 +02:00
niememat adf3772b7a Fix holidays in Finnish 2018-02-11 12:58:49 +02:00
SNoiraud 46cd191e49 Translation problem in narrative web. 2018-02-10 08:37:46 +01:00
Leonhaeuser 9afe0cc181 update German translation 2018-02-09 20:24:12 +01:00
Nick Hall 19f8c3561c Merge branch 'gramps50' 2018-02-09 00:13:43 +00:00
prculleyandNick Hall d3ed320636 fix Sidebar to resize better
Fixes #10334
Issue #10161
2018-02-08 23:35:32 +00:00
John Ralls 6f4a114fdc Update pyicu to v 2.0.3 2018-02-08 14:53:05 -08:00
John Ralls 5bec86c1f4 Consolidate Python2 and Python3 meta-modules.
GObject-Introspection now works with Python3 so the split isn't needed any more.
2018-02-08 14:53:05 -08:00
niememat 5b48691c3a Fix and updated translation in Finnish 2018-02-08 15:36:00 +02:00
Nick Hall be11466b35 Add tooltip to links in styled text editor
Fixes #10179.
2018-02-07 16:34:41 +00:00
John Ralls 0445004e7d Merge pull request #541 from jralls/accels. 2018-02-06 14:48:49 -08:00
John Ralls f688d376f5 [MacOS] Replace GDK_CONTROL_MASK with GDK_META_MASK in accelerators.
Fixes #10231 and works on all versions of Gtk3 by avoiding
GdkModifierIntent.
2018-02-06 14:46:55 -08:00
John Ralls 0a38a6352f Set the mnemonic modifier key to Alt-Ctrl for the Quartz Gdk backend.
This avoids interference with the use of the Alt/Option key for
extending the keyboard.

Fixes #6943.
2018-02-06 14:46:09 -08:00
prculleyandNick Hall 2410435d8c Fix Family Lines Graph when 'unknown' places are present
Fixes #10402
2018-02-06 22:31:40 +00:00
prculleyandNick Hall 6f1d6fa6b4 Fix Export View to CSV when Unicode characters are present
Fixes #10404
2018-02-06 22:23:27 +00:00
prculleyandNick Hall b1db542cb9 Fix several intl date displayers for missing parameter.
Fixes #10196
2018-02-06 22:19:23 +00:00
John Ralls 3d7479969f Update gramps.accel for gramps50 2018-02-05 14:56:34 -08:00
Zdeněk Hataš 8f4dffa1df Czech translation fixes 2018-01-31 20:31:32 +01:00
prculleyandNick Hall ffe9f31b0b Some filter optimizations to avoid repeated parts of tree scan 2018-01-28 23:36:23 +00:00
Leonhaeuser b1af1c5435 update German translation 2018-01-27 14:55:03 +01:00
niememat 94b6fcb93f New update for Finnish translation 2018-01-27 15:19:57 +02:00
vantu5z 4b25dde6e2 update Russian translation 2018-01-27 15:56:34 +09:00
prculleyandNick Hall f83c077a7e Fix view buttons order keeps changing on different startups
Fixes #10391
2018-01-26 22:49:59 +00:00
prculleyandNick Hall 323d775541 Fix DescendentTree report; more space beneath Title
Issue #10377
2018-01-26 22:47:29 +00:00
prculleyandNick Hall 4448234281 Fix DescendentTree report for crashes
Fixes #10377
2018-01-26 22:47:29 +00:00
prculleyandNick Hall d31ced9ca5 Fix Book XML handler for unusual characters in report name
Issue #10387
2018-01-26 22:44:02 +00:00
prculleyandNick Hall 9706af03b4 Fix 'Generate Book' dialog for bad transient parent 2018-01-26 22:44:02 +00:00
prculleyandNick Hall b3ca17a90f Fix Book XML handler to deal with unusual characters in Book name
Fixes #10387
2018-01-26 22:44:02 +00:00
Nick Hall 4b13c95467 Add support for new genealogy tree report category
Issue #10223.
2018-01-26 22:24:29 +00:00
niememat 7864af3626 Fix and updated translation in Finnish 2018-01-26 21:58:21 +02:00
vantu5zandNick Hall 028f9582f5 Add color schemes to config 2018-01-26 17:30:13 +00:00
prculley cd32559282 Surname Editor; fix so changes made update Person 'Preferred Name'
Fixes #10254
2018-01-24 11:40:04 -06:00
prculley 3980fca903 Surname Editor, fix fields for better fit in minimum width dialogs 2018-01-24 11:40:04 -06:00
prculley 462b0ea20b Surname Editor; fix loss of data if using mouse to change fields
Fixes #9868, #6828, #6257
2018-01-24 11:40:04 -06:00
prculleyandNick Hall ba4b3eaef6 Add Garbage collection after tools/reports
Fixes #10287
2018-01-22 21:14:27 +00:00
Leonhaeuser bf826637ab update German translation 2018-01-22 20:11:12 +01:00
Sam Manzi 316ff4454a Fix duplicate Add menu keybinding after PR #530 2018-01-22 13:40:19 +11:00
Paul CulleyandSam Manzi 3266625669 Main Window menu 'Add' keyboard Acellerators (Gramps50) (#530)
* Fix Add menu Accelerators so they don't activate on Shift-'x'

Fixes #10379

* Change Gramps 'Add' menu so 'New' is not used
2018-01-22 13:21:46 +11:00
niememat 90378f19c5 Fixed and updated translation in Finnish 2018-01-20 14:17:17 +02:00
vantu5z 78fb08aa12 update Russian translation 2018-01-20 18:27:48 +09:00
Paul CulleyandSam Manzi d081b75993 Export Web Family Tree; error on file write is now a message, not exception. (#524)
* Fix Export Web Family Tree for errors on file write

Fixes #10364

* Pylint on Web Family Tree export
2018-01-20 16:58:13 +11:00
Paul CulleyandSam Manzi 10e0e64ff4 Fix Citation Editor to Tab out of Confidence ComboBox (#526)
Fixes #10351
2018-01-20 16:28:15 +11:00
Serge NoiraudandGitHub 79ff9bc216 Geocoding: associate a lat/lon to a place name (#515)
* Geocoding: associate a lat/lon to a place name

Fixes #09642

* Some cleanup

* update README.md

* Remove url from message dialog
2018-01-18 09:11:51 +01:00
Serge NoiraudandGitHub 3615e75d16 Narrative web: multiple problems. (#517)
* Narrative web: multiple problems.

1 - Added an option for the statistics page.
2 - We have problems with notes : pages are too large
3 - Difficult to see some page on a mobile phone when you have notes.
4 - Resizing of images on a mobile
5 - Maps are too bigs on a mobile
6 - Split the event line to have a narrower page
7 - The note is spanned on two columns (Place + Description)
7 - In media pages, the progress meter doesn't work well.
8 - Add a progress meter for the medialistpage

Issues #10344

* Narrative Web: several modifications + css files

* Stylesheet problems and reverse set_header

* Removing memory cleanup.
2018-01-18 09:03:11 +01:00
niememat 3c8cba0301 New update for Finnish translation 2018-01-18 09:58:43 +02:00
Nick Hall dde9ea8a90 Use None as the foreground colour for untagged rows in list views
The call to get_style_context is not required.  It also caused
problems in Windows due to excessive calls to the foreground_color
method.

Fixes #10365.
2018-01-13 17:20:23 +00:00
Nick Hall b7c39e51c7 Remove trailing whitespace 2018-01-09 19:51:46 +00:00
Nick Hall a216441029 Clear old custom name formats when database loaded 2018-01-09 19:09:16 +00:00
Nick Hall 89592545f3 Fix shading colour in relationship view for dark themes
Fixes #7749.
2018-01-09 18:26:26 +00:00
Nick Hall 70fff6253d Fix link colour for dark themes
Issue #7749.
2018-01-09 18:24:52 +00:00
Nick Hall 84e76de2b1 Fix default foreground colour in list views for dark themes
Issue #7749.
2018-01-09 18:21:23 +00:00
prculleyandNick Hall fe289da983 Fix memory leak in ProgressMeter 2018-01-08 19:24:27 +00:00
prculleyandNick Hall b54672d28d Leak (Uncollected Objects); allow user to cancel long screen update 2018-01-08 19:22:27 +00:00
prculleyandNick Hall 371a8a8f89 fix Fan Chart for exception on right-click of person with no parent
Fixes #10349
2018-01-08 19:09:14 +00:00
mb06csandGitHub 6b42d71158 endoflinereport.py: sort generation during output 2018-01-06 13:32:43 +01:00
prculleyandNick Hall 1777cd4b29 Fix Fan Chart Print centering and scaling on Windows
Fixes #8460
2018-01-04 23:16:01 +00:00
Paweł TomkielandNick Hall ac593d814d fixing polish places translations 2018-01-04 23:07:42 +00:00
Nick Hall 617e2212c8 new gramps.pot translation template 2018-01-04 22:59:31 +00:00
Nick Hall ad15ef7961 Merge branch 'gramps50' 2018-01-03 21:32:14 +00:00
Zdeněk Hataš 3971fecb29 Update Czech translation 2018-01-02 17:19:43 +01:00
Luigi Toscano 5d51155441 Italian translation updates and fixes 2017-12-31 17:34:52 +01:00
Luigi Toscano a63c9ad080 Update Italian po file from latest pot template 2017-12-31 15:08:03 +01:00
niememat f44479edfb New update for Finnish translation 2017-12-29 11:01:27 +02:00
vantu5z 738f2b7dca update Russian translation 2017-12-29 11:03:23 +03:00
vantu5z f4dc24cacd udpate pot file after 00715fc530 2017-12-29 11:03:08 +03:00
prculleyandNick Hall eeb587e85e Fix Media Preview Gramplet for closed db
Fixes #10332
2017-12-28 22:12:22 +00:00
bertcarnellandNick Hall c93f2dd433 Added a requirement for pango and pangocairo versions
Eliminates a warning that was present when calling a report from
the command line.

Fixes #10333.
2017-12-28 21:47:26 +00:00
SNoiraudandNick Hall d4f37501a0 Narrative Web works poorly on Android browser
Fixes #010320
2017-12-28 21:33:13 +00:00
prculleyandNick Hall 1b0ad55d13 Fix Styled Text Editor for exception on non-editable text click
Fixes #10309
Also prevent editing of links on non-editable text.
2017-12-28 19:49:21 +00:00
prculleyandNick Hall aa2a451f23 Suport FTM 2017 Gedcom tags on import
Bug #10285
FTM adds subordinate PLAC and OBJE data to INDI.ADDR which is
non-standard.  So treat it as a Residence Event, instead of an
Address.
FTM puts _DATE and _TEXT tags subordinate to OBJE, also non-standard.
2017-12-28 19:29:14 +00:00
prculleyandNick Hall 59e367acf9 Fix FTM: rename a locked db, don't open, but title bar changes
Fixes #10303
2017-12-28 19:22:40 +00:00
prculleyandNick Hall d8057c2b0b Fix Person, Family Sidebar Filters to add custom Event types
Fixes #10112
Also fix Family Sidebar Filter RelType init with closed db
2017-12-28 18:47:55 +00:00
niememat d624d4a0bb Update finnish translation 2017-12-28 11:48:55 +02:00
Nick Hall ac86c415a7 Use UPDATE instead of DELETE and INSERT 2017-12-12 22:25:23 +00:00
prculleyandNick Hall b26b34fba9 Fix ProxyCache to deal with memory leak 2017-12-12 21:59:11 +00:00
prculleyandNick Hall 4ae4ac1d12 Fix duplicated method in ProxyCache
Fixes #10291
Also changed size request to better utilize actual memory
2017-12-12 21:57:00 +00:00
Nick Hall efabb77567 Remove write_version method from the database API
This is specific to the BSDDB backend.
2017-12-12 21:35:13 +00:00
Nick Hall 46eb72d002 Fixes for in-memory databases
In-memory databases always allow write access and don't need to
use lock files.
2017-12-12 18:54:15 +00:00
Nick Hall f75a8f9497 Enable Sqlite backend for all users 2017-12-11 22:18:39 +00:00
Nick Hall 00715fc530 Move PostgreSQL backend into third-party addons 2017-12-11 21:34:47 +00:00
Nick Hall e3300cd55d Implement locking for dbapi backends 2017-12-11 21:07:12 +00:00
Nick Hall 0f7e8e73b9 Use escape from html rather than cgi package 2017-12-11 18:44:18 +00:00
prculleyandNick Hall 1509ba526d Fix QuestionDialog display for html like characters in title
Fixes #10298
2017-12-10 19:02:53 +00:00
prculleyandNick Hall 76084e6f52 Fix Find Database Loop tool for faster operation and better display
Fixes #10299
2017-12-10 18:52:02 +00:00
prculleyandNick Hall 871c1a6dea Fix FamilyRelationshpType _DATAMAP order to correspond with values
Fixes #10275
2017-12-08 19:08:31 +00:00
prculleyandNick Hall 33ebd5d0b0 Fix HandleError on IsLessThanNthGenerationAncestorOf filters
Fixes #10286
2017-12-08 18:36:34 +00:00
prculleyandNick Hall b9b06f1668 Add additional tests to Person Filters (MatchesFilters) 2017-12-08 18:36:34 +00:00
prculleyandNick Hall 30f3918140 Fix Relationship Graph to shows families if siblings but no parents 2017-12-08 18:28:04 +00:00
prculleyandNick Hall e98b065719 pylint 2017-12-08 18:09:47 +00:00
prculleyandNick Hall e7bc887f60 Fix Deep Relationship filter to avoid recursion crash
Fixes #10279
This also changes filter to use shortest paths.
2017-12-08 18:09:47 +00:00
prculleyandNick Hall 85014bd92c Fix to allow filter progress meters in flat views 2017-12-08 18:04:24 +00:00
prculleyandNick Hall eee82ae27e Fix Gedcom import for illegal Gedcom Family Attributes
Issue #10262
TMG Gedcom exports an illegal NCHI with sub-data for FAM.  Gramps
could not handle this and attached the sub-data to the FAM creating
some corrupted Event records.
2017-12-08 18:02:01 +00:00
niememat adadd6c80b Update finnish translation 2017-12-03 17:38:56 +02:00
SNoiraud 408caa6c0f Narrated Web Site: warnings reported to console
Fixes : #10283
2017-11-25 10:22:02 +01:00
niememat 406faa5603 Update finnish translation 2017-11-25 10:44:45 +02:00
Serge NoiraudandGitHub 4e0d562208 Various Feature Requests in Narrative Web (#468)
Issue #06772
2017-11-23 09:40:52 +01:00
Serge NoiraudandGitHub 43ef686622 Narrative Web Feature requests : (#466)
Sort "Surname" web page by given name and birth date.
Surname list doesn't use default name format

Fixes #05315, #08067
2017-11-23 09:39:12 +01:00
Serge NoiraudandGitHub d59fe6b2af Display Lat/Lon optionally on places list page (#467)
Fixes #05382
2017-11-23 09:37:47 +01:00
Serge NoiraudandGitHub d677a1a785 Add extra page to narrativeweb. (#465)
Fixes #02630
2017-11-23 09:36:13 +01:00
Serge NoiraudandGitHub 88639fcd7d Mainz css file produces left aligned FamilyMap pages (#489)
* Mainz css file produces left aligned FamilyMap pages

Solving Mainz problem creates new ones with Basic-Blue
and Nebraska styles sheet.

Some cleanup with unused css file (GeoView.css)

Fixes #10268

* Many problems with css files and the ancestor tree

* media file not created if we have unused media.
2017-11-22 10:27:40 +01:00
prculleyandNick Hall f9da7ec19a Fix Session Log for exception on closed db reference click 2017-11-20 23:03:35 +00:00
Nick Hall 45e0b9d571 Fix bug in previous commit 2017-11-20 16:44:38 +00:00
prculleyandNick Hall 2bc4139c65 Fix 'Welcome' Gramplet and StyledTextEditor for Link handling
Issue #10179
2017-11-20 15:52:27 +00:00
prculleyandNick Hall c759ee31eb fix Quickreport start from Editor when object not yet committed
Fixes #10048
2017-11-20 15:08:51 +00:00
prculleyandNick Hall 12577cdfac Fix Find Database Loop tool for wrong transient parent for progress
Fixes #10072
2017-11-20 15:02:16 +00:00
prculleyandNick Hall 288b381453 Fix Test Case Generator to not create illegal 'None' handles
Fixes #10230
2017-11-20 14:57:52 +00:00
prculleyandNick Hall 896b9d96e2 Fix Gedcom export for bad Hebrew Months
Fixes #10245
2017-11-20 14:53:09 +00:00
Nick Hall 6b6a297a0e Revert "correct 'import' in ac2e0a26ac"
This reverts commit 620b2afa09.
2017-11-19 17:38:23 +00:00
vantu5z 07ec5c757e update Russian translation 2017-11-19 10:39:02 +03:00
niememat 5e31bca7d6 Update finnish translation 2017-11-16 12:55:37 +02:00
SNoiraud a91bc09160 Can't link to a place if wrong lat/lon in the db.
Fixes #10266
2017-11-15 16:14:47 +01:00
Zdeněk Hataš 4b7a0bafa4 Update Czech translation 2017-11-15 12:29:01 +01:00
Leonhaeuser 3b9d38e14a update German translation 2017-11-13 18:30:51 +01:00
Sam Manzi df93ce3cb0 Update redirected wiki link from GRAMPS_XML > Gramps_XML 2017-11-12 10:12:46 +11:00
SNoiraud d5776d4ddb Missing arg when right clicking in geography view.
Fixes #10261
2017-11-11 17:41:21 +01:00
vantu5z 9f0376d9aa update Russian translation 2017-11-09 11:38:25 +03:00
prculley 45bda3bacb Change INSTALL to replace 'python' with 'python3 for script invokes 2017-11-05 07:30:00 -06:00
niememat ab20047e88 Update finnish translation 2017-11-04 10:21:20 +02:00
Paul Franklin 8544f873d4 new gramps.pot translation template 2017-11-03 23:19:15 -07:00
Paul Franklin 620b2afa09 correct 'import' in ac2e0a26ac 2017-11-03 23:16:45 -07:00
niememat 759d68a9e9 Update finnish translation 2017-10-29 16:33:46 +02:00
vantu5z 205b94ad05 update Russian translation 2017-10-28 10:18:31 +03:00
Nick Hall c495edc220 Use new database convenience function
Fixes bug introduced in commit 875242c8d6.
2017-10-26 18:58:22 +01:00
Leonhaeuser 949cd6aae6 Update German translation 2017-10-26 19:27:35 +02:00
prculleyandNick Hall 0826ba8752 Check&Repair; add checks for 'backlinks' and repair if needed. 2017-10-26 14:07:42 +01:00
prculleyandNick Hall 12d8b62925 Fix CSV importer for place event name using gramps_id
Fixes #10239
2017-10-26 13:55:48 +01:00
prculleyandNick Hall 9b42486f2f Fix PlaceModel to avoid exception following merge
Fixes #10184
Bug #8377
2017-10-26 13:52:15 +01:00
prculleyandNick Hall 7e4e66d0e3 Fix Geography view 'Find' when db is closed.
Fixes #10229
2017-10-26 13:48:54 +01:00
prculleyandNick Hall 97db4cf64e Dbapi: Fix for broken 'backlinks' after a delete.
Fixes #10221
2017-10-26 13:44:38 +01:00
prculleyandNick Hall 455d56db1b Fix interactive search for exception on click then down arrow
Fixes #10226
2017-10-26 13:40:03 +01:00
Nick Hall 4d614ae5e5 Revert "warn user if no Ghostscript on their machine"
This reverts commit ac2e0a26ac.
2017-10-24 12:37:36 +01:00
Paul Franklin ac2e0a26ac warn user if no Ghostscript on their machine
This is the thread which motivated me to write this:
http://gramps.1791082.n4.nabble.com/Re-Relationship-graph-is-limited-to-1x1-page-td4680666.html
but unfortunately the Nabble archive of gramps was dead at
the start of that thread, so it is missing.

Here is a related commit, addressing part of the problem:
https://github.com/gramps-project/gramps/pull/472/commits/90de264ccf89578888c9c653c774632cde545b49
2017-10-23 00:17:55 -07:00
Nick Hall 0f0a9c941b Revert modifier key changes in glade files
Partially reverts commit da47949b60.

The modifier "primary" is only available in Gtk 3.20 and is
removed by the glade editor.
2017-10-19 14:07:30 +01:00
vantu5z 89908b54b3 update Russian translation 2017-10-16 09:04:25 +03:00
Nick Hall 875242c8d6 New convenience function to return database methods
Examples:

db.method('get_%s_from_handle', 'Person')
db.method('get_%s_from_%s', 'Event', 'gramps_id')

Returns None if the method doesn't exist.

Formats 'iter_%s' and 'get_number_of_%s' use the plural forms and
are not yet implemented.

Replaces old get_table_metadata method.

Issue #9541.
2017-10-15 18:38:46 +01:00
Nick Hall 8ef49ed303 Merge pull request #472 from prculley/bug9783 2017-10-15 18:07:04 +01:00
prculleyandNick Hall 90de264ccf Create where_is utility to locate a binary in the standard places
This is particularly useful on Mac OS X where Gramps is passed a PATH
that does not include elements added by the terminal shell.
2017-10-15 18:01:07 +01:00
prculleyandNick Hall 700f15be75 Pylint on graphdoc 2017-10-15 17:53:43 +01:00
prculleyandNick Hall 32caee3aa4 Fix relationship Graph so Unicode chars on Multiple pages works.
Fixes: #9783, #9359, #8080, #6782, #6108
Bugs: #6431, #4164, #1485, #2964, #2790
2017-10-15 17:53:43 +01:00
Nick Hall bb6d0267ac Merge pull request #474 from jralls/primary_intent 2017-10-15 17:29:17 +01:00
John RallsandNick Hall 6e24c2e79a Use Gdk.Event.triggers_context_menu in osmgpsmaps.py. 2017-10-15 17:27:02 +01:00
John RallsandNick Hall 00095667e8 Replace is_right_click implementation with Gdk.Event.triggers_context_menu(). 2017-10-15 17:27:02 +01:00
John RallsandNick Hall da47949b60 Replace use of CONTROL_MASK with PRIMARY_INTENT.
For better UX on Macs.
2017-10-15 17:27:02 +01:00
Nick Hall 90495324e0 Write dbapi schema version to metadata table instead of a file 2017-10-14 15:46:21 +01:00
Nick Hall 50091d1f86 Remove hardcoded references to BSDDB database backend
The default backend in the preferences is now used for:

* Archive checkout
* Import from the command line - python Gramps.py file
* Import by drag and drop onto the family tree manager
2017-10-13 22:25:49 +01:00
Nick Hall 94a6495a06 Fix opening recent family trees 2017-10-13 15:27:05 +01:00
Nick Hall c048ebcfbb Add login dialog and username/password command line options 2017-10-12 21:11:37 +01:00
prculleyandNick Hall 1f9f08c3c5 Fix exception when changing a family with Add person editor open
fixes #10187
2017-10-12 19:20:12 +01:00
prculleyandNick Hall 05800c530a Pylint improvements 2017-10-12 16:46:08 +01:00
prculleyandNick Hall fdccc733a2 Remove eval() and rename self.dbstate 2017-10-12 16:45:59 +01:00
prculleyandNick Hall 3d1095d9ca Another way to protect GOV IDs in Gramps ID position 2017-10-12 16:45:52 +01:00
Leonhaeuser be776d6a31 updated German date handler: added some missing Latin month names and some old German month names 2017-10-05 21:34:23 +02:00
Leonhaeuser 0697797504 updated German date handler: added missing Latin month names and some old German month names 2017-10-05 21:29:19 +02:00
vantu5z 8e34b04d64 update Russian translation 2017-10-03 18:25:57 +09:00
Paul Franklin e21a1c15d5 remove vestage of (old) SVN source-control system 2017-10-02 11:13:40 -07:00
Zdeněk Hataš 1aec255b38 Update Czech translation 2017-10-02 13:56:28 +02:00
Nemeséri LajosandPaul Franklin 4c268e1236 Update Hungarian translation 2017-10-01 18:55:12 -07:00
prculley cdec0299a5 update authors file 2017-10-01 10:47:52 -05:00
Nick Hall b3b46c70b2 Remove set_save_path method
The path is already set in the database load method.
2017-09-30 21:35:41 +01:00
Nick Hall aed7560a46 Add missing methods to database unit test 2017-09-30 19:07:03 +01:00
Nick Hall f7c9ef7dbf Add missing base database method
Issue #9741.
2017-09-30 19:05:35 +01:00
Nick Hall 96f430480b Remove get_schema_version method
Issue #9541.
2017-09-30 17:32:50 +01:00
vantu5z e38614291d update Russian translation 2017-09-30 17:43:10 +09:00
Leonhaeuser 4d1bc30d64 Update German translation 2017-09-30 00:57:46 +02:00
Nick Hall 159601d635 Remove has_gramps_id method from the public API
Issue #9541.
2017-09-29 23:38:53 +01:00
Nick Hall d7cba793cf Remove get_gramps_ids method from the public API
Issue #9541.
2017-09-29 23:10:45 +01:00
Nick Hall fc92bbcdba Make get_number_of, get_raw_data and has_handle methods protected
Issue #9541.
2017-09-29 22:31:24 +01:00
Nick Hall 755254cf7c Remove get_from_name_and_gramps_id method
Issue #9541.
2017-09-29 19:42:39 +01:00
Nick Hall 5cb9c3e30e Remove get_from_name_and_handle_method
Issue #9541.
2017-09-29 18:52:58 +01:00
prculleyandNick Hall 43c768c2d4 Fix ManagedWindow/GrampsWindowManager for subsidiary window close
fixes #10194
2017-09-29 16:56:36 +01:00
prculleyandNick Hall e5ce8bc829 Fix Gedcom import for "1 MARR Y" issue
Fixes #10188
2017-09-29 16:53:35 +01:00
prculleyandNick Hall d5ca13254f Correct ReorderID tool for several bugs and deal with GetGov ID
Fixes #10177, #10175, #10176
2017-09-29 15:28:58 +01:00
niememat 81a116b6a2 Update finnish translation 2017-09-28 04:44:49 +03:00
Leonhaeuser cf85f6600d Update German translation 2017-09-27 19:50:30 +02:00
SNoiraud 84c0d69da2 Bad call to unlink function.
Bug #08835
2017-09-27 09:40:12 +02:00
prculley 4ae5c6477b Fix Gedcom export for erroneously removed WriterOptionBox import 2017-09-26 16:20:42 -05:00
SNoiraud 41b97edb03 Try to handle OSError when we use the --export argument in CLI mode.
Fixes #08835
2017-09-26 16:07:41 +02:00
Nick Hall c9eee3b471 Ignore empty connection settings 2017-09-25 23:00:10 +01:00
Nick Hall 95376f9eff Include new PostgreSQL error handling in CLI 2017-09-25 22:52:05 +01:00
Paul Franklin 2b42dd258e Special char in place's name breaks xdot view
Issue #10174
2017-09-24 11:57:35 -07:00
vantu5z e1676aca6d update Russian translation 2017-09-24 19:57:14 +09:00
Paul Franklin 47ebd361d8 new gramps.pot translation template 2017-09-23 15:02:59 -07:00
Paul Franklin 62aaa65958 Organize Bookmarks Dialog doesn't close with x
Fixes #10207
2017-09-23 13:58:12 -07:00
Nick Hall 457722811d Improve PostgreSQL error handling
Re-raise a DbConnectionError if the connection raises an error.
2017-09-23 21:24:54 +01:00
Nick Hall 0f9a6d57bf Add connection preferences for PostgreSQL databases 2017-09-23 19:52:23 +01:00
Nick Hall 1482fedb9c Merge branch 'gramps50' 2017-09-23 17:08:52 +01:00
Nick Hall cd602170fd Build surname list with unique names
Fixes #10186.
2017-09-23 00:38:52 +01:00
Sam Manzi 00f8df60ce Revert "Tidy up mocking code (#438)[First commit]"
This reverts commit 8ebb4d35fa.
2017-09-23 07:50:48 +10:00
Paul Franklin c632d0f6a9 tweak some DateParser comments 2017-09-22 11:54:11 -07:00
Paul Franklin 829a8bd01d DateParserEN failures under the DateTest tool
Issue #7084
2017-09-22 11:51:30 -07:00
prculleyandNick Hall 61552f6903 Fix make_unknown to create valid Place
Fixes #10202
2017-09-21 17:23:45 +01:00
Zdeněk Hataš 9643c6d620 Update Czech translation 2017-09-20 10:41:24 +02:00
vantu5z 4be86ba2ad update Russian translation 2017-09-18 09:29:03 +03:00
Jonathan BiegertandPaul Franklin f31caf1ea4 enable Graphviz node port selection, optionable (p.r. 456)
This enables the headport and tailport attributes for all edges in
the Graphviz file. The default (off) value makes the arrows between
persons and/or family nodes attach their ends to the respective node
at any position. When this option is selected, the position facing
the node on the other side of the arrow is always chosen.
2017-09-17 17:20:23 -07:00
Pedro AlbuquerqueandPaul Franklin 42f5cd5d11 update Portuguese (Europe) translation 2017-09-17 10:09:03 -07:00
niememat 0000b03226 Update finnish translation 2017-09-17 11:47:44 +03:00
niememat 84370a75e8 Update finnish translation 2017-09-17 11:26:20 +03:00
Paul Franklin 9d89aaeac9 new gramps.pot translation template 2017-09-16 19:24:05 -07:00
Paul Franklin de02717139 consolidate two strings into one, for more context for translators 2017-09-16 18:41:23 -07:00
Paul Franklin 19bfb4160a fix typos 2017-09-16 18:35:38 -07:00
Nick HallandSam Manzi 8ebb4d35fa Tidy up mocking code (#438)[First commit] 2017-09-17 11:03:39 +10:00
Paul CulleyandSam Manzi af975e926f StyledText.join method fails if the joint_text has StyledText Tags (#457)
fixes #10192
2017-09-17 10:48:42 +10:00
Pedro AlbuquerqueandPaul Franklin fe45742c21 update Portuguese (Europe) translation 2017-09-15 22:59:34 -07:00
Paul Franklin 193f082f30 3.4 database conversion fails
Fixes #10189, #10064
2017-09-15 21:04:30 -07:00
Serge NoiraudandSam Manzi c5f2717623 Gramps 'Views' are not named in the window header (#448)
Resolves #001675
2017-09-12 10:05:46 +10:00
Paul CulleyandSam Manzi 231b15eca1 fix invalid export (and import) of Gedcom EMAIL records (#455)
Gedcom spec 5.5 requires '@' in general text to be doubled '@@'
fixes #10167
2017-09-10 08:33:23 +10:00
Paul Franklin c6f45af3f1 put the entire 'bash' tree in the tar file made by 'setup.py sdist' 2017-09-07 10:28:12 -07:00
Paul Franklin 96cc078118 put the entire 'example' tree in the tar file made by 'setup.py sdist' 2017-09-04 11:23:44 -07:00
Paul Franklin 4c1a82f757 restore git revision number to gramps50 branch 2017-09-02 22:08:28 -07:00
Paul Franklin b159ec719d Release Gramps 5.0.0-alpha3 2017-09-02 21:22:21 -07:00
Paul Franklin e715e9093e Update NEWS file for 5.0.0-alpha3 release 2017-09-02 21:17:39 -07:00
Paul Franklin 68310d21d0 Update ChangeLog files for 5.0.0-alpha3 release 2017-09-02 21:13:05 -07:00
prculleyandNick Hall 2eb1f31d92 fix Undo; crashes due to race in Gtk
Some Redraws occur during a model clear when the row changed signal
is emmitted.  Model is only partially cleared at that point.
Under some conditions, some more of the model gets
cleared before the redraw completes, and redraw fails.
fixes #9932
2017-09-01 22:41:32 +01:00
prculleyandNick Hall 86e2d96228 Fix for deleted objects referenced in Note StyledText Links
Fixes #10178
2017-09-01 22:39:14 +01:00
prculleyandNick Hall ac4ba4cb0b pylint on Gedcom importer and exporter 2017-09-01 22:03:27 +01:00
vantu5z 436509edf6 update Russian translation 2017-09-01 22:16:50 +03:00
Paul Franklin 526e6503df show correct list of buttons when FTM started 2017-09-01 10:26:51 -07:00
Serge NoiraudandSam Manzi e5d5cfbd3a Allow Home person to be set in Relationship and Pedigree view (#446)
Resolves #0001970
2017-09-01 10:41:24 +10:00
Paul Franklin 490d206afc don't show 'Archive' button on Windows, it doesn't exist there 2017-08-31 09:22:21 -07:00
Bernard Banko 10956afe84 update sl.po to latest .pot 2017-08-29 13:29:42 +02:00
Bernard Banko 0a19407328 updated slovenian translation 2017-08-29 13:29:42 +02:00
Zdeněk Hataš 65cff91c65 Update Czech translation 2017-08-28 11:17:52 +02:00
vantu5z 4c98f7aa5f update Russian translation 2017-08-28 09:38:29 +03:00
niememat d756f09c82 Update fix finnish translation 2017-08-26 11:58:36 +03:00
niememat 8b50243270 Update finnish translation 2017-08-26 11:12:21 +03:00
Leonhaeuser c03247be74 Update German translation 2017-08-25 19:20:16 +02:00
SNoiraud 2ad5095843 Apply changes from 9881 not in refactoring
Bug #009881, #010172
2017-08-25 09:02:02 +02:00
SNoiraud 61a57b8fdf Strange index and surnames count in narrative web
Fixes #010172
2017-08-23 22:06:57 +02:00
SNoiraud f4dc2a1ff5 After the patch for loop, some missing references
Fixes #010168
2017-08-23 11:59:41 +02:00
Paul Franklin 50b4c62d5e new gramps.pot translation template 2017-08-21 17:22:44 -07:00
SNoiraud b03816a2c0 10169: timestamp set to zero makes gramps crash on windows. 2017-08-21 17:12:31 +02:00
Paul Franklin e215393abd 7276: translate some currently-untranslated punctuation marks 2017-08-21 00:32:20 -07:00
Paul Franklin 04bb34b5e3 proofread and tidy up both POTFILES.in and POTFILES.skip 2017-08-21 00:26:11 -07:00
vantu5z 16e68cd605 update Russian translation 2017-08-21 09:23:03 +03:00
SNoiraud f0dadd9576 Better solution for avoiding loop in narrativeweb. 2017-08-21 00:30:33 +02:00
SNoiraud 73f2f05b26 Avoid loop in narrativeweb with citation, source, and media. 2017-08-20 23:50:08 +02:00
Nick Hall 08aee19e5e Use the default database backend for database conversion 2017-08-20 19:55:37 +01:00
Nick Hall 1d5788bb2d Remove version from the database type column
The version is still available in the information dialog and
from the command line.
2017-08-20 19:29:14 +01:00
Paul Franklin bb8a214c68 cope with pathlogical "person" 2017-08-19 19:01:39 -07:00
prculleyandNick Hall 87a54127ff Correct issue with exception on database change in Gramplets
Fixes #10147
2017-08-19 23:14:17 +01:00
Serge NoiraudandGitHub 8a648e7e22 Reorganization of the narrative web report. (#445)
* Reorganization of the narrative web report.

Resolves  #010151, #07740

* Add empty role to person and family backref lists
2017-08-19 19:54:15 +02:00
prculleyandNick Hall 1d51fa4f61 Fix for InMemory db close error 2017-08-15 22:50:14 +01:00
niememat 8760bb9f6f Update fix finnish translation 2017-08-14 16:44:11 +03:00
vantu5z ceb14a0820 update Russian translation 2017-08-14 13:23:58 +03:00
Paul Franklin 30e973162f Cannot edit dates in Swedish locale and "day month year" format
Fixes #10149
2017-08-12 14:33:35 -07:00
Paul Franklin 7719e995e0 Gramps does not check [for] installed DB backend on DB selector
Fixes #10148
2017-08-10 22:13:34 -07:00
Paul CulleyandGitHub 3311224e48 Typo in note get_schema (#444) 2017-08-10 13:55:08 -05:00
Paul Franklin d277b169f1 Crash when import complex .gramps 5.0 current branch backup file
Fixes #10152
2017-08-10 11:48:36 -07:00
Paul Franklin 4657f91116 add a few comments to the date parser (since I keep forgetting) 2017-08-10 00:08:26 -07:00
Sebastian SchubertandNick Hall bd5f6e4711 example.gramps: add some non-primary participants to events
The following additional participants were added:
Death of Garner, Anderson:
* Page, Elizabeth (Witness)
* Farmer, Miranda Keziah (Witness)
* Page, David (Informant)

Birth of Thornton, James Arthur:
* Jankowski, Margaret Jane "Maggie" (Witness)
* Garner, Raymond E. (Informant)

Marriage of Garner, Lewis Anderson and Martel, Luella Jacques:
* Garner, Robert W. (Witness)
* Martel, Henry (Witness)
* Page, Robert (Clergy)
* Blanco, L. J. (Clergy)
2017-08-08 12:41:54 +01:00
Paul Franklin b9b4d2e175 fix no-day numeric date display in y-m-d locales 2017-08-07 15:03:52 -07:00
Paul Franklin f18aac14fd translate three small-dialog "close" buttons 2017-08-06 18:32:47 -07:00
Kaj Mikkelsen da849a1408 New danish translation after review 2017-08-05 17:00:32 +02:00
Leonhaeuser e15deff4ed synced with gramps 50 2017-08-03 20:46:41 +02:00
Leonhaeuser 61d11594e4 update Germantranslation 2017-08-03 20:42:57 +02:00
romjerome 9d906c29a2 update french translation 2017-08-01 12:20:05 +02:00
romjerome ce4c24caa9 update french translation 2017-08-01 12:14:09 +02:00
romjerome 6577d43e4e merge forward (working release steps on gramps42) 2017-08-01 12:03:46 +02:00
romjerome 5662741b03 merge forward (working release steps on gramps42) 2017-08-01 11:59:34 +02:00
Paulo Henrique Paiva de MoraesandPaul Franklin bcec235e3b update Brazilian Portuguese translation 2017-07-31 19:20:23 -07:00
Paulo Henrique Paiva de MoraesandPaul Franklin 44195cb607 update Brazilian Portuguese translation 2017-07-31 12:58:53 -07:00
Bernard Banko 097865b0c1 Slovenian translation update 2017-07-31 19:30:59 +02:00
Zdeněk Hataš aa3a1cc199 czech translation update 2017-07-31 10:37:10 +02:00
Kaj MikkelsenandPaul Franklin db357e6af5 update Danish translation 2017-07-30 10:46:03 -07:00
Paul Franklin d09002755b remove obsolete translations (with doubled-percent-signs) 2017-07-30 10:41:36 -07:00
vantu5z 3c50a832e7 update Russian translation 2017-07-30 19:47:42 +03:00
niememat 2789ad40a8 Update finnish translation 2017-07-30 13:32:13 +03:00
Paul Franklin eccbb93775 new gramps.pot translation template 2017-07-29 13:45:01 -07:00
Paul Franklin 79a3b4d57d tidy up POTFILES.* (add recently translatable modules, etc.) 2017-07-29 13:42:17 -07:00
prculleyandNick Hall 2d592fa521 Prevent dbapi from nesting transactions for metadata
Fixes #10038.
2017-07-29 21:03:17 +01:00
Nick Hall c7249b5ca9 Tidy up database summary information 2017-07-29 19:28:26 +01:00
romjerome 185d89c917 typo 2017-07-29 14:53:07 +02:00
Nick Hall 63bb36ea44 Reorganise DBAPI plugins
Add SQLite and PostgreSQL plugins.
Remove DBAPI and InMemoryDb plugins.
2017-07-28 23:42:55 +01:00
Nick Hall 1513315d05 Remove unused imports 2017-07-28 19:35:11 +01:00
Nick Hall e24ba2f198 Remove settings.py file 2017-07-28 19:35:11 +01:00
Paul Franklin d0880a07a0 fix another typo in the new lt.po 2017-07-27 19:46:04 -07:00
Bernard Banko 2eb81c320b lt.po: Added quotes add the end of the last string 2017-07-28 00:06:56 +02:00
Tadas MasiulionisandPaul Franklin bb604521f2 update Lithuanian translation 2017-07-27 12:52:20 -07:00
Alois PoettkerandNick Hall 1a065485e3 Extend Pro-Gen importer II
Adapted to Pro-Gen test fix, expanded functionality and fixed
minor bugs.
2017-07-27 19:05:52 +01:00
schooncandNick Hall 009783a59a Add pycharm dir to .gitignore 2017-07-27 18:23:55 +01:00
Nick Hall 1b4f70c808 Fix permissions on leak gramplet 2017-07-27 18:18:53 +01:00
niememat dd4a727521 Update finnish translation 2017-07-27 09:48:08 +03:00
Paul CulleyandSam Manzi ebb7111f25 An improved Leak (Uncollected Objects) Gramplet (#345)
* Improved leak detector (debugging tool)

* Fix DummyDb so it garbage collector can reclaim it after close

* Fix leak gramplet so pop-ups use correct transient parent
2017-07-27 12:15:38 +10:00
niememat e08e1237d9 Finnish translation update 2017-07-26 19:28:42 +03:00
Nick Hall 86fd14613e Merge branch 'gramps50' 2017-07-25 21:45:37 +01:00
Matti NiemeläandPaul Franklin aef8668d9f update Finnish translation 2017-07-25 13:01:44 -07:00
Frederik De RichterandPaul Franklin b229bd331b update Netherlands translation 2017-07-24 23:28:13 -07:00
Zdeněk Hataš fb28f71095 czech translation update 2017-07-24 10:17:00 +02:00
vantu5z 6d4e4ba6cc [Russian translation] fix typo
PR #439
Thanks to schoonc
2017-07-24 11:05:57 +03:00
Paul Franklin 0fa3d4af76 Date Editor has 'Type' and 'Quality' labels swapped
Fixes #10135
2017-07-23 11:25:19 -07:00
Paul Franklin fda7c3becb new gramps.pot translation template 2017-07-22 15:13:42 -07:00
Nick Hall b83283e081 Allow multiple collations per connection
This fixes collation for translated reports and multi-user access
for PostgreSQL.
2017-07-22 19:46:26 +01:00
vantu5z 95d84573d4 update Russian translation 2017-07-21 11:01:48 +03:00
Alois PoettkerandNick Hall 5276461239 Tidy up code 2017-07-18 18:25:29 +01:00
Alois PoettkerandNick Hall 40f47bc22d Delete multiple events 2017-07-18 18:20:55 +01:00
Nick Hall 8150403ccb Revert "Simplify import plugin unit tests"
This works with python 3.6 but not with 3.4.

This reverts commit b43d94ab16.
2017-07-18 16:57:55 +01:00
Nick Hall b43d94ab16 Simplify import plugin unit tests 2017-07-18 16:15:01 +01:00
Nick Hall 849290a3b7 Fix Pro-Gen unit test 2017-07-18 00:06:30 +01:00
Paul CulleyandGitHub 7771fa063a Gramplets HandleErrors with Family Merge and issues on close/open (#424)
Unless a Gramplet has navtype=['Person'] in .gpr it will not get an
automatic connection to Person active-changed.
To prevent multiple connections after db close/open, all connections
are made through Gramplet class 'connect', rather than directly to db

fixes #10082, #10081, #10090, #10089
2017-07-17 16:53:23 -05:00
Leonhaeuser d01fbf05ec Update German translation 2017-07-17 21:14:12 +02:00
prculleyandNick Hall f40526366a Add title properties to more of schema 2017-07-17 16:13:12 +01:00
prculleyandNick Hall d6ca3cf527 Fix source attribute lists in schema 2017-07-17 16:13:12 +01:00
prculley d275b3f7a3 Add db undo/redo, callback, and callback manager tests for both dbs 2017-07-17 09:52:15 -05:00
prculley 48eb507f98 Guarantee order on db emits Partial fix #10068 2017-07-17 09:52:15 -05:00
prculley a1205009f4 Undo of delete person on dbapi fails; fixes #10070 2017-07-17 09:52:15 -05:00
Nick Hall 8f69201a70 Fix creating new PostgreSQL database
PostgreSQL will rollback the entire transaction on errors.
Change the code so that we know that columns created dynamically
do not already exist.
2017-07-15 00:41:23 +01:00
Leonhaeuser 0b617e9fd6 update German translation
Fix #0010131
2017-07-15 00:23:00 +02:00
Leonhaeuser a2b5c8e34c update German translation
Fix #0010131
2017-07-15 00:19:39 +02:00
Thomas Guyot-SionnestandNick Hall fd2af705e7 Use all parameters in settings.ini for postgresql
Read all parameters defined in settings.ini as keyword arguments for
postgresql. This also fixes port being ignored.
2017-07-14 18:01:51 +01:00
Paul Franklin d611b8b99c ignore whether 32-bit or 64-bit when reporting Windows o.s.
Fixes #8832
2017-07-10 10:47:20 -07:00
Zdeněk Hataš ad93ef2bb2 czech translation update 2017-07-10 10:51:16 +02:00
Lajos Nemesériandromjerome 7f267d8c46 Update Hungarian translation 2017-07-08 13:36:00 +02:00
Lajos Nemesériandromjerome 6eb435142e Update Hungarian translation 2017-07-08 13:34:34 +02:00
prculleyandPaul Franklin 213243ae3d Fix verify tool to close and save configs properly
Fixes #10121

Signed-off-by: Paul Franklin <pf.98052@gmail.com>
2017-07-07 12:10:26 -07:00
vantu5z 4feaa0b594 update Russian translation 2017-07-06 13:12:12 +03:00
Frederik De RichterandPaul Franklin bb1ae6a240 update Netherlands translation 2017-07-05 11:34:56 -07:00
Paul Franklin 7014bc0d2e fix (more fatal) errors in Esperanto translation
Travis doesn't check for string-parameter mismatches, but it would have
been fatal if anybody had tried to actually run gramps in Esperanto.
2017-07-03 20:35:47 -07:00
Paul Franklin 443809a1c7 add three (fatal) missing linefeeds to Esperanto translation 2017-07-03 20:04:45 -07:00
Pier Luigi CinquantiniandPaul Franklin e81cd22592 update Esperanto translation 2017-07-03 19:29:40 -07:00
Leonhaeuser d1c844e36c update German translation 2017-07-03 20:11:27 +02:00
John Ralls d10561f27c Open web links with /usr/bin/open on Mac and Python older than 3.5
Works around https://bugs.python.org/issue24452
Fixes #10105
2017-07-03 10:24:47 -07:00
Alois PoettkerandNick Hall e14ea777d5 Extend Pro-Gen importer functionality 2017-07-02 23:16:10 +01:00
Paul Franklin 46d73a16a0 add verify.py rules: match same birth or death date as marriage date
Issue #2583
2017-07-02 13:37:17 -07:00
Paul Franklin 9174d0e573 "translate" some more strings, make real omissions more obvious 2017-07-02 10:41:19 -07:00
Paul Franklin b36ca736ea translate some punctuation marks
more colons for French

Issue #7276
2017-07-02 09:54:51 -07:00
niememat 6682ebba81 Update finnish translation 2017-07-02 19:38:34 +03:00
Fedik 4d2b918d39 Update Ukrainian translation 2017-07-02 17:23:56 +03:00
Fedik 1e28870d25 Update Ukrainian translation 2017-07-02 16:43:17 +03:00
Paul Franklin 0b263eb5d5 revert half of 0fa5454831 (LANG), make new gramps.pot template 2017-07-01 20:41:51 -07:00
Paul Franklin 4eabee4b92 slight tweaks to two wiki pointers 2017-07-01 20:22:27 -07:00
SNoiraud dc8ec0a964 Narrated Web: path to alternate image is wrong
Fixes #9881
2017-06-30 15:24:24 +02:00
romjerome d69fc070f7 merge and update french translation 2017-06-30 09:35:49 +02:00
romjerome a9dbfca810 update french translation 2017-06-30 09:26:18 +02:00
romjerome 4acfdcce52 update french translation 2017-06-30 09:20:12 +02:00
vantu5z 0fa5454831 [about dialog] - some strings to translate 2017-06-30 09:04:46 +03:00
Paul Franklin 8611494069 don't print a 'Distribution' line in Windows error reports 2017-06-29 11:25:43 -07:00
vantu5z 4bbd5d5ee5 update Russian translation
- merge with template (translate new strings)
- add latest translators to translator-credits
2017-06-29 10:18:37 +03:00
arnaullvandNick Hall b3c5e372d6 Updated catalan translation to latest template 2017-06-28 21:49:06 +01:00
Paul Franklin 3a663870ac fix fatal error in Finnish translation 2017-06-28 12:03:34 -07:00
Frederik De RichterandPaul Franklin 8fce3035d3 update Netherlands translation 2017-06-28 10:43:52 -07:00
Matti NiemeläandPaul Franklin a3070f8149 update Finnish translation 2017-06-28 10:37:19 -07:00
Sveinn í FelliandPaul Franklin 1e8beab9a3 update Icelandic translation 2017-06-28 10:29:22 -07:00
SNoiraud afdd7c74c3 Narrative web : crash using OSM when bad lat/lon
Fixes : 10111
2017-06-28 17:36:58 +02:00
Zdeněk Hataš b0ad63f1c7 czech translation update 2017-06-28 11:17:01 +02:00
Leonhaeuser 790cae7685 update German translation 2017-06-27 21:21:52 +02:00
John Ralls 19adb31b0e FamilyGroup Report crash
Python's sort routine gratuitously converts the bytearrays returned by
ICU::Collator::getByteArray to a string when storing it. This resulted
in a TypeError when attempting to compare a just-returned bytearray
with a stored string.

We work around this by converting the bytearray into its hexadecimal
representation and then decoding that into a string.

Fixes #10077.
2017-06-27 11:25:14 -07:00
Paul Franklin a63e0c2e23 new gramps.pot translation template 2017-06-27 10:33:50 -07:00
Paul Franklin cd88b2a0b6 typo (thanks, Sveinn Felli) 2017-06-27 10:07:20 -07:00
Paul Franklin 28c0638c38 don't print a 'Distribution' line in Windows' Help=>About 2017-06-27 09:06:11 -07:00
Paul CulleyandNick Hall dc645c813b ReorderIds tool crashes with 'bytes' error on bsddb (#428)
fixes #10098
2017-06-26 22:17:40 +01:00
arnaullvandNick Hall f3b3eec211 Updated catalan translation to latest template 2017-06-26 22:06:29 +01:00
Paul Franklin e6ec825a97 merge translation with current template 2017-06-26 12:30:38 -07:00
Paul Franklin aac102f432 merge translation with current template 2017-06-26 12:30:37 -07:00
Paul Franklin 353543e47d merge translation with current template 2017-06-26 12:30:37 -07:00
Paul Franklin 68f1e920ed merge translation with current template 2017-06-26 12:30:37 -07:00
Paul Franklin 9e796ebb43 merge translation with current template 2017-06-26 12:30:36 -07:00
Paul Franklin a52f88fd53 merge translation with current template 2017-06-26 12:30:36 -07:00
Paul Franklin 0873c9006a merge translation with current template 2017-06-26 12:30:35 -07:00
Paul Franklin 1db2181dcf merge translation with current template 2017-06-26 12:30:35 -07:00
Paul Franklin d2ffe9cc38 merge translation with current template 2017-06-26 12:30:35 -07:00
Paul Franklin 7ce031bb15 merge translation with current template 2017-06-26 12:30:34 -07:00
Paul Franklin bc765ee2b0 merge translation with current template 2017-06-26 12:30:34 -07:00
Paul Franklin c77920471d merge translation with current template 2017-06-26 12:30:33 -07:00
Paul Franklin 702ebaf0a2 merge translation with current template 2017-06-26 12:30:33 -07:00
Paul Franklin 93349b8fa3 merge translation with current template 2017-06-26 12:30:33 -07:00
Paul Franklin 040fad0db4 merge translation with current template 2017-06-26 12:30:32 -07:00
Paul Franklin 1bdccd9270 merge translation with current template 2017-06-26 12:30:32 -07:00
Paul Franklin 919b79bef4 merge translation with current template 2017-06-26 12:30:31 -07:00
Paul Franklin 7b898b03a2 merge translation with current template 2017-06-26 12:30:31 -07:00
Paul Franklin ef65f7bfa2 merge translation with current template 2017-06-26 12:30:30 -07:00
Paul Franklin 047bfed661 merge translation with current template 2017-06-26 12:30:30 -07:00
Paul Franklin 1b32c38373 merge translation with current template 2017-06-26 12:30:30 -07:00
Paul Franklin a903e96e92 merge translation with current template 2017-06-26 12:30:29 -07:00
Paul Franklin e407e6b456 merge translation with current template 2017-06-26 12:30:29 -07:00
Paul Franklin 08e58c6652 merge translation with current template 2017-06-26 12:30:28 -07:00
Paul Franklin eda61cb80a merge translation with current template 2017-06-26 12:30:28 -07:00
Paul Franklin 143ae11221 merge translation with current template 2017-06-26 12:30:27 -07:00
Paul Franklin 4a1e4901c8 merge translation with current template 2017-06-26 12:30:27 -07:00
Paul Franklin 02e47dbae3 merge translation with current template 2017-06-26 12:30:26 -07:00
Paul Franklin 20d952d472 merge translation with current template 2017-06-26 12:30:26 -07:00
Paul Franklin 5487e03212 merge translation with current template 2017-06-26 12:30:26 -07:00
Paul Franklin 9c1ddbeab7 merge translation with current template 2017-06-26 12:30:25 -07:00
Paul Franklin 7247bb5ced merge translation with current template 2017-06-26 12:30:25 -07:00
Paul Franklin 0164c2087f merge translation with current template 2017-06-26 12:30:24 -07:00
Paul Franklin aa6e66ef9f merge translation with current template 2017-06-26 12:30:24 -07:00
Paul Franklin 57eb2bae2b merge translation with current template 2017-06-26 12:30:23 -07:00
Paul Franklin f658e5a1af merge translation with current template 2017-06-26 12:30:23 -07:00
Paul Franklin a918c66b87 merge translation with current template 2017-06-26 12:30:23 -07:00
Paul Franklin 4e75ce56ae add another address to the mailmap 2017-06-26 12:27:32 -07:00
Matti NiemeläandPaul Franklin b989b46f21 update Finnish translation 2017-06-26 11:16:49 -07:00
vantu5z fd12e81724 update Russian translation 2017-06-26 07:52:44 +03:00
John Ralls 59c97081be Add 24x24 gramps-fanchart2way.png.
Missed when the plugin was added. Not having it makes for an ugly charts
toolbar in HiDPI.
2017-06-24 20:38:47 -07:00
niememat a840566e02 Update fix finnish translation 2017-06-24 19:33:00 +03:00
Nick HallandPaul Franklin 3e5a90b4b1 typo
Traceback (most recent call last):
  File "C:\Program Files\GrampsAIO64-5.0.0-alpha2\gramps\gui\configure.py", line 1248, in autobackup_changed
    self.uistate.set_autobackup_timer()
AttributeError: 'DisplayState' object has no attribute 'set_autobackup_timer'

https://gramps-project.org/bugs/view.php?id=10098#c52129

Issue #10098
2017-06-23 12:55:33 -07:00
prculleyandNick Hall d8ba3f746c Unnecessarily long relative paths generated on Windows
The relative_path file utility function returns paths with '..\..'
on Windows unnecessarily.

fixes #10087
2017-06-23 19:31:47 +01:00
Nick Hall fd329764ed The get_name_group_mapping method should return a str
Fixes #10084, #10085, #10086.
2017-06-23 18:17:12 +01:00
Paul Franklin 7d9556c933 merge translation with current template 2017-06-22 20:28:08 -07:00
Paul Franklin 5bb2f8b7fb names not displayed in relationship graph
Issue #10093
2017-06-22 17:27:23 -07:00
Leonhaeuser d9136ecfa8 update German translation 2017-06-22 20:29:41 +02:00
Nick Hall f6a2199f68 Merge branch 'gramps50' 2017-06-22 17:47:33 +01:00
Zdeněk Hataš c0e1f5629d czech translation - small fixes 2017-06-22 12:29:42 +02:00
prculleyandNick Hall f954b97f96 Citations Gramplet doesn't update in many cases
Fixes #10069.
2017-06-21 18:45:40 +01:00
Nick Hall adb4883291 Fix HasCitation rule in citation filter sidebar
Filter parameters should be of type str.

Fixes #10076.
2017-06-21 18:26:32 +01:00
Paul Franklin ccb5d5245a typo 2017-06-21 10:06:54 -07:00
Paul Franklin c7ce70d844 Outdated Bugtracker link in Unexpected Error reporting wizard
Fixes #10100
2017-06-21 09:38:31 -07:00
Paul Franklin d7b6d88274 Family Lines Report generates empty PDFs when name [has double-quotes]
Fixes #10096
2017-06-21 09:18:57 -07:00
Paul Franklin 184eaf21cd non-local character in DB name causes crash on Windows
Fixes #10095
2017-06-19 09:51:02 -07:00
Paul Franklin 13b5680692 make error report versions closer to Help=>About ones 2017-06-17 19:07:43 -07:00
John Ralls 2f8bc559e8 Add a gir element, needed for scriptless bundles. 2017-06-17 14:51:28 -07:00
SNoiraudandNick Hall 65b058ff75 Dead people are shown as alive
Fixes #6364.
2017-06-16 23:01:29 +01:00
prculleyandNick Hall d486052378 Gedcom import with OBJE/FORM URL on event
Fixes #7593.
2017-06-16 22:31:56 +01:00
prculleyandNick Hall f17892c411 Fix click/drag in media reference editor
Fix so click/drag creates/updates selection using left mouse
button.

Fixes #8429.
2017-06-16 22:05:15 +01:00
prculleyandNick Hall 007c1cb1d6 Fix spin button updates in media reference editor
Fix so spin button updates visible selection when it has already
been clicked.

Bug #8429.
2017-06-16 22:05:06 +01:00
prculleyandNick Hall bdbecfa46c Fix media preview for preview size changes
Bug #8429.
2017-06-16 21:58:05 +01:00
prculleyandNick Hall 6ece4ce742 _errorview dialog mapped without transient parent
Fixes #8128.
2017-06-16 19:55:50 +01:00
prculleyandNick Hall c1aeb6b203 Undo of delete doesn't update views
Fixes #10056.
2017-06-16 18:31:48 +01:00
prculleyandNick Hall 3150fae2b8 Error on 'cancel' for db upgrade
Fixes #10065.
2017-06-16 18:07:29 +01:00
prculleyandNick Hall 620845bc4f Top surnames Gramplet doesn't update when db is closed
Fixes #10073.
2017-06-16 17:54:45 +01:00
JosipandGitHub bec8cea3e3 DBAPI: PostgreSQL crash (#421)
Fixes #0010071.
2017-06-16 16:53:36 +02:00
SNoiraud 1a4d43dbbf 10088: Geography: try to link a map position if we have an active place. 2017-06-16 14:54:04 +02:00
Doug BlankandNick Hall 676825cf52 Removes try/except and recursion in ancestor filters +/- N gens
This fix rewrites the Ancestor-of +/- N filters to remove the try/except
and removes the recursion. The recursion would only be a problem
on very deep trees, but the try/except was hiding a variety of
problems. Most directly, if a person did not have a main family
then it would exit out of the loop.

(I don't have a test database to break the code other than my
real data, so you'll have to do that part.)

I also made sure that the meaning of N is consistent in
both filters:

1 - root person
2 - root person's parents
3 - root person's grandparents
2017-06-16 00:55:31 +01:00
prculleyandNick Hall 5f93da1343 HandleError on Relationship view for add child with no father
Fixes #10059.
2017-06-15 21:50:24 +01:00
prculleyandNick Hall eedbe0db67 Fix HandleError in Citation gramplet
Fixes #10054.
2017-06-15 17:29:28 +01:00
Nick Hall dfc9dde32d Merge branch 'gramps50' 2017-06-15 16:44:15 +01:00
Zdeněk Hataš 5b0fbf209e removed legacy code from _date_cs.py
fixed inflections in cs.po
2017-06-15 12:57:03 +02:00
prculleyandbpisoj 22fb1ab254 relationship calculator fails (missing uistate param)
Fixes 10052
2017-06-14 02:25:28 +02:00
bpisoj d6b26eff26 add build version to const.py 2017-06-10 21:33:23 +02:00
Zdeněk Hataš 50f93f54ec czech translation update 2017-06-05 11:49:50 +02:00
Nick Hall 9cb1d96725 Merge branch 'gramps50' 2017-06-03 22:20:03 +01:00
Nick Hall 40013dccc3 Merge branch 'gramps50' 2017-06-02 23:53:56 +01:00
Serge NoiraudandGitHub 24af1b8420 8200: Person Relatives Tab should use the type from the relationship (#396)
* 8200: Person Relatives Tab should use the type from the relationship

* 8200: Flag variables as there are now two variables.
2017-06-02 20:07:31 +02:00
Serge NoiraudandGitHub 213d656df4 10049: tabs reorganization in narrative web. (#406) 2017-06-02 13:20:21 +02:00
Nick Hall c09b4e96d2 Remove trailing whitespace 2017-05-23 19:52:19 +01:00
Nick Hall a80875e00c Update Travis for gramps51 2017-05-23 19:51:24 +01:00
Nick Hall bbdedb5097 Update a few missed version numbers 2017-05-23 19:49:23 +01:00
Nick Hall dd0671b111 Bump all version numbers to 5.1 2017-05-23 18:30:29 +01:00
504 changed files with 450768 additions and 578201 deletions
+3
View File
@@ -23,5 +23,8 @@ test/data
Thumbs.db
ehthumbs.db
# IDE
.idea/
# Glade temp files
*~
+1 -1
View File
@@ -9,7 +9,7 @@
Josip Pisoj <josip@pisoj.com>
Mirko Leonhaeuser <mirko@leonhaeuser.de>
<martin.hawlisch@gmx.de> <loshawlos@users.sourceforge.net>
Matti Niemelä <matti.u.niemela@gmail.com>
Matti Niemelä <matti.u.niemela@gmail.com> <niememat@gmail.com>
<nick-h@gramps-project.org> <nick__hall@hotmail.com>
<nick-h@gramps-project.org> <Nick-Hall@users.noreply.github.com>
Ondrej Krč-Jediný <hou@centrum.sk>
+6 -6
View File
@@ -72,7 +72,7 @@ install:
# by the automatic git checkout.
# Download Sean Ross-Ross's Pure Python module containing a framework to
# manipulate and analyze python asts and bytecode. This is loaded to
# manipulate and analyze python asts and bytecode. This is loaded to
# /home/travis/build/gramps-project/gramps/meta
# FIXME: This should be loaded from the release directory at
# https://pypi.python.org/pypi/meta
@@ -95,11 +95,11 @@ before_script:
# set GRAMPS_RESOURCES for locale, data,image and documentation
- export GRAMPS_RESOURCES=.
# Install addons
- mkdir -p ~/.gramps/gramps50/plugins/
- wget https://github.com/gramps-project/addons/raw/master/gramps50/download/CliMerge.addon.tgz
- tar -C ~/.gramps/gramps50/plugins -xzf CliMerge.addon.tgz
- wget https://github.com/gramps-project/addons/raw/master/gramps50/download/ExportRaw.addon.tgz
- tar -C ~/.gramps/gramps50/plugins -xzf ExportRaw.addon.tgz
- mkdir -p ~/.gramps/gramps51/plugins/
- wget https://github.com/gramps-project/addons/raw/master/gramps51/download/CliMerge.addon.tgz
- tar -C ~/.gramps/gramps51/plugins -xzf CliMerge.addon.tgz
- wget https://github.com/gramps-project/addons/raw/master/gramps51/download/ExportRaw.addon.tgz
- tar -C ~/.gramps/gramps51/plugins -xzf ExportRaw.addon.tgz
script:
# Ignore the virtualenv entirely. Use nosetests3, python3 (3.4.0) and coverage
-1
View File
@@ -1,4 +1,3 @@
<!-- $Id$ -->
Alex Roitman shura@gramps-project.org
+140 -21194
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -355,4 +355,3 @@ Since Gramps generates HTML pages, you can upload the pages to your personal web
**** End of Gramps Frequently Asked Questions ****
$Id$
+8 -8
View File
@@ -33,11 +33,11 @@ all required and optional dependencies. Missing dependencies will
result in runtime errors.
To build and install, whether from a tarball or git repo:
python setup.py build
sudo python setup.py install
python3 setup.py build
sudo python3 setup.py install
You can avoid using sudo for the install step by specifying a prefix to which you have write priviledge. The default is /usr/local, which is usually owned by root. You can learn of more options with
python setup.py --help
python3 setup.py --help
One can use gramps from the command line without installing it by
setting the following environment variables, but that won't provide
@@ -71,7 +71,7 @@ from the source directory.
b) You installed Gramps, and want to start it from the PYTHONPATH. In this
case use the command:
python -c 'from gramps.grampsapp import main; main()'
python3 -c 'from gramps.grampsapp import main; main()'
The executable 'gramps' in /usr/local/bin or /usr/bin from a) does
this for you.
@@ -79,7 +79,7 @@ from the source directory.
b) You downloaded the Gramps source code to a directory, and want to run it.
You can start Gramps from the source code directory with
python Gramps.py
python3 Gramps.py
See gramps/gen/const.py how Gramps finds its resource directories in case
you encounter problems.
@@ -90,17 +90,17 @@ If you would like to install Gramps without being root, or in an
alternative location on windows, supply the --root argument to setup.py
For example:
python setup.py install --root ~/test
python3 setup.py install --root ~/test
Packager's issues
------------------
There is a MANIFEST.in file to indicate the work needed.
To create a source distribution run:
python setup.py sdist
python3 setup.py sdist
If Gramps is built outside of the source tree in a temporary location (e.g. when
packaging for a distribution), the --resourcepath option can be used to specify
the path to the installed location of the Gramps resources (e.g. /usr/share):
python setup.py install --resourcepath=/usr/share
python3 setup.py install --resourcepath=/usr/share
+1 -2
View File
@@ -1,6 +1,5 @@
include ChangeLog
include po/ChangeLog
include AUTHORS
include ChangeLog
include COPYING
include FAQ
include Gramps.py
+166 -1279
View File
File diff suppressed because it is too large Load Diff
+26 -6
View File
@@ -11,19 +11,20 @@ Requirements
The following packages **MUST** be installed in order for Gramps to work:
* **Python** 3.2 or greater - The programming language used by Gramps. https://www.python.org/
* **GTK** 3.10 or greater - A cross-platform widget toolkit for creating graphical user interfaces. http://www.gtk.org/
* **GTK** 3.12 or greater - A cross-platform widget toolkit for creating graphical user interfaces. http://www.gtk.org/
* **pygobject** 3.12 or greater - Python Bindings for GLib/GObject/GIO/GTK+ https://wiki.gnome.org/Projects/PyGObject
The following three packages with GObject Introspection bindings (the gi packages)
* **cairo** - a 2D graphics library with support for multiple output devices. http://cairographics.org/
* **cairo** 1.13.1 or greater - a 2D graphics library with support for multiple output devices. http://cairographics.org/
* **Pycairo** 1.13.3 or greater - GObject Introspection bindings for cairo. https://github.com/pygobject/pycairo
* **pango** - a library for laying out and rendering of text, with an emphasis on internationalization. http://www.pango.org/
* **pangocairo** - Allows you to use Pango with Cairo http://www.pango.org/
* **librsvg2** - (SVG icon view) a library to render SVG files using cairo. http://live.gnome.org/LibRsvg
* **xdg-utils** - Desktop integration utilities from freedesktop.org
* **bsddb3** - Python bindings for Oracle Berkeley DB https://pypi.python.org/pypi/bsddb3/
* **sqlite3** - Python bindings for SQLite Database library
The following package is needed for full translation of the interface
to your language:
@@ -44,7 +45,7 @@ The following packages are **STRONGLY RECOMMENDED** to be installed:
It may be osmgpsmap, osm-gps-map, or python-osmgpsmap,
but the Python bindings for this must also be present, so gir1.2-osmgpsmap-1.0.
Without this the GeoView will not be active, see
https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Categories#Geography_Category
https://gramps-project.org/wiki/index.php?title=Gramps_5.0_Wiki_Manual_-_Categories#Geography_Category
* **Graphviz**
@@ -65,6 +66,10 @@ The following packages are **STRONGLY RECOMMENDED** to be installed:
(These are Python bindings for the ICU package.
https://pypi.python.org/pypi/PyICU/)
* **Ghostscript**
Used by Graphviz reports to help create PDF's
The following packages are optional:
------------------------------------
* **gtkspell**
@@ -77,12 +82,12 @@ The following packages are optional:
The GNU Revision Control System (RCS) can be used to manage
multiple revisions of your family trees. See info at
https://gramps-project.org/wiki/index.php?title=Gramps_4.2_Wiki_Manual_-_Manage_Family_Trees#Archiving_a_Family_Tree
https://gramps-project.org/wiki/index.php?title=Gramps_5.0_Wiki_Manual_-_Manage_Family_Trees#Archiving_a_Family_Tree
Only rcs is needed, NO python bindings are required
* **PIL**
Python Image Library is needed to crop
Python Image Library (PILLOW) is needed to crop
images and also to convert non-JPG images to
JPG so as to include them in LaTeX output.
(For Python3 a different source may be needed,
@@ -98,6 +103,18 @@ The following packages are optional:
More font support in the reports
* **geocodeglib**
A library use to associate a geographical position (latitude, longitude)
to a place name. This is used if you already have osmgpsmap installed.
If installed, when you add or link a place from the map, you have a red line
at the end of the table for selection.
Debian, Ubuntu, ... : gir1.2-geocodeglib-1.0
Fedora, Redhat, ... : geocode-glib
openSUSE : geocode-glib
ArchLinux : geocode-glib
...
Optional packages required by Third-party Addons
------------------------------------------------
@@ -112,6 +129,9 @@ Prerequistes required for the following Addons to work:
* **Graph View** - Requires: PyGoocanvas and Goocanvas (python-pygoocanvas, gir1.2-goocanvas-2.0).
( https://gramps-project.org/wiki/index.php?title=Graph_View )
* **Network Chart** - Requires: networkx and pygraphviz
( https://gramps-project.org/wiki/index.php?title=NetworkChart )
* **PedigreeChart** - Can optionally use - numpy if installed
( https://gramps-project.org/wiki/index.php?title=PedigreeChart )
-1
View File
@@ -1,4 +1,3 @@
$Id$
UNSTABLE Gramps 4.0.0 Beta2 release.
+3 -1
View File
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id$ -->
<authors xmlns:html="http://www.w3.org/1999/xhtml">
<author title="author">
Alex Roitman &lt;<html:a href="mailto:shura@gramps-project.org">shura@gramps-project.org</html:a>&gt;
@@ -94,6 +93,9 @@
<author title="contributor">
Nick Hall &lt;<html:a href="mailto:nick__hall@hotmail.com">nick__hall@hotmail.com</html:a>&gt;
</author>
<author title="contributor">
Paul Culley &lt;<html:a href="mailto:paulr2787@gmail.com">paulr2787@gmail.com</html:a>&gt;
</author>
<author title="contributor">
Peter Landgren &lt;<html:a href="mailto:peter.talken@telia.com">peter.talken@telia.com</html:a>&gt;
</author>
-55
View File
@@ -1,55 +0,0 @@
/*
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright 2009 Serge Noiraud
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
----------------------------------------------------------------------------
GeoView Style Sheet
Style Name: GeoView
Style Author: Serge Noiraud (2009)
----------------------------------------------------------------------------
This file was created for GeoView usage.
# $Id$
GeoView Styles
----------------------------------------------------- */
#geo-map
{
margin-left:0px;
margin-top:0px;
margin-right:auto;
margin-bottom:auto;
}
/* InfoWindow */
#geo-info {
font-size:10pt;
max-height:200px;
max-width: 600px;
min-width: 300px;
text-align: left;
padding-right: 6px;
overflow-x: auto;
overflow-y: auto;
}
+11 -2
View File
@@ -50,7 +50,6 @@ Characteristic of this style is that it uses the full width of the browser
window and that horizontal highlighting bars extend over the full width of
the page.
--------------------------------------------------------------------------------------------------
# $Id$
NarrativeWeb Styles
------------------------------------------------------------------------------------------------
@@ -87,6 +86,12 @@ h1 {
font-weight: bold;
padding-left: 15px;
}
h2 {
display:block;
margin:0;
padding:0;
text-align: center;
}
h3 {
font-size: large;
padding-left: 15px;
@@ -325,6 +330,10 @@ table.IndividualList td.ColumnSurname {
content: "";
}
table.eventlist tbody tr td.ColumnSources {
width: 5%;
}
/* Gallery
----------------------------------------------------- */
#GalleryNav {
@@ -416,7 +425,7 @@ div#SourceDetail {
}
.subsection {
clear: both;
overflow: hidden;
overflow: visible;
}
.subsection p {
margin: 0px;
+9 -13
View File
@@ -134,7 +134,6 @@ h5, h6 {
margin:1.3em 0 .5em 1em;
}
p#description {
max-width: 800px;
margin: 0;
padding: 1em 20px;
text-indent: 30px;
@@ -289,10 +288,6 @@ table.infolist thead tr th {
table.infolist tr td {
border-bottom: dashed 1px #000;
vertical-align: middle;
padding: 6px 0 6px 10px;
}
table.infolist tr td a {
display: block;
}
table.infolist tr.BeginLetter td, table.infolist tr.BeginSurname td {
border-top: solid 1px #000;
@@ -352,15 +347,15 @@ div#Individuals {
margin: 0;
padding: 0;
}
div#Individuals table.individuallist {
div#Individuals table.IndividualList {
border-bottom: solid 1px #000;
}
div#Individuals table.individuallist tbody tr td.ColumnSurname a:hover,
div#Individuals table.individuallist tbody tr td.ColumnSurname a:active {
div#Individuals table.IndividualList tbody tr td.ColumnSurname a:hover,
div#Individuals table.IndividualList tbody tr td.ColumnSurname a:active {
cursor: default;
background: none;
}
div#Individuals table.individuallist tbody tr td.ColumnName a {
div#Individuals table.IndividualList tbody tr td.ColumnName a {
vertical-align: middle;
}
div#Individuals div table.infolist tr td p {
@@ -494,7 +489,7 @@ table.eventlist tbody tr td.ColumnNotes {
width: 20%;
}
table.eventlist tbody tr td.ColumnSources {
width: 17%;
width: 5%;
}
table.eventlist tbody tr td.ColumnPerson {
width: 35%;
@@ -1130,9 +1125,10 @@ div.narrative {
}
.narrative p {
font: normal .9em/1.4em sans-serif;
margin-top: .5em;
margin-bottom: 0;
padding: 0 20px 1em 20px;
margin: 0.1em 0 0.2em 0;
}
i + div.grampsstylednote p {
margin: 0.1em 0 0.2em 0;
}
/* Subsections : References
+11 -2
View File
@@ -50,7 +50,6 @@ Characteristic of this style is that it uses the full width of the browser
window and that horizontal highlighting bars extend over the full width of
the page.
--------------------------------------------------------------------------------------------------
# $Id$
NarrativeWeb Styles
------------------------------------------------------------------------------------------------
@@ -87,6 +86,12 @@ h1 {
font-weight: bold;
padding-left: 15px;
}
h2 {
display:block;
margin:0;
padding:0;
text-align: center;
}
h3 {
font-size: large;
padding-left: 15px;
@@ -368,6 +373,10 @@ table.IndividualList td.ColumnSurname {
content: "";
}
table.eventlist tbody tr td.ColumnSources {
width: 5%;
}
/* Gallery
----------------------------------------------------- */
#GalleryNav {
@@ -466,7 +475,7 @@ div#SourceDetail {
}
.subsection {
clear: both;
overflow: hidden;
overflow: visible;
}
.subsection p {
margin: 0px;
+11 -2
View File
@@ -50,7 +50,6 @@ Characteristic of this style is that it uses the full width of the browser
window and that horizontal highlighting bars extend over the full width of
the page.
--------------------------------------------------------------------------------------------------
# $Id$
NarrativeWeb Styles
------------------------------------------------------------------------------------------------
@@ -87,6 +86,12 @@ h1 {
font-weight: bold;
padding-left: 15px;
}
h2 {
display:block;
margin:0;
padding:0;
text-align: center;
}
h3 {
font-size: large;
padding-left: 15px;
@@ -361,6 +366,10 @@ table.IndividualList td.ColumnSurname {
content: "";
}
table.eventlist tbody tr td.ColumnSources {
width: 5%;
}
/* Gallery
----------------------------------------------------- */
#GalleryNav {
@@ -459,7 +468,7 @@ div#SourceDetail {
}
.subsection {
clear: both;
overflow: hidden;
overflow: visible;
}
.subsection p {
margin: 0px;
+11 -2
View File
@@ -50,7 +50,6 @@ Characteristic of this style is that it uses the full width of the browser
window and that horizontal highlighting bars extend over the full width of
the page.
--------------------------------------------------------------------------------------------------
# $Id$
NarrativeWeb Styles
------------------------------------------------------------------------------------------------
@@ -87,6 +86,12 @@ h1 {
font-weight: bold;
padding-left: 15px;
}
h2 {
display:block;
margin:0;
padding:0;
text-align: center;
}
h3 {
font-size: large;
padding-left: 15px;
@@ -361,6 +366,10 @@ table.IndividualList td.ColumnSurname {
content: "";
}
table.eventlist tbody tr td.ColumnSources {
width: 5%;
}
/* Gallery
----------------------------------------------------- */
#GalleryNav {
@@ -459,7 +468,7 @@ div#SourceDetail {
}
.subsection {
clear: both;
overflow: hidden;
overflow: visible;
}
.subsection p {
margin: 0px;
+11 -2
View File
@@ -50,7 +50,6 @@ Characteristic of this style is that it uses the full width of the browser
window and that horizontal highlighting bars extend over the full width of
the page.
--------------------------------------------------------------------------------------------------
# $Id$
NarrativeWeb Styles
------------------------------------------------------------------------------------------------
@@ -87,6 +86,12 @@ h1 {
font-weight: bold;
padding-left: 15px;
}
h2 {
display:block;
margin:0;
padding:0;
text-align: center;
}
h3 {
font-size: large;
padding-left: 15px;
@@ -361,6 +366,10 @@ table.IndividualList td.ColumnSurname {
content: "";
}
table.eventlist tbody tr td.ColumnSources {
width: 5%;
}
/* Gallery
----------------------------------------------------- */
#GalleryNav {
@@ -459,7 +468,7 @@ div#SourceDetail {
}
.subsection {
clear: both;
overflow: hidden;
overflow: visible;
}
.subsection p {
margin: 0px;
-1
View File
@@ -25,7 +25,6 @@ GRAMPS Cascading Style Sheet
Style Name: Web_Citations-Outline.css
******************************************************
# $Id$
Source Citations Outline styles
------------------------------------------------------ */
-1
View File
@@ -18,7 +18,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
*************************************************
GRAMPS Cascading Style Sheet
-1
View File
@@ -18,7 +18,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
*************************************************
GRAMPS Cascading Style Sheet
-2
View File
@@ -25,7 +25,6 @@ GRAMPS Cascading Style Sheet
Style Name: Web_Navigation-Horizontal.css
******************************************************
# $Id$
Body Element
------------------------------------------------------ */
@@ -33,7 +32,6 @@ body {
background-color: #00029D;
color: #00029D;
width: 100%;
padding: 0px 14px;
}
/* Navigation Menus
+12 -3
View File
@@ -54,7 +54,6 @@ Middle images/Web_Mainz_Mid.png
Middle Light images/Web_Mainz_MidLight.png
----------------------------------------------------------------------------
# $Id$
NarrativeWeb Styles
--------------------------------------------------------------------------------------------
@@ -68,7 +67,7 @@ body {
background: url(../images/Web_Mainz_Bkgd.png) black repeat;
}
body > div {
width: 950px;
width: 85%;
margin: 0px auto;
background: url(../images/Web_Mainz_Mid.png) #FFF2C6 repeat;
overflow: hidden;
@@ -91,6 +90,12 @@ h1 {
font-style: italic;
margin-left: 2em;
}
h2 {
display:block;
margin:0;
padding:0;
text-align: center;
}
h3 {
font-size: xx-large;
font-weight: normal;
@@ -144,7 +149,7 @@ div#nav ul li, #subnavigation ul li {
float: left;
}
div#nav ul li a, #subnavigation ul li a {
display: block;
display: run-in;
padding: 0.4em 0.8em 0.3em 0.8em;
font-size: smaller;
font-family: sans-serif;
@@ -307,6 +312,10 @@ table#SortByCount thead th.ColumnQuantity a:after {
content: "";
}
table.eventlist tbody tr td.ColumnSources {
width: 5%;
}
/* Gallery
-----------------------------------------------------------------*/
#GalleryNav {
+17 -15
View File
@@ -45,7 +45,6 @@ gray #696969
green #5D835F
--------------------------------------------------------------------------------------------
# $Id$
NarrativeWeb Styles
--------------------------------------------------------------------------------------------
@@ -115,7 +114,7 @@ h1 {
font:normal 2em/1.2em serif;
}
h2 {
display:none;
display:block;
}
h3 {
font:normal 2em/1.2em serif;
@@ -139,7 +138,6 @@ h5, h6 {
p#description {
color:#542;
max-width:800px;
margin:0;
padding:1em 20px;
background-color:#FFF;
@@ -278,7 +276,6 @@ table.infolist tr th a:hover {
table.infolist tr td {
font:normal 1.1em/1.4em serif;
vertical-align:middle;
padding:.1em 10px;
}
table.infolist tr td a {
display:block;
@@ -398,30 +395,30 @@ table.surname thead tr th.ColumnParents, table.surname tbody tr td.ColumnParents
/* Individuals
----------------------------------------------------- */
#Individuals { }
#Individuals table.individuallist {
#Individuals table.IndividualList {
border-bottom:solid 1px #A97;
}
#Individuals table.individuallist tbody tr td {
#Individuals table.IndividualList tbody tr td {
border-bottom:dashed 1px #C1B398;
}
#Individuals table.individuallist tbody tr td a:hover {
#Individuals table.IndividualList tbody tr td a:hover {
text-decoration:none;
}
table.individuallist tbody tr td.ColumnSurname a:hover, table.individuallist tbody tr td.ColumnSurname a:active {
table.IndividualList tbody tr td.ColumnSurname a:hover, table.IndividualList tbody tr td.ColumnSurname a:active {
cursor:default;
color:black;
background:none;
}
table.individuallist tbody tr td.ColumnName {
table.IndividualList tbody tr td.ColumnName {
padding:0;
background-color:#FFF;
}
table.individuallist tbody tr td.ColumnName a {
table.IndividualList tbody tr td.ColumnName a {
display:block;
padding:.6em 10px;
padding:.1em .1em;
vertical-align:middle;
}
table.individuallist tbody tr td.ColumnName a:hover {
table.IndividualList tbody tr td.ColumnName a:hover {
background-color:#C1B398;
}
#Individuals div table.infolist tr td p {
@@ -579,6 +576,10 @@ table.relationships tbody tr td.ColumnPartner a:hover {
content: "";
}
table.eventlist tbody tr td.ColumnSources {
width: 5%;
}
/* Gallery
----------------------------------------------------- */
#Gallery { }
@@ -962,11 +963,12 @@ div#Addresses table.infolist tr td a, div#Addresses table.infolist tr td p a {
div.narrative {
padding-bottom:0;
}
i + div.grampsstylednote p {
margin: 0.1em 0 0.2em 0;
}
.narrative p {
margin: 0.1em 0 0.2em 0;
font:normal .9em/1.4em sans-serif;
margin-top:.5em;
margin-bottom:0;
padding:0 20px 1em 20px;
}
/* Subsections : References
-1
View File
@@ -41,7 +41,6 @@ black #000
white #FFF
---------------------------------------------------------------------------------------------------
# $Id$
NarrativeWeb Styles
--------------------------------------------------------------------------------------------
+8 -10
View File
@@ -45,7 +45,6 @@ Unknown #000
Males Web_Gender_Male.png
Females Web_Gender_Female.png
# $Id$
NarrativeWeb Styles
-------------------------------------------------------------------------------------------- */
@@ -156,7 +155,6 @@ h5, h6 {
margin:1.3em 0 .5em 1em;
}
p#description {
max-width:800px;
margin:0;
padding:1em 20px;
}
@@ -456,30 +454,30 @@ div#Individuals {
margin: 0;
padding: 0;
}
div#Individuals table.individuallist {
div#Individuals table.IndividualList {
border-bottom: solid 1px #5D835F;
}
div#Individuals table.individuallist tbody tr td {
div#Individuals table.IndividualList tbody tr td {
border-bottom: dashed 1px #5D835F;
background-color: #D8F3D6;
}
div#Individuals table.individuallist tbody tr td a {
div#Individuals table.IndividualList tbody tr td a {
display: block;
padding: .6em 10px;
}
div#Individuals table.individuallist tbody tr td.ColumnSurname a:hover,
div#Individuals table.individuallist tbody tr td.ColumnSurname a:active {
div#Individuals table.IndividualList tbody tr td.ColumnSurname a:hover,
div#Individuals table.IndividualList tbody tr td.ColumnSurname a:active {
cursor:default;
color: #000;
background:none;
}
div#Individuals table.individuallist tbody tr td.ColumnName {
div#Individuals table.IndividualList tbody tr td.ColumnName {
background-color: #FFF;
}
div#Individuals table.individuallist tbody tr td.ColumnName a {
div#Individuals table.IndividualList tbody tr td.ColumnName a {
vertical-align:middle;
}
div#Individuals table.individuallist tbody tr td.ColumnPartner {
div#Individuals table.IndividualList tbody tr td.ColumnPartner {
background-color: #FFF;
}
div#Individuals div table.infolist tr td p {
+3
View File
@@ -45,6 +45,9 @@ Females Web_Gender_Female.png
}
#treeContainer {
position:relative;
display: table-cell;
vertical-align: middle;
overflow: visible;
z-index:1;
}
#treeContainer div.boxbg {
-1
View File
@@ -29,7 +29,6 @@ Style Author: Stephane Charette and Jason Simanek
Image Gallery
-------------
# $Id$
ensure RegionBox <ol> is hidden and has no margins/padding that would shift the image */
ol.RegionBox {
+7 -4
View File
@@ -18,13 +18,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# $Id$
#
###################################################### */
body#FamilyMap {
background-color: #000;
padding: 0 14px;
width: 965px;
}
/* Family Maps
@@ -33,8 +31,11 @@ body#FamilyMap {
margin-left: 10px;
margin-right: 10px;
border: solid 4px #000;
width: 931px;
height: 1000px;
margin: 0px auto;
width: 800px;
height: 400px;
max-width: 90%;
max-height: 90%;
}
/* Place Maps
@@ -44,6 +45,8 @@ div#place_canvas {
border: solid 4px #000;
width: 500px;
height: 400px;
max-width: 90%;
max-height: 90%;
}
button#drop {
background-color: purple;
-1
View File
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-gramps">
-1
View File
@@ -19,7 +19,6 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
$Id$
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-1
View File
@@ -21,7 +21,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# $Id$
-->
<!--
+4 -4
View File
@@ -201,12 +201,12 @@
<date name="Pääsiäispäivä" type="religious" value="> easter(y)" />
<date name="2. Pääsiäispäivä" type="religious" value="> easter(y)" offset="1" />
<date name="Helatorstai" type="religious" value="> easter(y)" offset="39" if="not(y>=1973)" />
<date name="Kristuksen taivaaseenastumisen päivä." type="religious" value="> easter(y)" offset="34" if="(y>=1973) and not(y>=1992)" />
<date name="Kristuksen taivaaseenastumisen päivä" type="religious" value="> easter(y)" offset="34" if="(y>=1973) and not(y>=1992)" />
<date name="Helatorstai" type="religious" value="> easter(y)" offset="39" if="(y>=1992)" />
<date name="Helluntaipäivä" value="easter(y)" offset="49" type="religious" />
<date name="Pyhän Kolminaisuuden päivä" value="easter(y)" offset="56" type="religious" />
<date name="Apostolienpäivä" value="easter(y)" offset="91" type="religious" />
<date name="Kirkastussunnuntai." value="easter(y)" offset="105" type="religious" />
<date name="Kirkastussunnuntai" value="easter(y)" offset="105" type="religious" />
<date name="Juhannusaatto" value="*/jun/19" offset="fri" type="religious" if="(y>=1955)" />
<date name="Juhannusaatto" value="*/jun/23" type="religious" if="not(y>=1955)" />
<date name="Juhannuspäivä" value="*/jun/20" offset="sat" type="religious" if="(y>=1955)" />
@@ -224,12 +224,12 @@
<date name="Joulupäivä" value="*/12/25" type="religious" />
<date name="Tapaninpäivä" value="*/12/26" type="religious" />
<date name="Johannes Evankelistan päivä" value="*/dec/27" type="religious" if="not(y>=1774)" />
<date name="Apostoli Johanneksen päivä." value="*/dec/27" type="religious" if="dow(y, m, d) == 7 and (y>=2000)" />
<date name="Apostoli Johanneksen päivä" value="*/dec/27" type="religious" if="dow(y, m, d) == 7 and (y>=2000)" />
<date name="Viattomien lasten päivä" value="*/12/28" type="religious" />
<date name="Uudenvuodenpäivä" value="*/1/1" type="national" />
<date name="Vainojen uhrien muistopäivä" value="*/1/27" type="national" if="(y>=2002)" />
<date name="J.L. Runebergin päivä" value="*/2/5" type="national" if="(y>=1854)" />
<date name="Saamelaisten kansallis päivä" value="*/2/6" type="religious" if="(y>=2004)" />
<date name="Saamelaisten kansallispäivä" value="*/2/6" type="religious" if="(y>=2004)" />
<date name="Ystävänpäivä" value="*/2/14" type="national" if="(y>=1987)" />
<date name="Kalevalan päivä" value="*/2/28" type="national" if="(y>=1978)" />
<date name="Naistenpäivä" value="*/3/8" type="national" if="(y>=1975)" />
+722 -501
View File
File diff suppressed because it is too large Load Diff
+16 -16
View File
@@ -1,12 +1,12 @@
0 HEAD
1 SOUR Gramps
2 VERS 5.0.0-alpha1
2 VERS 5.0.0-alpha2
2 NAME Gramps
1 DATE 29 OCT 2016
2 TIME 15:10:31
1 DATE 1 SEP 2017
2 TIME 12:10:38
1 SUBM @SUBM@
1 FILE C:\Users\prc\AppData\Roaming\gramps\temp\exp_sample_ged.ged
1 COPR Copyright (c) 2016 Alex Roitman,,,.
1 COPR Copyright (c) 2017 Alex Roitman,,,.
1 GEDC
2 VERS 5.5.1
2 FORM LINEAGE-LINKED
@@ -17,7 +17,7 @@
1 ADDR Not Provided
2 ADR1 Not Provided
1 PHON 666-555-4444
1 EMAIL an_email@gmail.com
1 EMAIL an_email@@gmail.com
0 @I0000@ INDI
1 NAME Anna /Hansdotter/
2 GIVN Anna
@@ -789,7 +789,7 @@
1 OBJE
2 FORM jpeg
2 TITL Michael O'Toole 2015-11
2 FILE c:\grampsaio64-4.9.9\share\gramps\tests\O0.jpg
2 FILE c:\grampsaio64-5.0.0\share\gramps\tests\O0.jpg
2 NOTE @N0019@
1 NOTE @N0007@
1 CHAN
@@ -820,7 +820,7 @@
3 CTRY USA
2 PHON 440-871-3400
2 PHON 800-871-3400
2 EMAIL thetester@gmail.com
2 EMAIL thetester@@gmail.com
2 FAX 440-123-4567
2 WWW http://thetester.com
1 EVEN A very bad day
@@ -862,7 +862,7 @@
2 DATE 30 DEC 1954
2 PLAC 123 Main St., Winslow, PA, 12345
2 PHON 440-871-3401
2 EMAIL mrstester@gmail.com
2 EMAIL mrstester@@gmail.com
2 FAX 440-321-4568
2 WWW http://mrstester.com
2 NOTE @N0011@
@@ -879,7 +879,7 @@
3 POST 12345
1 PHON 440-871-3401
1 PHON 800-871-3401
1 EMAIL mrstester@gmail.com
1 EMAIL mrstester@@gmail.com
1 FAX 440-321-4568
1 WWW http://mrstester.com
1 NOTE @N0010@
@@ -904,7 +904,7 @@
3 STAE Colorado
3 CTRY USA
2 PHON 440-871-3402
2 EMAIL tomtester@gmail.com
2 EMAIL tomtester@@gmail.com
2 FAX 440-321-4569
2 WWW http://tomtester.com
1 RESI
@@ -1316,10 +1316,10 @@
2 ADR1 360 W 4800 N, Provo, UT 84604
1 PHON (801) 705-7000
1 FAX (801) 705-7001
1 EMAIL help@ancestry.com
1 EMAIL help@@ancestry.com
1 WWW http://www.ancestry.com
0 @R0001@ REPO
1 NAME SUBM (Submitter): (@SUBM@) The Subm /Tester/
1 NAME SUBM (Submitter): (@@SUBM@@) The Subm /Tester/
1 ADDR 123 Main St.
2 CONT Winslow
2 CONT PA
@@ -1329,7 +1329,7 @@
2 STAE PA
2 POST 12345
1 PHON 440-871-3401
1 EMAIL mrstester@gmail.com
1 EMAIL mrstester@@gmail.com
1 FAX 440-321-4568
1 WWW http://mrstester.com
1 NOTE @N0009@
@@ -1362,7 +1362,7 @@
1 ADDR 123 High St., OSF village, CA, USA
2 ADR1 123 High St., OSF village, CA, USA
1 PHON 988-765-4321
1 EMAIL tester_repo@osf.com
1 EMAIL tester_repo@@osf.com
1 FAX 987-654-3210
1 WWW http://www.tester_repo.com
1 NOTE @N0012@
@@ -1401,8 +1401,8 @@
1 CONT
1 CONT Only one phone number supported Lin
1 CONC e 9: 3 PHON (800) 705-7000
0 @N0009@ NOTE Records not imported into SUBM (Submitter): (@SUBM@) The Subm /Test
1 CONC er/:
0 @N0009@ NOTE Records not imported into SUBM (Submitter): (@@SUBM@@) The Subm /Te
1 CONC ster/:
1 CONT
1 CONT Only one phone number supported Lin
1 CONC e 29: 1 PHON 800-871-3401
+9
View File
@@ -43,6 +43,15 @@
2 NOTE @N0018@
1 OBJE @M7@
1 OBJE @M8@
1 OBJE
2 FORM URL
2 FILE http:\\obje.form.on_person.org
1 BIRT
2 TYPE Birth of the Tester
2 DATE 2 OCT 1864
2 OBJE
3 FORM URL
3 FILE http:\\obje.form.on_event.org
0 @M1@ OBJE
1 FORM jpeg
1 TITL Multimedia link to linked form v5.5 blob
+95 -74
View File
@@ -3,17 +3,26 @@
"http://gramps-project.org/xml/1.7.1/grampsxml.dtd">
<database xmlns="http://gramps-project.org/xml/1.7.1/">
<header>
<created date="2016-08-29" version="5.0.0-alpha1"/>
<created date="2017-05-30" version="5.0.0-alpha1"/>
<researcher>
</researcher>
</header>
<events>
<event handle="_0000000f0000000f" change="1" id="E0000">
<type>Birth</type>
<dateval val="1864-10-02"/>
<description>Birth of the Tester</description>
<noteref hlink="_0000001000000010"/>
</event>
</events>
<people>
<person handle="_0000000100000001" change="1472500307" id="I0001">
<person handle="_0000000100000001" change="1" id="I0001">
<gender>U</gender>
<name type="Birth Name">
<first>The</first>
<surname>Tester</surname>
</name>
<eventref hlink="_0000000f0000000f" role="Primary"/>
<objref hlink="_0000000300000003"/>
<objref hlink="_0000000400000004"/>
<objref hlink="_0000000500000005"/>
@@ -25,106 +34,107 @@
<objref hlink="_0000000c0000000c"/>
<objref hlink="_0000000d0000000d"/>
<objref hlink="_0000000e0000000e"/>
<noteref hlink="_0000000f0000000f"/>
<url href="http:\\obje.form.on_person.org" type="Web Home"/>
<noteref hlink="_0000001100000011"/>
</person>
</people>
<citations>
<citation handle="_0000001b0000001b" change="1472500307" id="C0000">
<citation handle="_0000001d0000001d" change="1" id="C0000">
<confidence>0</confidence>
<noteref hlink="_0000001a0000001a"/>
<sourceref hlink="_0000001900000019"/>
<noteref hlink="_0000001c0000001c"/>
<sourceref hlink="_0000001b0000001b"/>
</citation>
<citation handle="_0000002500000025" change="1472500307" id="C0001">
<citation handle="_0000002700000027" change="1" id="C0001">
<dateval val="2014-06-07"/>
<page>77, 78 discussion of multimedia link with two files</page>
<confidence>4</confidence>
<noteref hlink="_0000002400000024"/>
<sourceref hlink="_0000002300000023"/>
<noteref hlink="_0000002600000026"/>
<sourceref hlink="_0000002500000025"/>
</citation>
</citations>
<sources>
<source handle="_0000001900000019" change="1472500307" id="S0002">
<source handle="_0000001b0000001b" change="1" id="S0002">
<stitle>A Great Photographer</stitle>
</source>
<source handle="_0000002300000023" change="1472500307" id="S0001">
<source handle="_0000002500000025" change="1" id="S0001">
<stitle>The Testers personal files</stitle>
<sauthor>The Tester</sauthor>
<spubinfo>Name: Tester Publishing Operations, Inc.; Location: OSF world</spubinfo>
</source>
</sources>
<objects>
<object handle="_0000000300000003" change="1472500307" id="O0000">
<object handle="_0000000300000003" change="1" id="O0000">
<file src="test_emb_55.jpg" mime="image/jpeg" description="Multimedia link embedded form v5.5"/>
<noteref hlink="_0000000200000002"/>
</object>
<object handle="_0000000400000004" change="548708291" id="M1">
<file src="" mime="" description="Multimedia link to linked form v5.5 blob"/>
<attribute type="REFN" value="Ref12345M1">
<noteref hlink="_0000001000000010"/>
<noteref hlink="_0000001200000012"/>
</attribute>
<attribute type="RIN" value="ID09876M1"/>
<noteref hlink="_0000001100000011"/>
<noteref hlink="_0000001200000012"/>
<noteref hlink="_0000001300000013"/>
<noteref hlink="_0000001400000014"/>
</object>
<object handle="_0000000500000005" change="548797681" id="M3">
<file src="test.jpg" mime="image/jpeg" description="Multimedia link to linked form Gramps style v5.5ish file"/>
<noteref hlink="_0000001500000015"/>
<noteref hlink="_0000001600000016"/>
<noteref hlink="_0000001700000017"/>
<noteref hlink="_0000001800000018"/>
</object>
<object handle="_0000000600000006" change="548883481" id="M4">
<file src="test.jpg" mime="image/jpeg" description="Multimedia link to linked form v5.5.1 file"/>
<attribute type="Media-Type" value="Photo"/>
<attribute type="REFN" value="Ref1234567M4">
<noteref hlink="_0000001700000017"/>
<noteref hlink="_0000001900000019"/>
</attribute>
<attribute type="RIN" value="ID098765M4"/>
<noteref hlink="_0000001800000018"/>
<noteref hlink="_0000001c0000001c"/>
<citationref hlink="_0000001b0000001b"/>
<noteref hlink="_0000001a0000001a"/>
<noteref hlink="_0000001e0000001e"/>
<citationref hlink="_0000001d0000001d"/>
</object>
<object handle="_0000000800000008" change="1472500307" id="O0001">
<object handle="_0000000800000008" change="1" id="O0001">
<file src="test_emb_551.jpg" mime="image/jpeg" description="Multimedia link embedded form v5.5.1"/>
<attribute type="Media-Type" value="Photo"/>
<noteref hlink="_0000000700000007"/>
</object>
<object handle="_0000000900000009" change="1472500307" id="M5">
<object handle="_0000000900000009" change="1" id="M5">
<file src="test.jpg" mime="image/jpeg" description="Multimedia link to linked form FTM style file"/>
<datestr val="6/4/2016 9:33:57 AM"/>
<noteref hlink="_0000001d0000001d"/>
<noteref hlink="_0000001e0000001e"/>
<noteref hlink="_0000001f0000001f"/>
<noteref hlink="_0000002000000020"/>
<noteref hlink="_0000002100000021"/>
<noteref hlink="_0000002200000022"/>
<datestr val="6/4/2016 9:33:57 AM"/>
</object>
<object handle="_0000000a0000000a" change="549056401" id="M6">
<file src="test.jpg" mime="image/jpeg" description="Multimedia link to linked form v5.5.1 with two files(1)"/>
<attribute type="Media-Type" value="Photo"/>
<attribute type="REFN" value="Ref1234567M6">
<noteref hlink="_0000002100000021"/>
<noteref hlink="_0000002300000023"/>
</attribute>
<attribute type="RIN" value="ID098765M6"/>
<noteref hlink="_0000002200000022"/>
<noteref hlink="_0000002600000026"/>
<citationref hlink="_0000002500000025"/>
<noteref hlink="_0000002400000024"/>
<noteref hlink="_0000002800000028"/>
<citationref hlink="_0000002700000027"/>
</object>
<object handle="_0000000c0000000c" change="1472500307" id="O0002">
<object handle="_0000000c0000000c" change="1" id="O0002">
<file src="http://www.geni.com/photo/view?photo_id=6000000001341319061" mime="unknown" description="Multimedia link embedded form v5.5 URL"/>
<noteref hlink="_0000000b0000000b"/>
</object>
<object handle="_0000000d0000000d" change="1472500307" id="M7">
<object handle="_0000000d0000000d" change="1" id="M7">
<file src="http://s6.postimg.org/8i2erq27l/Preserve_Record_Numbers_Option.png" mime="image/png" description="Multimedia link to linked form v5.5.1 with URL"/>
<attribute type="Media-Type" value="Photo"/>
</object>
<object handle="_0000000e0000000e" change="1472500307" id="M8">
<object handle="_0000000e0000000e" change="1" id="M8">
<file src="No_path_No_Title_NoForm.jpg" mime="image/jpeg" description="No_path_No_Title_NoForm.jpg"/>
<noteref hlink="_0000002700000027"/>
<noteref hlink="_0000002900000029"/>
</object>
<object handle="_0000001300000013" change="1472500307" id="M2">
<object handle="_0000001500000015" change="1" id="M2">
<file src="" mime="" description="2nd blob Multimedia link to linked form v5.5 blob"/>
<noteref hlink="_0000001400000014"/>
<noteref hlink="_0000001600000016"/>
</object>
</objects>
<notes>
<note handle="_0000000200000002" change="1472500307" id="N0010" type="Media Note">
<note handle="_0000000200000002" change="1" id="N0010" type="Media Note">
<text>Media note test: Multimedia link embedded form v5.5
n OBJE {1:1} p.55
+1 FORM &lt;MULTIMEDIA_FORMAT&gt; {1:1} p.48
@@ -132,7 +142,7 @@ n OBJE {1:1} p.55
+1 FILE &lt;MULTIMEDIA_FILE_REFERENCE&gt; {1:1} p.47
+1 &lt;&lt;NOTE_STRUCTURE&gt;&gt; {0:M} p.33</text>
</note>
<note handle="_0000000700000007" change="1472500307" id="N0014" type="Media Note">
<note handle="_0000000700000007" change="1" id="N0014" type="Media Note">
<text>Media note test: Multimedia link embedded form v5.5.1
This note is not in the 5.5.1 spec, but is an obvious extrapolation from 5.5.
n OBJE
@@ -141,23 +151,27 @@ n OBJE
+3 MEDI &lt;SOURCE_MEDIA_TYPE&gt; {0:1} p.62
+1 TITL &lt;DESCRIPTIVE_TITLE&gt; {0:1} p.48</text>
</note>
<note handle="_0000000b0000000b" change="1472500307" id="N0018" type="Media Note">
<note handle="_0000000b0000000b" change="1" id="N0018" type="Media Note">
<text>Multimedia embedded 2nd copy v5.5</text>
</note>
<note handle="_0000000f0000000f" change="1472500307" id="N0000" type="GEDCOM import">
<note handle="_0000001000000010" change="1" id="N0000" type="Event Note">
<text>http:\\obje.form.on_event.org</text>
</note>
<note handle="_0000001100000011" change="1" id="N0001" type="GEDCOM import">
<text>Records not imported into INDI (individual) Gramps ID I0001:
Could not import test_emb_55.jpg Line 18: 1 OBJE
Could not import test_emb_551.jpg Line 26: 1 OBJE
Could not import test_emb_55.jpg Line 34: 1 OBJE</text>
Could not import test_emb_55.jpg Line 34: 1 OBJE
</text>
<style name="fontface" value="Monospace">
<range start="0" end="326"/>
</style>
</note>
<note handle="_0000001000000010" change="1472500307" id="N0001" type="REFN-TYPE">
<note handle="_0000001200000012" change="1" id="N0002" type="REFN-TYPE">
<text>SOMETEXT</text>
</note>
<note handle="_0000001100000011" change="1472500307" id="N0011" type="Media Note">
<note handle="_0000001300000013" change="1" id="N0011" type="Media Note">
<text>Media note test: Multimedia link to linked form v5.5 blob
n @XREF:OBJE@ OBJE {1:1}
+1 FORM &lt;MULTIMEDIA_FORMAT&gt; {1:1} p.48
@@ -171,10 +185,10 @@ n @XREF:OBJE@ OBJE {1:1}
+1 RIN &lt;AUTOMATED_RECORD_ID&gt; {0:1} p.38
+1 &lt;&lt;CHANGE_DATE&gt;&gt; {0:1} p.29</text>
</note>
<note handle="_0000001200000012" change="1472500307" id="N0002" type="GEDCOM import">
<note handle="_0000001400000014" change="1" id="N0003" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M1:
Tag recognized but not supported Line 49: 1 BLOB
Tag recognized but not supported Line 58: 1 BLOB
.HM.......k.1..F.jwA.Dzzzzw............A....1.........0U.66..E.8
.......A..k.a6.A.......A..k.........../6....G.......0../..U.....
.w1/m........HC0..../...zzzzzzzz..5zzk..AnA..U..W6U....2rRrRrRrR
@@ -182,23 +196,25 @@ Tag recognized but not supported Line 49:
/Dw/.Tvz.E5zzUE9/kHz.Tw2/DzzzEEA.kE2zk5yzk2/zzs21.U2/Dw/.Tw/.Tzy
/.fy/.HzzkHzzzo21Ds00.E2.UE2.U62/.k./Ds0.UE0/Do0..E8/UE2.U62.U9w
/.Tx/.20.jg2/jo2..9u/.0U.6A.zk
Line ignored as not understood Line 57: 1 OBJE @M2@
Filename omitted Line 46: 0 M1 OBJE</text>
Line ignored as not understood Line 66: 1 OBJE @M2@
Filename omitted Line 55: 0 M1 OBJE
</text>
<style name="fontface" value="Monospace">
<range start="0" end="1367"/>
</style>
</note>
<note handle="_0000001400000014" change="1472500307" id="N0003" type="GEDCOM import">
<note handle="_0000001600000016" change="1" id="N0004" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M2:
Tag recognized but not supported Line 68: 1 BLOB
Tag recognized but not supported Line 77: 1 BLOB
67890gramps doesn't do this anyway, so don't bother doing it right.
Filename omitted Line 65: 0 M2 OBJE</text>
Filename omitted Line 74: 0 M2 OBJE
</text>
<style name="fontface" value="Monospace">
<range start="0" end="400"/>
</style>
</note>
<note handle="_0000001500000015" change="1472500307" id="N0012" type="Media Note">
<note handle="_0000001700000017" change="1" id="N0012" type="Media Note">
<text>Media note test: Multimedia link to linked form Gramps style v5.5ish file
n @XREF:OBJE@ OBJE {1:1}
+1 FORM &lt;MULTIMEDIA_FORMAT&gt; {1:1} p.48
@@ -206,18 +222,19 @@ n @XREF:OBJE@ OBJE {1:1}
+1 FILE &lt;MULTIMEDIA_FILE_REFERENCE&gt; {1:1} p.47
+1 &lt;&lt;NOTE_STRUCTURE&gt;&gt; {0:M} p.33</text>
</note>
<note handle="_0000001600000016" change="1472500307" id="N0004" type="GEDCOM import">
<note handle="_0000001800000018" change="1" id="N0005" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M3:
Could not import test.jpg Line 73: 1 FILE test.jpg</text>
Could not import test.jpg Line 82: 1 FILE test.jpg
</text>
<style name="fontface" value="Monospace">
<range start="0" end="163"/>
</style>
</note>
<note handle="_0000001700000017" change="1472500307" id="N0005" type="REFN-TYPE">
<note handle="_0000001900000019" change="1" id="N0006" type="REFN-TYPE">
<text>SOMETEXT</text>
</note>
<note handle="_0000001800000018" change="1472500307" id="N0013" type="Media Note">
<note handle="_0000001a0000001a" change="1" id="N0013" type="Media Note">
<text>Media note test: Multimedia link to linked form v5.5.1 file
n @XREF:OBJE@ OBJE {1:1}
+1 FILE &lt;MULTIMEDIA_FILE_REFN&gt; {1:M} p.54
@@ -231,25 +248,26 @@ n @XREF:OBJE@ OBJE {1:1}
+1 &lt;&lt;SOURCE_CITATION&gt;&gt; {0:M} p.39
+1 &lt;&lt;CHANGE_DATE&gt;&gt; {0:1} p.31</text>
</note>
<note handle="_0000001a0000001a" change="1472500307" id="N0006" type="Source text">
<note handle="_0000001c0000001c" change="1" id="N0007" type="Source text">
<text>who shall remain un-named</text>
</note>
<note handle="_0000001c0000001c" change="1472500307" id="N0007" type="GEDCOM import">
<note handle="_0000001e0000001e" change="1" id="N0008" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M4:
Could not import test.jpg Line 79: 1 FILE test.jpg</text>
Could not import test.jpg Line 88: 1 FILE test.jpg
</text>
<style name="fontface" value="Monospace">
<range start="0" end="163"/>
</style>
</note>
<note handle="_0000001d0000001d" change="1472500307" id="N0008" type="Media Note">
<note handle="_0000001f0000001f" change="1" id="N0009" type="Media Note">
<text>A fine gentelman was he, upstanding in his community and a great believer in the testing of open source software.</text>
</note>
<note handle="_0000001e0000001e" change="1472500307" id="N0015" type="Media Note">
<note handle="_0000002000000020" change="1" id="N0015" type="Media Note">
<text>A note on the FTM media, to see how this integrates... The DATE line is bad; it doesnt follow Gedcom standard at all, and includes the time.
The TEXT line comes from the FTM media description. This is the media Note.</text>
</note>
<note handle="_0000001f0000001f" change="1472500307" id="N0016" type="Media Note">
<note handle="_0000002100000021" change="1" id="N0016" type="Media Note">
<text>Multimedia link to linked form FTM style
n @XREF:OBJE@ OBJE {1:1}
+1 FILE &lt;MULTIMEDIA_FILE_REFN&gt; {1:M} p.54
@@ -258,39 +276,42 @@ n @XREF:OBJE@ OBJE {1:1}
+2 TEXT text string from FTM media description sometimes populated from exif comments
+1 &lt;&lt;NOTE_STRUCTURE&gt;&gt; {0:M} p.33</text>
</note>
<note handle="_0000002000000020" change="1472500307" id="N0009" type="GEDCOM import">
<note handle="_0000002200000022" change="1" id="N0017" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M5:
Could not import test.jpg Line 94: 1 FILE test.jpg</text>
Could not import test.jpg Line 103: 1 FILE test.jpg
</text>
<style name="fontface" value="Monospace">
<range start="0" end="163"/>
</style>
</note>
<note handle="_0000002100000021" change="1472500307" id="N0017" type="REFN-TYPE">
<note handle="_0000002300000023" change="1" id="N0019" type="REFN-TYPE">
<text>SOMETEXT</text>
</note>
<note handle="_0000002200000022" change="1472500307" id="N0019" type="Media Note">
<note handle="_0000002400000024" change="1" id="N0020" type="Media Note">
<text>Multimedia link to linked form v5.5.1 with two files</text>
</note>
<note handle="_0000002400000024" change="1472500307" id="N0020" type="Source text">
<note handle="_0000002600000026" change="1" id="N0021" type="Source text">
<text>A source who shall remain un-named</text>
</note>
<note handle="_0000002600000026" change="1472500307" id="N0021" type="GEDCOM import">
<note handle="_0000002800000028" change="1" id="N0022" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M6:
Could not import test.jpg Line 102: 1 FILE test.jpg
Multiple FILE in a single OBJE ignored Line 106: 1 FILE test1.jpg
Skipped subordinate line Line 107: 2 FORM jpeg
Skipped subordinate line Line 108: 3 TYPE photo
Skipped subordinate line Line 109: 2 TITL Multimedia link to linked form v5.5.1 with two files(2)</text>
Could not import test.jpg Line 111: 1 FILE test.jpg
Multiple FILE in a single OBJE ignored Line 115: 1 FILE test1.jpg
Skipped subordinate line Line 116: 2 FORM jpeg
Skipped subordinate line Line 117: 3 TYPE photo
Skipped subordinate line Line 118: 2 TITL Multimedia link to linked form v5.5.1 with two files(2)
</text>
<style name="fontface" value="Monospace">
<range start="0" end="588"/>
</style>
</note>
<note handle="_0000002700000027" change="1472500307" id="N0022" type="GEDCOM import">
<note handle="_0000002900000029" change="1" id="N0023" type="GEDCOM import">
<text>Records not imported into OBJE (multi-media object) Gramps ID M8:
Could not import No_path_No_Title_NoForm.jpg Line 129: 1 FILE No_path_No_Title_NoForm.jpg</text>
Could not import No_path_No_Title_NoForm.jpg Line 138: 1 FILE No_path_No_Title_NoForm.jpg
</text>
<style name="fontface" value="Monospace">
<range start="0" end="182"/>
</style>
+4 -4
View File
@@ -1,7 +1,7 @@
0 HEAD
1 SOUR FTM
2 VERS Family Tree Maker (22.0.0.1410)
2 NAME Family Tree Maker for Windows
1 SOUR Tester
2 VERS 1.0
2 NAME The Tester
2 CORP Ancestry.com
3 ADDR 360 W 4800 N
4 CONT Provo, UT 84604
@@ -44,7 +44,7 @@
3 FORM Street, City, County, State, Country, Zip code
2 PHON 440-871-3400
2 PHON 800-871-3400
2 EMAIL thetester@gmail.com
2 EMAIL thetester@@gmail.com
2 FAX 440-123-4567
2 WWW http://thetester.com
0 @I1@ INDI
+11 -8
View File
@@ -3,7 +3,7 @@
"http://gramps-project.org/xml/1.7.1/grampsxml.dtd">
<database xmlns="http://gramps-project.org/xml/1.7.1/">
<header>
<created date="2016-10-23" version="5.0.0-alpha1"/>
<created date="2017-12-19" version="5.0.0-alpha3"/>
<researcher>
<resname>The Subm /Tester/</resname>
<resaddr>123 Main St.</resaddr>
@@ -109,12 +109,12 @@
<source handle="_0000000300000003" change="1" id="S0000">
<stitle>Import from imp_FTM_LINK.ged</stitle>
<sauthor>The Tester</sauthor>
<srcattribute type="Approved system identification" value="FTM"/>
<srcattribute type="Version number of software product" value="Family Tree Maker (22.0.0.1410)"/>
<srcattribute type="Name of software product" value="Family Tree Maker for Windows"/>
<srcattribute type="Approved system identification" value="Tester"/>
<srcattribute type="Version number of software product" value="1.0"/>
<srcattribute type="Name of software product" value="The Tester"/>
<srcattribute type="Name of source data" value="FTM Source data"/>
<srcattribute type="Copyright of source data" value="Copyright 2999"/>
<srcattribute type="Generated By" value="Family Tree Maker for Windows Family Tree Maker (22.0.0.1410)"/>
<srcattribute type="Generated By" value="The Tester 1.0"/>
<srcattribute type="Creation date of GEDCOM" value="2016-03-01"/>
<srcattribute type="Character set and version" value="UTF-8 1.1"/>
<srcattribute type="GEDCOM version" value="5.5"/>
@@ -206,7 +206,8 @@
Only one phone number supported Line 9: 3 PHON (800) 705-7000
Line ignored as not understood Line 15: 2 DATE 1111-01-01
GEDCOM FORM should be in uppercase Line 26: 2 FORM Lineage-Linked</text>
GEDCOM FORM should be in uppercase Line 26: 2 FORM Lineage-Linked
</text>
<style name="fontface" value="Monospace">
<range start="0" end="344"/>
</style>
@@ -214,7 +215,8 @@ GEDCOM FORM should be in uppercase Line 26:
<note handle="_0000000600000006" change="1" id="N0001" type="GEDCOM import">
<text>Records not imported into SUBM (Submitter): (@SUBM@) The Subm /Tester/:
Only one phone number supported Line 35: 1 PHON 800-871-3401</text>
Only one phone number supported Line 35: 1 PHON 800-871-3401
</text>
<style name="fontface" value="Monospace">
<range start="0" end="173"/>
</style>
@@ -234,7 +236,8 @@ Only one phone number supported Line 35:
<note handle="_0000001700000017" change="1" id="N0005" type="GEDCOM import">
<text>Records not imported into REPO (repository) Gramps ID R0002:
Only one phone number supported Line 93: 1 PHON 800-765-4321</text>
Only one phone number supported Line 93: 1 PHON 800-765-4321
</text>
<style name="fontface" value="Monospace">
<range start="0" end="162"/>
</style>
+12 -12
View File
@@ -1,18 +1,18 @@
Gramps for Debian
----------------------
-----------------
This is the Debian package of the 4.0 series of GRAMPS.
Version 5.0 of gramps adds the option of using a new database backend called
DB_API, as an alternative to the default BSDDB (Berkeley).
It is a major update of Gramps to upgrade to GTK 3. A switch was also made to distutils from autotools.
Two DB-API SQL engines have been developed, sqlite3 and postgresql. Compared
to BSDDB, the alternative backends have beend designed allow some flexibility
with respect to using the database with multiple users, or in multiple
locations (different computers).
The 4.0 series of Gramps is being packaged for the experimental distribution until all dependencies are available
and it proves stable.
For more details, please read the Gramps wiki:
https://gramps-project.org/wiki/index.php?title=DB-API_Database_Backend
Webkit - gir1.2-webkit-3.0 crashes. Gramps has been patched disable the hidden
HTML view instead until a solution is found.
Please note, this particular version is a pre-release version for testing.
Please do not use it on your only copy of important genealogical data.
Goocanvas2 - The latest Goocanvas is not available in Debian yet. If you miss
the Graphview plugin, you could try installing the gir1.2-goocanvas-2.0-9 which
is available in Ubuntu.
-- Ross Gammon <rossgammon@mail.dk> Sat, 25 Jan 2014 18:00:00 +0100
-- Ross Gammon <rossgammon@debian.org> Mon, 19 Feb 2018 00:04:00 +0100
+157
View File
@@ -0,0 +1,157 @@
Run gramps -v from the commandline and check dependencies:
- From the commandline type $ gramps -v
- The gramps version and versions of library dependencies are output
- Check that all dependencies have been installed, show their versions, and that there are no error messages
- If required, install the dependencies that have not been found (typically icu, osmgpsmap & gexiv)
- Type $ gramps -v again
- Check that all dependencies have been installed, show their versions, and that there are no error messages
Open Gramps, create an empty Family Tree, and check the Gramps version, credits & license:
- Run gramps
- Family Trees window opens
- Click "New" to create an empty Family Tree
- Type a name for your family tree (e.g. Sample), and press "Enter"
- Click "Load Family Tree"
- Gramps displays the "Welcome to Gramps!" start screen
- Choose Help > About from the menu
- The "About gramps" window is displayed with Version information
- Click on "Credits"
- A list of Authors and Contributors to Gramps is displayed
- Click on "License"
- The GNU General Public License is displayed
- Click on the "X" to close the "About gramps" window
- Gramps closes the "About gramps" window and returns to the "Welcome to Gramps!" start screen
Import a GEDCOM file into Gramps
If you do not have one to hand, the provided example can be extracted to your home directory and imported from there.
/usr/share/doc/gramps/example/gedcom/sample.ged.gz
- From your open and empty Family Tree, choose Family Trees > Import from the menu
- The Gramps: Import Family Tree window opens
- Locate your GEDCOM file, select it and click on "Import"
- The Import Statistics window displays "Results: done"
- Click on "Close"
- The GEDCOM import report window displays "No errors detected"
- CLick on "Close"
- The Top Surnames gramplet displays the surnames of the people imported into the Tree
Test aspects of the People View
- Click on the People View
- A list of people in "Group View" mode are shown
- Click on the arrow for a surname (e.g. Hansdotter)
- The people with this surname are revealed
- Select a person and click in the "Edit selcted person" icon (or just double click on the person)
- The "Person" window opens showing the details of this person
- Click on Cancel
- The "Person" window closes
- Choose the person list view (not grouped) by clicking on the "People" icon
- The people are now listed without any grouping by surname
- Click on the "+" icon to create a new person
- An empty "Person" window opens
- Enter some details about the person (e.g. given name, surname, and gender)
- Click on the "+" button to create a new event for this person
- The "Event Reference Editor" window opens
- Create an event (e.g. birth) by entering a date
- Click on the "+" button to add a new place
- The "New Place" window opens
- Type in some details about the place (Name, Type, Latitude & Longitude)
- Click on OK
- The "New Place" window closes
- In the "Event Reference Editor" click OK
- In the "Person" window click OK
- The "Person" window closes and you can find the person just created in the list of people
Test aspects of the Relationships View
- Click on Anna Hansdotter to select her
- Click on the Relationships View
- Details of Anna and her family are displayed
- Click on one of her children, Hjalmar Smith
- Details of Hjalmar and his family are displayed
- Click on the "Add existing Child to family" icon just above Halmar's children
- The "Select Child" window opens
- Find the person you entered previously and select it
- Click OK
- The "Select Child" window closes and you can see the new person listed as a child in Hjalmar's family
Test aspects of the Charts View
- Click on the Charts View
- The Pedigree View is shown
- Click somewhere in the Pedigree View and drag the chart around
- The mouse pointer changes to a hand and the chart can be move around
- Click on the left and right arrows (when going left you need to choose the child to move to)
- The chart will move to reveal the next generation in the family
- Make sure there are several families in view, then Click on the "Fan Chart" icon
- A fan chart showing the ancesters of the main person is shown
- Click on the Descendant Fan icon
- A fan chart showing the descendants of the same person is shown
Test aspects of the Geography View
- Click on the Geography View
- The map may take some time to load, then a pin for the person you entered early should be shown on the map at the coordinates you entered
- Click on the pin
- A choice of the place, or the person will be offered
- Hover over the place name, and choose "Edit Place"
- The "Place Selection in a region" opens
- Double click on the place
- The "Place:" editor opens
- Click on Cancel
- Click on the pin
- A choice of the place, or the person will be offered
- Hover over the persons name, and choose "Edit Event"
- The "Event:" window opens
- Click on Cancel
Import a Gramps Xml file (*.gramps) into Gramps
An existing Gramps *.gramps file with links to media will be needed for this and the next test. If you do not have one to hand, the provided example can be extracted to your home directory and imported from there.
/usr/share/doc/gramps/example/gramps/example.gramps.gz
- From the "Family Trees" menu, choose "Manage Family Trees"
- The Family Trees window opens
- Click "New" to create an empty Family Tree
- Type a name for your family tree (e.g. Example), and press "Enter"
- Click "Load Family Tree"
- Gramps opens an empty database
- From your open and empty Family Tree, choose Family Trees > Import from the menu
- The Gramps: Import Family Tree window opens
- Locate your *.gramps file, select it and click on "Import"
- The import may take some minutes, then the Import Statistics window displays the number of objects imported.
- Click on "Close"
- The Import Statistics window closes.
View Media for a person, and add new media
The media for the example file you may have used in the previous test can be found in /usr/share/doc/gramps/example/gramps/. Create a folder in your home directory to store Gramps media, and then copy the media there.
You will also need a photo to add to Gramps. Any photo will do (e.g. *.jpg file - but you can use the ones provided with Gramps).
You also need to set the base media patch for Gramps.
- In the "Edit" menu, choose "Preferences".
- The Preferences window opens on the "General" tab.
- Click the "Folder" icon to set the "Base path for relative media paths".
- The "Select media directory" window opens
- Choose the directory where your media is stored and then click "Apply"
- The "Select media directory" window closes
- Click Close
- The "Preferences" window closes
- In the "People" View, find a person with media associated (e.g. Eugene Stanley Garner, Jr. in the example database) and select him/her.
- Below the Detials tab, a thumbnail image of the person should appear (in the case of Eugene Stanley Garner, Jr. you should see him yawning). It may be necessary to restart Gramps to see the Thumbnail.
- Double click on the person's name in the People View.
- The "Person:" window opens, and the image is dispayed for the person in the Image square in the top left corner of the "Person:" window.
- Double click on the image.
- The Media Reference Editor opens showing details about the image.
- Double click in the bottom image Preview.
- An external viewer opens giving details of the image metadata and allowing some basic manipulation of the image.
- Click on the "X" to close the external viewer
- Click "Cancel" on the Media Reference Editor
- Click "Cancel" on the "Person:" window.
- All three windows close.
- Click on the "Media View".
- A list of available media is shown.
- Click on the "+" icon.
- The "Select a media object" window opens.
- Move to the folder where the media is and select the new photo (if you are using the examples provided with Gramps, I can recommend choosing O3.jpg).
- Click on "OK".
- The "New Media" window opens.
- Click on "OK".
- The media is added to the list of media.
- Select the new media.
- A preview (thumbnail) image is shown.
- Close Gramps by choosing "Quit" from the "Family Trees" menu.
- Gramps closes.
TODO: Tagging & Filtering
+118 -7
View File
@@ -1,16 +1,127 @@
Old Changelog:
gramps (5.0.0-1) unstable; urgency=medium
* New Gramps release
-- Ross Gammon <rossgammon@debian.org> Wed, 25 Jul 2018 21:19:00 +0200
gramps (5.0.0~rc1-1) unstable; urgency=medium
* First release candidate for Gramps 5.0
* Drop patch applied upstream
* Update copyrights
-- Ross Gammon <rossgammon@debian.org> Sun, 01 Jul 2018 21:57:10 +0200
gramps (5.0.0~beta1-1) unstable; urgency=medium
* First beta release of gramps 5.0
* Sync debian directory with Debian experimental branch on salsa
* Point Vcs URLs at the Gramps Project on Github
* Correct spelling in debian/rules, node > nose
* Delete gbp.conf, not required as gbp not used to build package
* Delete NEWS file, only really applicable in Debian
* Fix syntax errors in d/changelog and remove trailing whitespace
* Patch person_rules_test.py to remove hard coded build path from
import. Fixes FTBFS due to test failure.
* Enable extra tests that were failing for alpha3
-- Ross Gammon <rossgammon@debian.org> Mon, 19 Feb 2018 19:25:25 +0100
gramps (4.2.8) unstable; urgency=medium
* Quick bug fix release
-- Ross Gammon <rossgammon@debian.org> Sat, 10 Feb 2018 08:30:33 +0100
gramps (5.0.0-alpha3) experimental; urgency=medium
* New alpha release for Gramps 5.0.0
-- Ross Gammon <rossgammon@debian.org> Mon, 04 Sep 2017 16:55:41 +0200
gramps (4.2.6) UNRELEASED; urgency=medium
* New upstream for Gramps 4.2.6
-- Jérôme Rapinat <romjerome@yahoo.fr> Tue, 01 Aug 2017 14:10:19 +0200
gramps (5.0.0-alpha2) experimental; urgency=medium
* 2nd Alpha release for testing
-- Ross Gammon <rosco2@ubuntu.com> Mon, 12 Jun 2017 19:42:39 +0200
gramps (4.2.5) UNRELEASED; urgency=medium
* New upstream for Gramps 4.2.5
-- Jérôme Rapinat <romjerome@yahoo.fr> Thu, 15 Dec 2016 18:52:08 +0100
gramps (4.2.4) UNRELEASED; urgency=medium
* New upstream for Gramps 4.2.4
-- Jérôme Rapinat <romjerome@yahoo.fr> Sun, 04 Sep 2016 18:34:49 +0200
gramps (5.0.0-alpha1) UNRELEASED; urgency=medium
* Alpha stream for Gramps 5.0.0
-- système <romjerome@yahoo.fr> Sat, 04 Jun 2016 20:07:14 +0200
gramps (4.2.3) UNRELEASED; urgency=medium
* New upstream for Gramps 4.2.3
-- Jérôme Rapinat <romjerome@yahoo.fr> Sun, 10 Apr 2016 21:09:19 +0200
gramps (4.2.2) UNRELEASED; urgency=medium
* New upstream for Gramps 4.2.2
-- Jérôme Rapinat <romjerome@yahoo.fr> Wed, 06 Jan 2016 19:38:25 +0100
gramps (4.2.1) UNRELEASED; urgency=medium
* New upstream for Gramps 4.2.1
-- Jérôme Rapinat <romjerome@yahoo.fr> Tue, 13 Oct 2015 05:08:30 +0200
gramps (4.2.0) UNRELEASED; urgency=medium
* New upstream for Gramps 4.2.0
-- Jérôme Rapinat <romjerome@yahoo.fr> Sun, 02 Aug 2015 17:03:37 +0200
gramps (4.1.3) precise; urgency=low
* New upstream for Gramps 4.1 branch (4.1.3)
-- Jérôme Rapinat <romjerome@yahoo.fr> Thu, 30 Apr 2015 18:42:34 +0200
gramps (3.4.9-1) precise; urgency=low
* New upstream release for 3.4.x branch
-- Jérôme Rapinat <romjerome@yahoo.fr> Thu, 30 Apr 2015 16:02:44 +0200
gramps (4.0.4) precise; urgency=low
* New upsteam for Gramps 4.0.4
-- Jérôme Rapinat <romjerome@yahoo.fr> Fri, 23 May 2014 17:07:41 +0200
gramps (4.0.3) precise; urgency=low
* - 4.0.4-git.f08e40 Experimental stream gramps.git
-- Jérôme Rapinat <romjerome@yahoo.fr> Tue, 04 Feb 2014 19:49:32 +0100
gramps (4.0.2) precise; urgency=low
* experimental .deb for gramps 4.0.2
-- Jérôme Rapinat <romjerome@yahoo.fr> Wed, 04 Dec 2013 10:23:36 +0100
-- Jérôme Rapinat <romjerome@yahoo.fr> Wed, 04 Dec 2013 10:23:36 +0100
gramps (4.0.1-2) precise; urgency=low
@@ -705,7 +816,7 @@ gramps (0.7.3-1) unstable; urgency=low
* Added new entry to the upstream NEWS file - it was missing.
* Added '#! usr/bin/python -O' line to src/AddMedia.py to make lintian happy.
Also removed this line from src/DbPrompter.py for the same reason.
* Edited debian/rules to call '$(MAKE) clean' instead of
* Edited debian/rules to call '$(MAKE) clean' instead of
'$(MAKE) distclean' which did not exist.
* Edited src/Makefile.in - 'clean' target should also remove *.so files.
* Pre-built static HTMLs since the on-the-fly generation from SGML is buggy.
@@ -840,7 +951,7 @@ gramps (0.3.1-2) unstable; urgency=low
* The author has finally addressed the issue of a missing help file. Though
as of now none have been created the error produced before is gone and the
author is working on better documentation.
Closes: #99617
Closes: #99617
-- Brandon L. Griffith <brandon@debian.org> Thu, 28 Jun 2001 20:27:30 -0500
@@ -917,7 +1028,7 @@ gramps (0.1.4-3) unstable; urgency=low
This should take care of the startup problem some people have had.
Bug Fixed. Closes: #98646
* Silly me named the menu file wrong so it never got included into the
* Silly me named the menu file wrong so it never got included into the
Debian Menu system. Gramps should now show up under Apps->Tools. Have
no idea how I overlooked this.
+1 -1
View File
@@ -1 +1 @@
9
11
+33 -18
View File
@@ -1,29 +1,38 @@
Source: gramps
Section: python
Section: gnome
Priority: optional
Maintainer: Ross Gammon <rossgammon@mail.dk>
Maintainer: Ross Gammon <rossgammon@debian.org>
Build-Depends-Indep:
dh-linktree,
dh-python,
gettext,
intltool,
libxml-parser-perl,
python3-all,
python3-setuptools
python3-setuptools,
python3-nose,
gir1.2-gtk-3.0 (>= 3.10.0),
python3-gi (>= 3.12.0),
python3-gi-cairo,
python3-bsddb3,
python3-lxml,
python3-jsonschema,
python3-mock,
python3-icu,
python3-nose-exclude
Build-Depends:
dh-python,
debhelper (>= 9.0.0)
Standards-Version: 3.9.5
Vcs-Git: git://anonscm.debian.org/collab-maint/gramps.git
Vcs-browser: http://anonscm.debian.org/gitweb/?p=collab-maint/gramps.git
Homepage: http://www.gramps-project.org/
X-Python-Version: >= 3.2
debhelper (>= 11)
Standards-Version: 4.1.3
Vcs-Git: https://github.com/gramps-project/gramps.git
Vcs-browser: https://github.com/gramps-project/gramps/tree/maintenance/gramps50
Homepage: https://www.gramps-project.org/
X-Python3-Version: >= 3.2
Package: python3-gramps
Package: gramps
Architecture: all
Depends:
gir1.2-gtk-3.0 (>= 3.10.0),
librsvg2-2,
python3-gi,
python3-gi (>= 3.12.0),
python3-gi-cairo,
python3-bsddb3,
xdg-utils,
@@ -31,16 +40,22 @@ Depends:
${python3:Depends}
Recommends:
graphviz,
gir1.2-goocanvas-2.0,
libosmgpsmap-1.0-0,
gir1.2-gexiv2-0.10,
gir1.2-osmgpsmap-1.0,
python3-pyicu
python3-icu
Suggests:
fonts-freefont-ttf,
gir1.2-gexiv2-0.10,
gir1.2-goocanvas-2.0,
gir1.2-gtkspell3-3.0,
python3-pil,
rcs
rcs,
python3-numpy
Conflicts:
python-gramps,
python3-gramps
Replaces:
python-gramps,
python3-gramps
Description: Genealogical research program
Gramps is an Open Source genealogy program written in Python, using
the GTK/GNOME interface. It is an extremely flexible program fitting
+38 -238
View File
@@ -1,37 +1,37 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Gramps
Source: http://gramps-project.org
Source: https://gramps-project.org
Files: *
Copyright: 2000-2007, Alex Roitman
2000-2002, Bruce J. DeGrasse
2000-2008, Donald N. Allingham
2000-2007, Martin Hawlisch
2001, Andrés Sepúlveda
2001, Andrés Sepúlveda
2001, David R. Hampton
2001-2013, Free Software Foundation, Inc.
2001-2017, Free Software Foundation, Inc.
2001, Graham J. Williams
2001, Jesper Zedlitz
2001-2013, The Gramps Project
2001-2018, The Gramps Project
2002, Gary Shao
2003-2006, Josiah Carlson
2004-2006, Eero Tamminen
2004-2013, Julio Sánchez
2004, Toshio Kuratomi
2005-2011, Serge Noiraud
2006-2011, Brian G. Matherly
2004-2013, Julio Sánchez
2005-2017, Serge Noiraud
2006-2012, Brian G. Matherly
2006, 2008-2011, Kees Bakker
2006-2008, Steve Hall
2007-2012, Benny Malengier
2007-2012, Douglas S. Blank
2007-2013, Benny Malengier
2007-2013, 2015-2016, Douglas S. Blank
2007-2012, Gary Burton
2007-2011, Jerome Rapinat
2007, Johan Gronqvist
2007, Robert Cawley
2007-2009, Stephane Charette
2007-2016, The Gramps Developers
2007, Thom Sturgill
2007-2008, Zsolt Foldvari
2008-2010, 2012, Craig J. Anderson
2008-2010, 2012-2015, Craig J. Anderson
2008-2009, James Friedmann
2008-2009, Jason Simanek
2008, Lukasz Rymarczyk
@@ -43,133 +43,58 @@ Copyright: 2000-2007, Alex Roitman
2008, Stefan Siegel
2008-2010, Stephen George
2009-2010, Andrew I Baznikin
2009, 2011, The Dojo Foundation
2009, Florian Heinle
2009, Gerald W. Britton
2009, Igal Shapira
2009, 2011, John Resig
2009-2013, Nick Hall
2009-2018, Nick Hall
2009, Pander Musubi
2009, Robert Ham
2009, Swoon on bug tracker
2009, Yevgeny Zegzda
2010, Gramps
2010, 2015 Gramps
2010, Jakim Friant
2010, Josip
2010, lcc & Robert Jerome
2010-2012, Michiel D. Nauta
2010-2013, Tim G L Lyons
2010-2011, Vlada Perić
2010-2016, Tim G L Lyons
2010-2011, 2014, Vlada Perić
2011, Adam Stein
2011-2012, Harald Rosemann
2011, 2013, Heinz Brinker
2011, Helge Herz
2011, 2013 John Ralls
2011, Matt Keenan
2011-2013, Paul Franklin
2012, Mathieu MD
2011, 2016 Matt Keenan
2011-2017, Paul Franklin
2012, lcc
2012, 2014, Mathieu MD
2012, Nicolas Adenis-Lamarre
2013, Fedir Zinchuk
2013, Oleh Petrivk
2013, Vassilii Khachaturov
2013, Artem Glebov
2011-2016, Fedir Zinchuk
2013-2017, Alois Poettker
2013-2014, Vassilii Khachaturov
2013, Zissis Papadopoulos
2015, Icelandic translators of Gramps
2014, Bastien Jacquet
2014, Gerald Kunzmann
2015, Fabrice
2015, Lajos Nemeséri
2015, Detlef Wolz
2016, Allen Crider
2016, DaAwesomeP
2016-2017, Paul Culley
2016, QuLogic
2016, Tom Samstag
2017, Mindaugas Baranauskas
2017, Robert Carnell
License: GPL-2+
Files: data/javascript/jquery-1.3.2.min.js
Copyright: 2009, John Resig
License: MIT and GPL
Files: data/javascript/jquery-1.7.1.js
Copyright: 2011, John Resig
2011, The Dojo Foundation
License: BSD and MIT and GPL-2
Files: data/javascript/jquery-ui-1.7.2.custom.min.js
Copyright: 2009, jQuery UI Team (http://jqueryui.com/about/)
License: MIT and GPL-2
Files: data/javascript/jquery.flexbox*
Copyright: 2008-2010, Noah Heldman and Fairway Technologies
License: Ms-PL
Files: data/jhtmlarea/Readme.txt
Copyright: 2009, Chris Pietschmann
License: Ms-RL
Files: data/jhtmlarea/scripts/jHtmlArea*
Copyright: 2009, Chris Pietschmann
License: Ms-RL
Files: data/jhtmlarea/scripts/jquery-1.3.2*
Copyright: 2009, John Resig
2009, The Dojo Foundation
License: MIT
Files: data/jhtmlarea/scripts/jquery-ui-*
Copyright: 2009, jQuery UI Team (http://jqueryui.com/about)
License: MIT and GPL
Files: debian/*
Copyright: 2001-2002, Brandon L. Griffith
2002, Alex Roitman
2002-2012, James A. Treacy
2013, Ross Gammon
2013-2018, Ross Gammon
License: GPL-2+
Files: gramps/webapp/grampsdb/view/png.py
Copyright: 2006, Johann C. Rocholl
2009, David Jones
2006, Nicko van Someren
License: MIT
License: BSD
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY John Resig ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License: GPL
This package 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; version 1 only of the License.
.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
License: GPL-2
This package 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; version 2 only of the License.
.
This package 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 package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-2'.
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -187,128 +112,3 @@ License: GPL-2+
.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-2'.
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
License: Ms-PL
This license governs use of the accompanying software. If you use the
software, you accept this license. If you do not accept the license, do not
use the software.
.
1. Definitions
.
The terms "reproduce," "reproduction," "derivative works," and "distribution"
have the same meaning here as under U.S. copyright law.
.
A "contribution" is the original software, or any additions or changes to the
software.
.
A "contributor" is any person that distributes its contribution under this
license.
.
"Licensed patents" are a contributor's patent claims that read directly on its
contribution.
.
2. Grant of Rights
.
(A) Copyright Grant- Subject to the terms of this license, including the
license conditions and limitations in section 3, each contributor grants you a
non-exclusive, worldwide, royalty-free copyright license to reproduce its
contribution, prepare derivative works of its contribution, and distribute its
contribution or any derivative works that you create.
.
(B) Patent Grant- Subject to the terms of this license, including the license
conditions and limitations in section 3, each contributor grants you a
non-exclusive, worldwide, royalty-free license under its licensed patents to
make, have made, use, sell, offer for sale, import, and/or otherwise dispose of
its contribution in the software or derivative works of the contribution in the
software.
.
3. Conditions and Limitations
.
(A) No Trademark License- This license does not grant you rights to use any
contributors' name, logo, or trademarks.
.
(B) If you bring a patent claim against any contributor over patents that you
claim are infringed by the software, your patent license from such contributor
to the software ends automatically.
.
(C) If you distribute any portion of the software, you must retain all copyright,
patent, trademark, and attribution notices that are present in the software.
.
(D) If you distribute any portion of the software in source code form, you may do
so only under this license by including a complete copy of this license with your
distribution. If you distribute any portion of the software in compiled or object
code form, you may only do so under a license that complies with this license.
.
(E) The software is licensed "as-is." You bear the risk of using it. The
contributors give no express warranties, guarantees or conditions. You may have
additional consumer rights under your local laws which this license cannot change.
To the extent permitted under your local laws, the contributors exclude the
implied warranties of merchantability, fitness for a particular purpose and
non-infringement.
License: Ms-RL
This license governs use of the accompanying software. If you use the software,
you accept this license. If you do not accept the license, do not use the software.
.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have
the same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the
software.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its
contribution.
.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license
conditions and limitations in section 3, each contributor grants you a
non-exclusive, worldwide, royalty-free copyright license to reproduce its
contribution, prepare derivative works of its contribution, and distribute its
contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license
conditions and limitations in section 3, each contributor grants you a
non-exclusive, worldwide, royalty-free license under its licensed patents to make,
have made, use, sell, offer for sale, import, and/or otherwise dispose of its
contribution in the software or derivative works of the contribution in the software.
.
3. Conditions and Limitations
(A) Reciprocal Grants- For any file you distribute that contains code from the
software (in source code or binary format), you must provide recipients the source
code to that file along with a copy of this license, which license will govern that
file. You may license other files that are entirely your own work and do not contain
code from the software under any terms you choose.
(B) No Trademark License- This license does not grant you rights to use any
contributors' name, logo, or trademarks.
(C) If you bring a patent claim against any contributor over patents that you claim
are infringed by the software, your patent license from such contributor to the
software ends automatically.
(D) If you distribute any portion of the software, you must retain all copyright,
patent, trademark, and attribution notices that are present in the software.
(E) If you distribute any portion of the software in source code form, you may do so
only under this license by including a complete copy of this license with your
distribution. If you distribute any portion of the software in compiled or object code
form, you may only do so under a license that complies with this license.
(F) The software is licensed "as-is." You bear the risk of using it. The contributors
give no express warranties, guarantees or conditions. You may have additional consumer
rights under your local laws which this license cannot change. To the extent permitted
under your local laws, the contributors exclude the implied warranties of
merchantability, fitness for a particular purpose and non-infringement.
+1
View File
@@ -0,0 +1 @@
RELEASE_NOTES
+25 -22
View File
@@ -1,35 +1,38 @@
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DH_OPTIONS=-v
#export DH_VERBOSE=1
#export DH_OPTIONS=-v
export PYBUILD_NAME=gramps
export PYBUILD_INSTALL_ARGS_python3=--resourcepath=/usr/share --force
%:
dh $@ --with python3 --buildsystem=pybuild
# Override auto test because upstream do not use the standard unittest discover
# Override auto test to enable nose tests
override_dh_auto_test:
# Override of auto_build
override_dh_auto_build:
python3 setup.py build
HOME=$(CURDIR)/build \
nosetests3 -vv \
--exclude=TestcaseGenerator \
--exclude=test4_arbitrary_uncode_path \
--exclude-dir=gramps/plugins/test/ \
gramps
# Override of auto_install to remove information from package
override_dh_auto_install:
#dh_auto_install
python3 setup.py install --resourcepath=/usr/share --root=debian/python3-gramps --install-layout=deb
# Remove duplicate license/copyright information
rm $(CURDIR)/debian/python3-gramps/usr/share/doc/gramps/COPYING
dh_installchangelogs NEWS
dh_auto_install
# Remove install file as it is not needed by package users
rm $(CURDIR)/debian/python3-gramps/usr/share/doc/gramps/INSTALL
# Link license/copyright information to debians
ln -s /usr/share/common-licenses/GPL-2 $(CURDIR)/debian/python3-gramps/usr/share/doc/gramps/COPYING
rm $(CURDIR)/debian/gramps/usr/share/doc/gramps/INSTALL
# Remove NEWS file as it is now installed as the changelog
rm $(CURDIR)/debian/gramps/usr/share/doc/gramps/NEWS
#Remove license information in COPYING file & link to system license
rm $(CURDIR)/debian/gramps/usr/share/doc/gramps/COPYING
ln -s /usr/share/common-licenses/GPL-2 $(CURDIR)/debian/gramps/usr/share/doc/gramps/COPYING
# Make css style sheets and png icons non-executable
override_dh_fixperms:
dh_fixperms
chmod a-x $(CURDIR)/debian/python3-gramps/usr/share/gramps/css/Web_*.css
# Avoid compressing COPYING file so that it can appear in the "About" dialog
override_dh_compress:
dh_compress -X COPYING
# Fix clean target
override_dh_clean:
rm -rf data/tips.xml
rm -rf gramps/plugins/lib/holidays.xml
rm -rf po/.intltool-merge-cache
dh_clean
+1 -1
View File
@@ -1 +1 @@
1.8
3.0 (quilt)
+1
View File
@@ -0,0 +1 @@
unapply-patches
+3
View File
@@ -0,0 +1,3 @@
Tests: gramps-import-export
Depends: gramps, gzip
Restrictions: allow-stderr
+38
View File
@@ -0,0 +1,38 @@
#!/bin/sh
# Author: Ross Gammon <rossgammon@mail.dk>
#
# autopkgtest check: Tests that gramps can import the sample gedcom file and
# export it in the .gpkg format, and then import the example gramps database
# and export it in gedcom format.
set -e
echo "--------------------------------"
echo "GEDCOM to Gramps conversion test"
echo "--------------------------------"
echo "Retrieving sample gedcom"
cp /usr/share/doc/gramps/example/gedcom/sample.ged.gz .
echo "Unzipping sample gedcom"
gunzip sample.ged.gz
echo "Importing gedcom into gramps and exporting a gramps .gpkg file"
gramps -i sample.ged -e sample.gpkg
echo "-----------------------------------"
echo "GEDCOM to Gramps conversion SUCCESS"
echo "-----------------------------------"
echo
echo "--------------------------------"
echo "Gramps to GEDCOM conversion test"
echo "--------------------------------"
echo "Retrieving example gramps file"
cp /usr/share/doc/gramps/example/gramps/example.gramps.gz .
echo "Unzipping example gramps file"
gunzip example.gramps.gz
echo "Importing gramps file into gramps and exporting a gedcom"
gramps -i example.gramps -e example.ged
echo "-----------------------------------"
echo "Gramps to GEDCOM conversion SUCCESS"
echo "-----------------------------------"
echo
echo "gramps-import-export: TEST PASSED"
+7
View File
@@ -0,0 +1,7 @@
Bug-Database: https://gramps-project.org/bugs/my_view_page.php
Contact: https://lists.sourceforge.net/lists/listinfo/gramps-users
Donation: https://sourceforge.net/project/project_donations.php?group_id=25770
Name: Gramps
Homepage: https://gramps-project.org/
Repository: https://github.com/gramps-project/gramps.git
Repository-Browse: https://github.com/gramps-project/gramps
+8
View File
@@ -0,0 +1,8 @@
version=3
opts=\
dversionmangle=s/(\~|\+)(debian|dfsg|ds|deb)(\.\d+)?$//,\
filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/$1\.tar\.gz/,\
repacksuffix=~dfsg \
https://github.com/gramps-project/gramps/tags \
.*/archive/v?([\d\.]+).tar.gz
+1 -1
View File
@@ -57,7 +57,7 @@ master_doc = 'index'
# General information about the project.
project = 'Gramps'
copyright = '2017, The Gramps Project'
copyright = '2001-2018, The Gramps Project'
author = 'Donald N. Allingham'
# The version info for the project you're documenting, acts as replacement for
+1 -1
View File
@@ -46,7 +46,7 @@ Generic
DummyDb
====================================
.. automodule:: gramps.plugins.db.dummydb
.. automodule:: gramps.gen.db.dummydb
:members:
:undoc-members:
:show-inheritance:
+67 -31
View File
@@ -3,7 +3,7 @@
"http://gramps-project.org/xml/1.7.1/grampsxml.dtd">
<database xmlns="http://gramps-project.org/xml/1.7.1/">
<header>
<created date="2016-08-31" version="5.0.0"/>
<created date="2017-08-08" version="5.1.0"/>
<researcher>
<resname>Alex Roitman,,,</resname>
</researcher>
@@ -951,7 +951,7 @@
<place hlink="_L3WJQCD3US67V2CNZT"/>
<description>Birth of Garner, Anderson</description>
</event>
<event handle="_a5af0eb7dfb557da07e" change="1284030599" id="E0179">
<event handle="_a5af0eb7dfb557da07e" change="1502187535" id="E0179">
<type>Death</type>
<dateval val="1887-04-07"/>
<place hlink="_AKFKQC2N4SM243HCTN"/>
@@ -6262,7 +6262,7 @@
<dateval val="1842-06-28"/>
<description>Death of Moreno, Joseph McDowell</description>
</event>
<event handle="_a5af0ec45b25c630e03" change="1284030608" id="E1179">
<event handle="_a5af0ec45b25c630e03" change="1502187451" id="E1179">
<type>Birth</type>
<dateval val="1911-07-12"/>
<description>Birth of Thornton, James Arthur</description>
@@ -13946,10 +13946,10 @@
<place hlink="_VDCKQCZX3MEHKVDR8S"/>
<description>Death of Schultz, Rev.Isaac</description>
</event>
<event handle="_a5af0ed3f64432fb742" change="1284030595" id="E2618">
<event handle="_a5af0ed3f64432fb742" change="1520536150" id="E2618">
<type>Burial</type>
<dateval val="1818" type="about"/>
<place hlink="_4ECKQCWCLO5YIHXEXZ"/>
<place hlink="_c965872633b600e8b5ca4d5e6db"/>
<description>Burial of Schultz, Rev.Isaac</description>
</event>
<event handle="_a5af0ed3f9b07f938fb" change="1284030602" id="E2619">
@@ -15003,7 +15003,7 @@
<type>Marriage</type>
<description>Marriage of Johnson, Henry and Sparks, Catherine</description>
</event>
<event handle="_a5af0ed5df832ee65c1" change="1328026859" id="E2815">
<event handle="_a5af0ed5df832ee65c1" change="1502187371" id="E2815">
<type>Marriage</type>
<dateval val="1875-04-01"/>
<place hlink="_RF5KQCNJRQY8OGTX2H"/>
@@ -18649,7 +18649,7 @@
<parentin hlink="_F4CKQCJZ24JRE9Z889"/>
<citationref hlink="_c140d2472c91aad494f"/>
</person>
<person handle="_14LKQCYZJEAXTS3XX" change="1185438865" id="I1376">
<person handle="_14LKQCYZJEAXTS3XX" change="1502187492" id="I1376">
<gender>F</gender>
<name type="Birth Name">
<first>Elizabeth</first>
@@ -18657,6 +18657,7 @@
</name>
<eventref hlink="_a5af0ebb003796f79a0" role="Primary"/>
<eventref hlink="_a5af0ebb0143dab99ff" role="Primary"/>
<eventref hlink="_a5af0eb7dfb557da07e" role="Witness"/>
<childof hlink="_5IUJQCRJY47YQ8PU7N"/>
<parentin hlink="_I4LKQCOAGPFH4R90A7"/>
<citationref hlink="_c140d24731407d57b3c"/>
@@ -19904,7 +19905,7 @@
<childof hlink="_IO5KQC6H0Q6Y517LR9"/>
<citationref hlink="_c140d24a1fd2319b703"/>
</person>
<person handle="_35WJQC1B7T7NPV8OLV" change="1284030051" id="I0106">
<person handle="_35WJQC1B7T7NPV8OLV" change="1502187260" id="I0106">
<gender>M</gender>
<name type="Birth Name">
<first>Robert W.</first>
@@ -19913,6 +19914,11 @@
<eventref hlink="_a5af0eb74ac73f86aa7" role="Primary"/>
<eventref hlink="_a5af0eb74ba358391ae" role="Primary"/>
<eventref hlink="_a5af0eb74c852f7c633" role="Primary"/>
<eventref hlink="_a5af0ed5df832ee65c1" role="Witness">
<attribute type="Age" value="23">
<citationref hlink="_c140dafeb317af2fd79"/>
</attribute>
</eventref>
<childof hlink="_X3WJQCSF48F6809142"/>
<parentin hlink="_8OUJQCUVZ0XML7BQLF"/>
<citationref hlink="_c140d24a27e19bb381a"/>
@@ -21991,13 +21997,14 @@
<childof hlink="_GCDKQCHI74ZPMI5GDJ"/>
<citationref hlink="_c140d24f3f8704aa41b"/>
</person>
<person handle="_6G0KQC2UXYC66XDDC2" change="1185438865" id="I0363">
<person handle="_6G0KQC2UXYC66XDDC2" change="1502187537" id="I0363">
<gender>F</gender>
<name type="Birth Name">
<first>Miranda Keziah</first>
<surname>Farmer</surname>
</name>
<eventref hlink="_a5af0ec7a76244d962d" role="Primary"/>
<eventref hlink="_a5af0eb7dfb557da07e" role="Witness"/>
<childof hlink="_8NVJQCGMJTCL7E6ZDV"/>
<citationref hlink="_c140d24f439709d3118"/>
</person>
@@ -22989,7 +22996,7 @@
<parentin hlink="_FBVJQCFBI50TW78O49"/>
<citationref hlink="_c140d2522702664ec52"/>
</person>
<person handle="_8CLKQCT97PJOGREJ7W" change="1185438865" id="I1387">
<person handle="_8CLKQCT97PJOGREJ7W" change="1502187387" id="I1387">
<gender>M</gender>
<name type="Birth Name">
<first>Robert</first>
@@ -22997,6 +23004,11 @@
</name>
<eventref hlink="_a5af0ebb3737a6ad088" role="Primary"/>
<eventref hlink="_a5af0ebb39b441e9607" role="Primary"/>
<eventref hlink="_a5af0ed5df832ee65c1" role="Clergy">
<attribute type="Age" value="23">
<citationref hlink="_c140dafeb317af2fd79"/>
</attribute>
</eventref>
<childof hlink="_5IUJQCRJY47YQ8PU7N"/>
<parentin hlink="_H6LKQCWVIFNRNGHFVH"/>
<citationref hlink="_c140d2522d804491375"/>
@@ -23803,7 +23815,7 @@
<childof hlink="_5DBKQCVAB0XMBEW8R9"/>
<citationref hlink="_c140d25425874b0b827"/>
</person>
<person handle="_9HUJQC6ONNW8SMSKGQ" change="1185438865" id="I0038">
<person handle="_9HUJQC6ONNW8SMSKGQ" change="1502187526" id="I0038">
<gender>M</gender>
<name type="Birth Name">
<first>David</first>
@@ -23812,6 +23824,7 @@
<eventref hlink="_a5af0ec7eb514c52fbf" role="Primary"/>
<eventref hlink="_a5af0ec7ec844213b55" role="Primary"/>
<eventref hlink="_a5af0ec7ed61c743fc8" role="Primary"/>
<eventref hlink="_a5af0eb7dfb557da07e" role="Informant"/>
<childof hlink="_5IUJQCRJY47YQ8PU7N"/>
<parentin hlink="_3HUJQCK4DH582YUTZG"/>
<citationref hlink="_c140d2542c764516f13"/>
@@ -24506,7 +24519,7 @@
<parentin hlink="_8NVJQCGMJTCL7E6ZDV"/>
<citationref hlink="_c140d2560004fad8df6"/>
</person>
<person handle="_ANLKQCQSQNE5LDZMRC" change="1185438865" id="I1402">
<person handle="_ANLKQCQSQNE5LDZMRC" change="1502187434" id="I1402">
<gender>F</gender>
<name type="Birth Name">
<first>Margaret Jane &quot;Maggie&quot;</first>
@@ -24514,6 +24527,7 @@
</name>
<eventref hlink="_a5af0ebb7d47a006ee2" role="Primary"/>
<eventref hlink="_a5af0ebb7e54e14970f" role="Primary"/>
<eventref hlink="_a5af0ec45b25c630e03" role="Witness"/>
<childof hlink="_VDLKQCQQ1ADTJG1D1F"/>
<parentin hlink="_SNLKQCD0VNJ627062Y"/>
<citationref hlink="_c140d25607213be35da"/>
@@ -24882,13 +24896,18 @@
<parentin hlink="_JFYJQCG2KLRQN835JD"/>
<citationref hlink="_c140d256e3403ba129d"/>
</person>
<person handle="_B3BKQCSV0G3NKSKWDX" change="1185438865" id="I0880">
<person handle="_B3BKQCSV0G3NKSKWDX" change="1502187344" id="I0880">
<gender>F</gender>
<name type="Birth Name">
<first>L. J.</first>
<surname>Blanco</surname>
</name>
<eventref hlink="_a5af0ed2cf617169903" role="Primary"/>
<eventref hlink="_a5af0ed5df832ee65c1" role="Clergy">
<attribute type="Age" value="23">
<citationref hlink="_c140dafeb317af2fd79"/>
</attribute>
</eventref>
<childof hlink="_1BVJQCNTFAGS8273LJ"/>
<citationref hlink="_c140d256ec4306a51ca"/>
</person>
@@ -31930,7 +31949,7 @@
<childof hlink="_UDMKQC5D3A2PXPUGNC"/>
<citationref hlink="_c140d266ec93334f40f"/>
</person>
<person handle="_MG5KQC6ZKSVO4A63G2" change="1328026883" id="I0624">
<person handle="_MG5KQC6ZKSVO4A63G2" change="1502187451" id="I0624">
<gender>M</gender>
<name type="Birth Name">
<first>Raymond E.</first>
@@ -31938,6 +31957,7 @@
</name>
<eventref hlink="_a5af0ece8bd1125a1a9" role="Primary"/>
<eventref hlink="_a5af0ece8d15511ddf9" role="Primary"/>
<eventref hlink="_a5af0ec45b25c630e03" role="Informant"/>
<childof hlink="_9OUJQCBOHW9UEK9CNV"/>
<citationref hlink="_c140d266f0d5d178784"/>
</person>
@@ -32336,7 +32356,7 @@
<parentin hlink="_F4CKQCJZ24JRE9Z889"/>
<citationref hlink="_c140d267ccb7aef0cd0"/>
</person>
<person handle="_N4DKQCPEMZ7OO62O7J" change="1185438865" id="I0975">
<person handle="_N4DKQCPEMZ7OO62O7J" change="1502187308" id="I0975">
<gender>M</gender>
<name type="Birth Name">
<first>Henry</first>
@@ -32345,6 +32365,11 @@
<eventref hlink="_a5af0ed483738d4ed1e" role="Primary"/>
<eventref hlink="_a5af0ed484a144d229b" role="Primary"/>
<eventref hlink="_a5af0ed48605fb6b9eb" role="Primary"/>
<eventref hlink="_a5af0ed5df832ee65c1" role="Witness">
<attribute type="Age" value="23">
<citationref hlink="_c140dafeb317af2fd79"/>
</attribute>
</eventref>
<parentin hlink="_7PUJQC4PPS4EDIVMYE"/>
<citationref hlink="_c140d267d2128356d8e"/>
</person>
@@ -59379,10 +59404,6 @@
<ptitle>USA</ptitle>
<pname value="USA"/>
</placeobj>
<placeobj handle="_4ECKQCWCLO5YIHXEXZ" change="1234373374" id="P1704" type="Country">
<ptitle>Puerto Rico</ptitle>
<pname value="Puerto Rico"/>
</placeobj>
<placeobj handle="_4FUJQCDFTJJJNKKJMH" change="1234390522" id="P0958" type="City">
<ptitle>Boone, IA</ptitle>
<pname value="Boone"/>
@@ -65622,29 +65643,44 @@
<pname value="St. Lawrence"/>
<placeref hlink="_c96587263cc11e217c35cc9003f"/>
</placeobj>
<placeobj handle="_d583a5b7ab21971300a" change="1467134436" id="P0435" type="Unknown">
<placeobj handle="_d583a5b7ab21971300a" change="1520535854" id="P0435" type="City">
<ptitle>Δράμα</ptitle>
<pname value="Δράμα"/>
<pname value="Δράμα" lang="el"/>
<pname value="Drama" lang="en"/>
<placeref hlink="_dd445e5bfcc17bd1838"/>
</placeobj>
<placeobj handle="_d583a5b8614206a939d" change="1467134581" id="P0436" type="Unknown">
<placeobj handle="_d583a5b8614206a939d" change="1520535887" id="P0436" type="City">
<ptitle>Θεσσαλονίκη</ptitle>
<pname value="Θεσσαλονίκη"/>
<pname value="Θεσσαλονίκη" lang="el"/>
<pname value="Thessaloniki" lang="en"/>
<placeref hlink="_dd445e5bfcc17bd1838"/>
</placeobj>
<placeobj handle="_d583a5b8a8c1474357d" change="1467135440" id="P0437" type="Unknown">
<placeobj handle="_d583a5b8a8c1474357d" change="1520535915" id="P0437" type="City">
<ptitle>Ιωάννινα</ptitle>
<pname value="Ιωάννινα"/>
<pname value="Ιωάννινα" lang="el"/>
<pname value="Ioannina" lang="en"/>
<placeref hlink="_dd445e5bfcc17bd1838"/>
</placeobj>
<placeobj handle="_d583a5b8b586fb992c8" change="1467135553" id="P0438" type="Unknown">
<placeobj handle="_d583a5b8b586fb992c8" change="1520535978" id="P0438" type="City">
<ptitle>Σιάτιστα</ptitle>
<pname value="Σιάτιστα"/>
<pname value="Σιάτιστα" lang="el"/>
<pname value="Siatista" lang="en"/>
<placeref hlink="_dd445e5bfcc17bd1838"/>
</placeobj>
<placeobj handle="_d583a5b8c380fb024c9" change="1467136002" id="P0439" type="Unknown">
<placeobj handle="_d583a5b8c380fb024c9" change="1520535800" id="P0439" type="City">
<ptitle>Άργος</ptitle>
<pname value="Άργος"/>
<pname value="Άργος" lang="el"/>
<pname value="Argos" lang="en"/>
<placeref hlink="_dd445e5bfcc17bd1838"/>
</placeobj>
<placeobj handle="_d583a5b8d1106cda712" change="1467136077" id="P0440" type="Unknown">
<placeobj handle="_d583a5b8d1106cda712" change="1520535947" id="P0440" type="City">
<ptitle>Μεσολόγγι</ptitle>
<pname value="Μεσολόγγι"/>
<pname value="Μεσολόγγι" lang="el"/>
<pname value="Missolonghi" lang="en"/>
<placeref hlink="_dd445e5bfcc17bd1838"/>
</placeobj>
<placeobj handle="_dd445e5bfcc17bd1838" change="1520535973" id="P0441" type="Country">
<pname value="Greece" lang="en"/>
</placeobj>
</places>
<objects>
+7 -3
View File
@@ -180,6 +180,8 @@ class ArgHandler:
self.imports = []
self.exports = []
self.removes = parser.removes
self.username = parser.username
self.password = parser.password
self.open = self.__handle_open_option(parser.open, parser.create)
self.sanitize_args(parser.imports, parser.exports)
@@ -502,10 +504,9 @@ class ArgHandler:
self.imp_db_path = get_empty_tempdir("import_dbdir")
dbid = config.get('database.backend')
newdb = make_database(dbid)
newdb.write_version(self.imp_db_path)
try:
self.smgr.open_activate(self.imp_db_path)
self.smgr.open_activate(self.imp_db_path, self.username, self.password)
msg = _("Created empty Family Tree successfully")
print(msg, file=sys.stderr)
except:
@@ -532,7 +533,7 @@ class ArgHandler:
# we load this file for use
try:
self.smgr.open_activate(self.open)
self.smgr.open_activate(self.open, self.username, self.password)
print(_("Opened successfully!"), file=sys.stderr)
except:
print(_("Error opening the file."), file=sys.stderr)
@@ -553,6 +554,9 @@ class ArgHandler:
if self.dbman.needs_recovery(dbpath):
self.__error(_("Database needs recovery, cannot open it!"))
return False
if self.dbman.backend_unavailable(dbpath):
self.__error(_("Database backend unavailable, cannot open it!"))
return False
return True
#-------------------------------------------------------------------------
+27
View File
@@ -9,6 +9,7 @@
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2012 Doug Blank
# Copyright (C) 2012-2013 Paul Franklin
# Copyright (C) 2017 Serge Noiraud
#
# 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
@@ -35,6 +36,7 @@ Module responsible for handling the command line arguments for Gramps.
#
#-------------------------------------------------------------------------
import sys
import os
import getopt
import logging
@@ -60,6 +62,8 @@ Help options
Application options
-O, --open=FAMILY_TREE Open Family Tree
-U, --username=USERNAME Database username
-P, --password=PASSWORD Database password
-C, --create=FAMILY_TREE Create on open if new Family Tree
-i, --import=FILENAME Import file
-e, --export=FILENAME Export file
@@ -136,6 +140,8 @@ class ArgParser:
The valid options are:
-O, --open=FAMILY_TREE Open Family Tree
-U, --username=USERNAME Database username
-P, --password=PASSWORD Database password
-C, --create=FAMILY_TREE Create on open if new Family Tree
-i, --import=FILENAME Import file
-e, --export=FILENAME Export file
@@ -194,6 +200,8 @@ class ArgParser:
self.open_gui = None
self.open = None
self.username = None
self.password = None
self.exports = []
self.actions = []
self.imports = []
@@ -277,6 +285,10 @@ class ArgParser:
self.open = value
elif option in ['-C', '--create']:
self.create = value
elif option in ['-U', '--username']:
self.username = value
elif option in ['-P', '--password']:
self.password = value
elif option in ['-i', '--import']:
family_tree_format = None
if (opt_ix < len(options) - 1
@@ -290,6 +302,21 @@ class ArgParser:
if (opt_ix < len(options) - 1
and options[opt_ix + 1][0] in ('-f', '--format')):
family_tree_format = options[opt_ix + 1][1]
abs_name = os.path.abspath(os.path.expanduser(value))
if not os.path.exists(abs_name):
# The file doesn't exists, try to create it.
try:
open(abs_name, 'w').close()
os.unlink(abs_name)
except OSError as e:
message = _("WARNING: %(strerr)s "
"(errno=%(errno)s):\n"
"WARNING: %(name)s\n") % {
'strerr' : e.strerror,
'errno' : e.errno,
'name' : e.filename}
print(message)
sys.exit(1)
self.exports.append((value, family_tree_format))
elif option in ['-a', '--action']:
action = value
+31 -40
View File
@@ -48,8 +48,8 @@ import logging
from gramps.gen.plug import BasePluginManager
from gramps.gen.config import config
from gramps.gen.constfunc import win
from gramps.gen.db.dbconst import DBLOGNAME
from gramps.gen.db.utils import make_database
from gramps.gen.db.dbconst import DBLOGNAME, DBBACKEND
from gramps.gen.db.utils import make_database, get_dbid_from_path
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
@@ -69,6 +69,7 @@ _LOG = logging.getLogger(DBLOGNAME)
DEFAULT_TITLE = _("Family Tree")
NAME_FILE = "name.txt"
META_NAME = "meta_data.db"
UNAVAILABLE = _('Unavailable')
#-------------------------------------------------------------------------
#
@@ -154,11 +155,7 @@ class CLIDbManager:
_("Version")
_("Schema version")
"""
dbid = "bsddb"
dbid_path = os.path.join(dirpath, "database.txt")
if os.path.isfile(dbid_path):
with open(dbid_path) as file:
dbid = file.read().strip()
dbid = get_dbid_from_path(dirpath)
if not self.is_locked(dirpath):
try:
database = make_database(dbid)
@@ -171,12 +168,19 @@ class CLIDbManager:
retval = {_("Unavailable"): "locked"}
retval.update({_("Family Tree"): name,
_("Path"): dirpath,
_("Database"): dbid,
_("Database"): self.get_backend_name_from_dbid(dbid),
_("Last accessed"): time_val(dirpath)[1],
_("Locked?"): self.is_locked(dirpath),
})
return retval
def get_backend_name_from_dbid(self, dbid):
pmgr = BasePluginManager.get_instance()
for plugin in pmgr.get_reg_databases():
if plugin.id == dbid:
return plugin._name
return UNAVAILABLE
def print_family_tree_summaries(self, database_names=None):
"""
Prints a detailed list of the known family trees.
@@ -184,7 +188,7 @@ class CLIDbManager:
print(_('Gramps Family Trees:'))
for item in self.current_names:
(name, dirpath, path_name, last,
tval, enable, stock_id, backend_type, version) = item
tval, enable, stock_id, backend_type) = item
if (database_names is None or
any([(re.match("^" + dbname + "$", name) or
dbname == name)
@@ -206,7 +210,7 @@ class CLIDbManager:
summary_list = []
for item in self.current_names:
(name, dirpath, path_name, last,
tval, enable, stock_id, backend_type, version) = item
tval, enable, stock_id, backend_type) = item
if (database_names is None or
any([(re.match("^" + dbname + "$", name) or
dbname == name)
@@ -228,20 +232,7 @@ class CLIDbManager:
for dpath in os.listdir(dbdir):
dirpath = os.path.join(dbdir, dpath)
path_name = os.path.join(dirpath, NAME_FILE)
try:
with open(os.path.join(dirpath, "database.txt")) as file:
backend_type = file.read()
except:
backend_type = "bsddb"
try:
with open(os.path.join(dirpath, "bdbversion.txt")) as file:
version = file.read()
except:
version = "(0, 0, 0)"
try:
version = ast.literal_eval(version)
except:
version = (0, 0, 0)
backend_type = get_dbid_from_path(dirpath)
if os.path.isfile(path_name):
with open(path_name, 'r', encoding='utf8') as file:
name = file.readline().strip()
@@ -255,7 +246,7 @@ class CLIDbManager:
self.current_names.append(
(name, os.path.join(dbdir, dpath), path_name,
last, tval, enable, stock_id, backend_type, version))
last, tval, enable, stock_id, backend_type))
self.current_names.sort()
@@ -305,11 +296,13 @@ class CLIDbManager:
name_file.write(title)
if create_db:
# write the version number into metadata
if dbid is None:
dbid = "bsddb"
dbid = config.get('database.backend')
newdb = make_database(dbid)
newdb.write_version(new_path)
backend_path = os.path.join(new_path, DBBACKEND)
with open(backend_path, "w", encoding='utf8') as backend_file:
backend_file.write(dbid)
(tval, last) = time_val(new_path)
@@ -357,15 +350,6 @@ class CLIDbManager:
# write locally:
temp_fp.write(data)
url_fp.close()
from gramps.gen.db.dbconst import BDBVERSFN
# name not set
(name, ext) = os.path.splitext(os.path.basename(filename))
versionpath = os.path.join(name, BDBVERSFN)
# dbase not set
dbase = make_database("bsddb")
_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))
@@ -374,13 +358,13 @@ class CLIDbManager:
for plugin in pmgr.get_import_plugins():
if format == plugin.get_extension():
new_path, name = self._create_new_db(name, edit_entry=False)
dbid = config.get('database.backend')
new_path, name = self._create_new_db(name, dbid=dbid,
edit_entry=False)
# Create a new database
self.__start_cursor(_("Importing data..."))
## Use bsddb, for now, because we assumed that above.
dbid = "bsddb" ## config.get('database.backend')
dbase = make_database(dbid)
dbase.load(new_path, user.callback)
@@ -410,6 +394,13 @@ class CLIDbManager:
return True
return False
def backend_unavailable(self, dbpath):
"""
Returns True if the database in dirpath has an unavailable backend
"""
dbid = get_dbid_from_path(dbpath)
return self.get_backend_name_from_dbid(dbid) == UNAVAILABLE
def remove_database(self, dbname, user=None):
"""
Deletes a database folder given a pattenr that matches
+13 -13
View File
@@ -59,7 +59,8 @@ from gramps.gen.db.exceptions import (DbUpgradeRequiredError,
BsddbUpgradeRequiredError,
BsddbDowngradeRequiredError,
PythonUpgradeRequiredError,
PythonDowngradeError)
PythonDowngradeError,
DbConnectionError)
from gramps.gen.plug import BasePluginManager
from gramps.gen.utils.config import get_researcher
from gramps.gen.recentfiles import recent_files
@@ -131,7 +132,7 @@ class CLIDbLoader:
"""
pass
def read_file(self, filename):
def read_file(self, filename, username, password):
"""
This method takes care of changing database, and loading the data.
In 3.0 we only allow reading of real databases of filetype
@@ -172,8 +173,8 @@ class CLIDbLoader:
self._begin_progress()
try:
self.dbstate.db.load(filename, self._pulse_progress, mode)
self.dbstate.db.set_save_path(filename)
self.dbstate.db.load(filename, self._pulse_progress, mode,
username=username, password=password)
except DbEnvironmentError as msg:
self.dbstate.no_database()
self._errordialog(_("Cannot open database"), str(msg))
@@ -201,6 +202,9 @@ class CLIDbLoader:
except DbPythonError as msg:
self.dbstate.no_database()
self._errordialog(_("Cannot open database"), str(msg))
except DbConnectionError as msg:
self.dbstate.no_database()
self._errordialog(_("Cannot open database"), str(msg))
except OSError as msg:
self.dbstate.no_database()
self._errordialog(
@@ -237,11 +241,11 @@ class CLIManager:
self._pmgr = BasePluginManager.get_instance()
self.user = user
def open_activate(self, path):
def open_activate(self, path, username=None, password=None):
"""
Open and make a family tree active
"""
self._read_recent_file(path)
self._read_recent_file(path, username, password)
def _errordialog(self, title, errormessage):
"""
@@ -250,7 +254,7 @@ class CLIManager:
print(_('ERROR: %s') % errormessage, file=sys.stderr)
sys.exit(1)
def _read_recent_file(self, filename):
def _read_recent_file(self, filename, username=None, password=None):
"""
Called when a file needs to be loaded
"""
@@ -271,7 +275,7 @@ class CLIManager:
"that the database is not in use."))
return
if self.db_loader.read_file(filename):
if self.db_loader.read_file(filename, username, password):
# Attempt to figure out the database title
path = os.path.join(filename, "name.txt")
try:
@@ -303,11 +307,6 @@ class CLIManager:
if title:
name = title
# This method is for UI stuff when the database has changed.
# Window title, recent files, etc related to new file.
self.dbstate.db.set_save_path(filename)
# apply preferred researcher if loaded file has none
res = self.dbstate.db.get_researcher()
owner = get_researcher()
@@ -319,6 +318,7 @@ class CLIManager:
and self.dbstate.db.get_total() == 0):
self.dbstate.db.set_researcher(owner)
name_displayer.clear_custom_formats()
name_displayer.set_name_format(self.dbstate.db.name_formats)
fmt_default = config.get('preferences.name-format')
name_displayer.set_default_format(fmt_default)
+29 -6
View File
@@ -47,7 +47,8 @@ LOG = logging.getLogger(".")
#-------------------------------------------------------------------------
from gramps.gen.plug import BasePluginManager
from gramps.gen.plug.docgen import (StyleSheet, StyleSheetList, PaperStyle,
PAPER_PORTRAIT, PAPER_LANDSCAPE, graphdoc)
PAPER_PORTRAIT, PAPER_LANDSCAPE, graphdoc,
treedoc)
from gramps.gen.plug.menu import (FamilyOption, PersonOption, NoteOption,
MediaOption, PersonListOption, NumberOption,
BooleanOption, DestinationOption, Option,
@@ -56,8 +57,8 @@ from gramps.gen.plug.menu import (FamilyOption, PersonOption, NoteOption,
from gramps.gen.display.name import displayer as name_displayer
from gramps.gen.errors import ReportError, FilterError
from gramps.gen.plug.report import (CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK,
CATEGORY_GRAPHVIZ, CATEGORY_CODE,
ReportOptions, append_styles)
CATEGORY_GRAPHVIZ, CATEGORY_TREE,
CATEGORY_CODE, ReportOptions, append_styles)
from gramps.gen.plug.report._paper import paper_sizes
from gramps.gen.const import USER_HOME, DOCGEN_OPTIONS
from gramps.gen.dbstate import DbState
@@ -250,6 +251,15 @@ class CommandLineReport:
if name not in self.option_class.options_dict:
self.option_class.options_dict[
name] = menu.get_option_by_name(name).get_value()
if category == CATEGORY_TREE:
# Need to include Genealogy Tree options
self.__toptions = treedoc.TreeOptions()
menu = self.option_class.menu
self.__toptions.add_menu_options(menu)
for name in menu.get_all_option_names():
if name not in self.option_class.options_dict:
self.option_class.options_dict[
name] = menu.get_option_by_name(name).get_value()
self.option_class.load_previous_values()
_validate_options(self.option_class, database)
self.show = options_str_dict.pop('show', None)
@@ -320,6 +330,10 @@ class CommandLineReport:
for graph_format in graphdoc.FORMATS:
self.options_help['off'][2].append(
graph_format["type"] + "\t" + graph_format["descr"])
elif self.category == CATEGORY_TREE:
for tree_format in treedoc.FORMATS:
self.options_help['off'][2].append(
tree_format["type"] + "\t" + tree_format["descr"])
else:
self.options_help['off'][2] = "NA"
@@ -446,7 +460,7 @@ class CommandLineReport:
else:
print(_("Unknown option: %s") % option, file=sys.stderr)
print(_(" Valid options are:") +
", ".join(list(self.options_dict.keys())),
_(", ").join(list(self.options_dict.keys())), # Arabic OK
file=sys.stderr)
print(_(" Use '%(donottranslate)s' to see description "
"and acceptable values"
@@ -498,6 +512,15 @@ class CommandLineReport:
# Pick the first one as the default.
self.format = graphdoc.FORMATS[0]["class"]
_chosen_format = graphdoc.FORMATS[0]["type"]
elif self.category == CATEGORY_TREE:
for tree_format in treedoc.FORMATS:
if tree_format['type'] == self.options_dict['off']:
if not self.format: # choose the first one, not the last
self.format = tree_format["class"]
if self.format is None:
# Pick the first one as the default.
self.format = tree_format.FORMATS[0]["class"]
_chosen_format = tree_format.FORMATS[0]["type"]
else:
self.format = None
if _chosen_format and _format_str:
@@ -527,7 +550,7 @@ class CommandLineReport:
else:
print(_("Ignoring unknown option: %s") % opt, file=sys.stderr)
print(_(" Valid options are:"),
", ".join(list(self.options_dict.keys())),
_(", ").join(list(self.options_dict.keys())), # Arabic OK
file=sys.stderr)
print(_(" Use '%(donottranslate)s' to see description "
"and acceptable values"
@@ -665,7 +688,7 @@ def cl_report(database, name, category, report_class, options_class,
clr.selected_style,
PaperStyle(clr.paper, clr.orien, clr.marginl,
clr.marginr, clr.margint, clr.marginb))
elif category == CATEGORY_GRAPHVIZ:
elif category in [CATEGORY_GRAPHVIZ, CATEGORY_TREE]:
clr.option_class.handler.doc = clr.format(
clr.option_class,
PaperStyle(clr.paper, clr.orien, clr.marginl,
+28 -22
View File
@@ -155,7 +155,7 @@ register('behavior.translator-needed', True)
register('behavior.use-tips', False)
register('behavior.welcome', 100)
register('behavior.web-search-url', 'http://google.com/#&q=%(text)s')
register('behavior.addons-url', "https://raw.githubusercontent.com/gramps-project/addons/master/gramps50")
register('behavior.addons-url', "https://raw.githubusercontent.com/gramps-project/addons/master/gramps51")
register('database.backend', 'bsddb')
register('database.compress-backup', True)
@@ -163,6 +163,8 @@ register('database.backup-path', USER_HOME)
register('database.backup-on-exit', True)
register('database.autobackup', 0)
register('database.path', os.path.join(HOME_DIR, 'grampsdb'))
register('database.host', '')
register('database.port', '')
register('export.proxy-order',
[["privacy", 0],
@@ -194,6 +196,7 @@ register('interface.view-categories',
register('interface.filter', False)
register('interface.fullscreen', False)
register('interface.grampletbar-close', False)
register('interface.grampletbar-freeze', False)
register('interface.ignore-gexiv2', False)
register('interface.ignore-pil', False)
register('interface.ignore-osmgpsmap', False)
@@ -215,6 +218,7 @@ register('interface.sidebar-text', True)
register('interface.size-checked', False)
register('interface.statusbar', 1)
register('interface.toolbar-on', True)
register('interface.toolbar-text', False)
register('interface.view', True)
register('interface.surname-box-height', 150)
register('interface.treemodel-cache-size', 1000)
@@ -226,6 +230,8 @@ register('paths.report-directory', USER_HOME)
register('paths.website-directory', USER_HOME)
register('paths.website-cms-uri', '')
register('paths.website-cal-uri', '')
register('paths.website-extra-page-uri', '')
register('paths.website-extra-page-name', '')
register('paths.quick-backup-directory', USER_HOME)
register('paths.quick-backup-filename',
"%(filename)s_%(year)d-%(month)02d-%(day)02d.%(extension)s")
@@ -245,11 +251,8 @@ register('preferences.hide-ep-msg', False)
register('preferences.invalid-date-format', "<b>%s</b>")
register('preferences.iprefix', 'I%04d')
register('preferences.name-format', 1)
register('preferences.place-format', 0)
register('preferences.place-auto', True)
register('preferences.place-number', False)
register('preferences.place-reverse', False)
register('preferences.place-restrict', 0)
register('preferences.place-lang', '')
register('preferences.patronimic-surname', False)
register('preferences.no-given-text', "[%s]" % _("Missing Given Name"))
register('preferences.no-record-text', "[%s]" % _("Missing Record"))
@@ -270,22 +273,25 @@ register('preferences.last-view', '')
register('preferences.last-views', [])
register('preferences.family-relation-type', 3) # UNKNOWN
register('preferences.age-display-precision', 1)
register('preferences.color-gender-male-alive', '#b8cee6')
register('preferences.color-gender-male-death', '#b8cee6')
register('preferences.color-gender-female-alive', '#feccf0')
register('preferences.color-gender-female-death', '#feccf0')
register('preferences.color-gender-unknown-alive', '#f3dbb6')
register('preferences.color-gender-unknown-death', '#f3dbb6')
#register('preferences.color-gender-other-alive', '#fcaf3e')
#register('preferences.color-gender-other-death', '#fcaf3e')
register('preferences.bordercolor-gender-male-alive', '#1f4986')
register('preferences.bordercolor-gender-male-death', '#000000')
register('preferences.bordercolor-gender-female-alive', '#861f69')
register('preferences.bordercolor-gender-female-death', '#000000')
register('preferences.bordercolor-gender-unknown-alive', '#8e5801')
register('preferences.bordercolor-gender-unknown-death', '#000000')
#register('preferences.bordercolor-gender-other-alive', '#f57900')
#register('preferences.bordercolor-gender-other-death', '#000000')
register('colors.scheme', 0)
register('colors.male-alive', ['#b8cee6', '#1f344a'])
register('colors.male-dead', ['#b8cee6', '#2d3039'])
register('colors.female-alive', ['#feccf0', '#62242D'])
register('colors.female-dead', ['#feccf0', '#3a292b'])
register('colors.unknown-alive', ['#f3dbb6', '#75507B'])
register('colors.unknown-dead', ['#f3dbb6', '#35103b'])
register('colors.family', ['#eeeeee', '#454545'])
register('colors.family-divorced', ['#ffdede', '#5c3636'])
register('colors.home-person', ['#bbe68a', '#304918'])
register('colors.border-male-alive', ['#1f4986', '#171d26'])
register('colors.border-male-dead', ['#000000', '#000000'])
register('colors.border-female-alive', ['#861f69', '#261111'])
register('colors.border-female-dead', ['#000000', '#000000'])
register('colors.border-unknown-alive', ['#8e5801', '#8e5801'])
register('colors.border-unknown-dead', ['#000000', '#000000'])
register('colors.border-family', ['#cccccc', '#252525'])
register('colors.border-family-divorced', ['#ff7373', '#720b0b'])
register('researcher.researcher-addr', '')
register('researcher.researcher-locality', '')
@@ -323,7 +329,7 @@ if not os.path.exists(CONFIGMAN.filename):
# check previous version of gramps:
fullpath, filename = os.path.split(CONFIGMAN.filename)
fullpath, previous = os.path.split(fullpath)
match = re.match('gramps(\d*)', previous)
match = re.match(r'gramps(\d*)', previous)
if match:
# cycle back looking for previous versions of gramps
for i in range(1, 20): # check back 2 gramps versions
+9 -5
View File
@@ -59,8 +59,8 @@ PROGRAM_NAME = "Gramps"
#-------------------------------------------------------------------------
URL_HOMEPAGE = "http://gramps-project.org/"
URL_MAILINGLIST = "http://sourceforge.net/mail/?group_id=25770"
URL_BUGHOME = "http://bugs.gramps-project.org"
URL_BUGTRACKER = "http://bugs.gramps-project.org/bug_report_page.php"
URL_BUGHOME = "http://gramps-project.org/bugs"
URL_BUGTRACKER = "http://gramps-project.org/bugs/bug_report_page.php"
URL_WIKISTRING = "http://gramps-project.org/wiki/index.php?title="
URL_MANUAL_PAGE = "Gramps_%s_Wiki_Manual" % major_version
URL_MANUAL_DATA = '%s_-_Entering_and_editing_data:_detailed' % URL_MANUAL_PAGE
@@ -112,6 +112,7 @@ VERSION_DIR = os.path.join(
CUSTOM_FILTERS = os.path.join(VERSION_DIR, "custom_filters.xml")
REPORT_OPTIONS = os.path.join(HOME_DIR, "report_options.xml")
TOOL_OPTIONS = os.path.join(HOME_DIR, "tool_options.xml")
PLACE_FORMATS = os.path.join(HOME_DIR, "place_formats.xml")
ENV_DIR = os.path.join(HOME_DIR, "env")
TEMP_DIR = os.path.join(HOME_DIR, "temp")
@@ -137,7 +138,8 @@ sys.path.insert(0, ROOT_DIR)
git_revision = get_git_revision(ROOT_DIR).replace('\n', '')
if sys.platform == 'win32' and git_revision == "":
git_revision = get_git_revision(os.path.split(ROOT_DIR)[1])
#VERSION += git_revision
VERSION += git_revision
#VERSION += "-1"
#
# Glade files
@@ -216,7 +218,7 @@ GTK_GETTEXT_DOMAIN = 'gtk30'
#
#-------------------------------------------------------------------------
COPYRIGHT_MSG = "© 2001-2006 Donald N. Allingham\n" \
"© 2007-2017 The Gramps Developers"
"© 2007-2018 The Gramps Developers"
COMMENTS = _("Gramps\n (Genealogical Research and Analysis "
"Management Programming System)\n"
"is a personal genealogy program.")
@@ -288,6 +290,8 @@ LONGOPTS = [
"oaf-ior-fd=",
"oaf-private",
"open=",
"username=",
"password=",
"create=",
"options=",
"screen=",
@@ -303,7 +307,7 @@ LONGOPTS = [
"quiet",
]
SHORTOPTS = "O:C:i:e:f:a:p:d:c:r:lLthuv?syq"
SHORTOPTS = "O:U:P:C:i:e:f:a:p:d:c:r:lLthuv?syq"
GRAMPS_UUID = uuid.UUID('516cd010-5a41-470f-99f8-eb22f1098ad6')
+6 -6
View File
@@ -124,12 +124,12 @@ class DateParserAR(DateParser):
_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)
self._span = re.compile(
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_span_1), '|'.join(_span_2)), re.IGNORECASE)
self._range = re.compile(
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
#-------------------------------------------------------------------------
#
+6 -6
View File
@@ -166,12 +166,12 @@ class DateParserBG(DateParser):
_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)
self._span = re.compile(
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_span_1), '|'.join(_span_2)), re.IGNORECASE)
self._range = re.compile(
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
#-------------------------------------------------------------------------
#
+7 -7
View File
@@ -98,14 +98,14 @@ class DateParserCA(DateParser):
DateParser.init_strings(self)
_span_1 = ['des de']
_span_2 = ['fins a']
_range_1 = ['entre', 'ent\.', 'ent']
_range_1 = ['entre', r'ent\.', 'ent']
_range_2 = ['i']
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)
self._span = re.compile(
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_span_1), '|'.join(_span_2)), re.IGNORECASE)
self._range = re.compile(
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
#-------------------------------------------------------------------------
#
+2 -203
View File
@@ -49,145 +49,15 @@ class DateParserCZ(DateParser):
"""
Converts a text string into a Date object
"""
month_to_int = DateParser.month_to_int
month_to_int["leden"] = 1
month_to_int["ledna"] = 1
month_to_int["lednu"] = 1
month_to_int["led"] = 1
month_to_int["I"] = 1
month_to_int["i"] = 1
month_to_int["únor"] = 2
month_to_int["února"] = 2
month_to_int["únoru"] = 2
month_to_int["ún"] = 2
month_to_int["II"] = 2
month_to_int["ii"] = 2
month_to_int["březen"] = 3
month_to_int["března"] = 3
month_to_int["březnu"] = 3
month_to_int["bře"] = 3
month_to_int["III"] = 3
month_to_int["iii"] = 3
month_to_int["duben"] = 4
month_to_int["dubna"] = 4
month_to_int["dubnu"] = 4
month_to_int["dub"] = 4
month_to_int["IV"] = 4
month_to_int["iv"] = 4
month_to_int["květen"] = 5
month_to_int["května"] = 5
month_to_int["květnu"] = 5
month_to_int["V"] = 5
month_to_int["v"] = 5
month_to_int["červen"] = 6
month_to_int["června"] = 6
month_to_int["červnu"] = 6
month_to_int["čer"] = 6
month_to_int["vi"] = 6
month_to_int["červenec"] = 7
month_to_int["července"] = 7
month_to_int["červenci"] = 7
month_to_int["čvc"] = 7
month_to_int["VII"] = 7
month_to_int["vii"] = 7
month_to_int["srpen"] = 8
month_to_int["srpna"] = 8
month_to_int["srpnu"] = 8
month_to_int["srp"] = 8
month_to_int["VIII"] = 8
month_to_int["viii"] = 8
month_to_int["září"] = 9
month_to_int["zář"] = 9
month_to_int["IX"] = 9
month_to_int["ix"] = 9
month_to_int["říjen"] = 10
month_to_int["října"] = 10
month_to_int["říjnu"] = 10
month_to_int["říj"] = 10
month_to_int["X"] = 10
month_to_int["x"] = 10
month_to_int["listopad"] = 11
month_to_int["listopadu"] = 11
month_to_int["lis"] = 11
month_to_int["XI"] = 11
month_to_int["xi"] = 11
month_to_int["prosinec"] = 12
month_to_int["prosince"] = 12
month_to_int["prosinci"] = 12
month_to_int["pro"] = 12
month_to_int["XII"] = 12
month_to_int["xii"] = 12
modifier_to_int = {
'před' : Date.MOD_BEFORE,
'do' : Date.MOD_BEFORE,
'po' : Date.MOD_AFTER,
'asi' : Date.MOD_ABOUT,
'kolem' : Date.MOD_ABOUT,
'přibl.' : Date.MOD_ABOUT,
}
calendar_to_int = {
'gregoriánský' : Date.CAL_GREGORIAN,
'greg.' : Date.CAL_GREGORIAN,
'g' : Date.CAL_GREGORIAN,
'juliánský' : Date.CAL_JULIAN,
'jul.' : Date.CAL_JULIAN,
'j' : Date.CAL_JULIAN,
'hebrejský' : Date.CAL_HEBREW,
'hebr.' : Date.CAL_HEBREW,
'h' : Date.CAL_HEBREW,
'islámský' : Date.CAL_ISLAMIC,
'isl.' : Date.CAL_ISLAMIC,
'i' : Date.CAL_ISLAMIC,
'francouzský republikánský' : Date.CAL_FRENCH,
'fr.' : Date.CAL_FRENCH,
'perský' : Date.CAL_PERSIAN,
'per.' : Date.CAL_PERSIAN,
'p' : Date.CAL_PERSIAN,
'švédský' : Date.CAL_SWEDISH,
'sve.' : Date.CAL_SWEDISH,
's' : Date.CAL_SWEDISH,
}
quality_to_int = {
'přibližně' : Date.QUAL_ESTIMATED,
'odhadem' : Date.QUAL_ESTIMATED,
'odh.' : Date.QUAL_ESTIMATED,
'vypočteno' : Date.QUAL_CALCULATED,
'vypočtené' : Date.QUAL_CALCULATED,
'vyp.' : Date.QUAL_CALCULATED,
}
bce = ["před naším letopočtem", "před Kristem",
"př. n. l.", "př. Kr."] + DateParser.bce
def dhformat_changed(self):
""" Allow overriding so a subclass can modify it """
# bug 9739 grampslocale.py gets '%-d.%-m.%Y' -- makes it be '%/d.%/m.%Y'
self.dhformat = self.dhformat.replace('/', '') # so counteract that
def init_strings(self):
DateParser.init_strings(self)
self._text2 = re.compile('(\d+)?\.?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$'
% self._mon_str, re.IGNORECASE)
self._span = re.compile(
"(od)\s+(?P<start>.+)\s+(do)\s+(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile(
"(mezi)\s+(?P<start>.+)\s+(a)\s+(?P<stop>.+)",
re.IGNORECASE)
#-------------------------------------------------------------------------
#
# Czech display
@@ -197,25 +67,6 @@ class DateDisplayCZ(DateDisplay):
"""
Czech language date display class.
"""
long_months = ( "", "leden", "únor", "březen", "duben", "květen",
"červen", "červenec", "srpen", "září", "říjen",
"listopad", "prosinec" )
short_months = ( "", "led", "úno", "bře", "dub", "kvě", "čer",
"čvc", "srp", "zář", "říj", "lis", "pro" )
calendar = (
"", "juliánský", "hebrejský",
"francouzský republikánský", "perský", "islámský",
"švédský"
)
_mod_str = ("", "před ", "po ", "kolem ", "", "", "")
_qual_str = ("", "přibližně ", "vypočteno ")
bce = ["před naším letopočtem", "před Kristem",
"př. n. l.", "př. Kr."] + DateParser.bce
display = DateDisplay.display_formatted
@@ -225,58 +76,6 @@ class DateDisplayCZ(DateDisplay):
# bug 9537 grampslocale.py gets '%-d.%-m.%Y' -- makes it be '%/d.%/m.%Y'
self.dhformat = self.dhformat.replace('/', '') # so counteract that
self.formats = (
"ISO (rrrr-mm-dd)",
"numerický",
"měsíc den, Rok",
"měs den, Rok",
"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 orig_display(self, date): # unused: only here for historical reference
"""
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_NONE:
# date_decl_string = self.display_cal[cal](start)
# date_decl_string = date_decl_string.replace("den ", "dna ")
# date_decl_string = date_decl_string.replace("or ", "ora ")
# date_decl_string = date_decl_string.replace("en ", "na ")
# date_decl_string = date_decl_string.replace("ad ", "adu ")
# date_decl_string = date_decl_string.replace("ec ", "ce ")
# return date_decl_string
elif mod == Date.MOD_SPAN:
dat1 = self.display_cal[cal](start)
dat2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, 'od', dat1,
'do', dat2, scal)
elif mod == Date.MOD_RANGE:
dat1 = self.display_cal[cal](start)
dat2 = self.display_cal[cal](date.get_stop_date())
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, 'mezi',
dat1, 'a', dat2, 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)
#-------------------------------------------------------------------------
#
+5 -4
View File
@@ -89,10 +89,11 @@ class DateParserDa(DateParser):
def init_strings(self):
DateParser.init_strings(self)
self._span = re.compile("(fra)?\s*(?P<start>.+)\s*(til|--|)\s*(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile("(mellem)\s+(?P<start>.+)\s+og\s+(?P<stop>.+)",
re.IGNORECASE)
self._span = re.compile(
r"(fra)?\s*(?P<start>.+)\s*(til|--|)\s*(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile(
r"(mellem)\s+(?P<start>.+)\s+og\s+(?P<stop>.+)", re.IGNORECASE)
#-------------------------------------------------------------------------
#
+84 -11
View File
@@ -58,30 +58,60 @@ class DateParserDE(DateParser):
# Add other common latin,
month_to_int["januaris"] = 1
month_to_int["ianarius"] = 1
month_to_int["januarii"] = 1
month_to_int["januarius"] = 1
month_to_int["january"] = 1
month_to_int["ianuary"] = 1
month_to_int["mensis"] = 1
month_to_int["februaris"] = 2
month_to_int["februarii"] = 2
month_to_int["februarius"] = 2
month_to_int["february"] = 2
month_to_int["martii"] = 3
month_to_int["martius"] = 3
month_to_int["martij"] = 3
month_to_int["marty"] = 3
month_to_int["aprilis"] = 4
month_to_int["maius"] = 5
month_to_int["majus"] = 5
month_to_int["maii"] = 5
month_to_int["maij"] = 5
month_to_int["may"] = 5
month_to_int["junius"] = 6
month_to_int["iunius"] = 6
month_to_int["junii"] = 6
month_to_int["iunius"] = 6
month_to_int["junij"] = 6
month_to_int["iunij"] = 6
month_to_int["juny"] = 6
month_to_int["iuny"] = 6
month_to_int["julius"] = 7
month_to_int["iulius"] = 7
month_to_int["julii"] = 7
month_to_int["iulii"] = 7
month_to_int["july"] = 7
month_to_int["iuly"] = 7
month_to_int["quintilis"] = 7
month_to_int["augustus"] = 8
month_to_int["augusti"] = 8
month_to_int["sextilis"] = 8
month_to_int["septembris"] = 9
month_to_int["7ber"] = 9
month_to_int["7bris"] = 9
month_to_int["viiber"] = 9
month_to_int["viibris"] = 9
month_to_int["september"] = 9
month_to_int["october"] = 10
month_to_int["octobris"] = 10
month_to_int["8bris"] = 10
month_to_int["viiiber"] = 10
month_to_int["viiibris"] = 10
month_to_int["novembris"] = 11
month_to_int["9ber"] = 11
month_to_int["9bris"] = 11
month_to_int["ixber"] = 11
month_to_int["ixbris"] = 11
month_to_int["november"] = 11
month_to_int["decembris"] = 12
month_to_int["10bris"] = 12
@@ -103,38 +133,79 @@ class DateParserDE(DateParser):
# old german names
month_to_int["hartung"] = 1
month_to_int["hartmonat"] = 1
month_to_int["hartmond"] = 1
month_to_int["eismond"] = 1
month_to_int["eismonat"] = 1
month_to_int["lassmonat"] = 1
month_to_int["wolfsmonat"] = 1
month_to_int["wintermonat"] = 1
month_to_int["hornung"] = 2
month_to_int["hintester"] = 2
month_to_int["sporkel"] = 2
month_to_int["spörkel"] = 2
month_to_int["rebmonat"] = 2
month_to_int["schmelzmond"] = 2
month_to_int["taumond"] = 2
month_to_int["narrenmond"] = 2
month_to_int["rebmond"] = 2
month_to_int["hintester"] = 2
month_to_int["letzter Wintermonat"] = 2
month_to_int["lenzing"] = 3
month_to_int["lenzmond"] = 3
month_to_int["lenzmonat"] = 3
month_to_int["frühlingsmonat"] = 3
month_to_int["launing"] = 4
month_to_int["grasmond"] = 4
month_to_int["ostermond"] = 4
month_to_int["ostermonat"] = 4
month_to_int["beuet"] = 5
month_to_int["blühmond"] = 5
month_to_int["winnemond"] = 5
month_to_int["wonnemond"] = 5
month_to_int["wonnemonat"] = 5
month_to_int["weidenmonat"] = 5
month_to_int["blumenmond"] = 5
month_to_int["brachet"] = 6
month_to_int["brachmond"] = 6
month_to_int["brachmonat"] = 6
month_to_int["johannismond"] = 6
month_to_int["weidemaent"] = 6
month_to_int["heuet"] = 7
month_to_int["heuert"] = 7
month_to_int["heumond"] = 7
month_to_int["heumonat"] = 7
month_to_int["bärenmonat"] = 7
month_to_int["honigmond"] = 7
month_to_int["honigmonat"] = 7
month_to_int["ernting"] = 8
month_to_int["erntemond"] = 8
month_to_int["bisemond"] = 8
month_to_int["holzing"] = 9
month_to_int["holzmond"] = 9
month_to_int["scheiding"] = 9
month_to_int["herbstmond"] = 9
month_to_int["scheidung"] = 9
month_to_int["erster herbstmond"] = 9
month_to_int["herbstmonat"] = 9
month_to_int["engelmonat"] = 9
month_to_int["gilbhard"] = 10
month_to_int["gilbhart"] = 10
month_to_int["weinmond"] = 10
month_to_int["weinmonat"] = 10
month_to_int["zweiter herbstmond"] = 10
month_to_int["windmond"] = 11
month_to_int["windmonat"] = 11
month_to_int["nebelung"] = 11
month_to_int["nebelmond"] = 11
month_to_int["schlachtmond"] = 11
month_to_int["wintermond"] = 11
month_to_int["dritter herbstmond"] = 11
month_to_int["julmond"] = 12
month_to_int["heilmond"] = 12
month_to_int["christmond"] = 12
month_to_int["christmonat"] = 12
month_to_int["dustermond"] = 12
month_to_int["heiligenmonat"] = 12
month_to_int["wendeling"] = 11
modifier_to_int = {
'vor' : Date.MOD_BEFORE,
@@ -177,14 +248,16 @@ class DateParserDE(DateParser):
def init_strings(self):
DateParser.init_strings(self)
self._span = re.compile("(von|vom)\s+(?P<start>.+)\s+(bis)\s+(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile("zwischen\s+(?P<start>.+)\s+und\s+(?P<stop>.+)",
re.IGNORECASE)
self._text2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._mon_str,
re.IGNORECASE)
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._jmon_str,
re.IGNORECASE)
self._span = re.compile(
r"(von|vom)\s+(?P<start>.+)\s+(bis)\s+(?P<stop>.+)", re.IGNORECASE)
self._range = re.compile(
r"zwischen\s+(?P<start>.+)\s+und\s+(?P<stop>.+)", re.IGNORECASE)
self._text2 = re.compile(
r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._mon_str,
re.IGNORECASE)
self._jtext2 = re.compile(
r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._jmon_str,
re.IGNORECASE)
#-------------------------------------------------------------------------
#
@@ -221,7 +294,7 @@ class DateDisplayDE(DateDisplay):
)
# this definition must agree with its "_display_gregorian" method
def _display_gregorian(self, date_val):
def _display_gregorian(self, date_val, **kwargs):
"""
display gregorian calendar date in different format
"""
+8 -8
View File
@@ -116,14 +116,14 @@ class DateParserEL(DateParser):
DateParser.init_strings(self)
_span_1 = ['από']
_span_2 = ['έως']
_range_1 = ['μετ', 'μετ\.', 'μεταξύ']
_range_1 = ['μετ', r'μετ\.', 'μεταξύ']
_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)
self._span = re.compile(
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_span_1), '|'.join(_span_2)), re.IGNORECASE)
self._range = re.compile(
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
#-------------------------------------------------------------------------
#
@@ -155,7 +155,7 @@ class DateDisplayEL(DateDisplay):
)
# this definition must agree with its "_display_gregorian" method
def _display_gregorian(self, date_val):
def _display_gregorian(self, date_val, **kwargs):
"""
display gregorian calendar date in different format
"""
+7 -7
View File
@@ -97,14 +97,14 @@ class DateParserES(DateParser):
DateParser.init_strings(self)
_span_1 = ['de']
_span_2 = ['a']
_range_1 = ['entre', 'ent\.', 'ent']
_range_1 = ['entre', r'ent\.', 'ent']
_range_2 = ['y']
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)
self._span = re.compile(
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_span_1), '|'.join(_span_2)), re.IGNORECASE)
self._range = re.compile(
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
#-------------------------------------------------------------------------
#
+5 -5
View File
@@ -98,12 +98,12 @@ class DateParserFI(DateParser):
def init_strings(self):
DateParser.init_strings(self)
self._text2 = re.compile('(\d+)?\.?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$'
% self._mon_str, re.IGNORECASE)
self._span = re.compile("(?P<start>.+)\s+(-)\s+(?P<stop>.+)",
re.IGNORECASE)
self._text2 = re.compile(r'(\d+)?\.?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$'
% self._mon_str, re.IGNORECASE)
self._span = re.compile(r"(?P<start>.+)\s+(-)\s+(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile(
"(vuosien\s*)?(?P<start>.+)\s+ja\s+(?P<stop>.+)\s+välillä",
r"(vuosien\s*)?(?P<start>.+)\s+ja\s+(?P<stop>.+)\s+välillä",
re.IGNORECASE)
#-------------------------------------------------------------------------
+42 -6
View File
@@ -79,15 +79,27 @@ class DateParserHR(DateParser):
#~ 'персидский' : Date.CAL_PERSIAN,
#~ 'п' : Date.CAL_PERSIAN,
#~ })
# match 'Day. MONTH year.' format with or without dots
self._text2 = re.compile(r'(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
% self._mon_str, re.IGNORECASE)
# match Day.Month.Year.
self._numeric = re.compile(
r"((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\.?$")
self._jtext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
% self._jmon_str, re.IGNORECASE)
_span_1 = ['od']
_span_2 = ['do']
_range_1 = ['između']
_range_2 = ['i']
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)),
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
% ('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
% ('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE)
#-------------------------------------------------------------------------
@@ -105,11 +117,35 @@ class DateDisplayHR(DateDisplay):
display = DateDisplay.display_formatted
def format_short_month_year(self, month, year, inflect, short_months):
""" Allow a subclass to modify the year, e.g. add a period """
if not hasattr(short_months[1], 'f'): # not a Lexeme: no inflection
return "{short_month} {year}.".format(
short_month = short_months[month], year = year)
return self.FORMATS_short_month_year[inflect].format(
short_month = short_months[month], year = year)
def _get_localized_year(self, year):
""" Allow a subclass to modify the year, e.g. add a period """
return year + '.'
# FIXME probably there should be a Croatian-specific "formats" (and this
# ("American comma") format (and dd_dformat03 too) should be eliminated)
def dd_dformat02(self, date_val, inflect, long_months):
""" month_name day, year """
return DateDisplay.dd_dformat02(
self, date_val, inflect, long_months).replace(' .', '')
def dd_dformat04(self, date_val, inflect, long_months):
""" day month_name year """
return DateDisplay.dd_dformat04(
self, date_val, inflect, long_months).replace(' .', '')
#-------------------------------------------------------------------------
#
# Register classes
#
#-------------------------------------------------------------------------
register_datehandler(
('hr_HR', 'hr', 'HR', 'croatian', 'Croatian', 'hrvatski', ('%d.%m.%Y',)),
('hr_HR', 'hr', 'HR', 'croatian', 'Croatian', 'hrvatski', ('%d.%m.%Y.',)),
DateParserHR, DateDisplayHR)
+10 -9
View File
@@ -228,18 +228,19 @@ class DateParserHU(DateParser):
DateParser.init_strings(self)
self._numeric = re.compile(
"((\d+)[/\.])?\s*((\d+)[/\.])?\s*(\d+)[/\. ]?$")
self._text2 = re.compile('((\d+)(/\d+)?\.)?\s+?%s\.?\s*(\d+\.)?\s*$'
% self._mon_str, re.IGNORECASE)
_span_1 = ['-tó\\)l', '-tól', '-től']
r"((\d+)[/\.])?\s*((\d+)[/\.])?\s*(\d+)[/\. ]?$")
# this next RE has the (possibly-slashed) year at the string's start
self._text2 = re.compile(r'((\d+)(/\d+)?\.)?\s+?%s\.?\s*(\d+\.)?\s*$'
% self._mon_str, re.IGNORECASE)
_span_1 = [r'-tó\\)l', '-tól', '-től']
_span_2 = ['-ig']
_range_1 = ['és']
_range_2 = ['között']
self._span = re.compile("(?P<start>.+)(%s)\s+(?P<stop>.+)(%s)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile("(?P<start>.+)\s+(%s)\s+(?P<stop>.+)\s+(%s)" %
('|'.join(_range_1), '|'.join(_range_2)),
self._span = re.compile(r"(?P<start>.+)(%s)\s+(?P<stop>.+)(%s)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile(r"(?P<start>.+)\s+(%s)\s+(?P<stop>.+)\s+(%s)"
% ('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE)
+10 -8
View File
@@ -90,22 +90,23 @@ class DateParserIs(DateParser):
}
def dhformat_changed(self):
self._dhformat_parse = re.compile(".*%(\S).*%(\S).*%(\S).*%(\S).*")
self._dhformat_parse = re.compile(r".*%(\S).*%(\S).*%(\S).*%(\S).*")
def init_strings(self):
DateParser.init_strings(self)
# match 'day. month year' format
self._text2 = re.compile('(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*$'
self._text2 = re.compile(r'(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*$'
% self._mon_str, re.IGNORECASE)
# match 'short-day day.month year' format
short_day_str = '(' + '|'.join(self._ds.short_days[1:]) + ')'
self._numeric = re.compile("%s\s*((\d+)[\.]\s*)?((\d+)\s*)?(\d+)\s*$"
self._numeric = re.compile(r"%s\s*((\d+)[\.]\s*)?((\d+)\s*)?(\d+)\s*$"
% short_day_str, re.IGNORECASE)
self._span = re.compile("(frá)?\s*(?P<start>.+)\s*(til|--|)\s*(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile("(milli)\s+(?P<start>.+)\s+og\s+(?P<stop>.+)",
re.IGNORECASE)
self._span = re.compile(
r"(frá)?\s*(?P<start>.+)\s*(til|--|)\s*(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile(
r"(milli)\s+(?P<start>.+)\s+og\s+(?P<stop>.+)", re.IGNORECASE)
#-------------------------------------------------------------------------
#
@@ -185,7 +186,8 @@ class DateDisplayIs(DateDisplay):
text, scal)
def _get_weekday(self, date_val):
if date_val[0] == 0 or date_val[1] == 0: # no day or no month or both
if (date_val[0] == 0 or date_val[1] == 0 # no day or no month or both
or date_val[2] > datetime.MAXYEAR): # bug 10815
return ''
w_day = datetime.date(date_val[2], date_val[1], date_val[0]) # y, m, d
return self.short_days[((w_day.weekday() + 1) % 7) + 1]
+5 -5
View File
@@ -96,12 +96,12 @@ class DateParserIT(DateParser):
_span_2 = ['al', 'a']
_range_1 = ['tra', 'fra']
_range_2 = ['e']
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)),
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile(
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
#-------------------------------------------------------------------------
#
+5 -5
View File
@@ -166,13 +166,13 @@ class DateParserJA(DateParser):
_span_2 = ['まで', '']
_range_1 = ['から', '', '~', '']
_range_2 = ['までの間', 'の間']
self._span = re.compile("(?P<start>.+)(%s)(?P<stop>\d+)(%s)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile("(?P<start>.+)(%s)(?P<stop>.+)(%s)" %
self._span = re.compile(r"(?P<start>.+)(%s)(?P<stop>\d+)(%s)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile(r"(?P<start>.+)(%s)(?P<stop>.+)(%s)" %
('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE)
self._numeric = re.compile("((\d+)年\s*)?((\d+)月\s*)?(\d+)?日?\s*$")
self._numeric = re.compile(r"((\d+)年\s*)?((\d+)月\s*)?(\d+)?日?\s*$")
#-------------------------------------------------------------------------
#
+11 -9
View File
@@ -130,18 +130,20 @@ class DateParserLT(DateParser):
def init_strings(self):
DateParser.init_strings(self)
self._text2 = re.compile('((\d+)(/\d+)?)?\s+?m\.\s+%s\s*(\d+)?\s*d?\.?$'
% self._mon_str, re.IGNORECASE)
# this next RE has the (possibly-slashed) year at the string's start
self._text2 = re.compile(
r'((\d+)(/\d+)?)?\s+?m\.\s+%s\s*(\d+)?\s*d?\.?$'
% self._mon_str, re.IGNORECASE)
_span_1 = ['nuo']
_span_2 = ['iki']
_range_1 = ['tarp']
_range_2 = ['ir']
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)
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile(
r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_range_1), '|'.join(_range_2)), re.IGNORECASE)
#-------------------------------------------------------------------------
#
@@ -186,7 +188,7 @@ class DateDisplayLT(DateDisplay):
"mmmm m. mėnesio diena d.", "Mėn diena, metai")
# this definition must agree with its "_display_gregorian" method
def _display_gregorian(self, date_val):
def _display_gregorian(self, date_val, **kwargs):
"""
display gregorian calendar date in different format
"""
+12 -6
View File
@@ -58,6 +58,7 @@ class DateParserNb(DateParser):
'innen' : Date.MOD_BEFORE,
'etter' : Date.MOD_AFTER,
'omkring' : Date.MOD_ABOUT,
'omtrent' : Date.MOD_ABOUT,
'ca' : Date.MOD_ABOUT
}
@@ -89,12 +90,13 @@ class DateParserNb(DateParser):
def init_strings(self):
DateParser.init_strings(self)
# match day. month year
self._numeric = re.compile("((\d+)[\.])?\s*((\d+))?\s*(\d+)$")
self._span = re.compile("(fra)?\s*(?P<start>.+)\s*(til|--|)\s*(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile("(mellom)\s+(?P<start>.+)\s+og\s+(?P<stop>.+)",
re.IGNORECASE)
self._numeric = re.compile(
r"((\d+)[/\.\s]\s*)?((\d+)[/\.\-\s]\s*)?(\d+)\s*$")
self._span = re.compile(
r"(fra)?\s*(?P<start>.+)\s*(til|--|)\s*(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile(
r"(mellom)\s+(?P<start>.+)\s+og\s+(?P<stop>.+)", re.IGNORECASE)
#-------------------------------------------------------------------------
#
@@ -173,6 +175,10 @@ class DateDisplayNb(DateDisplay):
return "%s%s%s%s" % (qual_str, self._mod_str[mod],
text, scal)
def dd_dformat01(self, date_val):
""" numerical -- for Norwegian dates """
return DateDisplay.dd_dformat01(self, date_val).lstrip()
#-------------------------------------------------------------------------
#
# Register classes
+8 -10
View File
@@ -119,16 +119,14 @@ class DateParserNL(DateParser):
def init_strings(self):
DateParser.init_strings(self)
self._span = re.compile("(van)\s+(?P<start>.+)\s+(tot)\s+(?P<stop>.+)",
self._span = re.compile(
r"(van)\s+(?P<start>.+)\s+(tot)\s+(?P<stop>.+)", re.IGNORECASE)
self._range = re.compile(r"tussen\s+(?P<start>.+)\s+en\s+(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile("tussen\s+(?P<start>.+)\s+en\s+(?P<stop>.+)",
re.IGNORECASE)
self._text2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
% self._mon_str,
re.IGNORECASE)
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
% self._jmon_str,
re.IGNORECASE)
self._text2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
% self._mon_str, re.IGNORECASE)
self._jtext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
% self._jmon_str, re.IGNORECASE)
#-------------------------------------------------------------------------
#
@@ -164,7 +162,7 @@ class DateDisplayNL(DateDisplay):
)
# this definition must agree with its "_display_gregorian" method
def _display_gregorian(self, date_val):
def _display_gregorian(self, date_val, **kwargs):
"""
display gregorian calendar date in different format
"""
+10 -7
View File
@@ -156,13 +156,16 @@ class DateParserPL(DateParser):
def init_strings(self):
DateParser.init_strings(self)
self._span = re.compile("(od)\s+(?P<start>.+)\s+(do)\s+(?P<stop>.+)", re.IGNORECASE)
self._span = re.compile(
r"(od)\s+(?P<start>.+)\s+(do)\s+(?P<stop>.+)", re.IGNORECASE)
# Also handle a common mistakes
self._range = re.compile("((?:po)?mi(?:ę|e)dzy)\s+(?P<start>.+)\s+(a)\s+(?P<stop>.+)", re.IGNORECASE)
self._text2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._mon_str,
re.IGNORECASE)
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?' % self._jmon_str,
re.IGNORECASE)
self._range = re.compile(
r"((?:po)?mi(?:ę|e)dzy)\s+(?P<start>.+)\s+(a)\s+(?P<stop>.+)",
re.IGNORECASE)
self._text2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
% self._mon_str, re.IGNORECASE)
self._jtext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
% self._jmon_str, re.IGNORECASE)
#-------------------------------------------------------------------------
#
@@ -215,7 +218,7 @@ class DateDisplayPL(DateDisplay):
"XII"
)
def _display_gregorian(self, date_val):
def _display_gregorian(self, date_val, **kwargs):
"""
display gregorian calendar date in different format
"""
+6 -6
View File
@@ -102,13 +102,13 @@ class DateParserPT(DateParser):
DateParser.init_strings(self)
_span_1 = ['de']
_span_2 = ['a']
_range_1 = ['entre','ent\.','ent']
_range_1 = ['entre', r'ent\.', 'ent']
_range_2 = ['e']
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)),
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
% ('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
% ('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE)
#-------------------------------------------------------------------------
+6 -6
View File
@@ -94,13 +94,13 @@ class DateParserRU(DateParser):
_span_1 = ['с', 'от']
#_span_2 = ['по', 'до'] # <-- clashes with bce parsing :-(
_span_2 = ['по']
_range_1 = ['между', 'меж\.', 'меж']
_range_1 = ['между', r'меж\.', 'меж']
_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)),
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
% ('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
% ('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE)
#-------------------------------------------------------------------------
+5 -5
View File
@@ -86,11 +86,11 @@ class DateParserSK(DateParser):
_span_2 = ['do']
_range_1 = ['medzi']
_range_2 = ['a']
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)),
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
% ('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
% ('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE)
#-------------------------------------------------------------------------
+8 -8
View File
@@ -88,18 +88,18 @@ class DateParserSL(DateParser):
DateParser.init_strings(self)
# match 'Day. MONTH year.' format with or without dots
self._text2 = re.compile('(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
% self._mon_str, re.IGNORECASE)
self._text2 = re.compile(r'(\d+)?\.?\s*?%s\.?\s*((\d+)(/\d+)?)?\s*\.?$'
% self._mon_str, re.IGNORECASE)
# match Day.Month.Year.
self._numeric = re.compile("((\d+)[/\.-])?\s*((\d+)[/\.-])?\s*(\d+)\.?$")
self._numeric = re.compile(
r"((\d+)[/\.-])?\s*((\d+)[/\.-])?\s*(\d+)\.?$")
self._span = re.compile("od\s+(?P<start>.+)\s+do\s+(?P<stop>.+)",
self._span = re.compile(r"od\s+(?P<start>.+)\s+do\s+(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile(
"med\s+(?P<start>.+)\s+in\s+(?P<stop>.+)",
re.IGNORECASE)
self._jtext2 = re.compile('(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'\
% self._jmon_str, re.IGNORECASE)
r"med\s+(?P<start>.+)\s+in\s+(?P<stop>.+)", re.IGNORECASE)
self._jtext2 = re.compile(r'(\d+)?.?\s+?%s\s*((\d+)(/\d+)?)?'
% self._jmon_str, re.IGNORECASE)
#-------------------------------------------------------------------------
#
+10 -9
View File
@@ -208,21 +208,22 @@ class DateParserSR(DateParser):
"""
DateParser.init_strings(self)
# match 'Day. MONTH year.' format with or without dots
self._text2 = re.compile('(\d+)?\.?\s*?%s\s*((\d+)(/\d+)?)?\.?\s*$'
% self._mon_str, re.IGNORECASE)
self._text2 = re.compile(r'(\d+)?\.?\s*?%s\s*((\d+)(/\d+)?)?\.?\s*$'
% self._mon_str, re.IGNORECASE)
# match Day.Month.Year.
self._numeric = re.compile("((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\.?$")
self._numeric = re.compile(
r"((\d+)[/\. ])?\s*((\d+)[/\.])?\s*(\d+)\.?$")
_span_1 = ['od', 'од']
_span_2 = ['do', 'до']
_range_1 = ['između', 'између']
_range_2 = ['i', 'и']
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)),
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
% ('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
% ('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE)
#-------------------------------------------------------------------------
@@ -240,7 +241,7 @@ class DateDisplaySR_Base(DateDisplay):
"VII", "VIII", "IX", "X", "XI", "XII"
)
def _display_gregorian(self, date_val):
def _display_gregorian(self, date_val, **kwargs):
"""
display gregorian calendar date in different format
"""
+64 -60
View File
@@ -95,10 +95,16 @@ class DateParserSv(DateParser):
def init_strings(self):
""" Define, in Swedish, span and range regular expressions"""
DateParser.init_strings(self)
self._span = re.compile("(från)?\s*(?P<start>.+)\s*(till|--|)\s*(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile("(mellan)\s+(?P<start>.+)\s+och\s+(?P<stop>.+)",
re.IGNORECASE)
self._numeric = re.compile(r"((\d+)/)?\s*((\d+)/)?\s*(\d+)[/ ]?$")
# this next RE has the (possibly-slashed) year at the string's start
self._text2 = re.compile(r'((\d+)(/\d+)?)?\s+?%s\s*(\d+)?\s*$'
% self._mon_str, re.IGNORECASE)
self._span = re.compile(
r"(från)?\s*(?P<start>.+)\s*(till|--|)\s*(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile(
r"(mellan)\s+(?P<start>.+)\s+och\s+(?P<stop>.+)",
re.IGNORECASE)
#-------------------------------------------------------------------------
#
@@ -109,72 +115,70 @@ class DateDisplaySv(DateDisplay):
"""
Swedish language date display class.
"""
long_months = ( "", "januari", "februari", "mars", "april", "maj",
"juni", "juli", "augusti", "september", "oktober",
"november", "december" )
short_months = ( "", "jan", "feb", "mar", "apr", "maj", "jun",
"jul", "aug", "sep", "okt", "nov", "dec" )
_bce_str = "%s f Kr"
formats = (
"ÅÅÅÅ-MM-DD (ISO)",
"År/mån/dag",
"Månad dag, år",
"MÅN DAG ÅR",
"Dag månad år",
"DAG MÅN ÅR",
"År månad dag",
"År mån dag",
)
# this must agree with DateDisplayEn's "formats" definition
# (since no locale-specific _display_gregorian exists, here)
# this definition must agree with its "_display_calendar" method
calendar = (
"",
"juliansk",
"hebreisk",
"fransk republikansk",
"persisk",
"islamisk",
"svensk"
)
def _display_calendar(self, date_val, long_months, short_months = None,
inflect=""):
# this must agree with its locale-specific "formats" definition
_mod_str = ("", "före ", "efter ", "c:a ", "", "", "")
if short_months is None:
# Let the short formats work the same as long formats
short_months = long_months
_qual_str = ("", "uppskattat ", "beräknat ")
_bce_str = "%s f Kr"
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 "%sfrån %s till %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 "%smellan %s och %s%s" % (qual_str, d1, d2,
scal)
if self.format == 0:
return self.display_iso(date_val)
elif self.format == 1:
# numerical: year/month/day (with slashes)
value = self.dd_dformat01(date_val)
elif self.format == 2:
# year month_name day
value = self.dd_dformat02_sv(date_val, long_months)
# elif self.format == 3:
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)
# year month_abbreviation day
value = self.dd_dformat03_sv(date_val, short_months)
if date_val[2] < 0:
# TODO fix BUG 7064: non-Gregorian calendars wrongly use BCE notation for negative dates
return self._bce_str % value
else:
return value
def dd_dformat02_sv(self, date_val, long_months):
# year month_name day
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
return year
else:
return "%s %s" % (year, long_months[date_val[1]])
elif date_val[1] == 0: # month is zero but day is not (see 8477)
return self.display_iso(date_val)
else:
return "%s %s %s" % (year, long_months[date_val[1]], date_val[0])
def dd_dformat03_sv(self, date_val, short_months):
# year month_abbreviation day
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
return year
else:
return "%s %s" % (year, short_months[date_val[1]])
elif date_val[1] == 0: # month is zero but day is not (see 8477)
return self.display_iso(date_val)
else:
return "%s %s %s" % (year, short_months[date_val[1]], date_val[0])
display = DateDisplay.display_formatted
#-------------------------------------------------------------------------
#
+6 -6
View File
@@ -108,14 +108,14 @@ class DateParserUK(DateParser):
_span_1 = ['з', 'від']
# b.c.e. pattern also have "до" so skip "до н."
_span_2 = ['по', 'до(?!\s+н)']
_span_2 = ['по', r'до(?!\s+н)']
_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)),
self._span = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile(r"(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)"
% ('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE)
#-------------------------------------------------------------------------
+5 -5
View File
@@ -124,13 +124,13 @@ class DateParserZH_CN(DateParser):
_span_2 = ['']
_range_1 = ['介于']
_range_2 = ['']
self._span = re.compile("(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile("(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
self._span = re.compile(r"(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile(r"(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE)
self._numeric = re.compile("((\d+)年\s*)?((\d+)月\s*)?(\d+)?日?\s*$")
self._numeric = re.compile(r"((\d+)年\s*)?((\d+)月\s*)?(\d+)?日?\s*$")
#-------------------------------------------------------------------------
#
+5 -5
View File
@@ -124,13 +124,13 @@ class DateParserZH_TW(DateParser):
_span_2 = ['']
_range_1 = ['介於']
_range_2 = ['']
self._span = re.compile("(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile("(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
self._span = re.compile(r"(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
('|'.join(_span_1), '|'.join(_span_2)),
re.IGNORECASE)
self._range = re.compile(r"(%s)(?P<start>.+)(%s)(?P<stop>\d+)" %
('|'.join(_range_1), '|'.join(_range_2)),
re.IGNORECASE)
self._numeric = re.compile("((\d+)年\s*)?((\d+)月\s*)?(\d+)?日?\s*$")
self._numeric = re.compile(r"((\d+)年\s*)?((\d+)月\s*)?(\d+)?日?\s*$")
#-------------------------------------------------------------------------
#
+31 -17
View File
@@ -4,7 +4,7 @@
#
# Copyright (C) 2004-2006 Donald N. Allingham
# Copyright (C) 2013 Vassilii Khachaturov
# Copyright (C) 2014-2017 Paul Franklin
# Copyright (C) 2014-2018 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
@@ -342,6 +342,7 @@ class DateDisplay:
for item in [scal, snewyear]:
if item:
if retval:
# TODO for Arabic, should the next comma be translated?
retval += ", "
retval += item
if retval:
@@ -569,6 +570,7 @@ class DateDisplay:
def _get_short_weekday(self, date_val):
if (date_val[0] == 0 or date_val[1] == 0 # no day or no month or both
or date_val[1] == 13 # Hebrew has 13 months
or date_val[2] > datetime.MAXYEAR # bug 10815
or date_val[2] < 0): # B.C.E. date
return ''
w_day = datetime.date(date_val[2], date_val[1], date_val[0]) # y, m, d
@@ -577,11 +579,16 @@ class DateDisplay:
def _get_long_weekday(self, date_val):
if (date_val[0] == 0 or date_val[1] == 0 # no day or no month or both
or date_val[1] == 13 # Hebrew has 13 months
or date_val[2] > datetime.MAXYEAR # bug 10815
or date_val[2] < 0): # B.C.E. date
return ''
w_day = datetime.date(date_val[2], date_val[1], date_val[0]) # y, m, d
return self.long_days[((w_day.weekday() + 1) % 7) + 1]
def _get_localized_year(self, year):
""" Allow a subclass to modify the year, e.g. add a period """
return year
def dd_dformat01(self, date_val):
"""
numerical
@@ -593,22 +600,29 @@ class DateDisplay:
return self.display_iso(date_val)
else:
if date_val[0] == date_val[1] == 0:
return str(date_val[2])
return self._get_localized_year(str(date_val[2]))
else:
value = self.dhformat.replace('%m', str(date_val[1]))
# some locales have %b for the month, e.g. ar_EG, is_IS, nb_NO
# so it would be "Jan" but as it's "numeric" I'll make it "1"
value = value.replace('%b', str(date_val[1]))
# some locales have %B for the month, e.g. ta_IN
# so it would be "January" but as it's "numeric" I'll make it 1
value = value.replace('%B', str(date_val[1]))
# some locales have %a for the abbreviated day, e.g. is_IS
value = value.replace('%a', self._get_short_weekday(date_val))
# some locales have %A for the long/full day, e.g. ta_IN
value = value.replace('%A', self._get_long_weekday(date_val))
if '%b' in value or '%B' in value:
# some locales have %b for the month (ar_EG, is_IS, nb_NO)
# so it would be "Jan" but as it's "numeric" make it "1"
value = value.replace('%b', str(date_val[1]))
# some locales have %B for the month, e.g. ta_IN
# so it would be "January" but as it's "numeric" make it 1
value = value.replace('%B', str(date_val[1]))
if '%a' in value or '%A' in value:
# some locales have %a for the abbreviated day, e.g. is_IS
value = value.replace('%a',
self._get_short_weekday(date_val))
# some locales have %A for the long/full day, e.g. ta_IN
value = value.replace('%A',
self._get_long_weekday(date_val))
if date_val[0] == 0: # ignore the zero day and its delimiter
i_day = value.find('%d')
value = value.replace(value[i_day:i_day+3], '')
if len(value) == i_day + 2: # delimiter is left of the day
value = value.replace(value[i_day-1:i_day+2], '')
else: # delimiter is to the right of the day
value = value.replace(value[i_day:i_day+3], '')
value = value.replace('%d', str(date_val[0]))
value = value.replace('%Y', str(abs(date_val[2])))
return value.replace('-', '/')
@@ -624,7 +638,7 @@ class DateDisplay:
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
return year
return self._get_localized_year(year)
else:
return self.format_long_month_year(date_val[1], year,
inflect, long_months)
@@ -650,7 +664,7 @@ class DateDisplay:
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
return year
return self._get_localized_year(year)
else:
return self.format_short_month_year(date_val[1], year,
inflect, short_months)
@@ -676,7 +690,7 @@ class DateDisplay:
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
return year
return self._get_localized_year(year)
else:
return self.format_long_month_year(date_val[1], year,
inflect, long_months)
@@ -702,7 +716,7 @@ class DateDisplay:
year = self._slash_year(date_val[2], date_val[3])
if date_val[0] == 0:
if date_val[1] == 0:
return year
return self._get_localized_year(year)
else:
return self.format_short_month_year(date_val[1], year,
inflect, short_months)
+92 -67
View File
@@ -193,7 +193,7 @@ class DateParser:
converted, the text string is assigned.
"""
_dhformat_parse = re.compile(".*%(\S).*%(\S).*%(\S).*")
_dhformat_parse = re.compile(r".*%(\S).*%(\S).*%(\S).*")
# RFC-2822 only uses capitalized English abbreviated names, no locales.
_rfc_days = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat')
@@ -423,62 +423,69 @@ class DateParser:
# bce, calendar type and quality may be either at the end or at
# the beginning of the given date string, therefore they will
# be parsed from the middle and will be in match.group(2).
self._bce_re = re.compile("(.*)\s+%s( ?.*)" % self._bce_str)
self._bce_re = re.compile(r"(.*)\s+%s( ?.*)" % self._bce_str)
self._cal = re.compile("(.*)\s+\(%s\)( ?.*)" % self._cal_str,
re.IGNORECASE)
self._calny = re.compile("(.*)\s+\(%s,\s*%s\)( ?.*)" % (self._cal_str,
self._ny_str),
re.IGNORECASE)
self._calny_iso = re.compile("(.*)\s+\(%s,\s*(\d{1,2}-\d{1,2})\)( ?.*)" % self._cal_str,
re.IGNORECASE)
self._cal = re.compile(r"(.*)\s+\(%s\)( ?.*)" % self._cal_str,
re.IGNORECASE)
self._calny = re.compile(r"(.*)\s+\(%s,\s*%s\)( ?.*)" %
(self._cal_str, self._ny_str), re.IGNORECASE)
self._calny_iso = re.compile(
r"(.*)\s+\(%s,\s*(\d{1,2}-\d{1,2})\)( ?.*)" % self._cal_str,
re.IGNORECASE)
self._ny = re.compile("(.*)\s+\(%s\)( ?.*)" % self._ny_str,
re.IGNORECASE)
self._ny_iso = re.compile("(.*)\s+\((\d{1,2}-\d{1,2})\)( ?.*)")
self._ny = re.compile(r"(.*)\s+\(%s\)( ?.*)" % self._ny_str,
re.IGNORECASE)
self._ny_iso = re.compile(r"(.*)\s+\((\d{1,2}-\d{1,2})\)( ?.*)")
self._qual = re.compile("(.* ?)%s\s+(.+)" % self._qual_str,
re.IGNORECASE)
self._qual = re.compile(r"(.* ?)%s\s+(.+)" % self._qual_str,
re.IGNORECASE)
self._span = re.compile("(from)\s+(?P<start>.+)\s+to\s+(?P<stop>.+)",
self._span = re.compile(r"(from)\s+(?P<start>.+)\s+to\s+(?P<stop>.+)",
re.IGNORECASE)
self._range = re.compile(
r"(bet|bet.|between)\s+(?P<start>.+)\s+and\s+(?P<stop>.+)",
re.IGNORECASE)
self._modifier = re.compile(r'%s\s+(.*)' % self._mod_str,
re.IGNORECASE)
self._range = re.compile("(bet|bet.|between)\s+(?P<start>.+)\s+and\s+(?P<stop>.+)",
re.IGNORECASE)
self._modifier = re.compile('%s\s+(.*)' % self._mod_str,
re.IGNORECASE)
self._modifier_after = re.compile('(.*)\s+%s' % self._mod_after_str,
self._modifier_after = re.compile(r'(.*)\s+%s' % self._mod_after_str,
re.IGNORECASE)
self._abt2 = re.compile('<(.*)>', re.IGNORECASE)
self._text = re.compile('%s\.?\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._mon_str,
re.IGNORECASE)
self._text2 = re.compile('(\d+)?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$' % self._mon_str,
re.IGNORECASE)
self._jtext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._jmon_str,
re.IGNORECASE)
self._jtext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._jmon_str,
re.IGNORECASE)
self._ftext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._fmon_str,
re.IGNORECASE)
self._ftext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._fmon_str,
re.IGNORECASE)
self._ptext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._pmon_str,
re.IGNORECASE)
self._ptext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._pmon_str,
re.IGNORECASE)
self._itext = re.compile('%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._imon_str,
re.IGNORECASE)
self._itext2 = re.compile('(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$' % self._imon_str,
re.IGNORECASE)
self._stext = re.compile('%s\.?\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$' % self._smon_str,
re.IGNORECASE)
self._stext2 = re.compile('(\d+)?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$' % self._smon_str,
re.IGNORECASE)
self._numeric = re.compile("((\d+)[/\.]\s*)?((\d+)[/\.]\s*)?(\d+)\s*$")
self._iso = re.compile("(\d+)(/(\d+))?-(\d+)-(\d+)\s*$")
self._isotimestamp = re.compile("^\s*?(\d{4})([01]\d)([0123]\d)(?:(?:[012]\d[0-5]\d[0-5]\d)|(?:\s+[012]\d:[0-5]\d(?::[0-5]\d)?))?\s*?$")
self._rfc = re.compile("(%s,)?\s+(\d|\d\d)\s+%s\s+(\d+)\s+\d\d:\d\d(:\d\d)?\s+(\+|-)\d\d\d\d"
% (self._rfc_day_str, self._rfc_mon_str))
self._today = re.compile("^\s*%s\s*$" % self._today_str, re.IGNORECASE)
self._abt2 = re.compile('<(.*)>', re.IGNORECASE)
self._text = re.compile(r'%s\.?(\s+\d+)?\s*,?\s+((\d+)(/\d+)?)?\s*$'
% self._mon_str, re.IGNORECASE)
# this next RE has the (possibly-slashed) year at the string's end
self._text2 = re.compile(r'(\d+)?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$'
% self._mon_str, re.IGNORECASE)
self._jtext = re.compile(r'%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$'
% self._jmon_str, re.IGNORECASE)
self._jtext2 = re.compile(r'(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$'
% self._jmon_str, re.IGNORECASE)
self._ftext = re.compile(r'%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$'
% self._fmon_str, re.IGNORECASE)
self._ftext2 = re.compile(r'(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$'
% self._fmon_str, re.IGNORECASE)
self._ptext = re.compile(r'%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$'
% self._pmon_str, re.IGNORECASE)
self._ptext2 = re.compile(r'(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$'
% self._pmon_str, re.IGNORECASE)
self._itext = re.compile(r'%s\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$'
% self._imon_str, re.IGNORECASE)
self._itext2 = re.compile(r'(\d+)?\s+?%s\s*((\d+)(/\d+)?)?\s*$'
% self._imon_str, re.IGNORECASE)
self._stext = re.compile(r'%s\.?\s+(\d+)?\s*,?\s*((\d+)(/\d+)?)?\s*$'
% self._smon_str, re.IGNORECASE)
self._stext2 = re.compile(r'(\d+)?\s+?%s\.?\s*((\d+)(/\d+)?)?\s*$'
% self._smon_str, re.IGNORECASE)
self._numeric = re.compile(
r"((\d+)[/\.]\s*)?((\d+)[/\.]\s*)?(\d+)\s*$")
self._iso = re.compile(r"(\d+)(/(\d+))?-(\d+)-(\d+)\s*$")
self._isotimestamp = re.compile(
r"^\s*?(\d{4})([01]\d)([0123]\d)(?:(?:[012]\d[0-5]\d[0-5]\d)|"
r"(?:\s+[012]\d:[0-5]\d(?::[0-5]\d)?))?\s*?$")
self._rfc = re.compile(
r"(%s,)?\s+(\d|\d\d)\s+%s\s+(\d+)\s+\d\d:\d\d(:\d\d)?\s+"
r"(\+|-)\d\d\d\d" % (self._rfc_day_str, self._rfc_mon_str))
self._today = re.compile(r"^\s*%s\s*$" % self._today_str,
re.IGNORECASE)
def _get_int(self, val):
"""
@@ -521,7 +528,7 @@ class DateParser:
def _parse_calendar(self, text, regex1, regex2, mmap, check=None):
match = regex1.match(text.lower())
if match:
if match: # user typed in 'month-name day year' or 'month-name year'
groups = match.groups()
if groups[0] is None:
m = 0
@@ -534,19 +541,21 @@ class DateParser:
s = False
else:
d = self._get_int(groups[1])
if groups[4] is not None: # slash year "/80"
if groups[4] is not None:
y = int(groups[3]) + 1 # fullyear + 1
s = True
else: # regular, non-slash date
s = True # slash year
else: # regular year
y = int(groups[3])
s = False
value = (d, m, y, s)
if check and not check((d, m, y)):
if s and julian_valid(value): # slash year
pass
elif check and not check((d, m, y)):
value = Date.EMPTY
return value
match = regex2.match(text.lower())
if match:
if match: # user typed in day month-name year or year month-name day
groups = match.groups()
if self.ymd:
if groups[3] is None:
@@ -558,10 +567,10 @@ class DateParser:
y = None
s = False
else:
if groups[2] is not None: # slash year digit
if groups[2] is not None:
y = int(groups[1]) + 1 # fullyear + 1
s = True
else: # regular, non-slash year
s = True # slash year
else: # regular year
y = int(groups[1])
s = False
else:
@@ -574,10 +583,10 @@ class DateParser:
y = None
s = False
else:
if groups[4] is not None: # slash year digit
if groups[4] is not None:
y = int(groups[3]) + 1 # fullyear + 1
s = True
else: # regular, non-slash year
s = True # slash year
else: # regular year
y = int(groups[3])
s = False
value = (d, m, y, s)
@@ -618,8 +627,8 @@ class DateParser:
y = self._get_int(groups[0])
m = self._get_int(groups[3])
d = self._get_int(groups[4])
if groups[2] and julian_valid((d, m, y + 1)): # slash year digit
return (d, m, y + 1, True)
if groups[2] and julian_valid((d, m, y + 1)):
return (d, m, y + 1, True) # slash year
if check is None or check((d, m, y)):
return (d, m, y, False)
return Date.EMPTY
@@ -669,6 +678,15 @@ class DateParser:
y = self._get_int(groups[1])
m = self._get_int(groups[3])
d = self._get_int(groups[4])
if m > 12: # maybe a slash year, not a month (1722/3 is March)
if y % 100 == 99:
modyear = (y + 1) % 1000
elif y % 10 == 9:
modyear = (y + 1) % 100
else:
modyear = (y + 1) % 10
if m == modyear:
return (0, 0, y + 1, True) # slash year
else:
y = self._get_int(groups[4])
if self.dmy:
@@ -681,6 +699,15 @@ class DateParser:
else:
m = self._get_int(groups[1])
d = self._get_int(groups[3])
if m > 12: # maybe a slash year, not a month
if m % 100 == 99:
modyear = (m + 1) % 1000
elif m % 10 == 9:
modyear = (m + 1) % 100
else:
modyear = (m + 1) % 10
if y == modyear:
return (0, 0, m + 1, True) # slash year
value = (d, m, y, False)
if check and not check((d, m, y)):
value = Date.EMPTY
@@ -906,8 +933,6 @@ class DateParser:
if subdate == Date.EMPTY and text != "":
date.set_as_text(text)
return
#else:
# print 'valid subdate', text, subdate
except:
date.set_as_text(text)
return
+79 -38
View File
@@ -605,12 +605,15 @@ class DbReadBase:
"""
raise NotImplementedError
def get_citation_handles(self, sort_handles=False):
def get_citation_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Citation in
the database.
If sort_handles is True, the list is sorted by Citation title.
:param sort_handles: If True, the list is sorted by Citation title.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
"""
raise NotImplementedError
@@ -624,24 +627,30 @@ class DbReadBase:
"""
raise NotImplementedError
def get_family_handles(self, sort_handles=False):
def get_family_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Family in
the database.
If sort_handles is True, the list is sorted by surnames.
:param sort_handles: If True, the list is sorted by surnames.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
.. warning:: For speed the keys are directly returned, so handles are
bytes type
"""
raise NotImplementedError
def get_media_handles(self, sort_handles=False):
def get_media_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Media in
the database.
If sort_handles is True, the list is sorted by title.
:param sort_handles: If True, the list is sorted by title.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
.. warning:: For speed the keys are directly returned, so handles are
bytes type
@@ -658,24 +667,30 @@ class DbReadBase:
"""
raise NotImplementedError
def get_person_handles(self, sort_handles=False):
def get_person_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Person in
the database.
If sort_handles is True, the list is sorted by surnames.
:param sort_handles: If True, the list is sorted by surnames.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
.. warning:: For speed the keys are directly returned, so handles are
bytes type
"""
raise NotImplementedError
def get_place_handles(self, sort_handles=False):
def get_place_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Place in
the database.
If sort_handles is True, the list is sorted by Place title.
:param sort_handles: If True, the list is sorted by Place title.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
.. warning:: For speed the keys are directly returned, so handles are
bytes type
@@ -692,24 +707,30 @@ class DbReadBase:
"""
raise NotImplementedError
def get_source_handles(self, sort_handles=False):
def get_source_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Source in
the database.
If sort_handles is True, the list is sorted by Source title.
:param sort_handles: If True, the list is sorted by Source title.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
.. warning:: For speed the keys are directly returned, so handles are
bytes type
"""
raise NotImplementedError
def get_tag_handles(self, sort_handles=False):
def get_tag_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Tag in
the database.
If sort_handles is True, the list is sorted by Tag name.
:param sort_handles: If True, the list is sorted by Tag name.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
.. warning:: For speed the keys are directly returned, so handles are
bytes type
@@ -826,12 +847,6 @@ class DbReadBase:
"""
raise NotImplementedError
def get_gramps_ids(self, obj_key):
"""
Returns all the keys from a table given a table name
"""
raise NotImplementedError
def get_mediapath(self):
"""
Return the default media path of the database.
@@ -1003,12 +1018,6 @@ class DbReadBase:
"""
raise NotImplementedError
def has_gramps_id(self, obj_key, gramps_id):
"""
Returns True if the key exists in table given a table name
"""
raise NotImplementedError
def has_citation_gramps_id(self, gramps_id):
"""
Return True if the Gramps ID exists in the Citation table.
@@ -1395,12 +1404,6 @@ class DbReadBase:
"""
raise NotImplementedError
def set_save_path(self, path):
"""
Set the save path for the database.
"""
raise NotImplementedError
def get_dbid(self):
"""
A unique ID for this database on this computer.
@@ -1413,6 +1416,50 @@ class DbReadBase:
"""
raise NotImplementedError
def get_summary(self):
"""
Returns dictionary of summary item.
Should include, if possible:
_("Number of people")
_("Version")
_("Data version")
"""
raise NotImplementedError
def requires_login(self):
"""
Returns True for backends that require a login dialog, else False.
"""
return False
def method(self, fmt, *args):
"""
Convenience function to return database methods.
:param fmt: Method format string.
:type fmt: str
:param args: Substitutions arguments.
:type args: str
:returns: Returns a database method or None.
:rtype: method
Examples::
db.method('get_%s_from_handle, 'Person')
Returns the get_person_from_handle method.
db.method('get_%s_from_%s, 'Event', 'gramps_id')
Returns the get_event_from_gramps_id method.
db.method('get_%s_handles, 'Attribute')
Returns None. Attribute is not a primary object.
.. warning:: Formats 'iter_%s' and 'get_number_of_%s' are not yet
implemented.
"""
return getattr(self, fmt % tuple([arg.lower() for arg in args]), None)
class DbWriteBase(DbReadBase):
"""
@@ -1750,12 +1797,6 @@ class DbWriteBase(DbReadBase):
"""
raise NotImplementedError
def write_version(self, name):
"""
Write version number for a newly created DB.
"""
raise NotImplementedError
def add_child_to_family(self, family, child,
mrel=ChildRefType(),
frel=ChildRefType(),
+38 -40
View File
@@ -68,6 +68,7 @@ from .dbconst import DBLOGNAME
from ..errors import HandleError
from ..utils.callback import Callback
from ..lib import Researcher
from ..const import GRAMPS_LOCALE as glocale
LOG = logging.getLogger(DBLOGNAME)
@@ -215,8 +216,9 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
"""
Create a new DummyDb instance.
"""
DbReadBase.__init__(self)
Callback.__init__(self)
self.basedb = None
self.__feature = {} # {"feature": VALUE, ...}
self.db_is_open = False
self.readonly = True
self.name_formats = []
@@ -531,12 +533,15 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
LOG.warning("handle %s does not exist in the dummy database", handle)
raise HandleError('Handle %s not found' % handle)
def get_family_handles(self, sort_handles=False):
def get_family_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Family in
the database.
If sort_handles is True, the list is sorted by surnames.
:param sort_handles: If True, the list is sorted by surnames.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
"""
if not self.db_is_open:
LOG.warning("database is closed")
@@ -551,14 +556,6 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
LOG.warning("database is closed")
return []
def get_gramps_ids(self, obj_key):
"""
Returns all the keys from a table given a table name
"""
if not self.db_is_open:
LOG.warning("database is closed")
return []
def get_media_attribute_types(self):
"""
Return a list of all Attribute types associated with Media and MediaRef
@@ -584,12 +581,15 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
LOG.warning("database is closed")
return []
def get_media_handles(self, sort_handles=False):
def get_media_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Media in
the database.
If sort_handles is True, the list is sorted by title.
:param sort_handles: If True, the list is sorted by title.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
"""
if not self.db_is_open:
LOG.warning("database is closed")
@@ -834,12 +834,15 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
LOG.warning("handle %s does not exist in the dummy database", handle)
raise HandleError('Handle %s not found' % handle)
def get_person_handles(self, sort_handles=False):
def get_person_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Person in
the database.
If sort_handles is True, the list is sorted by surnames.
:param sort_handles: If True, the list is sorted by surnames.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
"""
if not self.db_is_open:
LOG.warning("database is closed")
@@ -892,12 +895,15 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
LOG.warning("handle %s does not exist in the dummy database", handle)
raise HandleError('Handle %s not found' % handle)
def get_place_handles(self, sort_handles=False):
def get_place_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Place in
the database.
If sort_handles is True, the list is sorted by Place title.
:param sort_handles: If True, the list is sorted by Place title.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
"""
if not self.db_is_open:
LOG.warning("database is closed")
@@ -1102,12 +1108,15 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
LOG.warning("handle %s does not exist in the dummy database", handle)
raise HandleError('Handle %s not found' % handle)
def get_source_handles(self, sort_handles=False):
def get_source_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Source in
the database.
If sort_handles is True, the list is sorted by Source title.
:param sort_handles: If True, the list is sorted by Source title.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
"""
if not self.db_is_open:
LOG.warning("database is closed")
@@ -1160,12 +1169,15 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
LOG.warning("handle %s does not exist in the dummy database", handle)
raise HandleError('Handle %s not found' % handle)
def get_citation_handles(self, sort_handles=False):
def get_citation_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Citation in
the database.
If sort_handles is True, the list is sorted by Citation title.
:param sort_handles: If True, the list is sorted by Citation title.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
"""
if not self.db_is_open:
LOG.warning("database is closed")
@@ -1209,12 +1221,15 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
LOG.warning("tag name %s does not exist in the dummy database", val)
return None
def get_tag_handles(self, sort_handles=False):
def get_tag_handles(self, sort_handles=False, locale=glocale):
"""
Return a list of database handles, one handle for each Tag in
the database.
If sort_handles is True, the list is sorted by Tag name.
:param sort_handles: If True, the list is sorted by Tag name.
:type sort_handles: bool
:param locale: The locale to use for collation.
:type locale: A GrampsLocale object.
"""
if not self.db_is_open:
LOG.warning("database is closed")
@@ -1254,16 +1269,6 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
LOG.warning("database is closed")
return False
def has_gramps_id(self, obj_key, gramps_id):
"""
Returns True if the key exists in table given a table name
Not used in current codebase
"""
if not self.db_is_open:
LOG.warning("database is closed")
return False
def has_name_group_key(self, name):
"""
Return if a key exists in the name_group table.
@@ -1626,13 +1631,6 @@ class DummyDb(M_A_M_B("NewBaseClass", (DbReadBase, Callback, object,), {})):
if not self.db_is_open:
LOG.warning("database is closed")
def set_save_path(self, path):
"""
Set the save path for the database.
"""
if not self.db_is_open:
LOG.warning("database is closed")
def get_dbid(self):
"""
A unique ID for this database on this computer.
+17
View File
@@ -343,6 +343,23 @@ class PythonUpgradeRequiredError(Exception):
'db_python_version': self.db_python_version,
'current_python_version': self.current_python_version }
class DbConnectionError(Exception):
"""
Error used to report that a database connection failed.
"""
def __init__(self, msg, settings_file):
Exception.__init__(self)
self.msg = msg
self.settings_file = settings_file
def __str__(self):
return _('Database connection failed.\n\n'
'%(message)s\n'
'Please check your connection settings file:\n'
'%(settings_file)s') % {
'message': self.msg,
'settings_file': self.settings_file}
if __name__ == "__main__":
"""
Call this from the CLI (in order to find the imported modules):
+148 -181
View File
@@ -42,14 +42,15 @@ import glob
#
#------------------------------------------------------------------------
from . import (DbReadBase, DbWriteBase, DbUndo, DBLOGNAME, DBUNDOFN,
KEY_TO_CLASS_MAP, REFERENCE_KEY, PERSON_KEY, FAMILY_KEY,
REFERENCE_KEY, PERSON_KEY, FAMILY_KEY,
CITATION_KEY, SOURCE_KEY, EVENT_KEY, MEDIA_KEY, PLACE_KEY,
REPOSITORY_KEY, NOTE_KEY, TAG_KEY)
REPOSITORY_KEY, NOTE_KEY, TAG_KEY, TXNADD, TXNUPD, TXNDEL,
KEY_TO_NAME_MAP, DBMODE_R, DBMODE_W)
from .utils import write_lock_file, clear_lock_file
from ..errors import HandleError
from ..utils.callback import Callback
from ..updatecallback import UpdateCallback
from .bookmarks import DbBookmarks
from . import exceptions
from ..utils.id import create_id
from ..lib.researcher import Researcher
@@ -132,6 +133,8 @@ class DbGenericUndo(DbUndo):
transaction = txn
db = self.db
subitems = transaction.get_recnos()
# sigs[obj_type][trans_type]
sigs = [[[] for trans_type in range(3)] for key in range(11)]
# Process all records in the transaction
try:
@@ -141,17 +144,13 @@ class DbGenericUndo(DbUndo):
pickle.loads(self.undodb[record_id])
if key == REFERENCE_KEY:
self.undo_reference(new_data, handle)
self.db.undo_reference(new_data, handle)
else:
self.undo_data(new_data, handle, key)
self.db.undo_data(new_data, handle, key)
sigs[key][trans_type].append(handle)
# now emit the signals
for record_id in subitems:
(key, trans_type, handle, old_data, new_data) = \
pickle.loads(self.undodb[record_id])
self.undo_sigs(sigs, False)
if key != REFERENCE_KEY:
self.undo_signals(new_data, handle, key,
db.emit, SIGBASE[key])
self.db._txn_commit()
except:
self.db._txn_abort()
@@ -183,6 +182,8 @@ class DbGenericUndo(DbUndo):
transaction = txn
db = self.db
subitems = transaction.get_recnos(reverse=True)
# sigs[obj_type][trans_type]
sigs = [[[] for trans_type in range(3)] for key in range(11)]
# Process all records in the transaction
try:
@@ -192,17 +193,13 @@ class DbGenericUndo(DbUndo):
pickle.loads(self.undodb[record_id])
if key == REFERENCE_KEY:
self.undo_reference(old_data, handle)
self.db.undo_reference(old_data, handle)
else:
self.undo_data(old_data, handle, key)
self.db.undo_data(old_data, handle, key)
sigs[key][trans_type].append(handle)
# now emit the signals
for record_id in subitems:
(key, trans_type, handle, old_data, new_data) = \
pickle.loads(self.undodb[record_id])
self.undo_sigs(sigs, True)
if key != REFERENCE_KEY:
self.undo_signals(old_data, handle, key,
db.emit, SIGBASE[key])
self.db._txn_commit()
except:
self.db._txn_abort()
@@ -224,53 +221,34 @@ class DbGenericUndo(DbUndo):
db.undo_history_callback()
return True
def undo_reference(self, data, handle):
def undo_sigs(self, sigs, undo):
"""
Helper method to undo a reference map entry
Helper method to undo/redo the signals for changes made
We want to do deletes and adds first
Note that if 'undo' we swap emits
"""
if data is None:
sql = ("DELETE FROM reference " +
"WHERE obj_handle = ? AND ref_handle = ?")
self.db.dbapi.execute(sql, [handle[0], handle[1]])
else:
sql = ("INSERT INTO reference " +
"(obj_handle, obj_class, ref_handle, ref_class) " +
"VALUES(?, ?, ?, ?)")
self.db.dbapi.execute(sql, data)
def undo_data(self, data, handle, obj_key):
"""
Helper method to undo/redo the changes made
"""
cls = KEY_TO_CLASS_MAP[obj_key]
table = cls.lower()
if data is None:
sql = "DELETE FROM %s WHERE handle = ?" % table
self.db.dbapi.execute(sql, [handle])
else:
if self.db.has_handle(obj_key, handle):
sql = "UPDATE %s SET blob_data = ? WHERE handle = ?" % table
self.db.dbapi.execute(sql, [pickle.dumps(data), handle])
else:
sql = "INSERT INTO %s (handle, blob_data) VALUES (?, ?)" % table
self.db.dbapi.execute(sql, [handle, pickle.dumps(data)])
obj = self.db._get_table_func(cls)["class_func"].create(data)
self.db._update_secondary_values(obj)
def undo_signals(self, data, handle, obj_key, emit, signal_root):
"""
Helper method to undo/redo the changes made
"""
cls = KEY_TO_CLASS_MAP[obj_key]
table = cls.lower()
if data is None:
emit(signal_root + '-delete', ([handle],))
else:
if self.db.has_handle(obj_key, handle):
signal = signal_root + '-update'
else:
signal = signal_root + '-add'
emit(signal, ([handle],))
for trans_type in [TXNDEL, TXNADD, TXNUPD]:
for obj_type in range(11):
handles = sigs[obj_type][trans_type]
if handles:
if not undo and trans_type == TXNDEL \
or undo and trans_type == TXNADD:
typ = '-delete'
else:
# don't update a handle if its been deleted, and note
# that 'deleted' handles are in the 'add' list if we
# are undoing
handles = [handle for handle in handles
if handle not in
sigs[obj_type][TXNADD if undo else TXNDEL]]
if ((not undo) and trans_type == TXNADD) \
or (undo and trans_type == TXNDEL):
typ = '-add'
else: # TXNUPD
typ = '-update'
if handles:
self.db.emit(KEY_TO_NAME_MAP[obj_type] + typ,
(handles,))
class Cursor:
def __init__(self, iterator):
@@ -518,7 +496,6 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
"del_func": self.remove_tag,
}
}
self.set_save_path(directory)
self.readonly = False
self.db_is_open = False
self.name_formats = []
@@ -566,29 +543,58 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
if directory:
self.load(directory)
def _initialize(self, directory):
def _initialize(self, directory, username, password):
"""
Initialize database backend.
"""
raise NotImplementedError
def load(self, directory, callback=None, mode=None,
def __check_readonly(self, name):
"""
Return True if we don't have read/write access to the database,
otherwise return False (that is, we DO have read/write access)
"""
# In-memory databases always allow write access.
if name == ':memory:':
return False
# See if we write to the target directory at all?
if not os.access(name, os.W_OK):
return True
# See if we lack write access to the database file
path = os.path.join(name, 'sqlite.db')
if os.path.isfile(path) and not os.access(path, os.W_OK):
return True
# All tests passed. Inform caller that we are NOT read only
return False
def load(self, directory, callback=None, mode=DBMODE_W,
force_schema_upgrade=False,
force_bsddb_upgrade=False,
force_bsddb_downgrade=False,
force_python_upgrade=False,
update=True):
update=True,
username=None,
password=None):
"""
If update is False: then don't update any files
"""
db_schema_version = self.get_schema_version(directory)
current_schema_version = self.VERSION[0]
if db_schema_version != current_schema_version:
raise exceptions.DbVersionError(str(db_schema_version),
str(current_schema_version),
str(current_schema_version))
if self.__check_readonly(directory):
mode = DBMODE_R
self.readonly = mode == DBMODE_R
if not self.readonly and directory != ':memory:':
write_lock_file(directory)
# run backend-specific code:
self._initialize(directory)
self._initialize(directory, username, password)
if not self._schema_exists():
self._create_schema()
self._set_metadata('version', str(self.VERSION[0]))
# Load metadata
self.name_formats = self._get_metadata('name_formats')
@@ -627,7 +633,8 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
# surname list
self.surname_list = self.get_surname_list()
self.set_save_path(directory)
self._set_save_path(directory)
if self._directory:
self.undolog = os.path.join(self._directory, DBUNDOFN)
else:
@@ -663,8 +670,8 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
Close the database.
if update is False, don't change access times, etc.
"""
if self._directory:
if update:
if self._directory != ":memory:":
if update and not self.readonly:
# This is just a dummy file to indicate last modified time of
# the database for gramps.cli.clidbman:
filename = os.path.join(self._directory, "meta_data.db")
@@ -723,6 +730,12 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
self._set_metadata('nmap_index', self.nmap_index)
self._close()
try:
clear_lock_file(self.get_save_path())
except IOError:
pass
self.db_is_open = False
self._directory = None
@@ -754,13 +767,6 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
"""Return True when the file has a supported version."""
return True
def get_schema_version(self, directory=None):
"""
Get the version of the schema that the database was created
under. Assumes 18, if not found.
"""
raise NotImplementedError
def _get_table_func(self, table=None, func=None):
"""
Private implementation of get_table_func.
@@ -774,45 +780,6 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
else:
return None
def get_table_names(self):
"""Return a list of valid table names."""
return list(self._get_table_func())
def get_table_metadata(self, table_name):
"""Return the metadata for a valid table name."""
if table_name in self._get_table_func():
return self._get_table_func(table_name)
return None
def get_from_name_and_handle(self, table_name, handle):
"""
Returns a gen.lib object (or None) given table_name and
handle.
Examples:
>>> self.get_from_name_and_handle("Person", "a7ad62365bc652387008")
>>> self.get_from_name_and_handle("Media", "c3434653675bcd736f23")
"""
if table_name in self._get_table_func() and handle:
return self._get_table_func(table_name, "handle_func")(handle)
return None
def get_from_name_and_gramps_id(self, table_name, gramps_id):
"""
Returns a gen.lib object (or None) given table_name and
Gramps ID.
Examples:
>>> self.get_from_name_and_gramps_id("Person", "I00002")
>>> self.get_from_name_and_gramps_id("Family", "F056")
>>> self.get_from_name_and_gramps_id("Media", "M00012")
"""
if table_name in self._get_table_func():
return self._get_table_func(table_name, "gramps_id_func")(gramps_id)
return None
def _txn_begin(self):
"""
Lowlevel interface to the backend transaction.
@@ -1034,7 +1001,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
Helper function for find_next_<object>_gramps_id methods
"""
index = prefix % map_index
while self.has_gramps_id(obj_key, index):
while self._has_gramps_id(obj_key, index):
map_index += 1
index = prefix % map_index
map_index += 1
@@ -1136,7 +1103,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
#
################################################################
def get_number_of(self, obj_key):
def _get_number_of(self, obj_key):
"""
Return the number of objects currently in the database.
"""
@@ -1146,61 +1113,61 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
"""
Return the number of people currently in the database.
"""
return self.get_number_of(PERSON_KEY)
return self._get_number_of(PERSON_KEY)
def get_number_of_events(self):
"""
Return the number of events currently in the database.
"""
return self.get_number_of(EVENT_KEY)
return self._get_number_of(EVENT_KEY)
def get_number_of_places(self):
"""
Return the number of places currently in the database.
"""
return self.get_number_of(PLACE_KEY)
return self._get_number_of(PLACE_KEY)
def get_number_of_tags(self):
"""
Return the number of tags currently in the database.
"""
return self.get_number_of(TAG_KEY)
return self._get_number_of(TAG_KEY)
def get_number_of_families(self):
"""
Return the number of families currently in the database.
"""
return self.get_number_of(FAMILY_KEY)
return self._get_number_of(FAMILY_KEY)
def get_number_of_notes(self):
"""
Return the number of notes currently in the database.
"""
return self.get_number_of(NOTE_KEY)
return self._get_number_of(NOTE_KEY)
def get_number_of_citations(self):
"""
Return the number of citations currently in the database.
"""
return self.get_number_of(CITATION_KEY)
return self._get_number_of(CITATION_KEY)
def get_number_of_sources(self):
"""
Return the number of sources currently in the database.
"""
return self.get_number_of(SOURCE_KEY)
return self._get_number_of(SOURCE_KEY)
def get_number_of_media(self):
"""
Return the number of media objects currently in the database.
"""
return self.get_number_of(MEDIA_KEY)
return self._get_number_of(MEDIA_KEY)
def get_number_of_repositories(self):
"""
Return the number of source repositories currently in the database.
"""
return self.get_number_of(REPOSITORY_KEY)
return self._get_number_of(REPOSITORY_KEY)
################################################################
#
@@ -1208,7 +1175,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
#
################################################################
def get_gramps_ids(self, obj_key):
def _get_gramps_ids(self, obj_key):
"""
Return a list of Gramps IDs, one ID for each object in the
database.
@@ -1220,63 +1187,63 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
Return a list of Gramps IDs, one ID for each Person in the
database.
"""
return self.get_gramps_ids(PERSON_KEY)
return self._get_gramps_ids(PERSON_KEY)
def get_family_gramps_ids(self):
"""
Return a list of Gramps IDs, one ID for each Family in the
database.
"""
return self.get_gramps_ids(FAMILY_KEY)
return self._get_gramps_ids(FAMILY_KEY)
def get_source_gramps_ids(self):
"""
Return a list of Gramps IDs, one ID for each Source in the
database.
"""
return self.get_gramps_ids(SOURCE_KEY)
return self._get_gramps_ids(SOURCE_KEY)
def get_citation_gramps_ids(self):
"""
Return a list of Gramps IDs, one ID for each Citation in the
database.
"""
return self.get_gramps_ids(CITATION_KEY)
return self._get_gramps_ids(CITATION_KEY)
def get_event_gramps_ids(self):
"""
Return a list of Gramps IDs, one ID for each Event in the
database.
"""
return self.get_gramps_ids(EVENT_KEY)
return self._get_gramps_ids(EVENT_KEY)
def get_media_gramps_ids(self):
"""
Return a list of Gramps IDs, one ID for each Media in the
database.
"""
return self.get_gramps_ids(MEDIA_KEY)
return self._get_gramps_ids(MEDIA_KEY)
def get_place_gramps_ids(self):
"""
Return a list of Gramps IDs, one ID for each Place in the
database.
"""
return self.get_gramps_ids(PLACE_KEY)
return self._get_gramps_ids(PLACE_KEY)
def get_repository_gramps_ids(self):
"""
Return a list of Gramps IDs, one ID for each Repository in the
database.
"""
return self.get_gramps_ids(REPOSITORY_KEY)
return self._get_gramps_ids(REPOSITORY_KEY)
def get_note_gramps_ids(self):
"""
Return a list of Gramps IDs, one ID for each Note in the
database.
"""
return self.get_gramps_ids(NOTE_KEY)
return self._get_gramps_ids(NOTE_KEY)
################################################################
#
@@ -1289,7 +1256,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
raise HandleError('Handle is None')
if not handle:
raise HandleError('Handle is empty')
data = self.get_raw_data(obj_key, handle)
data = self._get_raw_data(obj_key, handle)
if data:
return obj_class.create(data)
else:
@@ -1373,41 +1340,41 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
#
################################################################
def has_handle(self, obj_key, handle):
def _has_handle(self, obj_key, handle):
"""
Return True if the handle exists in the database.
"""
raise NotImplementedError
def has_person_handle(self, handle):
return self.has_handle(PERSON_KEY, handle)
return self._has_handle(PERSON_KEY, handle)
def has_family_handle(self, handle):
return self.has_handle(FAMILY_KEY, handle)
return self._has_handle(FAMILY_KEY, handle)
def has_source_handle(self, handle):
return self.has_handle(SOURCE_KEY, handle)
return self._has_handle(SOURCE_KEY, handle)
def has_citation_handle(self, handle):
return self.has_handle(CITATION_KEY, handle)
return self._has_handle(CITATION_KEY, handle)
def has_event_handle(self, handle):
return self.has_handle(EVENT_KEY, handle)
return self._has_handle(EVENT_KEY, handle)
def has_media_handle(self, handle):
return self.has_handle(MEDIA_KEY, handle)
return self._has_handle(MEDIA_KEY, handle)
def has_place_handle(self, handle):
return self.has_handle(PLACE_KEY, handle)
return self._has_handle(PLACE_KEY, handle)
def has_repository_handle(self, handle):
return self.has_handle(REPOSITORY_KEY, handle)
return self._has_handle(REPOSITORY_KEY, handle)
def has_note_handle(self, handle):
return self.has_handle(NOTE_KEY, handle)
return self._has_handle(NOTE_KEY, handle)
def has_tag_handle(self, handle):
return self.has_handle(TAG_KEY, handle)
return self._has_handle(TAG_KEY, handle)
################################################################
#
@@ -1415,35 +1382,35 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
#
################################################################
def has_gramps_id(self, obj_key, gramps_id):
def _has_gramps_id(self, obj_key, gramps_id):
raise NotImplementedError
def has_person_gramps_id(self, gramps_id):
return self.has_gramps_id(PERSON_KEY, gramps_id)
return self._has_gramps_id(PERSON_KEY, gramps_id)
def has_family_gramps_id(self, gramps_id):
return self.has_gramps_id(FAMILY_KEY, gramps_id)
return self._has_gramps_id(FAMILY_KEY, gramps_id)
def has_source_gramps_id(self, gramps_id):
return self.has_gramps_id(SOURCE_KEY, gramps_id)
return self._has_gramps_id(SOURCE_KEY, gramps_id)
def has_citation_gramps_id(self, gramps_id):
return self.has_gramps_id(CITATION_KEY, gramps_id)
return self._has_gramps_id(CITATION_KEY, gramps_id)
def has_event_gramps_id(self, gramps_id):
return self.has_gramps_id(EVENT_KEY, gramps_id)
return self._has_gramps_id(EVENT_KEY, gramps_id)
def has_media_gramps_id(self, gramps_id):
return self.has_gramps_id(MEDIA_KEY, gramps_id)
return self._has_gramps_id(MEDIA_KEY, gramps_id)
def has_place_gramps_id(self, gramps_id):
return self.has_gramps_id(PLACE_KEY, gramps_id)
return self._has_gramps_id(PLACE_KEY, gramps_id)
def has_repository_gramps_id(self, gramps_id):
return self.has_gramps_id(REPOSITORY_KEY, gramps_id)
return self._has_gramps_id(REPOSITORY_KEY, gramps_id)
def has_note_gramps_id(self, gramps_id):
return self.has_gramps_id(NOTE_KEY, gramps_id)
return self._has_gramps_id(NOTE_KEY, gramps_id)
################################################################
#
@@ -1679,41 +1646,41 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
#
################################################################
def get_raw_data(self, obj_key, handle):
def _get_raw_data(self, obj_key, handle):
"""
Return raw (serialized and pickled) object from handle.
"""
raise NotImplementedError
def get_raw_person_data(self, handle):
return self.get_raw_data(PERSON_KEY, handle)
return self._get_raw_data(PERSON_KEY, handle)
def get_raw_family_data(self, handle):
return self.get_raw_data(FAMILY_KEY, handle)
return self._get_raw_data(FAMILY_KEY, handle)
def get_raw_source_data(self, handle):
return self.get_raw_data(SOURCE_KEY, handle)
return self._get_raw_data(SOURCE_KEY, handle)
def get_raw_citation_data(self, handle):
return self.get_raw_data(CITATION_KEY, handle)
return self._get_raw_data(CITATION_KEY, handle)
def get_raw_event_data(self, handle):
return self.get_raw_data(EVENT_KEY, handle)
return self._get_raw_data(EVENT_KEY, handle)
def get_raw_media_data(self, handle):
return self.get_raw_data(MEDIA_KEY, handle)
return self._get_raw_data(MEDIA_KEY, handle)
def get_raw_place_data(self, handle):
return self.get_raw_data(PLACE_KEY, handle)
return self._get_raw_data(PLACE_KEY, handle)
def get_raw_repository_data(self, handle):
return self.get_raw_data(REPOSITORY_KEY, handle)
return self._get_raw_data(REPOSITORY_KEY, handle)
def get_raw_note_data(self, handle):
return self.get_raw_data(NOTE_KEY, handle)
return self._get_raw_data(NOTE_KEY, handle)
def get_raw_tag_data(self, handle):
return self.get_raw_data(TAG_KEY, handle)
return self._get_raw_data(TAG_KEY, handle)
################################################################
#
@@ -2398,7 +2365,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
def get_save_path(self):
return self._directory
def set_save_path(self, directory):
def _set_save_path(self, directory):
self._directory = directory
if directory:
self.full_name = os.path.abspath(self._directory)
@@ -2450,7 +2417,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
_("Number of repositories"): self.get_number_of_repositories(),
_("Number of notes"): self.get_number_of_notes(),
_("Number of tags"): self.get_number_of_tags(),
_("Data version"): ".".join([str(v) for v in self.VERSION]),
_("Schema version"): ".".join([str(v) for v in self.VERSION]),
}
def _order_by_person_key(self, person):
+58 -10
View File
@@ -39,8 +39,9 @@ import logging
#------------------------------------------------------------------------
from ..plug import BasePluginManager
from ..const import PLUGINS_DIR, USER_PLUGINS
from ..constfunc import win, get_env_var
from ..config import config
from .dbconst import DBLOGNAME
from .dbconst import DBLOGNAME, DBLOCKFN, DBBACKEND
#-------------------------------------------------------------------------
#
@@ -108,13 +109,7 @@ def lookup_family_tree(dbname):
if dbname == name:
locked = False
locked_by = None
backend = None
fname = os.path.join(dirpath, "database.txt")
if os.path.isfile(fname):
with open(fname, 'r', encoding='utf8') as ifile:
backend = ifile.read().strip()
else:
backend = "bsddb"
backend = get_dbid_from_path(dirpath)
try:
fname = os.path.join(dirpath, "lock")
with open(fname, 'r', encoding='utf8') as ifile:
@@ -125,13 +120,34 @@ def lookup_family_tree(dbname):
return (dirpath, locked, locked_by, backend)
return None
def get_dbid_from_path(dirpath):
"""
Return a database backend from a directory path.
"""
dbid = "bsddb"
dbid_path = os.path.join(dirpath, DBBACKEND)
if os.path.isfile(dbid_path):
with open(dbid_path) as file:
dbid = file.read().strip()
return dbid
def import_as_dict(filename, user, skp_imp_adds=True):
"""
Import the filename into a InMemoryDB and return it.
"""
db = make_database("inmemorydb")
db.load(None)
db = make_database("sqlite")
db.load(":memory:")
db.set_feature("skip-import-additions", skp_imp_adds)
db.set_prefixes(
config.get('preferences.iprefix'),
config.get('preferences.oprefix'),
config.get('preferences.fprefix'),
config.get('preferences.sprefix'),
config.get('preferences.cprefix'),
config.get('preferences.pprefix'),
config.get('preferences.eprefix'),
config.get('preferences.rprefix'),
config.get('preferences.nprefix'))
status = import_from_filename(db, filename, user)
return db if status else None
@@ -179,3 +195,35 @@ def __index_surname(surn_list):
else:
surn = ""
return surn
def clear_lock_file(name):
try:
os.unlink(os.path.join(name, DBLOCKFN))
except OSError:
return
def write_lock_file(name):
if not os.path.isdir(name):
os.mkdir(name)
with open(os.path.join(name, DBLOCKFN), "w", encoding='utf8') as f:
if win():
user = get_env_var('USERNAME')
host = get_env_var('USERDOMAIN')
if host is None:
host = ""
else:
host = os.uname()[1]
# An ugly workaround for os.getlogin() issue with Konsole
try:
user = os.getlogin()
except:
# not win, so don't need get_env_var.
# under cron getlogin() throws and there is no USER.
user = os.environ.get('USER', 'noUSER')
if host:
text = "%s@%s" % (user, host)
else:
text = user
# Save only the username and host, so the massage can be
# printed with correct locale in DbManager.py when a lock is found
f.write(text)
+12 -7
View File
@@ -418,6 +418,11 @@ class NameDisplay:
result = raw_data[_FIRSTNAME]
return ' '.join(result.split())
def clear_custom_formats(self):
self.name_formats = {num: value
for num, value in self.name_formats.items()
if num >= 0}
def set_name_format(self, formats):
raw_func_dict = {
@@ -1054,13 +1059,13 @@ class NameDisplay:
format_str = format_str[1:]
else:
patterns = [
",\W*\"%(" + ("|".join(codes)) + ")\"", # ,\W*"%s"
",\W*\(%(" + ("|".join(codes)) + ")\)", # ,\W*(%s)
",\W*%(" + ("|".join(codes)) + ")", # ,\W*%s
"\"%(" + ("|".join(codes)) + ")\"", # "%s"
"_%(" + ("|".join(codes)) + ")_", # _%s_
"\(%(" + ("|".join(codes)) + ")\)", # (%s)
"%(" + ("|".join(codes)) + ")", # %s
",\\W*\"%(" + ("|".join(codes)) + ")\"", # ,\W*"%s"
",\\W*\\(%(" + ("|".join(codes)) + ")\\)", # ,\W*(%s)
",\\W*%(" + ("|".join(codes)) + ")", # ,\W*%s
"\"%(" + ("|".join(codes)) + ")\"", # "%s"
"_%(" + ("|".join(codes)) + ")_", # _%s_
"\\(%(" + ("|".join(codes)) + ")\\)", # (%s)
"%(" + ("|".join(codes)) + ")", # %s
]
new_fmt = format_str
+119 -16
View File
@@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2014-2015 Nick Hall
# Copyright (C) 2014-2017 Nick Hall
#
# 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
@@ -22,15 +22,44 @@
Class handling displaying of places.
"""
#---------------------------------------------------------------
#
# Python imports
#
#---------------------------------------------------------------
import os
import xml.dom.minidom
#-------------------------------------------------------------------------
#
# Gramps modules
#
#-------------------------------------------------------------------------
from ..const import PLACE_FORMATS, GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
from ..config import config
from ..utils.location import get_location_list
from ..lib import PlaceType
#-------------------------------------------------------------------------
#
# PlaceFormat class
#
#-------------------------------------------------------------------------
class PlaceFormat:
def __init__(self, name, levels, language, street, reverse):
self.name = name
self.levels = levels
self.language = language
self.street = street
self.reverse = reverse
def to_xml(self):
return (' <format name="%s" levels="%s" language="%s" '
'street="%s" reverse="%s"/>\n' %
(self.name, self.levels, self.language,
self.street, self.reverse))
#-------------------------------------------------------------------------
#
# PlaceDisplay class
@@ -38,50 +67,124 @@ from ..lib import PlaceType
#-------------------------------------------------------------------------
class PlaceDisplay:
def display_event(self, db, event):
def __init__(self):
self.place_formats = []
self.default_format = config.get('preferences.place-format')
if os.path.exists(PLACE_FORMATS):
self.load_formats()
else:
pf = PlaceFormat(_('Full'), ':', '', 0, False)
self.place_formats.append(pf)
def display_event(self, db, event, fmt=-1):
if not event:
return ""
place_handle = event.get_place_handle()
if place_handle:
place = db.get_place_from_handle(place_handle)
return self.display(db, place, event.get_date_object())
return self.display(db, place, event.get_date_object(), fmt)
else:
return ""
def display(self, db, place, date=None):
def display(self, db, place, date=None, fmt=-1):
if not place:
return ""
if not config.get('preferences.place-auto'):
return place.title
else:
lang = config.get('preferences.place-lang')
places = get_location_list(db, place, date, lang)
if fmt == -1:
fmt = config.get('preferences.place-format')
pf = self.place_formats[fmt]
lang = pf.language
all_places = get_location_list(db, place, date, lang)
if config.get('preferences.place-restrict') > 0:
index = _find_populated_place(places)
if index is not None:
if config.get('preferences.place-restrict') == 1:
places = places[:index+1]
# Apply format string to place list
index = _find_populated_place(all_places)
places = []
for slice in pf.levels.split(','):
parts = slice.split(':')
if len(parts) == 1:
offset = _get_offset(parts[0], index)
if offset is not None:
try:
places.append(all_places[offset])
except IndexError:
pass
elif len(parts) == 2:
start = _get_offset(parts[0], index)
end = _get_offset(parts[1], index)
if start is None:
places.extend(all_places[:end])
elif end is None:
places.extend(all_places[start:])
else:
places = places[index:]
places.extend(all_places[start:end])
if config.get('preferences.place-number'):
if pf.street:
types = [item[1] for item in places]
try:
idx = types.index(PlaceType.NUMBER)
except ValueError:
idx = None
if idx is not None and len(places) > idx+1:
combined = (places[idx][0] + ' ' + places[idx+1][0],
places[idx+1][1])
if pf.street == 1:
combined = (places[idx][0] + ' ' + places[idx+1][0],
places[idx+1][1])
else:
combined = (places[idx+1][0] + ' ' + places[idx][0],
places[idx+1][1])
places = places[:idx] + [combined] + places[idx+2:]
names = [item[0] for item in places]
if config.get('preferences.place-reverse'):
if pf.reverse:
names.reverse()
# TODO for Arabic, should the next line's comma be translated?
return ", ".join(names)
def get_formats(self):
return self.place_formats
def set_formats(self, formats):
self.place_formats = formats
def load_formats(self):
dom = xml.dom.minidom.parse(PLACE_FORMATS)
top = dom.getElementsByTagName('place_formats')
for fmt in top[0].getElementsByTagName('format'):
name = fmt.attributes['name'].value
levels = fmt.attributes['levels'].value
language = fmt.attributes['language'].value
street = int(fmt.attributes['street'].value)
reverse = fmt.attributes['reverse'].value == 'True'
pf = PlaceFormat(name, levels, language, street, reverse)
self.place_formats.append(pf)
dom.unlink()
def save_formats(self):
with open(PLACE_FORMATS, 'w') as fd:
fd.write('<?xml version="1.0" encoding="utf-8"?>\n')
fd.write('<place_formats>\n')
for fmt in self.place_formats:
fd.write(fmt.to_xml())
fd.write('</place_formats>\n')
def _get_offset(value, index):
if index is not None and value.startswith('p'):
try:
offset = int(value[1:])
except ValueError:
offset = 0
offset += index
else:
try:
offset = int(value)
except ValueError:
offset = None
return offset
def _find_populated_place(places):
populated_place = None
for index, item in enumerate(places):

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