Compare commits
181 Commits
v4.0.0-alp
...
v4.0.0-alp
Author | SHA1 | Date | |
---|---|---|---|
|
13c58292e3 | ||
|
5d8e37807c | ||
|
5feda5f56c | ||
|
5d46ae352d | ||
|
4c622a7b0f | ||
|
7e7ae7c42b | ||
|
0e172acd4c | ||
|
c221c1076a | ||
|
b2ae97c544 | ||
|
38f29ece86 | ||
|
383bd9548a | ||
|
97a37439d2 | ||
|
3ba99eb0b0 | ||
|
1e02a60f14 | ||
|
a5ffbb5e08 | ||
|
c36181d024 | ||
|
d91be2fd0b | ||
|
b23699d9ce | ||
|
313dcb77c2 | ||
|
348fa98341 | ||
|
7ac6856b60 | ||
|
e60ffbf83b | ||
|
5735799057 | ||
|
0446b7405d | ||
|
7be387e8fd | ||
|
f0cc7f35d6 | ||
|
b7d5bed60a | ||
|
c56fb05d1c | ||
|
64a8895df9 | ||
|
afefbeedf8 | ||
|
64ca5d105f | ||
|
1d3a687c0c | ||
|
fb56547589 | ||
|
e91a06dc1b | ||
|
096e57e36a | ||
|
44ea1b0fa8 | ||
|
3c75de2327 | ||
|
ca287ac12e | ||
|
bb392985f0 | ||
|
0625ed8109 | ||
|
5824a674d6 | ||
|
ee7ef78f6d | ||
|
6a287a6018 | ||
|
92ba36c349 | ||
|
54fd78c12a | ||
|
adb8a084a4 | ||
|
c133edec8e | ||
|
d3f8f73180 | ||
|
c081c5f6f5 | ||
|
41b4634d52 | ||
|
26ac4a6856 | ||
|
d4cd826b6f | ||
|
bd65cfcbea | ||
|
8bf43ccabb | ||
|
faac8fef8a | ||
|
1f825771b5 | ||
|
e677f40cab | ||
|
f9305d9e7f | ||
|
80625063a0 | ||
|
5923610e80 | ||
|
904dd024c6 | ||
|
a4abc9f26a | ||
|
f4e6ffb4be | ||
|
385641f092 | ||
|
e292eb0400 | ||
|
af953dec7c | ||
|
9a6f472ffd | ||
|
c572259d25 | ||
|
e613f02469 | ||
|
722f0f7589 | ||
|
2255acaa62 | ||
|
cac68a4110 | ||
|
599fe33470 | ||
|
222525e035 | ||
|
94d452d63c | ||
|
b30220b72b | ||
|
1604af190d | ||
|
711aba5272 | ||
|
2aa9aa1f48 | ||
|
d62e751285 | ||
|
2553cdc642 | ||
|
15e44633cf | ||
|
e5194e1462 | ||
|
af9f421d3f | ||
|
a3a8444fbe | ||
|
3401e86c60 | ||
|
4b6a95f211 | ||
|
d1765efa49 | ||
|
0bd44eeb84 | ||
|
32b6b27dca | ||
|
7dd022bddf | ||
|
642f837658 | ||
|
5f24c8834c | ||
|
d60bbe812b | ||
|
eee79d223b | ||
|
ddd1aae5c3 | ||
|
17824534cb | ||
|
a8c1530436 | ||
|
47fd0cf00f | ||
|
5105b4fd44 | ||
|
5b8d5b739a | ||
|
bb9601a2a0 | ||
|
81e1237b3c | ||
|
236da6da81 | ||
|
ca9f5de077 | ||
|
36008d3abe | ||
|
80d73f058c | ||
|
8d19b0198f | ||
|
9c69c3523e | ||
|
cae2814c97 | ||
|
421882c0e8 | ||
|
49585e1e96 | ||
|
904397ff11 | ||
|
5aa70b08a6 | ||
|
d080d15352 | ||
|
f3c4314a89 | ||
|
2284694530 | ||
|
15edee3a26 | ||
|
d0e698ffac | ||
|
addfaa933f | ||
|
e2fc32c4c0 | ||
|
46e8d865b1 | ||
|
c208b91184 | ||
|
ab6342af70 | ||
|
715ddbbab3 | ||
|
cc936c589b | ||
|
f554ffd57d | ||
|
46e9edaf59 | ||
|
29620a31ef | ||
|
ca2fd738d0 | ||
|
821caa8a5f | ||
|
3a45e70f54 | ||
|
89f6c7d83e | ||
|
ca73e01512 | ||
|
bfcecc646d | ||
|
77f9760504 | ||
|
3a93d03a4a | ||
|
03851db458 | ||
|
9f87dfd54b | ||
|
711e25e5bb | ||
|
f1eecb349d | ||
|
04baa6b50f | ||
|
c18d73ea8f | ||
|
671f64c08c | ||
|
b9cd27550f | ||
|
8b26f688cb | ||
|
e41c6db70d | ||
|
fdcc02d1bd | ||
|
f4f5104b72 | ||
|
0caf61b805 | ||
|
c46a66ecd1 | ||
|
35d553b4eb | ||
|
8bc6d475d9 | ||
|
b5fec9d1a3 | ||
|
1a5c516179 | ||
|
054d29612c | ||
|
ad066ba200 | ||
|
ffb3b1e232 | ||
|
76c896f977 | ||
|
5e00312139 | ||
|
c7ad3f3295 | ||
|
11723ffd8c | ||
|
cb9bebee1e | ||
|
a9ac56b33c | ||
|
19038fab93 | ||
|
fd13311aa0 | ||
|
ec0b9fb54b | ||
|
8b94955772 | ||
|
9a229466fd | ||
|
647c9cfef5 | ||
|
29443339cb | ||
|
f4f2747c65 | ||
|
ba7913fe3c | ||
|
5526f64e1f | ||
|
0a17eab461 | ||
|
fcce312e0a | ||
|
4ed2b0bace | ||
|
759075b3e4 | ||
|
7f4956dd00 | ||
|
e1ab03348e | ||
|
2033fd6567 |
.gitignoreMANIFEST.inNEWSREADMERELEASE_NOTES
data
authors.xmllds.xml
man
papersize.xmltemplates
404.html500.html
tips.xml.inadmin
browse_page.htmldetail_breadcrumb.htmlgramps-base.htmlmain_page.htmlpaginator.htmlpick.htmlreference.htmlregistration
table_header.htmluser_page.htmlview_citation_detail.htmlview_citations.htmlview_event_detail.htmlview_events.htmlview_families.htmlview_family_detail.htmlview_media.htmlview_media_detail.htmlview_name_detail.htmlview_note_detail.htmlview_notes.htmlview_page.htmlview_page_detail.htmlview_people.htmlview_person_detail.htmlview_place_detail.htmlview_places.htmlview_report.htmlview_report_detail.htmlview_repositories.htmlview_repository.htmlview_repository_detail.htmlview_source_detail.htmlview_sources.htmlview_surname_detail.htmlview_tag.htmlview_tag_detail.htmlview_tags.htmlgramps
cli
plug
data
gen
config.pyconst.py.inconstfunc.py
grampsapp.pydb
display
filters
lib
mime
plug
soundex.pysvn_revision.pyupdatecallback.pyutils
gui
basesidebar.pyclipboard.pyconfigure.pydbman.pydialog.pydisplaystate.py
editors
glade
grampsgui.pynavigator.pyplug
selectors
baseselector.pyselectcitation.pyselectevent.pyselectfamily.pyselectnote.pyselectobject.pyselectperson.pyselectplace.pyselectrepository.pyselectsource.py
undohistory.pyviewmanager.pyviews
widgets
plugins
docgen
drawreport
export
gramplet
graph
importer
lib
sidebar
tool
view
citationlistview.pycitationtreeview.pydashboardview.pyeventview.pyfamilyview.pyfanchartdescview.pyfanchartview.pygeoclose.pygeoevents.pygeofamclose.pygeofamily.pygeomoves.pygeoperson.pygeoplaces.pymediaview.pynoteview.pypedigreeview.pypersonlistview.pypersontreeview.pyplacetreeview.pyrelview.pyrepoview.pysourceview.pyview.gpr.py
webapp
images
16x16
geo-fixed-zoom.pnggeo-free-zoom.pnggeo-place-add.pnggeo-place-link.pnggeo-show-event.pnggeo-show-family.pnggeo-show-person.pnggeo-show-place.pnggramps-address.pnggramps-attribute.pnggramps-bookmark-delete.pnggramps-bookmark-edit.pnggramps-bookmark-new.pnggramps-bookmark.pnggramps-citation.pnggramps-config.pnggramps-date-edit.pnggramps-date.pnggramps-event.pnggramps-family.pnggramps-fanchart.pnggramps-fanchartdesc.pnggramps-font-bgcolor.pnggramps-font-color.pnggramps-font.pnggramps-geo.pnggramps-gramplet.pnggramps-lock.pnggramps-media.pnggramps-merge.pnggramps-notes.pnggramps-parents-add.pnggramps-parents-open.pnggramps-parents.pnggramps-pedigree.pnggramps-person.pnggramps-place.pnggramps-relation.pnggramps-reports.pnggramps-repository.pnggramps-source.pnggramps-spouse.pnggramps-tag-new.pnggramps-tag.pnggramps-tools.pnggramps-tree-group.pnggramps-tree-list.pnggramps-tree-select.pnggramps-unlock.pnggramps-view.pnggramps-viewmedia.pnggramps-zoom-best-fit.pnggramps-zoom-fit-width.pnggramps-zoom-in.pnggramps-zoom-out.pnggramps.png
source
22x22
geo-fixed-zoom.pnggeo-free-zoom.pnggeo-place-add.pnggeo-place-link.pnggeo-show-event.pnggeo-show-family.pnggeo-show-person.pnggeo-show-place.pnggramps-address.pnggramps-attribute.pnggramps-bookmark-delete.pnggramps-bookmark-edit.pnggramps-bookmark-new.pnggramps-bookmark.pnggramps-citation.pnggramps-config.pnggramps-date-edit.pnggramps-date.pnggramps-event.pnggramps-family.pnggramps-fanchart.pnggramps-fanchartdesc.pnggramps-font-bgcolor.pnggramps-font-color.pnggramps-font.pnggramps-geo-altmap.pnggramps-geo-birth.pnggramps-geo-death.pnggramps-geo-mainmap.pnggramps-geo-marriage.pnggramps-geo.pnggramps-gramplet.pnggramps-lock.pnggramps-media.pnggramps-merge.pnggramps-notes.pnggramps-parents-add.pnggramps-parents-open.pnggramps-parents.pnggramps-pedigree.pnggramps-person.pnggramps-place.pnggramps-relation.pnggramps-reports.pnggramps-repository.pnggramps-source.pnggramps-spouse.pnggramps-tag-new.pnggramps-tag.pnggramps-tools.pnggramps-tree-group.pnggramps-tree-list.pnggramps-tree-select.pnggramps-unlock.pnggramps-view.pnggramps-viewmedia.pnggramps-zoom-best-fit.pnggramps-zoom-fit-width.pnggramps-zoom-in.pnggramps-zoom-out.pnggramps.png
48x48
geo-fixed-zoom.pnggeo-free-zoom.pnggeo-place-add.pnggeo-place-link.pnggeo-show-event.pnggeo-show-family.pnggeo-show-person.pnggeo-show-place.pnggramps-address.pnggramps-attribute.pnggramps-bookmark-delete.pnggramps-bookmark-edit.pnggramps-bookmark-new.pnggramps-bookmark.pnggramps-citation.pnggramps-config.pnggramps-date-edit.pnggramps-date.pnggramps-event.pnggramps-family.pnggramps-fanchart.pnggramps-fanchartdesc.pnggramps-font-bgcolor.pnggramps-font-color.pnggramps-font.pnggramps-geo-altmap.pnggramps-geo-birth.pnggramps-geo-death.pnggramps-geo-mainmap.pnggramps-geo-marriage.pnggramps-geo.pnggramps-gramplet.pnggramps-lock.pnggramps-media.pnggramps-merge.pnggramps-notes.pnggramps-parents-add.pnggramps-parents-open.pnggramps-parents.pnggramps-pedigree.pnggramps-person.pnggramps-place.pnggramps-relation.pnggramps-reports.pnggramps-repository.pnggramps-source.pnggramps-spouse.pnggramps-tag-new.pnggramps-tag.pnggramps-tools.pnggramps-tree-group.pnggramps-tree-list.pnggramps-tree-select.pnggramps-unlock.pnggramps-view.pnggramps-viewmedia.pnggramps-zoom-best-fit.pnggramps-zoom-fit-width.pnggramps-zoom-in.pnggramps-zoom-out.pnggramps.png
add.pngbad.pngcaution.pngdocument.pngdown.pnggood.pnggramps-export.pnggramps-import.pnggramps-undo-history.pnggramps-url.pnggramps.pnggramps.svggtk-remove.pngimage-missing.pnglogo.pngnext.pngped24.icoprevious.pngscalable
add-parent-existing-family.svggeo-fixed-zoom.svggeo-free-zoom.svggeo-place-add.svggeo-place-link.svggeo-show-event.svggeo-show-family.svggeo-show-person.svggeo-show-place.svggramps-address.svggramps-attribute.svggramps-bookmark-delete.svggramps-bookmark-edit.svggramps-bookmark-new.svggramps-bookmark.svggramps-citation.svggramps-config.svggramps-date-edit.svggramps-date.svggramps-event.svggramps-family.svggramps-fanchart.svggramps-fanchartdesc.svggramps-font-bgcolor.svggramps-font-color.svggramps-font.svggramps-geo-altmap.svggramps-geo-birth.svggramps-geo-death.svggramps-geo-mainmap.svggramps-geo-marriage.svggramps-geo.svggramps-gramplet.svggramps-lock.svggramps-media.svggramps-merge.svggramps-notes.svggramps-parents-add.svggramps-parents-open.svggramps-parents.svggramps-pedigree.svggramps-person.svggramps-place.svggramps-relation.svggramps-reports.svggramps-repository.svggramps-source.svggramps-spouse.svggramps-tag-new.svggramps-tag.svggramps-tools.svggramps-tree-group.svggramps-tree-list.svggramps-tree-select.svggramps-unlock.svggramps-view.svggramps-viewmedia.svggramps-zoom-best-fit.svggramps-zoom-fit-width.svggramps-zoom-in.svggramps-zoom-out.svggramps.svg
splash.jpgstock_index_24.pngstock_link.pngstock_new-html.pngstock_notes.pngtext-editor.pngup.pngmac
po
setup.py
5
.gitignore
vendored
5
.gitignore
vendored
@@ -2,11 +2,12 @@
|
|||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|
||||||
# Distutils
|
# Distutils
|
||||||
|
MANIFEST
|
||||||
build/
|
build/
|
||||||
sdist/
|
dist/
|
||||||
|
|
||||||
# Gramps
|
# Gramps
|
||||||
gramps/data/tips.xml
|
data/tips.xml
|
||||||
gramps/gen/const.py
|
gramps/gen/const.py
|
||||||
gramps/plugins/lib/holidays.xml
|
gramps/plugins/lib/holidays.xml
|
||||||
po/.intltool-merge-cache
|
po/.intltool-merge-cache
|
||||||
|
22
MANIFEST.in
22
MANIFEST.in
@@ -11,34 +11,22 @@ include TestPlan.txt
|
|||||||
recursive-include data *
|
recursive-include data *
|
||||||
recursive-include debian *
|
recursive-include debian *
|
||||||
recursive-include docs *
|
recursive-include docs *
|
||||||
|
recursive-include gramps *
|
||||||
recursive-include help *
|
recursive-include help *
|
||||||
|
recursive-include images *
|
||||||
recursive-include mac *
|
recursive-include mac *
|
||||||
recursive-include po *
|
recursive-include po *
|
||||||
recursive-include gramps *
|
|
||||||
recursive-include test *
|
recursive-include test *
|
||||||
recursive-include windows *
|
recursive-include windows *
|
||||||
|
|
||||||
# Remove files created in the build
|
# Remove files created in the build
|
||||||
exclude data/gramps.desktop
|
exclude data/tips.xml
|
||||||
exclude data/gramps.keys
|
exclude gramps/gen/const.py
|
||||||
exclude data/gramps.xml
|
|
||||||
recursive-exclude data/man *.1
|
|
||||||
recursive-exclude data/man *.1.gz
|
|
||||||
exclude gramps/const.py
|
|
||||||
exclude gramps/data/tips.xml
|
|
||||||
exclude gramps/plugins/lib/holidays.xml
|
exclude gramps/plugins/lib/holidays.xml
|
||||||
exclude po/*.gmo
|
|
||||||
exclude po/.intltool-merge-cache
|
exclude po/.intltool-merge-cache
|
||||||
exclude po/stamp-it
|
|
||||||
exclude po/POTFILES
|
|
||||||
global-exclude *.pyc
|
global-exclude *.pyc
|
||||||
global-exclude *.py~
|
|
||||||
global-exclude *.pyo
|
global-exclude *.pyo
|
||||||
global-exclude *.bak
|
|
||||||
|
|
||||||
# Remove directories which should not be included in the distribution
|
# Remove directories which should not be included in the distribution
|
||||||
prune gramps/guiQML
|
prune gramps/guiQML
|
||||||
prune gramps/webapp
|
#prune gramps/webapp
|
||||||
|
|
||||||
# Remove Makefiles used by autotools
|
|
||||||
global-exclude Makefile*
|
|
||||||
|
17
NEWS
17
NEWS
@@ -1,3 +1,20 @@
|
|||||||
|
2012-10-28
|
||||||
|
Version 3.4.2 -- the "We're all individuals!" bug fix release.
|
||||||
|
* Some fixes on NarrativeWeb report
|
||||||
|
* Some fixes on book report
|
||||||
|
* Improvement on database path interface and user's preferences
|
||||||
|
* Consistency on Name display and regex support
|
||||||
|
* Some platform-specific fixes for Windows system environment
|
||||||
|
* Better support for media links on Gedcom file format
|
||||||
|
* Fix possible incorrect family relations on Gedcom file format
|
||||||
|
* Various fixes on citation records
|
||||||
|
* Fix and improve places handling on Geography views
|
||||||
|
* Fix on command line arguments
|
||||||
|
* Consistency on PDF file format
|
||||||
|
* New language: Greek
|
||||||
|
* Various updated translations
|
||||||
|
* Changelog: http://www.gramps-project.org/bugs/changelog_page.php?version_id=32
|
||||||
|
|
||||||
2012-08-23
|
2012-08-23
|
||||||
Version 3.4.1 -- The "A tiger? In Africa?!" bug fix release.
|
Version 3.4.1 -- The "A tiger? In Africa?!" bug fix release.
|
||||||
Mention in the release that upgrading is advised for two critical issues:
|
Mention in the release that upgrading is advised for two critical issues:
|
||||||
|
14
README
14
README
@@ -8,6 +8,7 @@ The following packages *MUST* be installed in order for Gramps to work:
|
|||||||
Python 2.7 or greater, Python 3.2 or greater (python version cannot be mixed)
|
Python 2.7 or greater, Python 3.2 or greater (python version cannot be mixed)
|
||||||
GTK 3.0 or greater
|
GTK 3.0 or greater
|
||||||
pygobject 3.3.2 or greater
|
pygobject 3.3.2 or greater
|
||||||
|
cairo, pango, pangocairo with instrospection bindings (the gi packages)
|
||||||
librsvg2 (svg icon view)
|
librsvg2 (svg icon view)
|
||||||
xdg-utils
|
xdg-utils
|
||||||
|
|
||||||
@@ -23,7 +24,7 @@ to your language:
|
|||||||
The following packages are *STRONGLY RECOMMENDED* to be installed:
|
The following packages are *STRONGLY RECOMMENDED* to be installed:
|
||||||
osmgpsmap Used to show maps in the geography view.
|
osmgpsmap Used to show maps in the geography view.
|
||||||
Without this the GeoView will not be active, see
|
Without this the GeoView will not be active, see
|
||||||
http://gramps-project.org/wiki/index.php?title=Gramps_3.3_Wiki_Manual_-_Main_Window#Geography_Category
|
http://gramps-project.org/wiki/index.php?title=Gramps_4.0_Wiki_Manual_-_Main_Window#Geography_Category
|
||||||
The package is named osmgpsmap, osm-gps-map
|
The package is named osmgpsmap, osm-gps-map
|
||||||
or python-osmgpsmap. Or obtain it from: http://nzjrs.github.com/osm-gps-map/
|
or python-osmgpsmap. Or obtain it from: http://nzjrs.github.com/osm-gps-map/
|
||||||
GraphViz Enable creation of graphs using GraphViz engine.
|
GraphViz Enable creation of graphs using GraphViz engine.
|
||||||
@@ -38,6 +39,14 @@ The following packages are optional
|
|||||||
enchant. A version of gtkspell with gobject introspection
|
enchant. A version of gtkspell with gobject introspection
|
||||||
is needed, so minimally version 3.0.0
|
is needed, so minimally version 3.0.0
|
||||||
|
|
||||||
|
rcs The GNU Revision Control System (RCS) can be used to manage
|
||||||
|
multiple revisions of your family trees. See info at
|
||||||
|
http://www.gramps-project.org/wiki/index.php?title=Gramps_4.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 convert non jpg images to
|
||||||
|
jpg so as to include them in LaTeX output
|
||||||
|
|
||||||
ttf-freefont More font support in the reports
|
ttf-freefont More font support in the reports
|
||||||
|
|
||||||
gir-webkit GObject introspection data of WebKit is required for the
|
gir-webkit GObject introspection data of WebKit is required for the
|
||||||
@@ -62,9 +71,6 @@ No longer needed in 3.2:
|
|||||||
No longer needed in 3.1:
|
No longer needed in 3.1:
|
||||||
yelp Gnome help browser. At the moment no help is shipped
|
yelp Gnome help browser. At the moment no help is shipped
|
||||||
|
|
||||||
Remark: There is a conflict when using python-gnome2 in Ubuntu. This is evident
|
|
||||||
with the error: TypeError: Error when calling the metaclass bases
|
|
||||||
metaclass conflict
|
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
"UNSTABLE Gramps 4.0.0 Alpha1 release.
|
"UNSTABLE Gramps 4.0.0 Alpha4 release.
|
||||||
|
|
||||||
This is a technology preview to allow plugin writers and packagers-installer
|
This is a technology preview to allow plugin writers and packagers-installer
|
||||||
writers to update their plugins and scripts. This release is not production
|
writers to update their plugins and scripts. This release is not production
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
# This is the data/man level Makefile for Gramps
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
SUBDIRS = fr sv nl pl cs pt_BR
|
|
||||||
|
|
||||||
man_IN_FILES = gramps.1.in
|
|
||||||
man_MANS = $(man_IN_FILES:.1.in=.1)
|
|
||||||
|
|
||||||
EXTRA_DIST = $(man_MANS) $(man_IN_FILES)
|
|
||||||
|
|
||||||
gramps.1: $(top_builddir)/config.status gramps.1.in
|
|
||||||
cd $(top_builddir) && CONFIG_FILES=data/man/$@ $(SHELL) ./config.status
|
|
||||||
|
|
||||||
CLEANFILES=$(man_MANS)
|
|
@@ -50,7 +50,7 @@ copyright = u'2012, Gramps project'
|
|||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '4.0'
|
version = '4.0'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '4.0.0'
|
release = '4.0.0-alpha2'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
# This is the data/man/sv level Makefile for Gramps
|
|
||||||
# $Id: Makefile.am 6189 2006-03-21 19:05:46Z rshura $
|
|
||||||
|
|
||||||
man_IN_FILES = gramps.1.in
|
|
||||||
man_MANS = $(man_IN_FILES:.1.in=.1)
|
|
||||||
|
|
||||||
mandir = @mandir@/cs
|
|
||||||
|
|
||||||
EXTRA_DIST = $(man_MANS) $(man_IN_FILES)
|
|
||||||
|
|
||||||
gramps.1: $(top_builddir)/config.status gramps.1.in
|
|
||||||
cd $(top_builddir) && CONFIG_FILES=data/man/cs/$@ $(SHELL) ./config.status
|
|
||||||
|
|
||||||
CLEANFILES=$(man_MANS)
|
|
@@ -249,7 +249,9 @@ gramps(1) 3.4.0 gramps(1)
|
|||||||
|
|
||||||
*${PREFIX}/bin/gramps*
|
*${PREFIX}/bin/gramps*
|
||||||
|
|
||||||
*${PREFIX}/share/gramps*
|
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||||
|
|
||||||
|
*${PREFIX}/share/*
|
||||||
|
|
||||||
*${HOME}/.gramps*
|
*${HOME}/.gramps*
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
English
|
English
|
||||||
=======
|
=======
|
||||||
|
|
||||||
gramps(1) 4.0.0 gramps(1)
|
gramps(1) @VERSION@ gramps(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -262,11 +262,14 @@ gramps(1) 4.0.0 gramps(1)
|
|||||||
|
|
||||||
|
|
||||||
**KNOWN BUGS AND LIMITATIONS**
|
**KNOWN BUGS AND LIMITATIONS**
|
||||||
**FILES**
|
|
||||||
|
|
||||||
|
**FILES**
|
||||||
|
|
||||||
*${PREFIX}/bin/gramps*
|
*${PREFIX}/bin/gramps*
|
||||||
|
|
||||||
*${PREFIX}/share/gramps*
|
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||||
|
|
||||||
|
*${PREFIX}/share/*
|
||||||
|
|
||||||
*${HOME}/.gramps*
|
*${HOME}/.gramps*
|
||||||
|
|
||||||
@@ -293,4 +296,4 @@ gramps(1) 4.0.0 gramps(1)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
January 2013 4.0.0 gramps(1)
|
gramps(1) @VERSION@ gramps(1)
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
# This is the data/man/fr level Makefile for Gramps
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
man_IN_FILES = gramps.1.in
|
|
||||||
man_MANS = $(man_IN_FILES:.1.in=.1)
|
|
||||||
|
|
||||||
mandir = @mandir@/fr
|
|
||||||
|
|
||||||
EXTRA_DIST = $(man_MANS) $(man_IN_FILES)
|
|
||||||
|
|
||||||
gramps.1: $(top_builddir)/config.status gramps.1.in
|
|
||||||
cd $(top_builddir) && CONFIG_FILES=data/man/fr/$@ $(SHELL) ./config.status
|
|
||||||
|
|
||||||
CLEANFILES=$(man_MANS)
|
|
@@ -50,7 +50,7 @@ copyright = u'2012, Gramps project'
|
|||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '4.0'
|
version = '4.0'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '4.0.0'
|
release = '4.0.0-alpha2'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
@@ -1,9 +1,7 @@
|
|||||||
French
|
French
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
gramps(1) @VERSION@ gramps(1)
|
||||||
gramps(1) 4.0.0 gramps(1)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**NOM**
|
**NOM**
|
||||||
@@ -34,33 +32,33 @@ gramps(1) 4.0.0 gramps(1)
|
|||||||
|
|
||||||
**OPTIONS**
|
**OPTIONS**
|
||||||
**gramps** *FICHIER*
|
**gramps** *FICHIER*
|
||||||
Si *FICHIER* est désigné (sans autres commandes) comme arbre
|
Si *FICHIER* est désigné (sans autres commandes) comme arbre
|
||||||
familial ou comme répertoire d'arbre familial, alors une session
|
familial ou comme répertoire d'arbre familial, alors une session
|
||||||
interactive est ouverte. Si *FICHIER* est un format de fichier
|
interactive est ouverte. Si *FICHIER* est un format de fichier
|
||||||
supporté par Gramps, une base vide est créée dont le nom est
|
supporté par Gramps, une base vide est créée dont le nom est
|
||||||
celui du *FICHIER* et les données y seront importées. Les autres
|
celui du *FICHIER* et les données y seront importées. Les autres
|
||||||
options sont ignorées. Ce type de lancement permet d'utiliser
|
options sont ignorées. Ce type de lancement permet d'utiliser
|
||||||
gramps pour manipuler des données comme dans un navigateur web.
|
gramps pour manipuler des données comme dans un navigateur web.
|
||||||
Les formats natifs de gramps sont acceptés, voir ci-dessous.
|
Les formats natifs de gramps sont acceptés, voir ci-dessous.
|
||||||
|
|
||||||
|
|
||||||
**-f** , **--format=** *FORMAT*
|
**-f** , **--format=** *FORMAT*
|
||||||
Le format spécifique du *FICHIER* est précédé par les arguments
|
Le format spécifique du *FICHIER* est précédé par les arguments
|
||||||
**-i** , ou **-e** . Si l'option **-f** n'est pas donnée pour le *FICHIER* ,
|
**-i** , ou **-e** . Si l'option **-f** n'est pas donnée pour le *FICHIER* ,
|
||||||
alors le format sera celui de l'extension ou du type-MIME.
|
alors le format sera celui de l'extension ou du type-MIME.
|
||||||
|
|
||||||
Les formats de sortie disponibles sont **gramps-xml** (deviné si
|
Les formats de sortie disponibles sont **gramps-xml** (deviné si
|
||||||
*FICHIER* se termine par **.gramps** ), et **gedcom** (deviné si *FICHIER* se
|
*FICHIER* se termine par **.gramps** ), et **gedcom** (deviné si *FICHIER* se
|
||||||
termine par **.ged** ), ou tout autre fichier d'exportation
|
termine par **.ged** ), ou tout autre fichier d'exportation
|
||||||
disponible dans le système de plugin Gramps.
|
disponible dans le système de plugin Gramps.
|
||||||
|
|
||||||
Les formats disponibles pour l'importation sont **grdb** ,
|
Les formats disponibles pour l'importation sont **grdb** ,
|
||||||
**gramps-xml** , **gedcom** , **gramps-pkg** (deviné si *FICHIER* se termine par
|
**gramps-xml** , **gedcom** , **gramps-pkg** (deviné si *FICHIER* se termine par
|
||||||
**.gpkg** ), et **geneweb** (deviné si *FICHIER* se termine par **.gw** ).
|
**.gpkg** ), et **geneweb** (deviné si *FICHIER* se termine par **.gw** ).
|
||||||
|
|
||||||
Les formats disponibles pour l'exportation sont **gramps-xml** , **ged‐
|
Les formats disponibles pour l'exportation sont **gramps-xml** , **ged‐
|
||||||
com** , **gramps-pkg** , **wft** (deviné si *FICHIER* se termine par **.wft** ),
|
com** , **gramps-pkg** , **wft** (deviné si *FICHIER* se termine par **.wft** ),
|
||||||
**geneweb** .
|
**geneweb** .
|
||||||
|
|
||||||
|
|
||||||
**-l**
|
**-l**
|
||||||
@@ -68,29 +66,29 @@ gramps(1) 4.0.0 gramps(1)
|
|||||||
|
|
||||||
|
|
||||||
**-u** , **--force-unlock**
|
**-u** , **--force-unlock**
|
||||||
Débloquer une base de données verrouillée.
|
Débloquer une base de données verrouillée.
|
||||||
|
|
||||||
|
|
||||||
**-O** , **--open=** *BASE_DE_DONNEES*
|
**-O** , **--open=** *BASE_DE_DONNEES*
|
||||||
Ouvrir une *BASE_DE_DONNEES* qui doit être une base présente dans
|
Ouvrir une *BASE_DE_DONNEES* qui doit être une base présente dans
|
||||||
le répertoire des bases ou le nom d'un arbre familial existant.
|
le répertoire des bases ou le nom d'un arbre familial existant.
|
||||||
Si aucune action n'est définie, les options d'import ou d'export
|
Si aucune action n'est définie, les options d'import ou d'export
|
||||||
sont données par la ligne de commande puis une session interac‐
|
sont données par la ligne de commande puis une session interactive
|
||||||
tive est ouverte, utilisant cette base de données.
|
est ouverte, utilisant cette base de données.
|
||||||
|
|
||||||
Seulement une base peut être ouverte. Si vous utilisez plusieurs
|
Seulement une base peut être ouverte. Si vous utilisez plusieurs
|
||||||
sources, vous devez utiliser l'option d'import.
|
sources, vous devez utiliser l'option d'import.
|
||||||
|
|
||||||
|
|
||||||
**-i** , **--import=** *FICHIER*
|
**-i** , **--import=** *FICHIER*
|
||||||
Importer des données depuis un *FICHIER* . Si vous n'avez pas
|
Importer des données depuis un *FICHIER* . Si vous n'avez pas
|
||||||
spécifié de base de données alors une base de données temporaire
|
spécifié de base de données alors une base de données temporaire
|
||||||
est utilisée; elle sera effacée quand vous quitterez gramps.
|
est utilisée; elle sera effacée quand vous quitterez gramps.
|
||||||
|
|
||||||
Quand plus d'un fichier doit être importé, chacun doit être
|
Quand plus d'un fichier doit être importé, chacun doit être
|
||||||
précédé par la commande **-i** . Ces fichiers sont importés dans le
|
précédé par la commande **-i** . Ces fichiers sont importés dans le
|
||||||
même ordre, i.e. **-i** *FICHIER1* **-i** *FICHIER2* et **-i** *FICHIER2* **-i**
|
même ordre, **-i** *FICHIER1* **-i** *FICHIER2* et **-i** *FICHIER2* **-i**
|
||||||
*FICHIER1* vont tous les deux produire différents IDs gramps.
|
*FICHIER1* vont tous les deux produire différents IDs gramps.
|
||||||
|
|
||||||
|
|
||||||
**-e** , **--export=** *FICHIER*
|
**-e** , **--export=** *FICHIER*
|
||||||
@@ -104,38 +102,38 @@ gramps(1) 4.0.0 gramps(1)
|
|||||||
|
|
||||||
|
|
||||||
**-a** , **--action=** *ACTION*
|
**-a** , **--action=** *ACTION*
|
||||||
Accomplir une *ACTION* sur les données importées. C'est effectué à
|
Accomplir une *ACTION* sur les données importées. C'est effectué à
|
||||||
la fin de l'importation. Les actions possibles sont **summary**
|
la fin de l'importation. Les actions possibles sont **summary**
|
||||||
(comme le rapport -> Afficher -> Statistiques sur la base),
|
(comme le rapport -> Afficher -> Statistiques sur la base),
|
||||||
**check** (comme l'outil -> Réparation de la base -> Vérifier et
|
**check** (comme l'outil -> Réparation de la base -> Vérifier et
|
||||||
réparer), **report** (produit un rapport) et **tool** (utilise un
|
réparer), **report** (produit un rapport) et **tool** (utilise un
|
||||||
outil), ces derniers ont besoin de *OPTION* précédé par la commande -p.
|
outil), ces derniers ont besoin de *OPTION* précédé par la commande -p.
|
||||||
|
|
||||||
L' *OPTION* doit satisfaire ces conditions:
|
L' *OPTION* doit satisfaire ces conditions:
|
||||||
Il ne doit pas y avoir d'espace. Si certains arguments doivent
|
Il ne doit pas y avoir d'espace. Si certains arguments doivent
|
||||||
utiliser des espaces, la chaîne doit être encadrée par des
|
utiliser des espaces, la chaîne doit être encadrée par des
|
||||||
guillemets. Les options vont par paire nom et valeur. Une
|
guillemets. Les options vont par paire nom et valeur. Une
|
||||||
paire est séparée par un signe égal. Différentes paires sont
|
paire est séparée par un signe égal. Différentes paires sont
|
||||||
séparées par une virgule.
|
séparées par une virgule.
|
||||||
|
|
||||||
La plupart des options sont spécifiques à chaque rapport. Même
|
La plupart des options sont spécifiques à chaque rapport. Même
|
||||||
s'il existe des options communes.
|
s'il existe des options communes.
|
||||||
|
|
||||||
**name=name**
|
**name=name**
|
||||||
Cette option est obligatoire, elle détermine quel rapport ou
|
Cette option est obligatoire, elle détermine quel rapport ou
|
||||||
outil sera utilisé. Si le name saisi ne correspond à aucun
|
outil sera utilisé. Si le name saisi ne correspond à aucun
|
||||||
module disponible, un message d'erreur sera ajouté.
|
module disponible, un message d'erreur sera ajouté.
|
||||||
|
|
||||||
**show=all**
|
**show=all**
|
||||||
Cette option produit une liste avec les noms des options
|
Cette option produit une liste avec les noms des options
|
||||||
disponibles pour un rapport donné.
|
disponibles pour un rapport donné.
|
||||||
|
|
||||||
**show=optionname**
|
**show=optionname**
|
||||||
Cette option affiche une description de toutes les fonctionnalités
|
Cette option affiche une description de toutes les fonctionnalités
|
||||||
proposées par optionname, aussi bien les types que les valeurs pour une option.
|
proposées par optionname, aussi bien les types que les valeurs pour une option.
|
||||||
|
|
||||||
Utiliser les options ci-dessus pour trouver tout sur un rapport
|
Utiliser les options ci-dessus pour trouver tout sur un rapport
|
||||||
choisi.
|
choisi.
|
||||||
|
|
||||||
|
|
||||||
Quand plus d'une action doit être effectuée, chacune doit être précédée
|
Quand plus d'une action doit être effectuée, chacune doit être précédée
|
||||||
@@ -144,23 +142,23 @@ gramps(1) 4.0.0 gramps(1)
|
|||||||
|
|
||||||
|
|
||||||
**-d** , **--debug=** *NOM_LOGGER*
|
**-d** , **--debug=** *NOM_LOGGER*
|
||||||
Permet les logs de debug pour le développement et les tests.
|
Permet les logs de debug pour le développement et les tests.
|
||||||
Regarder le code source pour les détails.
|
Regarder le code source pour les détails.
|
||||||
|
|
||||||
**--version**
|
**--version**
|
||||||
Imprime le numéro de version pour gramps puis quitte.
|
Imprime le numéro de version pour gramps puis quitte.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**Opération**
|
**Opération**
|
||||||
Si le premie argument de la ligne de commande ne commence pas par un
|
Si le premier argument de la ligne de commande ne commence pas par un
|
||||||
tiret (i.e. pas d'instruction), gramps va essayer d'ouvrir la base de
|
tiret (i.e. pas d'instruction), gramps va essayer d'ouvrir la base de
|
||||||
données avec le nom donné par le premier argument et démarrer une ses‐
|
données avec le nom donné par le premier argument et démarrer une ses‐
|
||||||
sion interactive, en ignorant le reste de la ligne de commande.
|
sion interactive, en ignorant le reste de la ligne de commande.
|
||||||
|
|
||||||
|
|
||||||
Si la commande **-O** est notée, alors gramps va essayer le fichier défini
|
Si la commande **-O** est notée, alors gramps va essayer le fichier défini
|
||||||
et va travailler avec ses données, comme pour les autres paramètres de
|
et va travailler avec ses données, comme pour les autres paramètres de
|
||||||
la ligne de commande.
|
la ligne de commande.
|
||||||
|
|
||||||
@@ -183,7 +181,7 @@ gramps(1) 4.0.0 gramps(1)
|
|||||||
Cette base sera **import_db.grdb** dans le répertoire **~/.gramps/import**.
|
Cette base sera **import_db.grdb** dans le répertoire **~/.gramps/import**.
|
||||||
|
|
||||||
|
|
||||||
Les erreurs rencontrées lors d'importation, d'exportation, ou d'action, seront
|
Les erreurs rencontrées lors d'importation, d'exportation, ou d'action, seront
|
||||||
mémorisées en *stdout* (si elles sont le fait de la manipulation par
|
mémorisées en *stdout* (si elles sont le fait de la manipulation par
|
||||||
gramps) ou en *stderr* (si elles ne sont pas le fait d'une manipulation).
|
gramps) ou en *stderr* (si elles ne sont pas le fait d'une manipulation).
|
||||||
Utilisez les shell de redirection de *stdout* et *stderr* pour sauver
|
Utilisez les shell de redirection de *stdout* et *stderr* pour sauver
|
||||||
@@ -191,16 +189,16 @@ gramps(1) 4.0.0 gramps(1)
|
|||||||
|
|
||||||
|
|
||||||
**EXEMPLES**
|
**EXEMPLES**
|
||||||
Pour ouvrir un arbre familial et y importer un fichier XML, on peut
|
Pour ouvrir un arbre familial et y importer un fichier XML, on peut
|
||||||
saisir:
|
saisir:
|
||||||
|
|
||||||
**gramps -O** *'Mon Arbre Familial'* **-i** *~/db3.gramps*
|
**gramps -O** *'Mon Arbre Familial'* **-i** *~/db3.gramps*
|
||||||
|
|
||||||
Ceci ouvre un arbre familial, pour faire la même chose, mais importer
|
Ceci ouvre un arbre familial, pour faire la même chose, mais importer
|
||||||
dans un arbre familial temporaire et démarrer une session interactive,
|
dans un arbre familial temporaire et démarrer une session interactive,
|
||||||
on peut saisir:
|
on peut saisir :
|
||||||
|
|
||||||
**gramps -i** *'Mon Arbre Familial'* **-i** *~/db3.gramps*
|
**gramps -i** *'Mon Arbre Familial'* **-i** *~/db3.gramps*
|
||||||
|
|
||||||
Lecture de quatre bases de données dont les formats peuvent être
|
Lecture de quatre bases de données dont les formats peuvent être
|
||||||
devinés d'après les noms, puis vérification des données:
|
devinés d'après les noms, puis vérification des données:
|
||||||
@@ -225,12 +223,12 @@ gramps(1) 4.0.0 gramps(1)
|
|||||||
Pour lire trois ensembles de données puis lancer une session
|
Pour lire trois ensembles de données puis lancer une session
|
||||||
interactive de gramps sur le tout :
|
interactive de gramps sur le tout :
|
||||||
|
|
||||||
**gramps -i** *file1.ged* **-i** *file2.tgz* **-i** *~/db3.gramps*
|
**gramps -i** *file1.ged* **-i** *file2.tgz* **-i** *~/db3.gramps*
|
||||||
|
|
||||||
Pour lancer l'outil de vérification de la base de données depuis la
|
Pour lancer l'outil de vérification de la base de données depuis la
|
||||||
ligne de commande et obtenir le résultat :
|
ligne de commande et obtenir le résultat :
|
||||||
|
|
||||||
**gramps -O** *'My Family Tree'* **-a** *tool* **-p name=** *verify*
|
**gramps -O** *'My Family Tree'* **-a** *tool* **-p name=** *verify*
|
||||||
|
|
||||||
Enfin, pour lancer une session interactive normale, entrer :
|
Enfin, pour lancer une session interactive normale, entrer :
|
||||||
|
|
||||||
@@ -253,21 +251,24 @@ gramps(1) 4.0.0 gramps(1)
|
|||||||
|
|
||||||
**CONCEPTS**
|
**CONCEPTS**
|
||||||
Gramps est un système basé sur le support de plugin-python, permettant
|
Gramps est un système basé sur le support de plugin-python, permettant
|
||||||
d'importer et d'exporter, la saisie, générer des rapports, des outils,
|
d'importer et d'exporter, la saisie, générer des rapports, des outils,
|
||||||
et afficher des filtres pouvant être ajoutés sans modifier le programme.
|
et afficher des filtres pouvant être ajoutés sans modifier le programme.
|
||||||
|
|
||||||
Par ailleurs, gramps permet la génération directe : impression, rap‐
|
Par ailleurs, gramps permet la génération directe : impression, rap‐
|
||||||
ports avec sortie vers d'autres formats, comme *LibreOffice.org* ,
|
ports avec sortie vers d'autres formats, comme *LibreOffice.org* ,
|
||||||
*HTML* , ou *LaTeX* pour permettre à l'utilisateur de choisir selon ses
|
*HTML* , ou *LaTeX* pour permettre à l'utilisateur de choisir selon ses
|
||||||
besoins
|
besoins
|
||||||
|
|
||||||
|
|
||||||
**BUGS CONNUS ET LIMITATIONS**
|
**BUGS CONNUS ET LIMITATIONS**
|
||||||
|
|
||||||
**FICHIERS**
|
**FICHIERS**
|
||||||
|
|
||||||
*${PREFIX}/bin/gramps*
|
*${PREFIX}/bin/gramps*
|
||||||
|
|
||||||
*${PREFIX}/share/gramps*
|
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||||
|
|
||||||
|
*${PREFIX}/share/*
|
||||||
|
|
||||||
*${HOME}/.gramps*
|
*${HOME}/.gramps*
|
||||||
|
|
||||||
@@ -296,4 +297,4 @@ gramps(1) 4.0.0 gramps(1)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Janvier 2013 4.0.0 gramps(1)
|
gramps(1) @VERSION@ gramps(1)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
.TH "GRAMPS" "1" "04 December 2012" "4.0" "Gramps"
|
.TH "GRAMPS" "1" "28 December 2012" "4.0" "Gramps"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
gramps \- Gramps Documentation
|
gramps \- Gramps Documentation
|
||||||
.
|
.
|
||||||
@@ -28,10 +28,10 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|||||||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
||||||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
||||||
..
|
..
|
||||||
.\" Man page generated from reStructeredText.
|
.\" Man page generated from reStructuredText.
|
||||||
.
|
.
|
||||||
.sp
|
.sp
|
||||||
gramps(1) 4.0.0 gramps(1)
|
gramps(1) @VERSION@ gramps(1)
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
.B \fBNOM\fP
|
.B \fBNOM\fP
|
||||||
@@ -72,7 +72,7 @@ Les formats natifs de gramps sont acceptés, voir ci\-dessous.
|
|||||||
.TP
|
.TP
|
||||||
.B \fB\-f\fP , \fB\-\-format=\fP \fIFORMAT\fP
|
.B \fB\-f\fP , \fB\-\-format=\fP \fIFORMAT\fP
|
||||||
Le format spécifique du \fIFICHIER\fP est précédé par les arguments
|
Le format spécifique du \fIFICHIER\fP est précédé par les arguments
|
||||||
\fB\-i\fP , ou \fB\-e\fP . Si l\(aqoption \fB\-f\fP n\(aqest pas donnée pour le \fIFICHIER\fP ,
|
\fB\-i\fP , ou \fB\-e\fP . Si l\(aqoption \fB\-f\fP n\(aqest pas donnée pour le \fIFICHIER\fP ,
|
||||||
alors le format sera celui de l\(aqextension ou du type\-MIME.
|
alors le format sera celui de l\(aqextension ou du type\-MIME.
|
||||||
.sp
|
.sp
|
||||||
Les formats de sortie disponibles sont \fBgramps\-xml\fP (deviné si
|
Les formats de sortie disponibles sont \fBgramps\-xml\fP (deviné si
|
||||||
@@ -96,10 +96,10 @@ Débloquer une base de données verrouillée.
|
|||||||
.TP
|
.TP
|
||||||
.B \fB\-O\fP , \fB\-\-open=\fP \fIBASE_DE_DONNEES\fP
|
.B \fB\-O\fP , \fB\-\-open=\fP \fIBASE_DE_DONNEES\fP
|
||||||
Ouvrir une \fIBASE_DE_DONNEES\fP qui doit être une base présente dans
|
Ouvrir une \fIBASE_DE_DONNEES\fP qui doit être une base présente dans
|
||||||
le répertoire des bases ou le nom d\(aqun arbre familial existant.
|
le répertoire des bases ou le nom d\(aqun arbre familial existant.
|
||||||
Si aucune action n\(aqest définie, les options d\(aqimport ou d\(aqexport
|
Si aucune action n\(aqest définie, les options d\(aqimport ou d\(aqexport
|
||||||
sont données par la ligne de commande puis une session interac‐
|
sont données par la ligne de commande puis une session interactive
|
||||||
tive est ouverte, utilisant cette base de données.
|
est ouverte, utilisant cette base de données.
|
||||||
.sp
|
.sp
|
||||||
Seulement une base peut être ouverte. Si vous utilisez plusieurs
|
Seulement une base peut être ouverte. Si vous utilisez plusieurs
|
||||||
sources, vous devez utiliser l\(aqoption d\(aqimport.
|
sources, vous devez utiliser l\(aqoption d\(aqimport.
|
||||||
@@ -109,9 +109,9 @@ Importer des données depuis un \fIFICHIER\fP . Si vous n\(aqavez pas
|
|||||||
spécifié de base de données alors une base de données temporaire
|
spécifié de base de données alors une base de données temporaire
|
||||||
est utilisée; elle sera effacée quand vous quitterez gramps.
|
est utilisée; elle sera effacée quand vous quitterez gramps.
|
||||||
.sp
|
.sp
|
||||||
Quand plus d\(aqun fichier doit être importé, chacun doit être
|
Quand plus d\(aqun fichier doit être importé, chacun doit être
|
||||||
précédé par la commande \fB\-i\fP . Ces fichiers sont importés dans le
|
précédé par la commande \fB\-i\fP . Ces fichiers sont importés dans le
|
||||||
même ordre, i.e. \fB\-i\fP \fIFICHIER1\fP \fB\-i\fP \fIFICHIER2\fP et \fB\-i\fP \fIFICHIER2\fP \fB\-i\fP
|
même ordre, \fB\-i\fP \fIFICHIER1\fP \fB\-i\fP \fIFICHIER2\fP et \fB\-i\fP \fIFICHIER2\fP \fB\-i\fP
|
||||||
\fIFICHIER1\fP vont tous les deux produire différents IDs gramps.
|
\fIFICHIER1\fP vont tous les deux produire différents IDs gramps.
|
||||||
.TP
|
.TP
|
||||||
.B \fB\-e\fP , \fB\-\-export=\fP \fIFICHIER\fP
|
.B \fB\-e\fP , \fB\-\-export=\fP \fIFICHIER\fP
|
||||||
@@ -124,17 +124,15 @@ précédé par la commande \fB\-e\fP . Ces fichiers sont importés dans le
|
|||||||
même ordre.
|
même ordre.
|
||||||
.TP
|
.TP
|
||||||
.B \fB\-a\fP , \fB\-\-action=\fP \fIACTION\fP
|
.B \fB\-a\fP , \fB\-\-action=\fP \fIACTION\fP
|
||||||
.INDENT 7.0
|
|
||||||
.INDENT 3.5
|
|
||||||
Accomplir une \fIACTION\fP sur les données importées. C\(aqest effectué à
|
Accomplir une \fIACTION\fP sur les données importées. C\(aqest effectué à
|
||||||
la fin de l\(aqimportation. Les actions possibles sont \fBsummary\fP
|
la fin de l\(aqimportation. Les actions possibles sont \fBsummary\fP
|
||||||
(comme le rapport \-> Afficher \-> Statistiques sur la base),
|
(comme le rapport \-> Afficher \-> Statistiques sur la base),
|
||||||
\fBcheck\fP (comme l\(aqoutil \-> Réparation de la base \-> Vérifier et
|
\fBcheck\fP (comme l\(aqoutil \-> Réparation de la base \-> Vérifier et
|
||||||
réparer), \fBreport\fP (produit un rapport) et \fBtool\fP (utilise un
|
réparer), \fBreport\fP (produit un rapport) et \fBtool\fP (utilise un
|
||||||
outil), ces derniers ont besoin de \fIOPTION\fP précédé par la commande \-p.
|
outil), ces derniers ont besoin de \fIOPTION\fP précédé par la commande \-p.
|
||||||
.sp
|
.sp
|
||||||
L\(aq \fIOPTION\fP doit satisfaire ces conditions:
|
L\(aq \fIOPTION\fP doit satisfaire ces conditions:
|
||||||
Il ne doit pas y avoir d\(aqespace. Si certains arguments doivent
|
Il ne doit pas y avoir d\(aqespace. Si certains arguments doivent
|
||||||
utiliser des espaces, la chaîne doit être encadrée par des
|
utiliser des espaces, la chaîne doit être encadrée par des
|
||||||
guillemets. Les options vont par paire nom et valeur. Une
|
guillemets. Les options vont par paire nom et valeur. Une
|
||||||
paire est séparée par un signe égal. Différentes paires sont
|
paire est séparée par un signe égal. Différentes paires sont
|
||||||
@@ -144,25 +142,21 @@ La plupart des options sont spécifiques à chaque rapport. Même
|
|||||||
s\(aqil existe des options communes.
|
s\(aqil existe des options communes.
|
||||||
.sp
|
.sp
|
||||||
\fBname=name\fP
|
\fBname=name\fP
|
||||||
Cette option est obligatoire, elle détermine quel rapport ou
|
Cette option est obligatoire, elle détermine quel rapport ou
|
||||||
outil sera utilisé. Si le name saisi ne correspond à aucun
|
outil sera utilisé. Si le name saisi ne correspond à aucun
|
||||||
module disponible, un message d\(aqerreur sera ajouté.
|
module disponible, un message d\(aqerreur sera ajouté.
|
||||||
.sp
|
.sp
|
||||||
\fBshow=all\fP
|
\fBshow=all\fP
|
||||||
Cette option produit une liste avec les noms des options
|
Cette option produit une liste avec les noms des options
|
||||||
disponibles pour un rapport donné.
|
disponibles pour un rapport donné.
|
||||||
.UNINDENT
|
|
||||||
.UNINDENT
|
|
||||||
.sp
|
.sp
|
||||||
\fBshow=optionname\fP
|
\fBshow=optionname\fP
|
||||||
Cette option affiche une description de toutes les fonctionnalités
|
Cette option affiche une description de toutes les fonctionnalités
|
||||||
proposées par optionname, aussi bien les types que les valeurs pour une option.
|
proposées par optionname, aussi bien les types que les valeurs pour une option.
|
||||||
.INDENT 7.0
|
.sp
|
||||||
.TP
|
Utiliser les options ci\-dessus pour trouver tout sur un rapport
|
||||||
.B Utiliser les options ci\-dessus pour trouver tout sur un rapport
|
|
||||||
choisi.
|
choisi.
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.UNINDENT
|
|
||||||
.sp
|
.sp
|
||||||
Quand plus d\(aqune action doit être effectuée, chacune doit être précédée
|
Quand plus d\(aqune action doit être effectuée, chacune doit être précédée
|
||||||
par la commande \fB\-a\fP . Les actions seront réalisées une à une, dans
|
par la commande \fB\-a\fP . Les actions seront réalisées une à une, dans
|
||||||
@@ -178,12 +172,12 @@ Imprime le numéro de version pour gramps puis quitte.
|
|||||||
.UNINDENT
|
.UNINDENT
|
||||||
.TP
|
.TP
|
||||||
.B \fBOpération\fP
|
.B \fBOpération\fP
|
||||||
Si le premie argument de la ligne de commande ne commence pas par un
|
Si le premier argument de la ligne de commande ne commence pas par un
|
||||||
tiret (i.e. pas d\(aqinstruction), gramps va essayer d\(aqouvrir la base de
|
tiret (i.e. pas d\(aqinstruction), gramps va essayer d\(aqouvrir la base de
|
||||||
données avec le nom donné par le premier argument et démarrer une ses‐
|
données avec le nom donné par le premier argument et démarrer une ses‐
|
||||||
sion interactive, en ignorant le reste de la ligne de commande.
|
sion interactive, en ignorant le reste de la ligne de commande.
|
||||||
.sp
|
.sp
|
||||||
Si la commande \fB\-O\fP est notée, alors gramps va essayer le fichier défini
|
Si la commande \fB\-O\fP est notée, alors gramps va essayer le fichier défini
|
||||||
et va travailler avec ses données, comme pour les autres paramètres de
|
et va travailler avec ses données, comme pour les autres paramètres de
|
||||||
la ligne de commande.
|
la ligne de commande.
|
||||||
.sp
|
.sp
|
||||||
@@ -208,7 +202,7 @@ Utilisez les shell de redirection de \fIstdout\fP et \fIstderr\fP pour sauver
|
|||||||
les messages et les erreurs dans les fichiers.
|
les messages et les erreurs dans les fichiers.
|
||||||
.TP
|
.TP
|
||||||
.B \fBEXEMPLES\fP
|
.B \fBEXEMPLES\fP
|
||||||
Pour ouvrir un arbre familial et y importer un fichier XML, on peut
|
Pour ouvrir un arbre familial et y importer un fichier XML, on peut
|
||||||
saisir:
|
saisir:
|
||||||
.INDENT 7.0
|
.INDENT 7.0
|
||||||
.INDENT 3.5
|
.INDENT 3.5
|
||||||
@@ -217,8 +211,8 @@ saisir:
|
|||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
Ceci ouvre un arbre familial, pour faire la même chose, mais importer
|
Ceci ouvre un arbre familial, pour faire la même chose, mais importer
|
||||||
dans un arbre familial temporaire et démarrer une session interactive,
|
dans un arbre familial temporaire et démarrer une session interactive,
|
||||||
on peut saisir:
|
on peut saisir :
|
||||||
.INDENT 7.0
|
.INDENT 7.0
|
||||||
.INDENT 3.5
|
.INDENT 3.5
|
||||||
\fBgramps \-i\fP \fI\(aqMon Arbre Familial\(aq\fP \fB\-i\fP \fI~/db3.gramps\fP
|
\fBgramps \-i\fP \fI\(aqMon Arbre Familial\(aq\fP \fB\-i\fP \fI~/db3.gramps\fP
|
||||||
@@ -292,22 +286,25 @@ PROFILE pour Windows 2000/XP).
|
|||||||
.TP
|
.TP
|
||||||
.B \fBCONCEPTS\fP
|
.B \fBCONCEPTS\fP
|
||||||
Gramps est un système basé sur le support de plugin\-python, permettant
|
Gramps est un système basé sur le support de plugin\-python, permettant
|
||||||
d\(aqimporter et d\(aqexporter, la saisie, générer des rapports, des outils,
|
d\(aqimporter et d\(aqexporter, la saisie, générer des rapports, des outils,
|
||||||
et afficher des filtres pouvant être ajoutés sans modifier le programme.
|
et afficher des filtres pouvant être ajoutés sans modifier le programme.
|
||||||
.sp
|
.sp
|
||||||
Par ailleurs, gramps permet la génération directe : impression, rap‐
|
Par ailleurs, gramps permet la génération directe : impression, rap‐
|
||||||
ports avec sortie vers d\(aqautres formats, comme \fILibreOffice.org\fP ,
|
ports avec sortie vers d\(aqautres formats, comme \fILibreOffice.org\fP ,
|
||||||
\fIHTML\fP , ou \fILaTeX\fP pour permettre à l\(aqutilisateur de choisir selon ses
|
\fIHTML\fP , ou \fILaTeX\fP pour permettre à l\(aqutilisateur de choisir selon ses
|
||||||
besoins
|
besoins
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
\fBBUGS CONNUS ET LIMITATIONS\fP
|
\fBBUGS CONNUS ET LIMITATIONS\fP
|
||||||
|
.sp
|
||||||
\fBFICHIERS\fP
|
\fBFICHIERS\fP
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.INDENT 3.5
|
.INDENT 3.5
|
||||||
\fI${PREFIX}/bin/gramps\fP
|
\fI${PREFIX}/bin/gramps\fP
|
||||||
.sp
|
.sp
|
||||||
\fI${PREFIX}/share/gramps\fP
|
\fI${PREFIX}/lib/python/dist\-packages/gramps/\fP
|
||||||
|
.sp
|
||||||
|
\fI${PREFIX}/share/\fP
|
||||||
.sp
|
.sp
|
||||||
\fI${HOME}/.gramps\fP
|
\fI${HOME}/.gramps\fP
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
@@ -336,11 +333,10 @@ La documentation pour développeur est disponible sur le site
|
|||||||
\fI\%http://www.gramps-project.org/wiki/index.php?title=Portal:Developers\fP .
|
\fI\%http://www.gramps-project.org/wiki/index.php?title=Portal:Developers\fP .
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
Janvier 2013 4.0.0 gramps(1)
|
gramps(1) @VERSION@ gramps(1)
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Jerome Rapinat
|
Jerome Rapinat
|
||||||
.SH COPYRIGHT
|
.SH COPYRIGHT
|
||||||
2012, Gramps project
|
2012, Gramps project
|
||||||
.\" Generated by docutils manpage writer.
|
.\" Generated by docutils manpage writer.
|
||||||
.\"
|
|
||||||
.
|
.
|
||||||
|
@@ -298,9 +298,11 @@ or LaTeX to allow the users to modify the format to suit their needs.
|
|||||||
|
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.LP
|
.LP
|
||||||
\fI${PREFIX}/bin/gramps\fP
|
\fI${PREFIX}/bin/gramps\fP
|
||||||
.br
|
.br
|
||||||
\fI${PREFIX}/share/gramps\fP
|
\fI${PREFIX}/lib/python/dist\-packages/gramps/\fP
|
||||||
|
.br
|
||||||
|
\fI${PREFIX}/share/\fP
|
||||||
.br
|
.br
|
||||||
\fI${HOME}/.gramps\fP
|
\fI${HOME}/.gramps\fP
|
||||||
|
|
||||||
|
@@ -1,15 +0,0 @@
|
|||||||
# This is the data/man/nl level Makefile for Gramps
|
|
||||||
# $Id: Makefile.am 9819 2008-01-15 15:42:10Z bmcage $
|
|
||||||
|
|
||||||
mandir = @mandir@/nl
|
|
||||||
|
|
||||||
man_IN_FILES = gramps.1.in
|
|
||||||
man_MANS = $(man_IN_FILES:.1.in=.1)
|
|
||||||
|
|
||||||
EXTRA_DIST = $(man_MANS) $(man_IN_FILES)
|
|
||||||
|
|
||||||
gramps.1: $(top_builddir)/config.status gramps.1.in
|
|
||||||
cd $(top_builddir) && CONFIG_FILES=data/man/nl/$@ $(SHELL) ./config.status
|
|
||||||
|
|
||||||
CLEANFILES=$(man_MANS)
|
|
||||||
|
|
@@ -227,11 +227,14 @@ gramps(1) 3.4.0 gramps(1)
|
|||||||
|
|
||||||
|
|
||||||
**GEKENDE BUGS EN BEPERKINGEN**
|
**GEKENDE BUGS EN BEPERKINGEN**
|
||||||
|
|
||||||
**BESTANDEN**
|
**BESTANDEN**
|
||||||
|
|
||||||
*${PREFIX}/bin/gramps*
|
*${PREFIX}/bin/gramps*
|
||||||
|
|
||||||
*${PREFIX}/share/gramps*
|
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||||
|
|
||||||
|
*${PREFIX}/share/*
|
||||||
|
|
||||||
*${HOME}/.gramps*
|
*${HOME}/.gramps*
|
||||||
|
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
# This is the data/man/sv level Makefile for Gramps
|
|
||||||
# $Id: Makefile.am 6189 2006-03-21 19:05:46Z rshura $
|
|
||||||
|
|
||||||
man_IN_FILES = gramps.1.in
|
|
||||||
man_MANS = $(man_IN_FILES:.1.in=.1)
|
|
||||||
|
|
||||||
mandir = @mandir@/pl
|
|
||||||
|
|
||||||
EXTRA_DIST = $(man_MANS) $(man_IN_FILES)
|
|
||||||
|
|
||||||
gramps.1: $(top_builddir)/config.status gramps.1.in
|
|
||||||
cd $(top_builddir) && CONFIG_FILES=data/man/pl/$@ $(SHELL) ./config.status
|
|
||||||
|
|
||||||
CLEANFILES=$(man_MANS)
|
|
@@ -276,7 +276,9 @@ gramps(1) 3.4.0 gramps(1)
|
|||||||
|
|
||||||
*${PREFIX}/bin/gramps*
|
*${PREFIX}/bin/gramps*
|
||||||
|
|
||||||
*${PREFIX}/share/gramps*
|
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||||
|
|
||||||
|
*${PREFIX}/share/*
|
||||||
|
|
||||||
*${HOME}/.gramps (jeśli nie użyta została zmienna środowiskowa GRAMP‐
|
*${HOME}/.gramps (jeśli nie użyta została zmienna środowiskowa GRAMP‐
|
||||||
SHOME)*
|
SHOME)*
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
# This is the data/pt_BR level Makefile for Gramps
|
|
||||||
# $Id: Makefile.am 16377 2011-01-13 18:32:42Z matlas $
|
|
||||||
|
|
||||||
man_IN_FILES = gramps.1.in
|
|
||||||
man_MANS = $(man_IN_FILES:.1.in=.1)
|
|
||||||
|
|
||||||
mandir = @mandir@/pt_BR
|
|
||||||
|
|
||||||
EXTRA_DIST = $(man_MANS) $(man_IN_FILES)
|
|
||||||
|
|
||||||
gramps.1: $(top_builddir)/config.status gramps.1.in
|
|
||||||
cd $(top_builddir) && CONFIG_FILES=data/man/pt_BR/$@ $(SHELL) ./config.status
|
|
||||||
|
|
||||||
CLEANFILES=$(man_MANS)
|
|
@@ -255,9 +255,11 @@ gramps(1) 4.0.0 gramps(1)
|
|||||||
*ARQUIVOS**
|
*ARQUIVOS**
|
||||||
|
|
||||||
*${PREFIX}/bin/gramps*
|
*${PREFIX}/bin/gramps*
|
||||||
|
|
||||||
*${PREFIX}/share/gramps*
|
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||||
|
|
||||||
|
*${PREFIX}/share/*
|
||||||
|
|
||||||
*${HOME}/.gramps*
|
*${HOME}/.gramps*
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
# This is the data/man/sv level Makefile for Gramps
|
|
||||||
# $Id: Makefile.am 6189 2006-03-21 19:05:46Z rshura $
|
|
||||||
|
|
||||||
man_IN_FILES = gramps.1.in
|
|
||||||
man_MANS = $(man_IN_FILES:.1.in=.1)
|
|
||||||
|
|
||||||
mandir = @mandir@/sv
|
|
||||||
|
|
||||||
EXTRA_DIST = $(man_MANS) $(man_IN_FILES)
|
|
||||||
|
|
||||||
gramps.1: $(top_builddir)/config.status gramps.1.in
|
|
||||||
cd $(top_builddir) && CONFIG_FILES=data/man/sv/$@ $(SHELL) ./config.status
|
|
||||||
|
|
||||||
CLEANFILES=$(man_MANS)
|
|
@@ -246,7 +246,9 @@ Gramps(1) 3.4.0 Gramps(1)
|
|||||||
|
|
||||||
*${PREFIX}/bin/gramps*
|
*${PREFIX}/bin/gramps*
|
||||||
|
|
||||||
*${PREFIX}/share/gramps*
|
*${PREFIX}/lib/python/dist-packages/gramps/*
|
||||||
|
|
||||||
|
*${PREFIX}/share/*
|
||||||
|
|
||||||
*${HOME}/.gramps*
|
*${HOME}/.gramps*
|
||||||
|
|
||||||
|
@@ -726,6 +726,7 @@ def cl_book(database, name, book, options_str_dict):
|
|||||||
clr.marginr, clr.margint, clr.marginb))
|
clr.marginr, clr.margint, clr.marginb))
|
||||||
user = User()
|
user = User()
|
||||||
rptlist = []
|
rptlist = []
|
||||||
|
global_style = None
|
||||||
for item in book.get_item_list():
|
for item in book.get_item_list():
|
||||||
|
|
||||||
# The option values were loaded magically by the book parser.
|
# The option values were loaded magically by the book parser.
|
||||||
@@ -743,6 +744,12 @@ def cl_book(database, name, book, options_str_dict):
|
|||||||
report_class, item.option_class, user)
|
report_class, item.option_class, user)
|
||||||
style_sheet = create_style_sheet(item)
|
style_sheet = create_style_sheet(item)
|
||||||
rptlist.append((obj, style_sheet))
|
rptlist.append((obj, style_sheet))
|
||||||
|
if ( item.name == 'table_of_contents' or
|
||||||
|
item.name == 'alphabetical_index' ): # ugly hack: FIXME
|
||||||
|
if global_style is None:
|
||||||
|
global_style = style_sheet
|
||||||
|
else:
|
||||||
|
global_style = create_style_sheet(item, global_style)
|
||||||
|
|
||||||
doc.open(clr.option_class.get_output())
|
doc.open(clr.option_class.get_output())
|
||||||
doc.init()
|
doc.init()
|
||||||
@@ -754,6 +761,8 @@ def cl_book(database, name, book, options_str_dict):
|
|||||||
newpage = 1
|
newpage = 1
|
||||||
rpt.begin_report()
|
rpt.begin_report()
|
||||||
rpt.write_report()
|
rpt.write_report()
|
||||||
|
if global_style:
|
||||||
|
doc.set_style_sheet(global_style)
|
||||||
doc.close()
|
doc.close()
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
@@ -1,21 +0,0 @@
|
|||||||
# This is the src/data level Makefile for gramps
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
SUBDIRS =
|
|
||||||
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@/data
|
|
||||||
|
|
||||||
dist_pkgdata_DATA = \
|
|
||||||
authors.xml \
|
|
||||||
papersize.xml \
|
|
||||||
tips.xml\
|
|
||||||
lds.xml
|
|
||||||
|
|
||||||
# Rules for files with translatable strings
|
|
||||||
# These are taken care of by the intltool
|
|
||||||
xml_in_files = tips.xml.in
|
|
||||||
xml_files = $(xml_in_files:.xml.in=.xml)
|
|
||||||
@INTLTOOL_XML_NOMERGE_RULE@
|
|
||||||
|
|
||||||
EXTRA_DIST = $(xml_in_files)
|
|
||||||
CLEANFILES = $(xml_files)
|
|
@@ -151,6 +151,7 @@ register('behavior.surname-guessing', 0)
|
|||||||
register('behavior.use-tips', False)
|
register('behavior.use-tips', False)
|
||||||
register('behavior.welcome', 100)
|
register('behavior.welcome', 100)
|
||||||
register('behavior.web-search-url', 'http://google.com/#&q=%(text)s')
|
register('behavior.web-search-url', 'http://google.com/#&q=%(text)s')
|
||||||
|
register('behavior.addons-url', "http://svn.code.sf.net/p/gramps-addons/code/branches/gramps40/")
|
||||||
|
|
||||||
register('export.proxy-order', [
|
register('export.proxy-order', [
|
||||||
["privacy", 0],
|
["privacy", 0],
|
||||||
@@ -187,7 +188,7 @@ register('interface.clipboard-height', 300)
|
|||||||
register('interface.clipboard-width', 300)
|
register('interface.clipboard-width', 300)
|
||||||
register('interface.dont-ask', False)
|
register('interface.dont-ask', False)
|
||||||
register('interface.view-categories',
|
register('interface.view-categories',
|
||||||
["Gramplets", "People", "Relationships", "Families",
|
["Dashboard", "People", "Relationships", "Families",
|
||||||
"Ancestry", "Events", "Places", "Geography", "Sources",
|
"Ancestry", "Events", "Places", "Geography", "Sources",
|
||||||
"Citations", "Repositories", "Media", "Notes"])
|
"Citations", "Repositories", "Media", "Notes"])
|
||||||
register('interface.edit-filter-width', 500)
|
register('interface.edit-filter-width', 500)
|
||||||
@@ -208,6 +209,7 @@ register('interface.filter', False)
|
|||||||
register('interface.filter-editor-width', 400)
|
register('interface.filter-editor-width', 400)
|
||||||
register('interface.filter-editor-height', 350)
|
register('interface.filter-editor-height', 350)
|
||||||
register('interface.fullscreen', False)
|
register('interface.fullscreen', False)
|
||||||
|
register('interface.grampletbar-close', False)
|
||||||
register('interface.height', 500)
|
register('interface.height', 500)
|
||||||
register('interface.lds-height', 450)
|
register('interface.lds-height', 450)
|
||||||
register('interface.lds-width', 600)
|
register('interface.lds-width', 600)
|
||||||
@@ -278,6 +280,8 @@ register('preferences.date-format', 0)
|
|||||||
register('preferences.calendar-format-report', 0)
|
register('preferences.calendar-format-report', 0)
|
||||||
register('preferences.cprefix', 'C%04d')
|
register('preferences.cprefix', 'C%04d')
|
||||||
register('preferences.default-source', False)
|
register('preferences.default-source', False)
|
||||||
|
register('preferences.tag-on-import', False)
|
||||||
|
register('preferences.tag-on-import-format', _("Imported %Y/%m/%d %H:%M:%S"))
|
||||||
register('preferences.eprefix', 'E%04d')
|
register('preferences.eprefix', 'E%04d')
|
||||||
register('preferences.family-warn', True)
|
register('preferences.family-warn', True)
|
||||||
register('preferences.fprefix', 'F%04d')
|
register('preferences.fprefix', 'F%04d')
|
||||||
|
@@ -43,6 +43,7 @@ import uuid
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from .ggettext import sgettext as _
|
from .ggettext import sgettext as _
|
||||||
|
from .svn_revision import get_svn_revision
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@@ -50,11 +51,20 @@ from .ggettext import sgettext as _
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
PROGRAM_NAME = "Gramps"
|
PROGRAM_NAME = "Gramps"
|
||||||
if "@VERSIONSTRING@" == "@" + "VERSIONSTRING" + "@":
|
VERSION = "@VERSIONSTRING@"
|
||||||
VERSION = "4.0.0"
|
if VERSION == "@" + "VERSIONSTRING" + "@":
|
||||||
else:
|
raise Exception("Please run 'python setup.py build'")
|
||||||
VERSION = "@VERSIONSTRING@"
|
def get_version_tuple(v):
|
||||||
VERSION_TUPLE = (4, 0, 0)
|
""" Get the numeric-dotted part of version number"""
|
||||||
|
retval = ""
|
||||||
|
for c in v:
|
||||||
|
if c.isdigit() or (c == "." and retval.count(".") <= 1):
|
||||||
|
retval += c
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
return tuple(map(int, retval.split(".")))
|
||||||
|
VERSION_TUPLE = get_version_tuple(VERSION)
|
||||||
|
major_version = "%s.%s" % (VERSION_TUPLE[0], VERSION_TUPLE[1])
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@@ -65,11 +75,11 @@ URL_HOMEPAGE = "http://gramps-project.org/"
|
|||||||
URL_MAILINGLIST = "http://sourceforge.net/mail/?group_id=25770"
|
URL_MAILINGLIST = "http://sourceforge.net/mail/?group_id=25770"
|
||||||
URL_BUGTRACKER = "http://bugs.gramps-project.org/bug_report_advanced_page.php"
|
URL_BUGTRACKER = "http://bugs.gramps-project.org/bug_report_advanced_page.php"
|
||||||
URL_WIKISTRING = "http://gramps-project.org/wiki/index.php?title="
|
URL_WIKISTRING = "http://gramps-project.org/wiki/index.php?title="
|
||||||
URL_MANUAL_PAGE = "Gramps_4.0_Wiki_Manual"
|
URL_MANUAL_PAGE = "Gramps_%s_Wiki_Manual" % major_version
|
||||||
WIKI_FAQ = "FAQ"
|
WIKI_FAQ = "FAQ"
|
||||||
WIKI_KEYBINDINGS = "Gramps_4.0_Wiki_Manual_-_Keybindings"
|
WIKI_KEYBINDINGS = "Gramps_%s_Wiki_Manual_-_Keybindings" % major_version
|
||||||
WIKI_EXTRAPLUGINS= "4.0_Addons"
|
WIKI_EXTRAPLUGINS= "%s_Addons" % major_version
|
||||||
WIKI_EXTRAPLUGINS_RAWDATA = "Plugins4.0&action=raw"
|
WIKI_EXTRAPLUGINS_RAWDATA = "Plugins%s&action=raw" % major_version
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@@ -84,25 +94,6 @@ APP_GRAMPS_PKG = "application/x-gramps-package"
|
|||||||
APP_GENEWEB = "application/x-geneweb"
|
APP_GENEWEB = "application/x-geneweb"
|
||||||
APP_VCARD = ["text/x-vcard", "text/x-vcalendar"]
|
APP_VCARD = ["text/x-vcard", "text/x-vcalendar"]
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# system paths
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
if sys.platform == "win32":
|
|
||||||
if sys.prefix == os.path.dirname(os.getcwd()):
|
|
||||||
PREFIXDIR = sys.prefix
|
|
||||||
SYSCONFDIR = os.path.join(sys.prefix, "etc")
|
|
||||||
else:
|
|
||||||
PREFIXDIR = os.path.join(os.path.dirname(__file__), os.pardir)
|
|
||||||
SYSCONFDIR = os.path.join(PREFIXDIR, "etc")
|
|
||||||
elif sys.platform == "darwin" and sys.prefix != sys.exec_prefix:
|
|
||||||
PREFIXDIR = sys.prefix
|
|
||||||
SYSCONFDIR = os.path.join(sys.prefix, "etc")
|
|
||||||
else:
|
|
||||||
PREFIXDIR = "@prefix@"
|
|
||||||
SYSCONFDIR = "@sysconfdir@"
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Platforms
|
# Platforms
|
||||||
@@ -145,24 +136,6 @@ if sys.version_info[0] < 3:
|
|||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Paths to files - assumes that files reside in the same directory as
|
|
||||||
# this one, and that the plugins directory is in a directory below this.
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(
|
|
||||||
__file__), os.pardir))
|
|
||||||
if sys.version_info[0] < 3:
|
|
||||||
# test for sys.frozen to detect a py2exe executable on Windows
|
|
||||||
if hasattr(sys, "frozen"):
|
|
||||||
ROOT_DIR = os.path.abspath(os.path.dirname(
|
|
||||||
unicode(sys.executable, sys.getfilesystemencoding())))
|
|
||||||
else:
|
|
||||||
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(
|
|
||||||
unicode(__file__, sys.getfilesystemencoding())), os.pardir))
|
|
||||||
|
|
||||||
IMAGE_DIR = os.path.join(ROOT_DIR, "images")
|
|
||||||
VERSION_DIR = os.path.join(
|
VERSION_DIR = os.path.join(
|
||||||
HOME_DIR, "gramps%s%s" % (VERSION_TUPLE[0], VERSION_TUPLE[1]))
|
HOME_DIR, "gramps%s%s" % (VERSION_TUPLE[0], VERSION_TUPLE[1]))
|
||||||
|
|
||||||
@@ -180,15 +153,28 @@ USER_PLUGINS = os.path.join(VERSION_DIR, "plugins")
|
|||||||
USER_DIRLIST = (HOME_DIR, VERSION_DIR, ENV_DIR, TEMP_DIR, THUMB_DIR,
|
USER_DIRLIST = (HOME_DIR, VERSION_DIR, ENV_DIR, TEMP_DIR, THUMB_DIR,
|
||||||
THUMB_NORMAL, THUMB_LARGE, USER_PLUGINS)
|
THUMB_NORMAL, THUMB_LARGE, USER_PLUGINS)
|
||||||
|
|
||||||
ICON = os.path.join(ROOT_DIR, "images", "gramps.png")
|
#-------------------------------------------------------------------------
|
||||||
LOGO = os.path.join(ROOT_DIR, "images", "logo.png")
|
#
|
||||||
SPLASH = os.path.join(ROOT_DIR, "images", "splash.jpg")
|
# Paths to python modules - assumes that the root directory is one level
|
||||||
LICENSE_FILE = os.path.join(ROOT_DIR, "COPYING")
|
# above this one, and that the plugins directory is below the root directory.
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(
|
||||||
|
__file__), os.pardir))
|
||||||
|
if sys.version_info[0] < 3:
|
||||||
|
# test for sys.frozen to detect a py2exe executable on Windows
|
||||||
|
if hasattr(sys, "frozen"):
|
||||||
|
ROOT_DIR = os.path.abspath(os.path.dirname(
|
||||||
|
unicode(sys.executable, sys.getfilesystemencoding())))
|
||||||
|
else:
|
||||||
|
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(
|
||||||
|
unicode(__file__, sys.getfilesystemencoding())), os.pardir))
|
||||||
|
|
||||||
|
#VERSION += get_svn_revision(ROOT_DIR)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Glade files
|
# Glade files
|
||||||
#
|
#
|
||||||
|
|
||||||
GLADE_DIR = os.path.join(ROOT_DIR, "gui", "glade")
|
GLADE_DIR = os.path.join(ROOT_DIR, "gui", "glade")
|
||||||
GLADE_FILE = os.path.join(GLADE_DIR, "gramps.glade")
|
GLADE_FILE = os.path.join(GLADE_DIR, "gramps.glade")
|
||||||
PERSON_GLADE = os.path.join(GLADE_DIR, "edit_person.glade")
|
PERSON_GLADE = os.path.join(GLADE_DIR, "edit_person.glade")
|
||||||
@@ -198,29 +184,43 @@ RULE_GLADE = os.path.join(GLADE_DIR, "rule.glade")
|
|||||||
|
|
||||||
|
|
||||||
PLUGINS_DIR = os.path.join(ROOT_DIR, "plugins")
|
PLUGINS_DIR = os.path.join(ROOT_DIR, "plugins")
|
||||||
DATA_DIR = os.path.join(ROOT_DIR, "data")
|
|
||||||
WEB_DIR = os.path.join(ROOT_DIR, 'webapp')
|
WEB_DIR = os.path.join(ROOT_DIR, 'webapp')
|
||||||
#SYSTEM_FILTERS = os.path.join(DATA_DIR, "system_filters.xml")
|
|
||||||
TIP_DATA = os.path.join(DATA_DIR, "tips.xml")
|
|
||||||
WEBSTUFF_DIR = os.path.join(PLUGINS_DIR, "webstuff")
|
WEBSTUFF_DIR = os.path.join(PLUGINS_DIR, "webstuff")
|
||||||
WEBSTUFF_IMAGE_DIR = os.path.join(WEBSTUFF_DIR, "images")
|
WEBSTUFF_IMAGE_DIR = os.path.join(WEBSTUFF_DIR, "images")
|
||||||
|
|
||||||
PAPERSIZE = os.path.join(DATA_DIR, "papersize.xml")
|
USE_TIPS = False
|
||||||
|
|
||||||
USE_TIPS = False
|
|
||||||
|
|
||||||
if os.sys.platform in WINDOWS:
|
if os.sys.platform in WINDOWS:
|
||||||
USE_THUMBNAILER = False
|
USE_THUMBNAILER = False
|
||||||
else:
|
else:
|
||||||
USE_THUMBNAILER = True
|
USE_THUMBNAILER = True
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Paths to data files.
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
LOCALE_DIR = "@LOCALE_DIR@"
|
||||||
|
DATA_DIR = "@DATA_DIR@"
|
||||||
|
IMAGE_DIR = "@IMAGE_DIR@"
|
||||||
|
DOC_DIR = "@DOC_DIR@"
|
||||||
|
|
||||||
|
TIP_DATA = os.path.join(DATA_DIR, "tips.xml")
|
||||||
|
PAPERSIZE = os.path.join(DATA_DIR, "papersize.xml")
|
||||||
|
|
||||||
|
ICON = os.path.join(IMAGE_DIR, "gramps.png")
|
||||||
|
LOGO = os.path.join(IMAGE_DIR, "logo.png")
|
||||||
|
SPLASH = os.path.join(IMAGE_DIR, "splash.jpg")
|
||||||
|
|
||||||
|
LICENSE_FILE = os.path.join(DOC_DIR, 'COPYING')
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# About box information
|
# About box information
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
COPYRIGHT_MSG = "© 2001-2006 Donald N. Allingham\n" \
|
COPYRIGHT_MSG = "© 2001-2006 Donald N. Allingham\n" \
|
||||||
"© 2007-2012 The Gramps Developers"
|
"© 2007-2013 The Gramps Developers"
|
||||||
COMMENTS = _("Gramps (Genealogical Research and Analysis "
|
COMMENTS = _("Gramps (Genealogical Research and Analysis "
|
||||||
"Management Programming System) is a personal "
|
"Management Programming System) is a personal "
|
||||||
"genealogy program.")
|
"genealogy program.")
|
||||||
@@ -325,3 +325,29 @@ LONGOPTS = [
|
|||||||
SHORTOPTS = "O:C:i:e:f:a:p:d:c:lLhuv?s"
|
SHORTOPTS = "O:C:i:e:f:a:p:d:c:lLhuv?s"
|
||||||
|
|
||||||
GRAMPS_UUID = uuid.UUID('516cd010-5a41-470f-99f8-eb22f1098ad6')
|
GRAMPS_UUID = uuid.UUID('516cd010-5a41-470f-99f8-eb22f1098ad6')
|
||||||
|
|
||||||
|
def need_to_update_const():
|
||||||
|
""" Check to see if this file is older than
|
||||||
|
setup.py or const.py.in """
|
||||||
|
this_file = os.path.join(ROOT_DIR, "gen", "const.py")
|
||||||
|
in_file = os.path.join(ROOT_DIR, "gen", "const.py.in")
|
||||||
|
setup_file = os.path.join(ROOT_DIR, "..", "setup.py")
|
||||||
|
|
||||||
|
if (os.path.exists(this_file) and
|
||||||
|
os.path.exists(in_file) and
|
||||||
|
os.path.exists(setup_file)):
|
||||||
|
|
||||||
|
this_file_time = os.path.getmtime(this_file)
|
||||||
|
in_file_time = os.path.getmtime(in_file)
|
||||||
|
setup_file_time = os.path.getmtime(setup_file)
|
||||||
|
|
||||||
|
# Is this file older than others? If so,
|
||||||
|
# need to run setup
|
||||||
|
return (this_file_time < in_file_time or
|
||||||
|
this_file_time < setup_file_time)
|
||||||
|
else:
|
||||||
|
# Can't tell because can't find the files
|
||||||
|
return False
|
||||||
|
|
||||||
|
if need_to_update_const():
|
||||||
|
print("Outdated gramps.gen.const; please run 'python setup.py build'")
|
||||||
|
@@ -64,6 +64,13 @@ else:
|
|||||||
STRTYPE = str
|
STRTYPE = str
|
||||||
UNITYPE = str
|
UNITYPE = str
|
||||||
cuni = conv_to_unicode_direct
|
cuni = conv_to_unicode_direct
|
||||||
|
|
||||||
|
# handle in database is bytes, while internally Gramps wants unicode for py3
|
||||||
|
if sys.version_info[0] < 3:
|
||||||
|
handle2internal = lambda x: x
|
||||||
|
else:
|
||||||
|
handle2internal = lambda x: conv_to_unicode(x, 'utf-8')
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Platform determination functions
|
# Platform determination functions
|
||||||
|
@@ -102,6 +102,17 @@ DBERRS = (db.DBRunRecoveryError, db.DBAccessError,
|
|||||||
# Helper functions
|
# Helper functions
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
def find_byte_surname(key, data):
|
||||||
|
"""
|
||||||
|
Creating a surname from raw data of a person, to use for sort and index
|
||||||
|
returns a byte string
|
||||||
|
"""
|
||||||
|
surn = __index_surname(data[3][5])
|
||||||
|
# in python 3 we work with unicode internally, but need byte function sometimes
|
||||||
|
if isinstance(surn, UNITYPE):
|
||||||
|
return surn.encode('utf-8')
|
||||||
|
return surn
|
||||||
|
|
||||||
def find_surname(key, data):
|
def find_surname(key, data):
|
||||||
"""
|
"""
|
||||||
Creating a surname from raw data of a person, to use for sort and index
|
Creating a surname from raw data of a person, to use for sort and index
|
||||||
@@ -127,7 +138,10 @@ def __index_surname(surn_list):
|
|||||||
NameOriginType.PATRONYMIC, NameOriginType.MATRONYMIC]) ])
|
NameOriginType.PATRONYMIC, NameOriginType.MATRONYMIC]) ])
|
||||||
else:
|
else:
|
||||||
surn = ""
|
surn = ""
|
||||||
return surn.encode('utf-8')
|
if sys.version_info[0] < 3:
|
||||||
|
return surn.encode('utf-8')
|
||||||
|
else:
|
||||||
|
return surn
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@@ -745,6 +759,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
|||||||
return self.get_from_handle(handle, Tag, self.tag_map)
|
return self.get_from_handle(handle, Tag, self.tag_map)
|
||||||
|
|
||||||
def __get_obj_from_gramps_id(self, val, tbl, class_, prim_tbl):
|
def __get_obj_from_gramps_id(self, val, tbl, class_, prim_tbl):
|
||||||
|
if isinstance(tbl, dict): return None ## trying to get object too early
|
||||||
if isinstance(val, UNITYPE):
|
if isinstance(val, UNITYPE):
|
||||||
val = val.encode('utf-8')
|
val = val.encode('utf-8')
|
||||||
try:
|
try:
|
||||||
|
@@ -53,6 +53,7 @@ from ..ggettext import gettext as _
|
|||||||
# Gramps modules
|
# Gramps modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
from ..constfunc import conv_to_unicode, handle2internal
|
||||||
from .dbconst import *
|
from .dbconst import *
|
||||||
from . import BSDDBTxn
|
from . import BSDDBTxn
|
||||||
from ..errors import DbError
|
from ..errors import DbError
|
||||||
@@ -67,6 +68,7 @@ DBERRS = (db.DBRunRecoveryError, db.DBAccessError,
|
|||||||
|
|
||||||
_SIGBASE = ('person', 'family', 'source', 'event', 'media',
|
_SIGBASE = ('person', 'family', 'source', 'event', 'media',
|
||||||
'place', 'repository', 'reference', 'note', 'tag', 'citation')
|
'place', 'repository', 'reference', 'note', 'tag', 'citation')
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# DbUndo class
|
# DbUndo class
|
||||||
@@ -315,7 +317,7 @@ class DbUndo(object):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
if data is None:
|
if data is None:
|
||||||
emit(signal_root + '-delete', ([handle],))
|
emit(signal_root + '-delete', ([handle2internal(handle)],))
|
||||||
db_map.delete(handle, txn=self.txn)
|
db_map.delete(handle, txn=self.txn)
|
||||||
else:
|
else:
|
||||||
ex_data = db_map.get(handle, txn=self.txn)
|
ex_data = db_map.get(handle, txn=self.txn)
|
||||||
@@ -324,7 +326,7 @@ class DbUndo(object):
|
|||||||
else:
|
else:
|
||||||
signal = signal_root + '-add'
|
signal = signal_root + '-add'
|
||||||
db_map.put(handle, data, txn=self.txn)
|
db_map.put(handle, data, txn=self.txn)
|
||||||
emit(signal, ([handle],))
|
emit(signal, ([handle2internal(handle)],))
|
||||||
|
|
||||||
except DBERRS as msg:
|
except DBERRS as msg:
|
||||||
self.db._log_error()
|
self.db._log_error()
|
||||||
|
@@ -31,7 +31,7 @@ import logging
|
|||||||
LOG = logging.getLogger(".citation")
|
LOG = logging.getLogger(".citation")
|
||||||
|
|
||||||
from ..ggettext import gettext as _
|
from ..ggettext import gettext as _
|
||||||
from ..constfunc import cuni
|
from ..constfunc import cuni, UNITYPE
|
||||||
|
|
||||||
"""
|
"""
|
||||||
methods to upgrade a database from version 13 to current version
|
methods to upgrade a database from version 13 to current version
|
||||||
@@ -144,7 +144,9 @@ def gramps_upgrade_16(self):
|
|||||||
new_citation_list, note_list, change, tag_list,
|
new_citation_list, note_list, change, tag_list,
|
||||||
private, person_ref_list)
|
private, person_ref_list)
|
||||||
with BSDDBTxn(self.env, self.person_map) as txn:
|
with BSDDBTxn(self.env, self.person_map) as txn:
|
||||||
txn.put(str(handle), new_person)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_person)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
LOG.debug("%d persons upgraded with %d citations in %d seconds. " %
|
LOG.debug("%d persons upgraded with %d citations in %d seconds. " %
|
||||||
@@ -176,7 +178,9 @@ def gramps_upgrade_16(self):
|
|||||||
change, date, tag_list, private)
|
change, date, tag_list, private)
|
||||||
LOG.debug(" upgrade new_media %s" % [new_media])
|
LOG.debug(" upgrade new_media %s" % [new_media])
|
||||||
with BSDDBTxn(self.env, self.media_map) as txn:
|
with BSDDBTxn(self.env, self.media_map) as txn:
|
||||||
txn.put(str(handle), new_media)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_media)
|
||||||
LOG.debug(" update ref map media %s" % [handle,
|
LOG.debug(" update ref map media %s" % [handle,
|
||||||
self.get_object_from_handle(handle) ])
|
self.get_object_from_handle(handle) ])
|
||||||
self.update()
|
self.update()
|
||||||
@@ -195,7 +199,7 @@ def gramps_upgrade_16(self):
|
|||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
for place_handle in self.place_map.keys():
|
for place_handle in self.place_map.keys():
|
||||||
place = self.place_map[place_handle]
|
place = self.place_map[place_handle]
|
||||||
(handle, gramps_id, title, int, lat,
|
(handle, gramps_id, title, longi, lat,
|
||||||
main_loc, alt_loc, urls, media_list, source_list, note_list,
|
main_loc, alt_loc, urls, media_list, source_list, note_list,
|
||||||
change, private) = place
|
change, private) = place
|
||||||
if source_list:
|
if source_list:
|
||||||
@@ -208,11 +212,13 @@ def gramps_upgrade_16(self):
|
|||||||
self, media_list)
|
self, media_list)
|
||||||
if source_list or media_list:
|
if source_list or media_list:
|
||||||
new_place = (handle, gramps_id, title,
|
new_place = (handle, gramps_id, title,
|
||||||
int, lat, main_loc, alt_loc, urls,
|
longi, lat, main_loc, alt_loc, urls,
|
||||||
media_list, new_citation_list, note_list,
|
media_list, new_citation_list, note_list,
|
||||||
change, private)
|
change, private)
|
||||||
with BSDDBTxn(self.env, self.place_map) as txn:
|
with BSDDBTxn(self.env, self.place_map) as txn:
|
||||||
txn.put(str(handle), new_place)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_place)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
LOG.debug("%d places upgraded with %d citations in %d seconds. " %
|
LOG.debug("%d places upgraded with %d citations in %d seconds. " %
|
||||||
@@ -260,7 +266,9 @@ def gramps_upgrade_16(self):
|
|||||||
attribute_list, lds_seal_list, new_citation_list,
|
attribute_list, lds_seal_list, new_citation_list,
|
||||||
note_list, change, tag_list, private)
|
note_list, change, tag_list, private)
|
||||||
with BSDDBTxn(self.env, self.family_map) as txn:
|
with BSDDBTxn(self.env, self.family_map) as txn:
|
||||||
txn.put(str(handle), new_family)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_family)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
LOG.debug("%d familys upgraded with %d citations in %d seconds. " %
|
LOG.debug("%d familys upgraded with %d citations in %d seconds. " %
|
||||||
@@ -300,7 +308,9 @@ def gramps_upgrade_16(self):
|
|||||||
attribute_list,
|
attribute_list,
|
||||||
change, private)
|
change, private)
|
||||||
with BSDDBTxn(self.env, self.event_map) as txn:
|
with BSDDBTxn(self.env, self.event_map) as txn:
|
||||||
txn.put(str(handle), new_event)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_event)
|
||||||
t2 = time.time()
|
t2 = time.time()
|
||||||
upgrade_time += t2 - t1
|
upgrade_time += t2 - t1
|
||||||
t3 = time.time()
|
t3 = time.time()
|
||||||
@@ -332,7 +342,9 @@ def gramps_upgrade_16(self):
|
|||||||
new_repository = (handle, gramps_id, the_type, name, note_list,
|
new_repository = (handle, gramps_id, the_type, name, note_list,
|
||||||
address_list, urls, change, private)
|
address_list, urls, change, private)
|
||||||
with BSDDBTxn(self.env, self.repository_map) as txn:
|
with BSDDBTxn(self.env, self.repository_map) as txn:
|
||||||
txn.put(str(handle), new_repository)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_repository)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
LOG.debug("%d repositorys upgraded with %d citations in %d seconds. " %
|
LOG.debug("%d repositorys upgraded with %d citations in %d seconds. " %
|
||||||
@@ -535,7 +547,9 @@ def convert_source_list_to_citation_list_16(self, source_list):
|
|||||||
date, page, confidence, ref, note_list, new_media_list,
|
date, page, confidence, ref, note_list, new_media_list,
|
||||||
new_data_map, new_change, private)
|
new_data_map, new_change, private)
|
||||||
with BSDDBTxn(self.env, self.citation_map) as txn:
|
with BSDDBTxn(self.env, self.citation_map) as txn:
|
||||||
txn.put(str(new_handle), new_citation)
|
if isinstance(new_handle, UNITYPE):
|
||||||
|
new_handle = new_handle.encode('utf-8')
|
||||||
|
txn.put(new_handle, new_citation)
|
||||||
self.cmap_index += 1
|
self.cmap_index += 1
|
||||||
# # add backlinks for references from Citation to Source
|
# # add backlinks for references from Citation to Source
|
||||||
# with BSDDBTxn(self.env) as txn:
|
# with BSDDBTxn(self.env) as txn:
|
||||||
@@ -621,7 +635,9 @@ def gramps_upgrade_15(self):
|
|||||||
)
|
)
|
||||||
|
|
||||||
with BSDDBTxn(self.env, self.person_map) as txn:
|
with BSDDBTxn(self.env, self.person_map) as txn:
|
||||||
txn.put(str(handle), new_person)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_person)
|
||||||
self.update()
|
self.update()
|
||||||
#surname is now different, remove secondary index with names
|
#surname is now different, remove secondary index with names
|
||||||
_db = db.DB(self.env)
|
_db = db.DB(self.env)
|
||||||
@@ -644,7 +660,9 @@ def gramps_upgrade_15(self):
|
|||||||
new_family[13] = []
|
new_family[13] = []
|
||||||
new_family = tuple(new_family)
|
new_family = tuple(new_family)
|
||||||
with BSDDBTxn(self.env, self.family_map) as txn:
|
with BSDDBTxn(self.env, self.family_map) as txn:
|
||||||
txn.put(str(handle), new_family)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_family)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -661,7 +679,9 @@ def gramps_upgrade_15(self):
|
|||||||
new_note[6] = []
|
new_note[6] = []
|
||||||
new_note = tuple(new_note)
|
new_note = tuple(new_note)
|
||||||
with BSDDBTxn(self.env, self.note_map) as txn:
|
with BSDDBTxn(self.env, self.note_map) as txn:
|
||||||
txn.put(str(handle), new_note)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_note)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -674,7 +694,9 @@ def gramps_upgrade_15(self):
|
|||||||
new_media[10] = []
|
new_media[10] = []
|
||||||
new_media = tuple(new_media)
|
new_media = tuple(new_media)
|
||||||
with BSDDBTxn(self.env, self.media_map) as txn:
|
with BSDDBTxn(self.env, self.media_map) as txn:
|
||||||
txn.put(str(handle), new_media)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_media)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -688,7 +710,9 @@ def gramps_upgrade_15(self):
|
|||||||
#new_event[11] = []
|
#new_event[11] = []
|
||||||
new_event = tuple(new_event)
|
new_event = tuple(new_event)
|
||||||
with BSDDBTxn(self.env, self.event_map) as txn:
|
with BSDDBTxn(self.env, self.event_map) as txn:
|
||||||
txn.put(str(handle), new_event)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_event)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -704,7 +728,9 @@ def gramps_upgrade_15(self):
|
|||||||
new_place = new_place[:12] + new_place[13:]
|
new_place = new_place[:12] + new_place[13:]
|
||||||
new_place = tuple(new_place)
|
new_place = tuple(new_place)
|
||||||
with BSDDBTxn(self.env, self.place_map) as txn:
|
with BSDDBTxn(self.env, self.place_map) as txn:
|
||||||
txn.put(str(handle), new_place)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_place)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -717,7 +743,9 @@ def gramps_upgrade_15(self):
|
|||||||
new_source = new_source[:11] + new_source[12:]
|
new_source = new_source[:11] + new_source[12:]
|
||||||
new_source = tuple(new_source)
|
new_source = tuple(new_source)
|
||||||
with BSDDBTxn(self.env, self.source_map) as txn:
|
with BSDDBTxn(self.env, self.source_map) as txn:
|
||||||
txn.put(str(handle), new_source)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_source)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -731,7 +759,9 @@ def gramps_upgrade_15(self):
|
|||||||
new_repository[5] = list(map(convert_address, new_repository[5]))
|
new_repository[5] = list(map(convert_address, new_repository[5]))
|
||||||
new_repository = tuple(new_repository)
|
new_repository = tuple(new_repository)
|
||||||
with BSDDBTxn(self.env, self.repository_map) as txn:
|
with BSDDBTxn(self.env, self.repository_map) as txn:
|
||||||
txn.put(str(handle), new_repository)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_repository)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# Bump up database version. Separate transaction to save metadata.
|
# Bump up database version. Separate transaction to save metadata.
|
||||||
@@ -753,6 +783,8 @@ def convert_marker(self, marker_field):
|
|||||||
tag.set_name(tag_name)
|
tag.set_name(tag_name)
|
||||||
tag.set_priority(len(self.tags))
|
tag.set_priority(len(self.tags))
|
||||||
with BSDDBTxn(self.env, self.tag_map) as txn:
|
with BSDDBTxn(self.env, self.tag_map) as txn:
|
||||||
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
txn.put(handle, tag.serialize())
|
txn.put(handle, tag.serialize())
|
||||||
self.tags[tag_name] = handle
|
self.tags[tag_name] = handle
|
||||||
return self.tags[tag_name]
|
return self.tags[tag_name]
|
||||||
@@ -819,7 +851,9 @@ def gramps_upgrade_14(self):
|
|||||||
new_note = (handle, gramps_id, styled_text, format, note_type,
|
new_note = (handle, gramps_id, styled_text, format, note_type,
|
||||||
change, marker, private)
|
change, marker, private)
|
||||||
with BSDDBTxn(self.env, self.note_map) as txn:
|
with BSDDBTxn(self.env, self.note_map) as txn:
|
||||||
txn.put(str(handle), new_note)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_note)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -839,7 +873,9 @@ def gramps_upgrade_14(self):
|
|||||||
description, place, new_source_list, note_list,
|
description, place, new_source_list, note_list,
|
||||||
new_media_list, new_attribute_list, change,marker,private)
|
new_media_list, new_attribute_list, change,marker,private)
|
||||||
with BSDDBTxn(self.env, self.event_map) as txn:
|
with BSDDBTxn(self.env, self.event_map) as txn:
|
||||||
txn.put(str(handle), new_event)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_event)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -921,7 +957,9 @@ def gramps_upgrade_14(self):
|
|||||||
)
|
)
|
||||||
|
|
||||||
with BSDDBTxn(self.env, self.person_map) as txn:
|
with BSDDBTxn(self.env, self.person_map) as txn:
|
||||||
txn.put(str(handle), new_person)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_person)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -953,7 +991,9 @@ def gramps_upgrade_14(self):
|
|||||||
change, marker, private)
|
change, marker, private)
|
||||||
|
|
||||||
with BSDDBTxn(self.env, self.family_map) as txn:
|
with BSDDBTxn(self.env, self.family_map) as txn:
|
||||||
txn.put(str(handle), new_family)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_family)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -978,7 +1018,9 @@ def gramps_upgrade_14(self):
|
|||||||
new_address_list, urls, change, marker, private)
|
new_address_list, urls, change, marker, private)
|
||||||
|
|
||||||
with BSDDBTxn(self.env, self.repository_map) as txn:
|
with BSDDBTxn(self.env, self.repository_map) as txn:
|
||||||
txn.put(str(handle), new_repository)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_repository)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -996,7 +1038,9 @@ def gramps_upgrade_14(self):
|
|||||||
new_date, marker, private)
|
new_date, marker, private)
|
||||||
|
|
||||||
with BSDDBTxn(self.env, self.media_map) as txn:
|
with BSDDBTxn(self.env, self.media_map) as txn:
|
||||||
txn.put(str(handle), new_media)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_media)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -1004,17 +1048,19 @@ def gramps_upgrade_14(self):
|
|||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
for place_handle in self.place_map.keys():
|
for place_handle in self.place_map.keys():
|
||||||
place = self.place_map[place_handle]
|
place = self.place_map[place_handle]
|
||||||
(handle, gramps_id, title, int, lat,
|
(handle, gramps_id, title, longi, lat,
|
||||||
main_loc, alt_loc, urls, media_list, source_list, note_list,
|
main_loc, alt_loc, urls, media_list, source_list, note_list,
|
||||||
change, marker, private) = place
|
change, marker, private) = place
|
||||||
new_media_list = new_media_list_14(media_list)
|
new_media_list = new_media_list_14(media_list)
|
||||||
new_source_list = new_source_list_14(source_list)
|
new_source_list = new_source_list_14(source_list)
|
||||||
new_place = (handle, gramps_id, title, int, lat,
|
new_place = (handle, gramps_id, title, longi, lat,
|
||||||
main_loc, alt_loc, urls, new_media_list,
|
main_loc, alt_loc, urls, new_media_list,
|
||||||
new_source_list, note_list, change, marker, private)
|
new_source_list, note_list, change, marker, private)
|
||||||
|
|
||||||
with BSDDBTxn(self.env, self.place_map) as txn:
|
with BSDDBTxn(self.env, self.place_map) as txn:
|
||||||
txn.put(str(handle), new_place)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_place)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
@@ -1033,7 +1079,9 @@ def gramps_upgrade_14(self):
|
|||||||
marker, private)
|
marker, private)
|
||||||
|
|
||||||
with BSDDBTxn(self.env, self.source_map) as txn:
|
with BSDDBTxn(self.env, self.source_map) as txn:
|
||||||
txn.put(str(handle), new_source)
|
if isinstance(handle, UNITYPE):
|
||||||
|
handle = handle.encode('utf-8')
|
||||||
|
txn.put(handle, new_source)
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
# Bump up database version. Separate transaction to save metadata.
|
# Bump up database version. Separate transaction to save metadata.
|
||||||
|
@@ -74,13 +74,13 @@ from ..lib.researcher import Researcher
|
|||||||
from . import (DbBsddbRead, DbWriteBase, BSDDBTxn,
|
from . import (DbBsddbRead, DbWriteBase, BSDDBTxn,
|
||||||
DbTxn, BsddbBaseCursor, BsddbDowngradeError, DbVersionError,
|
DbTxn, BsddbBaseCursor, BsddbDowngradeError, DbVersionError,
|
||||||
DbEnvironmentError, DbUpgradeRequiredError, find_surname,
|
DbEnvironmentError, DbUpgradeRequiredError, find_surname,
|
||||||
find_surname_name, DbUndoBSDDB as DbUndo)
|
find_byte_surname, find_surname_name, DbUndoBSDDB as DbUndo)
|
||||||
from .dbconst import *
|
from .dbconst import *
|
||||||
from ..utils.callback import Callback
|
from ..utils.callback import Callback
|
||||||
from ..utils.cast import (conv_unicode_tosrtkey, conv_dbstr_to_unicode)
|
from ..utils.cast import (conv_unicode_tosrtkey, conv_dbstr_to_unicode)
|
||||||
from ..updatecallback import UpdateCallback
|
from ..updatecallback import UpdateCallback
|
||||||
from ..errors import DbError
|
from ..errors import DbError
|
||||||
from ..constfunc import win, conv_to_unicode, cuni, UNITYPE
|
from ..constfunc import win, conv_to_unicode, cuni, UNITYPE, handle2internal
|
||||||
|
|
||||||
_LOG = logging.getLogger(DBLOGNAME)
|
_LOG = logging.getLogger(DBLOGNAME)
|
||||||
LOG = logging.getLogger(".citation")
|
LOG = logging.getLogger(".citation")
|
||||||
@@ -163,7 +163,7 @@ KEY_TO_NAME_MAP = {PERSON_KEY: 'person',
|
|||||||
# Helper functions
|
# Helper functions
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
def find_idmap(key, data):
|
def find_idmap(key, data):
|
||||||
""" return id for association of secondary index.
|
""" return id for association of secondary index.
|
||||||
returns a byte string
|
returns a byte string
|
||||||
@@ -718,7 +718,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
|||||||
if not self.readonly:
|
if not self.readonly:
|
||||||
|
|
||||||
assoc = [
|
assoc = [
|
||||||
(self.person_map, self.surnames, find_surname),
|
(self.person_map, self.surnames, find_byte_surname),
|
||||||
(self.person_map, self.id_trans, find_idmap),
|
(self.person_map, self.id_trans, find_idmap),
|
||||||
(self.family_map, self.fid_trans, find_idmap),
|
(self.family_map, self.fid_trans, find_idmap),
|
||||||
(self.event_map, self.eid_trans, find_idmap),
|
(self.event_map, self.eid_trans, find_idmap),
|
||||||
@@ -857,6 +857,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
|||||||
def delete_primary_from_reference_map(self, handle, transaction, txn=None):
|
def delete_primary_from_reference_map(self, handle, transaction, txn=None):
|
||||||
"""
|
"""
|
||||||
Remove all references to the primary object from the reference_map.
|
Remove all references to the primary object from the reference_map.
|
||||||
|
handle should be utf-8
|
||||||
"""
|
"""
|
||||||
primary_cur = self.get_reference_map_primary_cursor()
|
primary_cur = self.get_reference_map_primary_cursor()
|
||||||
|
|
||||||
@@ -875,8 +876,12 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
|||||||
|
|
||||||
# so we need the second tuple give us a reference that we can
|
# so we need the second tuple give us a reference that we can
|
||||||
# combine with the primary_handle to get the main key.
|
# combine with the primary_handle to get the main key.
|
||||||
|
if sys.version_info[0] < 3:
|
||||||
main_key = (handle, pickle.loads(data)[1][1])
|
#handle should be in python 2 str
|
||||||
|
main_key = (handle, pickle.loads(data)[1][1])
|
||||||
|
else:
|
||||||
|
#python 3 work internally with unicode
|
||||||
|
main_key = (handle.decode('utf-8'), pickle.loads(data)[1][1])
|
||||||
|
|
||||||
# The trick is not to remove while inside the cursor,
|
# The trick is not to remove while inside the cursor,
|
||||||
# but collect them all and remove after the cursor is closed
|
# but collect them all and remove after the cursor is closed
|
||||||
@@ -950,7 +955,12 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
|||||||
the passed transaction.
|
the passed transaction.
|
||||||
"""
|
"""
|
||||||
if isinstance(key, tuple):
|
if isinstance(key, tuple):
|
||||||
#create a string key
|
#create a byte string key, first validity check in python 3!
|
||||||
|
for val in key:
|
||||||
|
if sys.version_info[0] >= 3 and isinstance(val, bytes):
|
||||||
|
raise DbError(_('An attempt is made to safe a reference key '
|
||||||
|
'which is partly bytecode, this is not allowed.\n'
|
||||||
|
'Key is %s') % str(key))
|
||||||
key = str(key)
|
key = str(key)
|
||||||
if isinstance(key, UNITYPE):
|
if isinstance(key, UNITYPE):
|
||||||
key = key.encode('utf-8')
|
key = key.encode('utf-8')
|
||||||
@@ -1895,10 +1905,10 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
|||||||
"""
|
"""
|
||||||
if (obj_type, trans_type) in transaction:
|
if (obj_type, trans_type) in transaction:
|
||||||
if trans_type == TXNDEL:
|
if trans_type == TXNDEL:
|
||||||
handles = [handle for handle, data in
|
handles = [handle2internal(handle) for handle, data in
|
||||||
transaction[(obj_type, trans_type)]]
|
transaction[(obj_type, trans_type)]]
|
||||||
else:
|
else:
|
||||||
handles = [handle for handle, data in
|
handles = [handle2internal(handle) for handle, data in
|
||||||
transaction[(obj_type, trans_type)]
|
transaction[(obj_type, trans_type)]
|
||||||
if (handle, None) not in transaction[(obj_type,
|
if (handle, None) not in transaction[(obj_type,
|
||||||
TXNDEL)]]
|
TXNDEL)]]
|
||||||
|
@@ -54,7 +54,10 @@ Specific symbols for parts of a name are defined:
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from ..ggettext import sgettext as _
|
from ..ggettext import sgettext as _
|
||||||
|
import sys
|
||||||
import re
|
import re
|
||||||
|
import logging
|
||||||
|
LOG = logging.getLogger(".gramps.gen")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@@ -1047,8 +1050,17 @@ def fn(%s):
|
|||||||
else:
|
else:
|
||||||
return p + str + s
|
return p + str + s
|
||||||
return cleanup_name("%s" %% (%s))""" % (args, new_fmt, ",".join(param))
|
return cleanup_name("%s" %% (%s))""" % (args, new_fmt, ",".join(param))
|
||||||
exec(s)
|
try:
|
||||||
|
exec(s) in globals(), locals()
|
||||||
return locals()['fn']
|
return locals()['fn']
|
||||||
|
except:
|
||||||
|
LOG.error("\n" + 'Wrong name format string %s' % new_fmt
|
||||||
|
+"\n" + ("ERROR, Edit Name format in Preferences->Display to correct")
|
||||||
|
+"\n" + _('Wrong name format string %s') % new_fmt
|
||||||
|
+"\n" + ("ERROR, Edit Name format in Preferences->Display to correct")
|
||||||
|
)
|
||||||
|
def errfn(*arg):
|
||||||
|
return _("ERROR, Edit Name format in Preferences")
|
||||||
|
return errfn
|
||||||
|
|
||||||
displayer = NameDisplay()
|
displayer = NameDisplay()
|
||||||
|
@@ -111,6 +111,7 @@ class FilterList(object):
|
|||||||
parser.parse(the_file)
|
parser.parse(the_file)
|
||||||
the_file.close()
|
the_file.close()
|
||||||
except (IOError, OSError):
|
except (IOError, OSError):
|
||||||
|
print("IO/OSError in _filterlist.py")
|
||||||
pass
|
pass
|
||||||
except SAXParseException:
|
except SAXParseException:
|
||||||
print("Parser error")
|
print("Parser error")
|
||||||
|
@@ -26,13 +26,17 @@
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from ...ggettext import gettext as _
|
from ...ggettext import gettext as _
|
||||||
|
import logging
|
||||||
|
LOG = logging.getLogger(".filter")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from .. import CustomFilters
|
# we need global variableCustomFilters, so we need to query gramps.gen.filters
|
||||||
|
# when we need this variable, not import it at the start!
|
||||||
|
import gramps.gen.filters
|
||||||
from . import Rule
|
from . import Rule
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@@ -48,31 +52,36 @@ class MatchesFilterBase(Rule):
|
|||||||
Subclasses need to define the namespace class attribute.
|
Subclasses need to define the namespace class attribute.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
labels = [_('Filter name:')]
|
labels = [_('Filter name:')]
|
||||||
name = 'Objects matching the <filter>'
|
name = 'Objects matching the <filter>'
|
||||||
description = "Matches objects matched by the specified filter name"
|
description = "Matches objects matched by the specified filter name"
|
||||||
category = _('General filters')
|
category = _('General filters')
|
||||||
|
|
||||||
def prepare(self, db):
|
def prepare(self, db):
|
||||||
if CustomFilters:
|
if gramps.gen.filters.CustomFilters:
|
||||||
filters = CustomFilters.get_filters_dict(self.namespace)
|
filters = gramps.gen.filters.CustomFilters.get_filters_dict(self.namespace)
|
||||||
if self.list[0] in filters:
|
if self.list[0] in filters:
|
||||||
filt = filters[self.list[0]]
|
filt = filters[self.list[0]]
|
||||||
for rule in filt.flist:
|
for rule in filt.flist:
|
||||||
rule.requestprepare(db)
|
rule.requestprepare(db)
|
||||||
|
else:
|
||||||
|
LOG.warning(_("Can't find filter %s in the defined custom filters")
|
||||||
|
% self.list[0])
|
||||||
|
else:
|
||||||
|
LOG.warning(_("Can't find filter %s in the defined custom filters")
|
||||||
|
% self.list[0])
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
if CustomFilters:
|
if gramps.gen.filters.CustomFilters:
|
||||||
filters = CustomFilters.get_filters_dict(self.namespace)
|
filters = gramps.gen.filters.CustomFilters.get_filters_dict(self.namespace)
|
||||||
if self.list[0] in filters:
|
if self.list[0] in filters:
|
||||||
filt = filters[self.list[0]]
|
filt = filters[self.list[0]]
|
||||||
for rule in filt.flist:
|
for rule in filt.flist:
|
||||||
rule.requestreset()
|
rule.requestreset()
|
||||||
|
|
||||||
def apply(self, db, obj):
|
def apply(self, db, obj):
|
||||||
if CustomFilters:
|
if gramps.gen.filters.CustomFilters:
|
||||||
filters = CustomFilters.get_filters_dict(self.namespace)
|
filters = gramps.gen.filters.CustomFilters.get_filters_dict(self.namespace)
|
||||||
if self.list[0] in filters:
|
if self.list[0] in filters:
|
||||||
filt = filters[self.list[0]]
|
filt = filters[self.list[0]]
|
||||||
return filt.check(db, obj.handle)
|
return filt.check(db, obj.handle)
|
||||||
@@ -82,8 +91,8 @@ class MatchesFilterBase(Rule):
|
|||||||
"""
|
"""
|
||||||
Return the selected filter or None.
|
Return the selected filter or None.
|
||||||
"""
|
"""
|
||||||
if CustomFilters:
|
if gramps.gen.filters.CustomFilters:
|
||||||
filters = CustomFilters.get_filters_dict(self.namespace)
|
filters = gramps.gen.filters.CustomFilters.get_filters_dict(self.namespace)
|
||||||
if self.list[0] in filters:
|
if self.list[0] in filters:
|
||||||
return filters[self.list[0]]
|
return filters[self.list[0]]
|
||||||
return None
|
return None
|
||||||
|
@@ -60,6 +60,7 @@ from ._childhasnameof import ChildHasNameOf
|
|||||||
from ._childhasidof import ChildHasIdOf
|
from ._childhasidof import ChildHasIdOf
|
||||||
from ._changedsince import ChangedSince
|
from ._changedsince import ChangedSince
|
||||||
from ._hastag import HasTag
|
from ._hastag import HasTag
|
||||||
|
from ._hastwins import HasTwins
|
||||||
|
|
||||||
editor_rule_list = [
|
editor_rule_list = [
|
||||||
AllFamilies,
|
AllFamilies,
|
||||||
@@ -89,4 +90,5 @@ editor_rule_list = [
|
|||||||
ChildHasIdOf,
|
ChildHasIdOf,
|
||||||
ChangedSince,
|
ChangedSince,
|
||||||
HasTag,
|
HasTag,
|
||||||
|
HasTwins,
|
||||||
]
|
]
|
||||||
|
64
gramps/gen/filters/rules/family/_hastwins.py
Normal file
64
gramps/gen/filters/rules/family/_hastwins.py
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#
|
||||||
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
|
#
|
||||||
|
# Copyright (C) 2013 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
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
# $Id$
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Standard Python modules
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
from ....ggettext import gettext as _
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# GRAMPS modules
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
from .. import Rule
|
||||||
|
from ....lib.childreftype import ChildRefType
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# HasTwins
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
class HasTwins(Rule):
|
||||||
|
"""Rule that checks for a family with twins"""
|
||||||
|
|
||||||
|
name = _('Families with twins')
|
||||||
|
description = _("Matches families with twins")
|
||||||
|
category = _('Child filters')
|
||||||
|
|
||||||
|
def apply(self, db, family):
|
||||||
|
date_list = []
|
||||||
|
for childref in family.get_child_ref_list():
|
||||||
|
if int(childref.get_mother_relation()) == ChildRefType.BIRTH:
|
||||||
|
child = db.get_person_from_handle(childref.ref)
|
||||||
|
birthref = child.get_birth_ref()
|
||||||
|
if birthref:
|
||||||
|
birth = db.get_event_from_handle(birthref.ref)
|
||||||
|
sortval = birth.get_date_object().get_sort_value()
|
||||||
|
if sortval != 0:
|
||||||
|
if sortval in date_list:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
date_list.append(sortval)
|
||||||
|
return False
|
@@ -36,6 +36,7 @@ from ._matchesfilter import MatchesFilter
|
|||||||
from ._hasnote import HasNote
|
from ._hasnote import HasNote
|
||||||
from ._changedsince import ChangedSince
|
from ._changedsince import ChangedSince
|
||||||
from ._hastag import HasTag
|
from ._hastag import HasTag
|
||||||
|
from ._hastype import HasType
|
||||||
|
|
||||||
editor_rule_list = [
|
editor_rule_list = [
|
||||||
AllNotes,
|
AllNotes,
|
||||||
@@ -49,4 +50,5 @@ editor_rule_list = [
|
|||||||
MatchesFilter,
|
MatchesFilter,
|
||||||
ChangedSince,
|
ChangedSince,
|
||||||
HasTag,
|
HasTag,
|
||||||
|
HasType,
|
||||||
]
|
]
|
||||||
|
57
gramps/gen/filters/rules/note/_hastype.py
Normal file
57
gramps/gen/filters/rules/note/_hastype.py
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
#
|
||||||
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
|
#
|
||||||
|
# Copyright (C) 2002-2006 Donald N. Allingham
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
# $Id$
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Standard Python modules
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
from ....ggettext import gettext as _
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Gramps modules
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
from ....lib.notetype import NoteType
|
||||||
|
from .. import Rule
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# HasType
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
class HasType(Rule):
|
||||||
|
"""Rule that checks for a note of a particular type."""
|
||||||
|
|
||||||
|
labels = [ _('Note type:') ]
|
||||||
|
name = _('Notes with the particular type')
|
||||||
|
description = _("Matches notes with the particular type ")
|
||||||
|
category = _('General filters')
|
||||||
|
|
||||||
|
def apply(self, db, note):
|
||||||
|
if not self.list[0]:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
specified_type = NoteType()
|
||||||
|
specified_type.set_from_xml_str(self.list[0])
|
||||||
|
return note.get_type() == specified_type
|
@@ -69,6 +69,7 @@ class NoteType(GrampsType):
|
|||||||
REPORT_TEXT = 23 # this is used for notes used for reports
|
REPORT_TEXT = 23 # this is used for notes used for reports
|
||||||
# indicate a note is html code
|
# indicate a note is html code
|
||||||
HTML_CODE = 24
|
HTML_CODE = 24
|
||||||
|
TODO = 25
|
||||||
|
|
||||||
_CUSTOM = CUSTOM
|
_CUSTOM = CUSTOM
|
||||||
_DEFAULT = GENERAL
|
_DEFAULT = GENERAL
|
||||||
@@ -84,6 +85,7 @@ class NoteType(GrampsType):
|
|||||||
(CITATION, _('Citation'), "Citation"),
|
(CITATION, _('Citation'), "Citation"),
|
||||||
(REPORT_TEXT, _("Report"), "Report"),
|
(REPORT_TEXT, _("Report"), "Report"),
|
||||||
(HTML_CODE, _("Html code"), "Html code"),
|
(HTML_CODE, _("Html code"), "Html code"),
|
||||||
|
(TODO, _("To Do"), "To Do"),
|
||||||
]
|
]
|
||||||
|
|
||||||
_DATAMAPIGNORE = [
|
_DATAMAPIGNORE = [
|
||||||
|
@@ -22,12 +22,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from ._gnomemime import get_description, get_type, mime_type_is_defined
|
from ._winmime import get_description, get_type, mime_type_is_defined
|
||||||
except:
|
except:
|
||||||
try:
|
from ._pythonmime import get_description, get_type, mime_type_is_defined
|
||||||
from ._winmime import get_description, get_type, mime_type_is_defined
|
|
||||||
except:
|
|
||||||
from ._pythonmime import get_description, get_type, mime_type_is_defined
|
|
||||||
|
|
||||||
def base_type(val):
|
def base_type(val):
|
||||||
return val.split('/')[0]
|
return val.split('/')[0]
|
||||||
|
@@ -1,71 +0,0 @@
|
|||||||
#
|
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
|
||||||
#
|
|
||||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
from gi.repository import Gtk
|
|
||||||
|
|
||||||
try:
|
|
||||||
from gnomevfs import mime_get_short_list_applications, \
|
|
||||||
mime_get_description, get_mime_type, mime_get_default_application
|
|
||||||
except:
|
|
||||||
from gnome.vfs import mime_get_short_list_applications, \
|
|
||||||
mime_get_description, get_mime_type, mime_get_default_application
|
|
||||||
|
|
||||||
from ..ggettext import gettext as _
|
|
||||||
|
|
||||||
def get_description(type):
|
|
||||||
"""Return the description of the specified mime type."""
|
|
||||||
try:
|
|
||||||
return mime_get_description(type)
|
|
||||||
except:
|
|
||||||
return _("unknown")
|
|
||||||
|
|
||||||
def get_type(file):
|
|
||||||
"""Return the mime type of the specified file."""
|
|
||||||
try:
|
|
||||||
return get_mime_type(file)
|
|
||||||
except:
|
|
||||||
return _('unknown')
|
|
||||||
|
|
||||||
def mime_type_is_defined(type):
|
|
||||||
"""
|
|
||||||
Return True if a description for a mime type exists.
|
|
||||||
"""
|
|
||||||
try:
|
|
||||||
mime_get_description(type)
|
|
||||||
return True
|
|
||||||
except:
|
|
||||||
return False
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# private functions
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
def _is_good_command(cmd):
|
|
||||||
"""
|
|
||||||
We don't know what to do with certain substitution values.
|
|
||||||
If we find one, skip the command.
|
|
||||||
"""
|
|
||||||
for sub in [ "%m", "%i", "%c" ]:
|
|
||||||
if cmd.find(sub) != -1:
|
|
||||||
return False
|
|
||||||
return True
|
|
@@ -368,7 +368,7 @@ class Gramplet(object):
|
|||||||
"""
|
"""
|
||||||
from gi.repository import GObject
|
from gi.repository import GObject
|
||||||
self._pause = True
|
self._pause = True
|
||||||
if self._idle_id == 0:
|
if self._idle_id != 0:
|
||||||
GObject.source_remove(self._idle_id)
|
GObject.source_remove(self._idle_id)
|
||||||
self._idle_id = 0
|
self._idle_id = 0
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ import sys
|
|||||||
if sys.version_info[0] < 3:
|
if sys.version_info[0] < 3:
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
else:
|
else:
|
||||||
from io import StringIO
|
from io import BytesIO
|
||||||
import tempfile
|
import tempfile
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
import sys
|
import sys
|
||||||
@@ -369,7 +369,10 @@ class GVDocBase(BaseDoc, GVDoc):
|
|||||||
BaseDoc.__init__(self, None, paper_style)
|
BaseDoc.__init__(self, None, paper_style)
|
||||||
|
|
||||||
self._filename = None
|
self._filename = None
|
||||||
self._dot = StringIO()
|
if sys.version_info[0] < 3:
|
||||||
|
self._dot = StringIO()
|
||||||
|
else:
|
||||||
|
self._dot = BytesIO()
|
||||||
self._paper = paper_style
|
self._paper = paper_style
|
||||||
|
|
||||||
get_option_by_name = options.menu.get_option_by_name
|
get_option_by_name = options.menu.get_option_by_name
|
||||||
@@ -595,7 +598,10 @@ class GVDotDoc(GVDocBase):
|
|||||||
if self._filename[-3:] != ".gv":
|
if self._filename[-3:] != ".gv":
|
||||||
self._filename += ".gv"
|
self._filename += ".gv"
|
||||||
|
|
||||||
dotfile = open(self._filename, "w")
|
if sys.version_info[0] < 3:
|
||||||
|
dotfile = open(self._filename, "w")
|
||||||
|
else:
|
||||||
|
dotfile = open(self._filename, "wb")
|
||||||
dotfile.write(self._dot.getvalue())
|
dotfile.write(self._dot.getvalue())
|
||||||
dotfile.close()
|
dotfile.close()
|
||||||
|
|
||||||
@@ -630,7 +636,10 @@ class GVPsDoc(GVDocBase):
|
|||||||
|
|
||||||
# Create a temporary dot file
|
# Create a temporary dot file
|
||||||
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
||||||
dotfile = os.fdopen(handle,"w")
|
if sys.version_info[0] < 3:
|
||||||
|
dotfile = os.fdopen(handle, "w")
|
||||||
|
else:
|
||||||
|
dotfile = os.fdopen(handle, "wb")
|
||||||
dotfile.write(self._dot.getvalue())
|
dotfile.write(self._dot.getvalue())
|
||||||
dotfile.close()
|
dotfile.close()
|
||||||
|
|
||||||
@@ -647,10 +656,13 @@ class GVPsDoc(GVDocBase):
|
|||||||
# See bug tracker issue 2815
|
# See bug tracker issue 2815
|
||||||
# :cairo does not work with Graphviz 2.26.3 and later See issue 4164
|
# :cairo does not work with Graphviz 2.26.3 and later See issue 4164
|
||||||
# Covert filename to str using file system encoding.
|
# Covert filename to str using file system encoding.
|
||||||
fname = self._filename.encode(sys.getfilesystemencoding())
|
if sys.version_info[0] < 3:
|
||||||
|
fname = self._filename.encode(sys.getfilesystemencoding())
|
||||||
|
else:
|
||||||
|
fname = self._filename
|
||||||
|
|
||||||
command = 'dot -Tps:cairo -o"%s" "%s"' % (fname, tmp_dot)
|
command = 'dot -Tps:cairo -o"%s" "%s"' % (fname, tmp_dot)
|
||||||
dotversion = Popen(['dot', '-V'], stderr=PIPE).communicate(input=None)[1]
|
dotversion = str(Popen(['dot', '-V'], stderr=PIPE).communicate(input=None)[1])
|
||||||
# Problem with dot 2.26.3 and later and multiple pages, which gives "cairo: out of
|
# Problem with dot 2.26.3 and later and multiple pages, which gives "cairo: out of
|
||||||
# memory" If the :cairo is skipped for these cases it gives acceptable
|
# memory" If the :cairo is skipped for these cases it gives acceptable
|
||||||
# result.
|
# result.
|
||||||
@@ -685,11 +697,17 @@ class GVSvgDoc(GVDocBase):
|
|||||||
|
|
||||||
# Create a temporary dot file
|
# Create a temporary dot file
|
||||||
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
||||||
dotfile = os.fdopen(handle,"w")
|
if sys.version_info[0] < 3:
|
||||||
|
dotfile = os.fdopen(handle, "w")
|
||||||
|
else:
|
||||||
|
dotfile = os.fdopen(handle, "wb")
|
||||||
dotfile.write(self._dot.getvalue())
|
dotfile.write(self._dot.getvalue())
|
||||||
dotfile.close()
|
dotfile.close()
|
||||||
# Covert filename to str using file system encoding.
|
# Covert filename to str using file system encoding.
|
||||||
fname = self._filename.encode(sys.getfilesystemencoding())
|
if sys.version_info[0] < 3:
|
||||||
|
fname = self._filename.encode(sys.getfilesystemencoding())
|
||||||
|
else:
|
||||||
|
fname = self._filename
|
||||||
|
|
||||||
# Generate the SVG file.
|
# Generate the SVG file.
|
||||||
os.system( 'dot -Tsvg -o"%s" "%s"' % (fname, tmp_dot) )
|
os.system( 'dot -Tsvg -o"%s" "%s"' % (fname, tmp_dot) )
|
||||||
@@ -722,11 +740,17 @@ class GVSvgzDoc(GVDocBase):
|
|||||||
|
|
||||||
# Create a temporary dot file
|
# Create a temporary dot file
|
||||||
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
||||||
dotfile = os.fdopen(handle,"w")
|
if sys.version_info[0] < 3:
|
||||||
|
dotfile = os.fdopen(handle, "w")
|
||||||
|
else:
|
||||||
|
dotfile = os.fdopen(handle, "wb")
|
||||||
dotfile.write(self._dot.getvalue())
|
dotfile.write(self._dot.getvalue())
|
||||||
dotfile.close()
|
dotfile.close()
|
||||||
# Covert filename to str using file system encoding.
|
# Covert filename to str using file system encoding.
|
||||||
fname = self._filename.encode(sys.getfilesystemencoding())
|
if sys.version_info[0] < 3:
|
||||||
|
fname = self._filename.encode(sys.getfilesystemencoding())
|
||||||
|
else:
|
||||||
|
fname = self._filename
|
||||||
|
|
||||||
# Generate the SVGZ file.
|
# Generate the SVGZ file.
|
||||||
os.system( 'dot -Tsvgz -o"%s" "%s"' % (fname, tmp_dot) )
|
os.system( 'dot -Tsvgz -o"%s" "%s"' % (fname, tmp_dot) )
|
||||||
@@ -759,11 +783,17 @@ class GVPngDoc(GVDocBase):
|
|||||||
|
|
||||||
# Create a temporary dot file
|
# Create a temporary dot file
|
||||||
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
||||||
dotfile = os.fdopen(handle,"w")
|
if sys.version_info[0] < 3:
|
||||||
|
dotfile = os.fdopen(handle, "w")
|
||||||
|
else:
|
||||||
|
dotfile = os.fdopen(handle, "wb")
|
||||||
dotfile.write(self._dot.getvalue())
|
dotfile.write(self._dot.getvalue())
|
||||||
dotfile.close()
|
dotfile.close()
|
||||||
# Covert filename to str using file system encoding.
|
# Covert filename to str using file system encoding.
|
||||||
fname = self._filename.encode(sys.getfilesystemencoding())
|
if sys.version_info[0] < 3:
|
||||||
|
fname = self._filename.encode(sys.getfilesystemencoding())
|
||||||
|
else:
|
||||||
|
fname = self._filename
|
||||||
|
|
||||||
# Generate the PNG file.
|
# Generate the PNG file.
|
||||||
os.system( 'dot -Tpng -o"%s" "%s"' % (fname, tmp_dot) )
|
os.system( 'dot -Tpng -o"%s" "%s"' % (fname, tmp_dot) )
|
||||||
@@ -796,11 +826,17 @@ class GVJpegDoc(GVDocBase):
|
|||||||
|
|
||||||
# Create a temporary dot file
|
# Create a temporary dot file
|
||||||
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
||||||
dotfile = os.fdopen(handle,"w")
|
if sys.version_info[0] < 3:
|
||||||
|
dotfile = os.fdopen(handle, "w")
|
||||||
|
else:
|
||||||
|
dotfile = os.fdopen(handle, "wb")
|
||||||
dotfile.write(self._dot.getvalue())
|
dotfile.write(self._dot.getvalue())
|
||||||
dotfile.close()
|
dotfile.close()
|
||||||
# Covert filename to str using file system encoding.
|
# Covert filename to str using file system encoding.
|
||||||
fname = self._filename.encode(sys.getfilesystemencoding())
|
if sys.version_info[0] < 3:
|
||||||
|
fname = self._filename.encode(sys.getfilesystemencoding())
|
||||||
|
else:
|
||||||
|
fname = self._filename
|
||||||
|
|
||||||
# Generate the JPEG file.
|
# Generate the JPEG file.
|
||||||
os.system( 'dot -Tjpg -o"%s" "%s"' % (fname, tmp_dot) )
|
os.system( 'dot -Tjpg -o"%s" "%s"' % (fname, tmp_dot) )
|
||||||
@@ -833,11 +869,17 @@ class GVGifDoc(GVDocBase):
|
|||||||
|
|
||||||
# Create a temporary dot file
|
# Create a temporary dot file
|
||||||
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
||||||
dotfile = os.fdopen(handle,"w")
|
if sys.version_info[0] < 3:
|
||||||
|
dotfile = os.fdopen(handle, "w")
|
||||||
|
else:
|
||||||
|
dotfile = os.fdopen(handle, "wb")
|
||||||
dotfile.write(self._dot.getvalue())
|
dotfile.write(self._dot.getvalue())
|
||||||
dotfile.close()
|
dotfile.close()
|
||||||
# Covert filename to str using file system encoding.
|
# Covert filename to str using file system encoding.
|
||||||
fname = self._filename.encode(sys.getfilesystemencoding())
|
if sys.version_info[0] < 3:
|
||||||
|
fname = self._filename.encode(sys.getfilesystemencoding())
|
||||||
|
else:
|
||||||
|
fname = self._filename
|
||||||
|
|
||||||
# Generate the GIF file.
|
# Generate the GIF file.
|
||||||
os.system( 'dot -Tgif -o"%s" "%s"' % (fname, tmp_dot) )
|
os.system( 'dot -Tgif -o"%s" "%s"' % (fname, tmp_dot) )
|
||||||
@@ -873,11 +915,17 @@ class GVPdfGvDoc(GVDocBase):
|
|||||||
|
|
||||||
# Create a temporary dot file
|
# Create a temporary dot file
|
||||||
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
||||||
dotfile = os.fdopen(handle,"w")
|
if sys.version_info[0] < 3:
|
||||||
|
dotfile = os.fdopen(handle, "w")
|
||||||
|
else:
|
||||||
|
dotfile = os.fdopen(handle, "wb")
|
||||||
dotfile.write(self._dot.getvalue())
|
dotfile.write(self._dot.getvalue())
|
||||||
dotfile.close()
|
dotfile.close()
|
||||||
# Covert filename to str using file system encoding.
|
# Convert filename to str using file system encoding.
|
||||||
fname = self._filename.encode(sys.getfilesystemencoding())
|
if sys.version_info[0] < 3:
|
||||||
|
fname = self._filename.encode(sys.getfilesystemencoding())
|
||||||
|
else:
|
||||||
|
fname = self._filename
|
||||||
|
|
||||||
# Generate the PDF file.
|
# Generate the PDF file.
|
||||||
os.system( 'dot -Tpdf -o"%s" "%s"' % (fname, tmp_dot) )
|
os.system( 'dot -Tpdf -o"%s" "%s"' % (fname, tmp_dot) )
|
||||||
@@ -908,7 +956,10 @@ class GVPdfGsDoc(GVDocBase):
|
|||||||
|
|
||||||
# Create a temporary dot file
|
# Create a temporary dot file
|
||||||
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
(handle, tmp_dot) = tempfile.mkstemp(".gv" )
|
||||||
dotfile = os.fdopen(handle,"w")
|
if sys.version_info[0] < 3:
|
||||||
|
dotfile = os.fdopen(handle, "w")
|
||||||
|
else:
|
||||||
|
dotfile = os.fdopen(handle, "wb")
|
||||||
dotfile.write(self._dot.getvalue())
|
dotfile.write(self._dot.getvalue())
|
||||||
dotfile.close()
|
dotfile.close()
|
||||||
|
|
||||||
@@ -922,7 +973,7 @@ class GVPdfGsDoc(GVDocBase):
|
|||||||
# :cairo does not work with Graphviz 2.26.3 and later See issue 4164
|
# :cairo does not work with Graphviz 2.26.3 and later See issue 4164
|
||||||
|
|
||||||
command = 'dot -Tps:cairo -o"%s" "%s"' % ( tmp_ps, tmp_dot )
|
command = 'dot -Tps:cairo -o"%s" "%s"' % ( tmp_ps, tmp_dot )
|
||||||
dotversion = Popen(['dot', '-V'], stderr=PIPE).communicate(input=None)[1]
|
dotversion = str(Popen(['dot', '-V'], stderr=PIPE).communicate(input=None)[1])
|
||||||
# Problem with dot 2.26.3 and later and multiple pages, which gives "cairo: out
|
# Problem with dot 2.26.3 and later and multiple pages, which gives "cairo: out
|
||||||
# of memory". If the :cairo is skipped for these cases it gives
|
# of memory". If the :cairo is skipped for these cases it gives
|
||||||
# acceptable result.
|
# acceptable result.
|
||||||
@@ -936,7 +987,10 @@ class GVPdfGsDoc(GVDocBase):
|
|||||||
height_pt = int( (paper_size.get_height_inches() * 72) + 0.5 )
|
height_pt = int( (paper_size.get_height_inches() * 72) + 0.5 )
|
||||||
|
|
||||||
# Convert to PDF using ghostscript
|
# Convert to PDF using ghostscript
|
||||||
fname = self._filename.encode(sys.getfilesystemencoding())
|
if sys.version_info[0] < 3:
|
||||||
|
fname = self._filename.encode(sys.getfilesystemencoding())
|
||||||
|
else:
|
||||||
|
fname = self._filename
|
||||||
command = '%s -q -sDEVICE=pdfwrite -dNOPAUSE -dDEVICEWIDTHPOINTS=%d' \
|
command = '%s -q -sDEVICE=pdfwrite -dNOPAUSE -dDEVICEWIDTHPOINTS=%d' \
|
||||||
' -dDEVICEHEIGHTPOINTS=%d -sOutputFile="%s" "%s" -c quit' \
|
' -dDEVICEHEIGHTPOINTS=%d -sOutputFile="%s" "%s" -c quit' \
|
||||||
% ( _GS_CMD, width_pt, height_pt, fname, tmp_ps )
|
% ( _GS_CMD, width_pt, height_pt, fname, tmp_ps )
|
||||||
|
@@ -448,11 +448,11 @@ class BookParser(handler.ContentHandler):
|
|||||||
# Functions
|
# Functions
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def create_style_sheet(item):
|
def create_style_sheet(item, previous_style=None):
|
||||||
"""
|
"""
|
||||||
Create a style sheet for a book item.
|
Create a style sheet for a book item, appending any previous_style.
|
||||||
"""
|
"""
|
||||||
selected_style = StyleSheet()
|
selected_style = StyleSheet(previous_style)
|
||||||
|
|
||||||
handler = item.option_class.handler
|
handler = item.option_class.handler
|
||||||
|
|
||||||
|
@@ -43,14 +43,13 @@ from .. import (CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_CODE, CATEGORY_WEB,
|
|||||||
CATEGORY_BOOK, CATEGORY_GRAPHVIZ)
|
CATEGORY_BOOK, CATEGORY_GRAPHVIZ)
|
||||||
|
|
||||||
standalone_categories = {
|
standalone_categories = {
|
||||||
CATEGORY_TEXT : _("Text Reports"),
|
CATEGORY_TEXT : ("RepText", _("Text Reports")),
|
||||||
CATEGORY_DRAW : _("Graphical Reports"),
|
CATEGORY_DRAW : ("RepGraph", _("Graphical Reports")),
|
||||||
CATEGORY_CODE : _("Code Generators"),
|
CATEGORY_CODE : ("RepCode", _("Code Generators")),
|
||||||
CATEGORY_WEB : _("Web Pages"),
|
CATEGORY_WEB : ("RepWeb", _("Web Pages")),
|
||||||
CATEGORY_BOOK : _("Books"),
|
CATEGORY_BOOK : ("RepBook", _("Books")),
|
||||||
CATEGORY_GRAPHVIZ : _("Graphs"),
|
CATEGORY_GRAPHVIZ : ("Graphs", _("Graphs")),
|
||||||
}
|
}
|
||||||
|
|
||||||
book_categories = {
|
book_categories = {
|
||||||
CATEGORY_TEXT : _("Text"),
|
CATEGORY_TEXT : _("Text"),
|
||||||
CATEGORY_DRAW : _("Graphics"),
|
CATEGORY_DRAW : _("Graphics"),
|
||||||
|
@@ -908,7 +908,7 @@ class DocOptionHandler(_options.OptionHandler):
|
|||||||
# First we set options_dict values based on the saved options
|
# First we set options_dict values based on the saved options
|
||||||
options = self.saved_option_list.get_options()
|
options = self.saved_option_list.get_options()
|
||||||
docgen_names = self.option_list_collection.docgen_names
|
docgen_names = self.option_list_collection.docgen_names
|
||||||
for option_name, option_data in options.iteritems():
|
for option_name, option_data in options.items():
|
||||||
if ( option_name in self.options_dict and
|
if ( option_name in self.options_dict and
|
||||||
isinstance(option_data, list) and
|
isinstance(option_data, list) and
|
||||||
option_data and
|
option_data and
|
||||||
|
@@ -35,7 +35,7 @@ import os
|
|||||||
if sys.version_info[0] < 3:
|
if sys.version_info[0] < 3:
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
else:
|
else:
|
||||||
from io import StringIO
|
from io import StringIO, BytesIO
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@@ -219,7 +219,11 @@ def load_addon_file(path, callback=None):
|
|||||||
callback(_("Unable to open '%s'") % path)
|
callback(_("Unable to open '%s'") % path)
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
buffer = StringIO(fp.read())
|
content = fp.read()
|
||||||
|
if sys.version_info[0] < 3:
|
||||||
|
buffer = StringIO(content)
|
||||||
|
else:
|
||||||
|
buffer = BytesIO(content)
|
||||||
except:
|
except:
|
||||||
if callback:
|
if callback:
|
||||||
callback(_("Error in reading '%s'") % path)
|
callback(_("Error in reading '%s'") % path)
|
||||||
|
@@ -29,17 +29,23 @@ Provide soundex calculation
|
|||||||
# Standard python modules
|
# Standard python modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import string
|
import sys
|
||||||
import unicodedata
|
import unicodedata
|
||||||
|
if sys.version_info[0] < 3:
|
||||||
|
import string
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# constants
|
# constants
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
IGNORE = "HW~!@#$%^&*()_+=-`[]\|;:'/?.,<>\" \t\f\v"
|
IGNORE = "HW~!@#$%^&*()_+=-`[]\|;:'/?.,<>\" \t\f\v"
|
||||||
TABLE = string.maketrans('ABCDEFGIJKLMNOPQRSTUVXYZ',
|
if sys.version_info[0] < 3:
|
||||||
'012301202245501262301202')
|
TABLE = string.maketrans('ABCDEFGIJKLMNOPQRSTUVXYZ',
|
||||||
|
'012301202245501262301202')
|
||||||
|
else:
|
||||||
|
TABLE = bytes.maketrans(b'ABCDEFGIJKLMNOPQRSTUVXYZ',
|
||||||
|
b'012301202245501262301202')
|
||||||
|
|
||||||
from .constfunc import conv_to_unicode_direct
|
from .constfunc import conv_to_unicode_direct
|
||||||
|
|
||||||
@@ -55,9 +61,14 @@ def soundex(strval):
|
|||||||
conv_to_unicode_direct(strval.upper().strip())).encode('ASCII', 'ignore')
|
conv_to_unicode_direct(strval.upper().strip())).encode('ASCII', 'ignore')
|
||||||
if not strval:
|
if not strval:
|
||||||
return "Z000"
|
return "Z000"
|
||||||
strval = strval.encode('iso-8859-1')
|
if sys.version_info[0] < 3:
|
||||||
str2 = strval[0]
|
strval = strval.encode('iso-8859-1') # Really?
|
||||||
strval = strval.translate(TABLE, IGNORE)
|
str2 = strval[0]
|
||||||
|
strval = strval.translate(TABLE, IGNORE)
|
||||||
|
else:
|
||||||
|
strval = strval.decode('ASCII', 'ignore')
|
||||||
|
str2 = strval[0]
|
||||||
|
strval = strval.translate(TABLE)
|
||||||
if not strval:
|
if not strval:
|
||||||
return "Z000"
|
return "Z000"
|
||||||
prev = strval[0]
|
prev = strval[0]
|
||||||
|
56
gramps/gen/svn_revision.py
Normal file
56
gramps/gen/svn_revision.py
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
#
|
||||||
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Doug Blank <doug.blank@gmail.com>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
# $Id$
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
if sys.version_info[0] < 3:
|
||||||
|
cuni = unicode
|
||||||
|
else:
|
||||||
|
def to_utf8(s):
|
||||||
|
return s.decode("utf-8")
|
||||||
|
cuni = to_utf8
|
||||||
|
|
||||||
|
def get_svn_revision(path=""):
|
||||||
|
stdout = ""
|
||||||
|
try:
|
||||||
|
p = subprocess.Popen("svnversion -n \"%s\"" % path, shell=True,
|
||||||
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
(stdout, stderr) = p.communicate()
|
||||||
|
except:
|
||||||
|
return "" # subprocess failed
|
||||||
|
# subprocess worked
|
||||||
|
if stdout: # has output
|
||||||
|
stdout = cuni(stdout) # get a proper string
|
||||||
|
if (" " in stdout) or (stdout == "exported"):
|
||||||
|
# one of svnversion's 1.7 non-version responses:
|
||||||
|
# 'Unversioned directory'
|
||||||
|
# 'Unversioned file'
|
||||||
|
# 'Uncommitted local addition, copy or move'
|
||||||
|
# svnversion's 1.6 non-version response:
|
||||||
|
# 'exported'
|
||||||
|
return ""
|
||||||
|
else:
|
||||||
|
return "-r" + stdout
|
||||||
|
else: # no output from svnversion
|
||||||
|
return ""
|
||||||
|
|
@@ -35,7 +35,8 @@ from __future__ import division
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import time
|
import time
|
||||||
import collections
|
import collections
|
||||||
|
import logging
|
||||||
|
_LOG = logging.getLogger(".gen")
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Callback updater
|
# Callback updater
|
||||||
@@ -71,6 +72,9 @@ class UpdateCallback(object):
|
|||||||
|
|
||||||
def set_total(self, total):
|
def set_total(self, total):
|
||||||
self.total = total
|
self.total = total
|
||||||
|
if self.total == 0:
|
||||||
|
_LOG.warning('UpdateCallback with total == 0 created')
|
||||||
|
self.total = 1
|
||||||
|
|
||||||
def update_empty(self, count=None):
|
def update_empty(self, count=None):
|
||||||
pass
|
pass
|
||||||
|
@@ -101,13 +101,16 @@ class ProbablyAlive(object):
|
|||||||
death_date = None
|
death_date = None
|
||||||
birth_date = None
|
birth_date = None
|
||||||
explain = ""
|
explain = ""
|
||||||
# If the recorded death year is before current year then
|
|
||||||
# things are simple.
|
|
||||||
if death_ref and death_ref.get_role().is_primary():
|
if death_ref and death_ref.get_role().is_primary():
|
||||||
if death_ref:
|
if death_ref:
|
||||||
death = self.db.get_event_from_handle(death_ref.ref)
|
death = self.db.get_event_from_handle(death_ref.ref)
|
||||||
if death and death.get_date_object().get_start_date() != Date.EMPTY:
|
if death and death.get_date_object().is_valid():
|
||||||
death_date = death.get_date_object()
|
death_date = death.get_date_object()
|
||||||
|
elif death: # has a death event, but it is no valid:
|
||||||
|
death_date = Today() # before today
|
||||||
|
death_date.set_modifier(Date.MOD_BEFORE)
|
||||||
|
explain = _("death event without date")
|
||||||
|
|
||||||
# Look for Cause Of Death, Burial or Cremation events.
|
# Look for Cause Of Death, Burial or Cremation events.
|
||||||
# These are fairly good indications that someone's not alive.
|
# These are fairly good indications that someone's not alive.
|
||||||
@@ -117,7 +120,12 @@ class ProbablyAlive(object):
|
|||||||
ev = self.db.get_event_from_handle(ev_ref.ref)
|
ev = self.db.get_event_from_handle(ev_ref.ref)
|
||||||
if ev and ev.type.is_death_fallback():
|
if ev and ev.type.is_death_fallback():
|
||||||
death_date = ev.get_date_object()
|
death_date = ev.get_date_object()
|
||||||
explain = _("death-related evidence")
|
if death_date.get_start_date().is_valid():
|
||||||
|
explain = _("death-related evidence")
|
||||||
|
else:
|
||||||
|
death_date = Today() # before today
|
||||||
|
death_date.set_modifier(Date.MOD_BEFORE)
|
||||||
|
explain = _("death-related evidence without date")
|
||||||
|
|
||||||
# If they were born within X years before current year then
|
# If they were born within X years before current year then
|
||||||
# assume they are alive (we already know they are not dead).
|
# assume they are alive (we already know they are not dead).
|
||||||
@@ -226,13 +234,25 @@ class ProbablyAlive(object):
|
|||||||
if mother_handle == person.handle and father_handle:
|
if mother_handle == person.handle and father_handle:
|
||||||
father = self.db.get_person_from_handle(father_handle)
|
father = self.db.get_person_from_handle(father_handle)
|
||||||
date1, date2, explain, other = self.probably_alive_range(father, is_spouse=True)
|
date1, date2, explain, other = self.probably_alive_range(father, is_spouse=True)
|
||||||
if date1 and date2:
|
if date1 and date1.get_year() != 0:
|
||||||
return date1, date2, _("a spouse, ") + explain, other
|
return (Date().copy_ymd(date1.get_year() - self.AVG_GENERATION_GAP),
|
||||||
|
Date().copy_ymd(date1.get_year() - self.AVG_GENERATION_GAP + self.MAX_AGE_PROB_ALIVE),
|
||||||
|
_("a spouse's birth-related date, ") + explain, other)
|
||||||
|
elif date2 and date2.get_year() != 0:
|
||||||
|
return (Date().copy_ymd(date2.get_year() + self.AVG_GENERATION_GAP - self.MAX_AGE_PROB_ALIVE),
|
||||||
|
Date().copy_ymd(date2.get_year() + self.AVG_GENERATION_GAP),
|
||||||
|
_("a spouse's death-related date, ") + explain, other)
|
||||||
elif father_handle == person.handle and mother_handle:
|
elif father_handle == person.handle and mother_handle:
|
||||||
mother = self.db.get_person_from_handle(mother_handle)
|
mother = self.db.get_person_from_handle(mother_handle)
|
||||||
date1, date2, explain, other = self.probably_alive_range(mother, is_spouse=True)
|
date1, date2, explain, other = self.probably_alive_range(mother, is_spouse=True)
|
||||||
if date1 and date2:
|
if date1 and date1.get_year() != 0:
|
||||||
return date1, date2, _("a spouse, ") + explain, other
|
return (Date().copy_ymd(date1.get_year() - self.AVG_GENERATION_GAP),
|
||||||
|
Date().copy_ymd(date1.get_year() - self.AVG_GENERATION_GAP + self.MAX_AGE_PROB_ALIVE),
|
||||||
|
_("a spouse's birth-related date, ") + explain, other)
|
||||||
|
elif date2 and date2.get_year() != 0:
|
||||||
|
return (Date().copy_ymd(date2.get_year() + self.AVG_GENERATION_GAP - self.MAX_AGE_PROB_ALIVE),
|
||||||
|
Date().copy_ymd(date2.get_year() + self.AVG_GENERATION_GAP),
|
||||||
|
_("a spouse's death-related date, ") + explain, other)
|
||||||
# Let's check the family events and see if we find something
|
# Let's check the family events and see if we find something
|
||||||
for ref in family.get_event_ref_list():
|
for ref in family.get_event_ref_list():
|
||||||
if ref:
|
if ref:
|
||||||
@@ -483,7 +503,7 @@ def probably_alive(person, db,
|
|||||||
death += limit # add these years to death
|
death += limit # add these years to death
|
||||||
# Finally, check to see if current_date is between dates
|
# Finally, check to see if current_date is between dates
|
||||||
result = (current_date.match(birth, ">=") and
|
result = (current_date.match(birth, ">=") and
|
||||||
current_date.match(death, "<="))
|
current_date.match(death, "<<"))
|
||||||
if return_range:
|
if return_range:
|
||||||
return (result, birth, death, explain, relative)
|
return (result, birth, death, explain, relative)
|
||||||
else:
|
else:
|
||||||
|
@@ -31,8 +31,11 @@ Utility functions to cast types
|
|||||||
# Python modules
|
# Python modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
import os
|
||||||
import locale
|
import locale
|
||||||
import sys
|
import sys
|
||||||
|
import logging
|
||||||
|
LOG = logging.getLogger(".")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@@ -42,19 +45,48 @@ import sys
|
|||||||
from ..datehandler import codeset
|
from ..datehandler import codeset
|
||||||
from ..constfunc import conv_to_unicode, conv_to_unicode_direct, UNITYPE, STRTYPE
|
from ..constfunc import conv_to_unicode, conv_to_unicode_direct, UNITYPE, STRTYPE
|
||||||
|
|
||||||
"""
|
try:
|
||||||
strxfrm needs it's unicode argument correctly cast before used.
|
import PyICU
|
||||||
"""
|
if os.environ.has_key("LC_COLLATE"):
|
||||||
if sys.version_info[0] < 3:
|
collation = os.environ['LC_COLLATE']
|
||||||
conv_unicode_tosrtkey = lambda x: locale.strxfrm(x.encode(codeset, 'replace'))
|
else:
|
||||||
else:
|
collation = os.environ["LANG"]
|
||||||
conv_unicode_tosrtkey = lambda x: locale.strxfrm(x)
|
language_and_country = collation.rsplit('.', 1)[0]
|
||||||
|
if language_and_country in PyICU.Collator.getAvailableLocales().keys():
|
||||||
if codeset == 'UTF-8':
|
loc = language_and_country
|
||||||
conv_str_tosrtkey = lambda x: locale.strxfrm(x)
|
else:
|
||||||
else:
|
language = collation.rsplit('_', 1)[0]
|
||||||
conv_str_tosrtkey = lambda x: locale.strxfrm(
|
if language in PyICU.Collator.getAvailableLocales().keys():
|
||||||
conv_to_unicode(x,'UTF-8').encode(codeset, 'replace'))
|
LOG.warn(_("Language and country %s not supported by ICU: "
|
||||||
|
"but language %s is supported and will be used" %
|
||||||
|
(language_and_country, language)))
|
||||||
|
loc = language
|
||||||
|
else:
|
||||||
|
LOG.warn(_("Neither Language and country %s nor language %s "
|
||||||
|
"supported by ICU: using en_GB" %
|
||||||
|
(language_and_country, language)))
|
||||||
|
loc = "en_GB"
|
||||||
|
|
||||||
|
collator = PyICU.Collator.createInstance(PyICU.Locale(loc))
|
||||||
|
# on ICU, the functions need to receive unicode
|
||||||
|
conv_unicode_tosrtkey = lambda x: collator.getCollationKey(
|
||||||
|
x).getByteArray()
|
||||||
|
conv_str_tosrtkey = lambda x: collator.getCollationKey(
|
||||||
|
x.decode("UTF-8")).getByteArray()
|
||||||
|
except:
|
||||||
|
"""
|
||||||
|
strxfrm needs it's unicode argument correctly cast before used.
|
||||||
|
"""
|
||||||
|
if sys.version_info[0] < 3:
|
||||||
|
conv_unicode_tosrtkey = lambda x: locale.strxfrm(x.encode(codeset, 'replace'))
|
||||||
|
else:
|
||||||
|
conv_unicode_tosrtkey = lambda x: locale.strxfrm(x)
|
||||||
|
|
||||||
|
if codeset == 'UTF-8':
|
||||||
|
conv_str_tosrtkey = lambda x: locale.strxfrm(x)
|
||||||
|
else:
|
||||||
|
conv_str_tosrtkey = lambda x: locale.strxfrm(
|
||||||
|
conv_to_unicode(x,'UTF-8').encode(codeset, 'replace'))
|
||||||
|
|
||||||
def conv_tosrtkey(value):
|
def conv_tosrtkey(value):
|
||||||
if isinstance(value, UNITYPE):
|
if isinstance(value, UNITYPE):
|
||||||
|
@@ -558,7 +558,6 @@ def get_referents(handle, db, primary_objects):
|
|||||||
for primary in primary_objects:
|
for primary in primary_objects:
|
||||||
primary_list = [item[1] for item in object_list if item[0] == primary]
|
primary_list = [item[1] for item in object_list if item[0] == primary]
|
||||||
the_lists = the_lists + (primary_list, )
|
the_lists = the_lists + (primary_list, )
|
||||||
|
|
||||||
return the_lists
|
return the_lists
|
||||||
|
|
||||||
def get_source_referents(source_handle, db):
|
def get_source_referents(source_handle, db):
|
||||||
|
@@ -20,6 +20,6 @@
|
|||||||
|
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
from .TabbedDoc import TabbedDoc
|
from .tabbeddoc import TabbedDoc
|
||||||
from .ODSTab import ODSTab
|
from .odstab import ODSTab
|
||||||
from .CSVTab import CSVTab
|
from .csvtab import CSVTab
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user