Compare commits

..

76 Commits

Author SHA1 Message Date
d080d15352 ready for alpha3
svn: r20964
2013-01-03 18:20:37 +00:00
f3c4314a89 new strings added for alpha3
svn: r20963
2013-01-03 18:15:08 +00:00
2284694530 typo
svn: r20962
2013-01-03 17:48:03 +00:00
15edee3a26 support for upgrade of database on python3
svn: r20960
2013-01-03 15:33:50 +00:00
d0e698ffac note model with wrong tag handle, gracefully continue
svn: r20958
2013-01-03 15:09:18 +00:00
addfaa933f FIX MAJOR ERROR blocking upgrade of old family trees !
svn: r20956
2013-01-03 11:26:13 +00:00
e2fc32c4c0 Fix exec problem in python 2 after previous change
svn: r20954
2013-01-03 11:19:05 +00:00
46e8d865b1 updated german translation
svn: r20953
2013-01-03 11:18:16 +00:00
c208b91184 Recover gracefully from some errors in python3
svn: r20950
2013-01-03 10:28:51 +00:00
ab6342af70 6258: Error during start of Gramps for certain LANG values
svn: r20948
2013-01-03 09:50:36 +00:00
715ddbbab3 6274: Tried to use Charts View and receive 'NameError: global name 'gen' is not defined'
svn: r20947
2013-01-03 05:41:28 +00:00
cc936c589b updated dutch translation
svn: r20945
2013-01-03 00:04:42 +00:00
f554ffd57d URL for Welcome Gramplet was still pointing to 3.3 manual
svn: r20942
2013-01-02 20:26:23 +00:00
46e9edaf59 [r20933]Bug 6268: Fix check_po for python3
svn: r20940
2013-01-02 17:27:39 +00:00
29620a31ef 6249: Please, add a tag when importing. Adds preference, and tag on import for CSV, XML, and GEDCOM. Cleaned up preferences, and added 'GEDCOM' to add source on import text.
svn: r20939
2013-01-02 07:12:22 +00:00
ca2fd738d0 Wait for report to exist before trying to download
svn: r20937
2013-01-02 03:20:16 +00:00
821caa8a5f 4719: Narweb Privacy issue, probably_alive uses spouse birth/death directly
svn: r20936
2013-01-02 03:02:25 +00:00
3a45e70f54 New URL for gramps-addons
svn: r20931
2013-01-01 20:08:45 +00:00
89f6c7d83e updated dutch translation
svn: r20928
2013-01-01 16:45:31 +00:00
ca73e01512 6266: loading plugin manager gives error
svn: r20926
2013-01-01 16:28:47 +00:00
bfcecc646d 6265: can not make back up
svn: r20923
2013-01-01 11:15:45 +00:00
77f9760504 6203: typo when interrupting a gramplet
svn: r20920
2013-01-01 07:15:23 +00:00
3a93d03a4a Two different types of selection data
svn: r20918
2012-12-31 20:55:52 +00:00
03851db458 Changes for gtk3 clipboard to work
svn: r20913
2012-12-31 18:57:02 +00:00
9f87dfd54b Improve check to prevent overwriting const.py
svn: r20911
2012-12-31 18:18:20 +00:00
711e25e5bb 6258: Error during start of Gramps for certain LANG values
svn: r20908
2012-12-31 15:00:35 +00:00
f1eecb349d Add timestamp to downloads
svn: r20907
2012-12-31 14:58:45 +00:00
04baa6b50f 6112: use get_indices method on TreePath for "old" Gtk version (e.g, 3.6.1)
svn: r20903
2012-12-31 13:39:32 +00:00
c18d73ea8f update translation template
svn: r20901
2012-12-31 09:59:59 +00:00
671f64c08c update NEWS and RELEASE_NOTES files, update ChangeLog (no revision)
svn: r20900
2012-12-31 09:48:50 +00:00
b9cd27550f Fix structure of build directory for locale files (merged from trunk; changes by Nick.H), road to alpha2
svn: r20899
2012-12-31 09:44:49 +00:00
8b26f688cb 6205: Gtk.CALENDAR needs a migration to new GI/GTK3 API
svn: r20896
2012-12-30 23:20:31 +00:00
e41c6db70d Added addons-url to config and Preferences; currently set to invalid URL, but will update in a couple of days when new addons URL comes on-line
svn: r20895
2012-12-30 22:00:58 +00:00
fdcc02d1bd Fix divisionbyzero in python3
svn: r20888
2012-12-30 17:32:22 +00:00
f4f5104b72 6205: Gtk.CALENDAR needs a migration to new GI/GTK3 API
Also: don't expand the calendar more than needed to show it.


svn: r20884
2012-12-30 15:41:54 +00:00
0caf61b805 avoid specific case with decimal comparison
svn: r20882
2012-12-30 15:28:48 +00:00
c46a66ecd1 More version strings
svn: r20880
2012-12-30 15:14:40 +00:00
35d553b4eb typo
svn: r20879
2012-12-30 10:05:42 +00:00
8bc6d475d9 updated dutch translation
svn: r20877
2012-12-29 22:11:31 +00:00
b5fec9d1a3 Set the correct number of update callbacks. Bug #6219.
svn: r20875
2012-12-29 17:20:47 +00:00
1a5c516179 6112: Cannot install addons via dialog
svn: r20869
2012-12-28 20:33:01 +00:00
054d29612c 6208: Cannot iterate on attributes when trying to paginate via cairodoc
At same time, fix deprecated cairocontext


svn: r20863
2012-12-28 17:21:28 +00:00
ad066ba200 updated dutch translation
svn: r20862
2012-12-28 16:51:41 +00:00
ffb3b1e232 6123: Index into undohistory, correct fail on older gobject
svn: r20859
2012-12-28 13:01:28 +00:00
76c896f977 Improve hover handling on displaytabs
svn: r20858
2012-12-28 10:27:38 +00:00
5e00312139 spacing, tab (fr) and paths for files (en, fr)
svn: r20855
2012-12-28 09:41:22 +00:00
c7ad3f3295 correct wrong function call
svn: r20851
2012-12-27 17:50:58 +00:00
11723ffd8c updated german translation
svn: r20850
2012-12-27 12:13:26 +00:00
cb9bebee1e Fix crash on callback after clean_up in gallerytab
svn: r20848
2012-12-26 23:18:50 +00:00
a9ac56b33c bug 1772: follow cursor to completely resolve bug
svn: r20846
2012-12-26 22:39:40 +00:00
19038fab93 bug 1772, correct event handling
svn: r20844
2012-12-26 22:22:07 +00:00
fd13311aa0 1. context menu on displaytabs showing
2. partially do bug 1772


svn: r20842
2012-12-26 22:15:03 +00:00
ec0b9fb54b 1567: beautify Relation Ship Graph, remove - if no date of birth or death
svn: r20840
2012-12-26 18:19:17 +00:00
8b94955772 GTK3 conversion in tools
svn: r20838
2012-12-24 12:35:40 +00:00
9a229466fd updated dutch translation
svn: r20837
2012-12-24 08:16:52 +00:00
647c9cfef5 rows_reoredered patch not yet in GTK
svn: r20833
2012-12-23 14:07:16 +00:00
29443339cb small translation and uptades
svn: r20832
2012-12-23 14:05:35 +00:00
f4f2747c65 updated dutch translation
svn: r20830
2012-12-23 08:11:31 +00:00
ba7913fe3c Restore include to git.gnome.org
svn: r20828
2012-12-23 02:20:13 +00:00
5526f64e1f Mods for Gtk3, Gramps 4.0.0
svn: r20827
2012-12-23 02:17:31 +00:00
0a17eab461 spacing, tab (fr) and VERSION (en, fr)
svn: r20825
2012-12-22 19:48:21 +00:00
fcce312e0a update used paths and gramps versions
svn: r20823
2012-12-22 17:51:22 +00:00
4ed2b0bace Convert validated masked entry to normal gtk.entry with icon
Working background color change on error


svn: r20821
2012-12-22 13:24:21 +00:00
759075b3e4 rows_reordered is present again in GTK 3.8
svn: r20820
2012-12-22 09:24:00 +00:00
7f4956dd00 updated dutch translation
svn: r20818
2012-12-21 19:59:12 +00:00
e1ab03348e Someone optimized some code incorrectly; lines at bottom of calendar where placed off the page
svn: r20816
2012-12-21 18:57:32 +00:00
2033fd6567 If you try to lookup an object too early, you might find that the tbl is still a dict; this protects such early lookups from crashing
svn: r20814
2012-12-21 18:34:44 +00:00
7c6872c11a alpha1 environment, what should be the VERSION into gen/const.py.in ?
svn: r20810
2012-12-21 14:15:45 +00:00
71f87a31b3 update content for 4.0.0-alpha1
svn: r20809
2012-12-21 14:09:38 +00:00
eb2ca43ff6 avoid fatal errors on norwegian bokmål translation, string status to fuzzy before review
svn: r20808
2012-12-21 13:47:14 +00:00
71b951f31d avoid fatal errors on swedish translation, string status to fuzzy before review
svn: r20807
2012-12-21 13:38:45 +00:00
a542081e25 test update and merge processes with the french translation file
svn: r20806
2012-12-21 13:26:33 +00:00
5b8da49bae do not need to check untranslated and fuzzy strings because they have not been reviewed yet; warning this script uses tab for the bloc indentation...
svn: r20804
2012-12-20 17:41:09 +00:00
4d7e1043ef On translation error, allow build to continue after asking user
svn: r20802
2012-12-20 16:40:23 +00:00
2040716b9c common date handler for Norwegian Bokmål and Norwegian Nynorsk
svn: r20801
2012-12-20 14:16:30 +00:00
8a3a477ea4 Create 4.0 branch
svn: r20798
2012-12-20 13:31:33 +00:00
1747 changed files with 839726 additions and 1111090 deletions

11
.get_packages_list.py Normal file
View File

@ -0,0 +1,11 @@
import os
from distutils2.util import find_packages
exclude_list = ('src.gui.glade', 'src.guiQML', 'src.guiQML.views', 'src.images', 'src.plugins',
'src.webapp', 'src.webapp.grampsdb', 'src.webapp.grampsdb.templatetags', 'src.webapp.grampsdb.view', )
packages = sorted(find_packages(exclude=exclude_list))
for package in packages:
print(" '%s'," % package)

14
.gitignore vendored
View File

@ -2,19 +2,11 @@
*.py[cod]
# Distutils
MANIFEST
build/
dist/
sdist/
# Gramps
data/tips.xml
gramps/data/tips.xml
gramps/gen/const.py
gramps/plugins/lib/holidays.xml
po/.intltool-merge-cache
docs/_build/
# Editing
tags
*.swp
# Testing
test/data

View File

@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

View File

@ -1,4 +1,3 @@
#! /usr/bin/env python
#
# Gramps - a GTK+/GNOME based genealogy program
#
@ -16,16 +15,16 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
"""
This is a stub to start Gramps. It is provided for the sole reason of being
able to run gramps from the source directory without setting PYTHONPATH
From this position, import gramps works great
"""
import os
os.environ['GRAMPS_RESOURCES'] = os.path.dirname(os.path.abspath(__file__))
import gramps.grampsapp as app
app.main()

15
INSTALL
View File

@ -15,12 +15,11 @@ version by deleting the installed directories (for example,
/usr/lib/pythonx.x/site-packages/gramps
/usr/lib/pythonx.x/dist-packages/gramps
where pythonx.x is python2.7 or whatever version you installed gramps with.
Also remove the gramps .egg files that are installed along with the gramps
directory.
Also remove the gramps .egg files that are installed along the gramps directory.
If you don't know the list of all files that Gramps installed, you can
reinstall it with the --record option, and take a look at the list this
produces (so python setup.py install --record grampsfiles.txt
If you don't know the list of all files that Gramps installed, you can reinstall
it with the --record option, and take a look at the list this produces (so
python setup.py install --record grampsfiles.txt
GRAMPS is a python application, so loading happens on reading the
files, meaning that files of a previous version that are no longer
@ -72,12 +71,12 @@ from the source directory.
this for you.
b) You downloaded the Gramps source code to a directory, and want to run it.
You can start Gramps from the source code directory with
First, copy/rename the gramps/gen/const.py.in to gramps/gen/const.py.
Edit this file if needed. Now you can start Gramps from the source code
directory with
python Gramps.py
See gramps/gen/const.py how Gramps finds his resource directories in case
you encounter problems.
Custom directory installation
-------------------------------------

View File

@ -3,7 +3,7 @@
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

View File

@ -1,7 +1,6 @@
include AUTHORS
include COPYING
include FAQ
include Gramps.py
include INSTALL
include LICENSE
include MANIFEST.in
@ -12,21 +11,34 @@ include TestPlan.txt
recursive-include data *
recursive-include debian *
recursive-include docs *
recursive-include gramps *
recursive-include help *
recursive-include images *
recursive-include mac *
recursive-include po *
recursive-include gramps *
recursive-include test *
recursive-include windows *
# Remove files created in the build
exclude data/tips.xml
exclude data/gramps.desktop
exclude data/gramps.keys
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 po/*.gmo
exclude po/.intltool-merge-cache
exclude po/stamp-it
exclude po/POTFILES
global-exclude *.pyc
global-exclude *.py~
global-exclude *.pyo
global-exclude *.bak
# Remove directories which should not be included in the distribution
prune gramps/guiQML
#prune gramps/webapp
prune gramps/webapp
# Remove Makefiles used by autotools
global-exclude Makefile*

286
NEWS
View File

@ -1,289 +1,3 @@
2014-10-24
Version 4.1.1, "MachineThatGoes...Ping!", a maintenance release.
* Fix custom place types in the place editor
* Allow place type combobox to receive focus.
* Store custom place types in the metadata table
* Fix place type for places without a main location
* Fix bug adding parent places to a new place
* Prevent user creating a cycle in the place hierarchy
* Avoid infinite loop when place cycle encountered
* Prevent creation of a place cycle when merging
* Fix error when no place is selected
* Check that a place has been selected when saving.
* Use the standard place selection widget to be consistent.
* Add a new Top Level place through the Place Reference Editor
* Fix backlinks code in place report
* Backlinks for places can now also be places as well as events.
* Fix check and repair tool for empty placerefs
* Update location utilities to work with proxies
* Place report does not run
* Update place details gramplet
* Locations are now displayed in a new separate gramplet.
* Add check for empty handle in gramplets
* Check DB lock on the recent opened trees list
* Sidebarfilter gramplet does not fit well into People, Events or Media views
* Fix new event default type considering existing events with *default* role
* Rebuild secondary indexes after database upgrade
* Importing gedcom files containing multibyte UTF-8 characters fails
* Ahnentafel Report did not use Christening Date if no Birth Date
* [Narweb:] Missing webpage for media under some circumstances
* Fix narrated web report with gendex option enabled
* Tweak to "default" CSS choice for the narrated web report
* Invalid link for Merge citation Help button
* Fix 'todo' gramplet
* Fix path when using drag & drop to add media
* Limit the number of generations displayed in the ancestor gramplet
* Export of a subset of the tree failed
* Fix issues in python3, and bytes-string mismatch with ICU
* Fix url/uri handling with non-ascii characters under linux and mac
* Fix name format on graphical reports
* Fix name format on textual reports
* Better GUI support for embeded custom attributes list on media object
* Better keys for search under linux shells (.desktop file)
* 'Unknown' person in detailed ancestor report can not be translated
* Translations don't show in many labels
* Ensure python text domain gets the right encoding.
* Translate some punctuation marks
* Various fixes around Geography and osmgpsmap
* Allow gramplets to be displayed in the dashboard only
* Update FSF address
* Add Arabic-script, Islamic-date, Thai script, Married Name and more dates examples
* Fix on czech date handler for calculated and estimated dates
* Enhance Serbian date handler to handle Cyrillic dates
* Simplify Canadian Ash Wednesday holiday
* Re-enable Esperanto support (for non-Windows OS only) after a large review
* New translation: Serbian
* Various fixes in German and Czech
* Updated translations: ar, cs, de, fi, fr, it, sv
2014-06-15
Version 4.1.0, the "Name go in book", new major release.
* GEP 006: Better Place handling
* New Tags support on Event, Place, Repository, Source, and Citation
* Source/Citation Data becomes Attributes
* Add optional support for checksum on Media object
* New place hierarchies model
* By default, you can choose navigator modes with a drop down.
* New Place editor
* Enhanced MediaReference Editor
* Some debug tools move to new gramplets
* Full Python 3 support
* New functions and widgets related to Place and Media selections
* Enhancements on to_struct()
* New methods on Date handlers
* Better support on translation for inflection rules
2014-05-22
Version 4.0.4, "Not the comfy chair", a maintenance release.
* Upgrade to db version 17 fails in Python 3 due to use of iteritems
* Database corrupted - TypeError: unhashable type: 'list'
* Fix bug in abandon changes and quit
* Consistency on create_id method
* Better handling for non-ASCII characters on database-path
* Better support for ANSEL characters
* 'Display as' field in Name Editor reverts to Preferences default
* Fix vcard date converter
* View does not communicate over proxy server with autorisation
* Enhanced Bookmark support
* Event gramplet filter does not have field for primary role,
* New HasDayOfWeek filter rule
* Error when leaving a Gramps type field blank in an editor
* Fix creation of events with same Gramps-ID
* Crash when opening details of a person
* Fix spacing on dialogs for some recent linux distribution
* date editor and Date class allow e.g. Hebrew dates with newyear (Mar25)
* Fix crash in fan chart view when scrolling
* Poor contrast mouse on mouse over
* Drag and drop only one data into Editors tabs
* Enhancements and consitency on events gramplet, selector and view
* Sometimes says 'no data exists for note' when saving
* Enhanced Citation Editor
* Do not always raise errors when some plugins are hidden
* Remove hover selection from embedded lists
* Fix update of active object after merge
* Cleanup on warnings and messages around locale directory
* Media Editor error if Path value was changed to a non existing file
* Register history objects at startup
* Avoid dumb encoding error when compiling gpr file
* Work around Py2Cairo
* Given Name Cloud Gramplet splits up given names into words
* Users should not be allowed to edit and delete 'default' style into Style Editor
* Filename Decoding Error in Graphical Reports
* Missing closing bracket in Web_Basic-Spruce.css
* Reorder tool: global name 'gen' is not defined
* Fix start in East Asian language, force UTF-8 locale on Mac
* Fix apple_collation
* Spelling messages at random cause hang for a few seconds.
* Media viewer list crashes during start if one try to select an entry where the media isn't available
* 'Available Gramps Updates for Addons' window not on top
* HTML View fails to load
* Paper names and Styles values are now translated
* Sort failure using glocale.sort_key
* Improve support for collation variants
* Translate some punctuation marks
* Fix unit tests and python3 issues
* Fix Relationships handler for Portuguese
* Updated translations: ar, cs, de, fi, fr, he, it, lt, nb, nl, pl, pt_BR, ru, sv, uk
2014-01-27
Version 4.0.3, "It's tomorrow, ask me now", a maintenance release.
* Fix copy via context menu on Views into Charts Category
* Fix Tab sequence in Name Editor
* Fix citations gramplet into media view
* Fix unhandled exception when inspecting media
* Fix Citation sidebar filter for python3
* Fix add link to a "Html code" note
* Fix message on backup dialog
* Fix space for selection lists
* Fix spell with myspell and LANG
* Fix changes root cursor to hand
* Recent file parser now gives the file location
* Fix vertical overflows on check and repair-tool dialog
* Fix custom key/value (data item) on Database difference report
* Fix unhandled exception in media exif information under Windows OS
* Fix person selector in searchfilter under Windows OS
* Starting Gramps without console is now possible under Windows OS
* Specific OS handling
* Common fixes and changes with 3.4.7.
* Updated translations: ca, de, fi, fr, ru
2013-11-08
Version 4.0.2, "Welcome to our humble abode", a maintenance release.
* Citation merge works better for all objects with citations
* Fixed citations attached to family events
* Fixed several crashes, hangs, and data corruption scenarios
* Fixed bugs in determining whether a person is alive, potentially resolving private data leak via export or report
* Fixed bugs on proxies
* VCF export/import now support gender information
* Several bugs with filtering fixed, most filters now support regular expressions
* Fixed bug in Hebrew calendar date calculations
* Fix some regressions on GEDCOM file format export and enhancement on CONT/CONC handling
* Multiple fixes and improvements on gramplets
* Multiple fixes in the narrated website and web calendar reports
* Enhancements on date and calendar
* Some fixes and improvements of the webapp
* Fix on Database Differences module
* Enhancements of the citation tree view (Sources category)
* Improvements on User classes
* Polish and consistency on Gramps XML export
* Bump XML schema to 1.5.1
* Fixed several long-standing problems with report generation
* Better support of RTL locales (Arabic, Hebrew, etc.) in GUI
* Better support for selected lang on some reports
* Better way for displaying missing dependencies
* Better Spell support
* Platform-specific fixes for Mac and Windows
* Add printing functionality for all geography views
* New date handlers for Arabic and Greek
* Translation updates (ar, cs, de, fr, lt, nb, nl, ru, sv) and translation-related fixes
* Repaired and enhanced tests broken since 3.3.x, resulting in overall reliability improvements
* Add a support for AppData
2013-06-24
Version 4.0.1, the "What is washing when we are on the verge of a great scientific breakthrough?", a maintenance release.
* Gtk3: fix menu on person editor and Geography views, convert deprecated code for the indicator in entryfield
* Gedcom: Fix crash on export when there are addresses, fix space on ID
* Disallow bookmarking a source in the Citation Tree View
* Better RTL support on Pedigreeview and position for gramplets
* Fix bad scaling in address editor
* Fix crash on ancestor chart report
* Fix navigation issues with selected line
* Fix size of the 'Tip of the day' dialog
* Fix right-click on tables in Quick Views
* Fix cursor corruption on Pedigree view
* Improvements when exporting via CLI
* Reports: Various fixes on dialogs, output file formats and cleanup on error messages
* MacOS: Fix bad filename on Gramps URL, osm-gps-map revision, image paths, resource-path file, maclocale
* Move the HTML resources from gramps/plugins/webstuff to Data and Images
* Alternate Names in Person Details Gramplet (patch by Heinz Brinker)
* New holidays, date and relationship handlers for Ukrainian
* Enhancements for testing localized Relationship handlers (contribution by Fedir)
* More names and events on data.gramps sample
* Translations updated: cs, de, es, fr, hu, nb, nl, ru, uk, and new support for Arabic
2013-05-21
Version 4.0.0, the "The Miracle of Birth", new major release.
* GEP 8: code reorganization
* GEP 26: Replace make
* GEP 29: Gtk 3 support
* GEP 31: Python 3 support
* Completely reworked localization handling
* The Gramplet view has been renamed Dashboard. This to avoid an overload of the word Gramplet, and to make it more clear to new users what can be expected in this view
* GTK 3 uses new themes, so users not on Gnome must set a nice GTK 3 theme to fully appreciate Gramps 4.0. Install a GTK 3 theme and set it. If Gramps looks ugly, you made an error in this step.
* Different sidebar navigators can be installed
* New Ancestor Fan Chart View and Descendant Fan Chart View, which offer a lot of insight in your family tree on a small space. Direct printing is available from these views.
* All wizards are reworked, so the exporter dialog, help and bug report dialog are different from version 3.4, but offer the same functions
* New To Do Gramplets listing all To Do Notes
* More reports support output in a different language than the interface language
* Narrative Web has been reworked to make it more stable.
2013-05-15
Version 3.4.4 of Gramps! "The Ministry of Silly Names", a maintenance release.
* infinite recursion bug in narrative web generation
* protection on family trees when using version 3.4 and 4.0 on the same PC (road to 4.0)
* merging notes of media with citations now works
* crash during Calculate Preview of a filtered XML export
* fix annoying errors on navigation related to citations gramplet and tag object.
* listing the Family Trees can corrupt them.
* various fix around handling Gedcom file format
* fix citations and sources import on ProGen format
* better date handling and better alternate translation support on some textual reports according to locale under windows
* avoid Errors when setting wrong value as markup for invalid dates (Preferences)
* fix paragraph layout on PDF format or print output
* New: New-Zealand holidays
* Polish and backport code on XML import (road to 4.0)
* Regular expression rules now use search rather than match, fix design issues on regex filter rules
* Disable/Enable indent spouse on descendants tree
* fix regular expressions on Place filter rule
* consistency on cli arguments (road to 4.0)
* fix call of non-existant process on references proxy, enhanced tests on proxy filter
* fix NarWeb creation via cli for some non-english locales
* Various updated translations: ca, de, fr, it, nl, pt_BR, ru, sv, uk
2013-03-19
Version 3.4.3 of Gramps! "Whenever life gets you down, Mrs. Brown", a maintenance release.
* Sorting (both in the main display window, and particularly in Narrative Web output) now uses PyICU (if that module is available). Inclusion of PyICU is 'strongly recommended'. This resolves a number of bugs particularly related to sorting of non-Latin characters, and sorting on MS Windows and Mac OS X. Some changes have been made in Narrative Web to support contractions for alphabetic indices.
* The automatic Addon checking and download now works once again (the location used in Gramps 3.4.2 and before had been changed, so the the automatic process was no longer working).
* Import from Pro-Gen has been updated (at last) to take account of the change to Citations (in 3.4.0)
* Import and Export of address fields in GEDCOM has been improved so that the round-trip works properly.
* GEDCOM Repositories not imported correctly from FTM for Windows and Heredis.
* Fixes to a number of errors in filtering notes.
* Fix some errors in determining whether someone is alive (e.g. for filtering out alive people).
* Make availability of GraphViz settings depend on output format
* Improve the descriptions and tooltip for GraphViz aspect ratio option
* Fixed update problems with citation bottombar gramplet (bug #6336)
* Fixed Open Document Text output in Book report (bug #6457)
* A number of changes to Narrative Web:
** Media objects attached to Marriage events and Sources are not included in Narrative Web Site
** restructure the families index so families are indexed under both spouses, and the family name is normalised
** separate out Families section in individual and families pages so individual page links to the family page and family page links to both people
** normalise links to families so the link is only displayed if the family page is present, and the gid is included when appropriate
** remove highlighting of media subregions except in the media pages (it was confusing and not very well implemented)
** include people whose surname is absent in the individual, surname and families indexes
** html_escape names and surnames
** always display media thumbnails for first image in Gallery list (in some cases they were suppressed if they had been displayed at the top of the page)
** change partner and parent columns in families index to improve the layout of the HTML and put the comma between multiple partners in the right place
** use event description (where present) instead of just event type in back references
** fix bug in the way obj_dict and bkref_dict were initialised
** fix missing document.png for missing media
** fixed problems that bibliography ignores media attached to citations, so if that is the only 'interesting' thing about the citation, the citation media is not output
** Replaced person link routine with one that takes into account whether there is a page for the person.
** Included repository reference media type and call number in the 'Repositories' section of the relevant source instead of the Repository page.
** Implemented a generalised back reference function to display the 'References' section of all pages. This recursively displays references till one is found for which a page exists.
** Removed list of people and families from heading of the event pages as these are now in the 'References' section.
** Fixed bug "0005968: Narrated Web Site not copying Source Citations files such as jpg or pdf docs to web site
** Fixed bug "0005946 GRAMPS failed to insert jpeg image into proper place for an event" by displaying a thumbnail for citation media in the 'Source References' section (with a link to the media page)
** Tidy up media pages - remove unused parameters, use list of media items generated in first pass. Should fix bugs 2365, 5905 and 6009.
** Tidy up sources pages - fix numbering of repositories, remove unused parameters, fix title of individual source pages
** Bug: reset NarrWeb navigation menu layout when style sheet doesn't support it
** Change Source Pages to use the list of sources generated by the first pass that finds objects to be output, and simplify references section on the Source page to use the references passed to it.
** Fix option to suppress Gramps ID (bug #6237)
* a number of technical changes to Narrative Web
** Removed a lot of redundant code and parameters (mainly connected with the old way of determining the objects to be included in the report).
** Movement of some large chunks of code within the source file and some initial work towards GEPS 022: Narrative Website Refactor. Functionality should be unchanged.
** Moved routines for calculating objects to be output so they can be part of default list building classes.
* Various updated translations: da, de, es, fr, it, nb, nl, pt_BR, pt_PT, sv, uk
2012-10-28
Version 3.4.2 -- the "We're all individuals!" bug fix release.
* Some fixes on NarrativeWeb report

73
README
View File

@ -1,87 +1,49 @@
$Id$
Please read the COPYING file first.
If building from source, also read the INSTALL file (at least through the
"SUPER-SHORT VERSION") before going further.
Requirements
--------------------------------
The following packages *MUST* be installed in order for Gramps to work:
Python 2.7 or greater, Python 3.2 or greater (or both python versions)
Python 2.7 or greater, Python 3.2 or greater (python version cannot be mixed)
GTK 3.0 or greater
pygobject 3.3.2 or greater
cairo, pango, pangocairo with introspection bindings (the gi packages)
librsvg2 (svg icon view)
xdg-utils
bsddb3 is required for Python 3.2 (not python 2.7)
The following package is needed for full translation of the interface
to your language:
language-pack-gnome-xx
Translation of GTK elements to your language, with
xx your language code; e.g. for Dutch you need
Translation of GTK elements to your language, with
xx your language code eg for Dutch you need
language-pack-gnome-nl. The translation of the
Gramps strings is included with the gramps source.
Gramps strings is included with the source code.
The following packages are *STRONGLY RECOMMENDED* to be installed:
osmgpsmap Used to show maps in the geography view.
It may be osmgpsmap, osm-gps-map, or python-osmgpsmap,
but the Python bindings for this must also be present.
Without this the GeoView will not be active, see
http://gramps-project.org/wiki/index.php?title=Gramps_4.0_Wiki_Manual_-_Main_Window#Geography_Category
!! PACKAGERS: unfortunately, at the moment (March 2013),
the patches which gramps 4.0 needs osm-gps-map to have
are not yet released (as a new osm-gps-map version). The
osm-gps-map sources must be dated 6 February 2013 (or
later) to have the necessary patches. You may obtain
it from: http://nzjrs.github.com/osm-gps-map/ or else
http://sourceforge.net/projects/gramps/files/Dependencies
(The necessary version seems to be 0.8 -- or later.)
http://gramps-project.org/wiki/index.php?title=Gramps_3.3_Wiki_Manual_-_Main_Window#Geography_Category
The package is named osmgpsmap, 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.
Without this, three reports cannot be run.
Without this no beautiful graphs can be created.
Obtain it from: http://www.graphviz.org
PyICU Improves localised sorting in Gramps. In particular, this
applies to sorting in the various views and in the
Narrative Web output. It is particularly helpful for
non-Latin characters, for non-English locales and on MS
Windows and Mac OS X platforms. If it is not available,
sorting is done through built-in libraries. PyICU is
fairly widely available through the package managers of
distributions. See http://pyicu.osafoundation.org/
(These are Python bindings for the ICU package.)
pyexiv2 Enables Gramps to manage Exif metadata embedded in your
media. Gramps needs version 0.1.3 or greater.
Obtain it from: http://tilloy.net/dev/pyexiv2/download.html
The following packages are optional
gtkspell Enable spell checking in the notes. Gtkspell depends on
enchant. A version of gtkspell with gobject introspection
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 crop
images and also to convert non-JPG images to
JPG so as to include them in LaTeX output.
(For Python3 a different source may be needed.)
GExiv2 Enables Gramps to manage Exif metadata embedded in your
media. Gramps needs version 0.5 or greater.
See http://www.gramps-project.org/wiki/index.php?title=GEPS_029:_GTK3-GObject_introspection_Conversion#GExiv2_for_Image_metadata
ttf-freefont More font support in the reports
gir-webkit GObject introspection data of WebKit is required for the
hidden view 'Htmlview', which allows websites to be
opened in Gramps. Users can unhide the view in the
plugin manager. A html renderer must be installed to
use the view.
hidden view 'Htmlview', which allows websites to be opened in
Gramps. Users can unhide the view in the plugin manager.
A html renderer must be installed to use the view.
!! PACKAGERS, Test if on your distribution
webkit and Gramps is stable. If you obtain crashes, patch
src/plugins/view/htmlrenderer.py and
@ -89,10 +51,10 @@ The following packages are optional
from gi.repository import WebKit as webkit
goocanvas2:
Required for the (user-downloadable) Graphview plugin
Required for the Graphview plugin
No longer needed in 4.0:
pygoocanvas, pygtk, pyexiv2
pygoocanvas, pygtk
No longer needed in 3.3:
python-enchant Enchant
No longer needed in 3.2:
@ -100,6 +62,9 @@ No longer needed in 3.2:
No longer needed in 3.1:
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
---------------------------------

View File

@ -1,14 +1,11 @@
$Id$
"UNSTABLE Gramps 4.0.0 Alpha2 release.
UNSTABLE Gramps 4.0.0 Beta2 release.
This is a technology preview to allow plugin writers and packagers-installer
writers to update their plugins and scripts. This release is not production
ready, so use for testing!"
This is a technology preview to allow distribution packagers (and plugin
writers) to update their scripts (and plugins). This release is not
production ready, so only use it for testing!
It is recommended that Gramps 4.0.0 be used with python 2.7 since many
dependent packages do not yet have python 3 versions. A determined person
can probably download their sources and build them, however.
It is recommended to use Gramps 4.0.0 with python 3.2 so as to be ready
for the future (python 2.7 works though).
The dependencies for Gramps 4.0.0 are _completely_ different than 3.4 due
to the switch to GObject introspection, and the removal of autotools. So

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<application>
<id type="desktop">gramps.desktop</id>
<licence>CC0</licence>
<description>
<_p>Gramps is a genealogy program that is both intuitive for hobbyists and feature-complete for professional genealogists.</_p>
<_p>It gives you the ability to record the many details of the life of an individual as well as the complex relationships between various people, places and events.</_p>
<_p>All of your research is kept organized, searchable and as precise as you need it to be.</_p>
</description>
<url type="homepage">http://gramps-project.org/</url>
<screenshots>
<screenshot width="1226" height="740">http://www.gramps-project.org/wiki/images/5/5f/AppData1.png</screenshot>
<screenshot width="1226" height="740">http://www.gramps-project.org/wiki/images/6/68/AppData2.png</screenshot>
<screenshot type="default" width="1226" height="740">http://www.gramps-project.org/wiki/images/e/e9/AppData3.png</screenshot>
<screenshot width="1226" height="740">http://www.gramps-project.org/wiki/images/6/68/AppData4.png</screenshot>
<screenshot width="1226" height="740">http://www.gramps-project.org/wiki/images/5/50/AppData5.png</screenshot>
</screenshots>
</application>

View File

@ -8,6 +8,5 @@ Terminal=false
Type=Application
StartupNotify=true
Categories=GTK;Office;
_Keywords=Genealogy;Family History;Research;Family Tree;GEDCOM
MimeType=application/x-gramps;application/x-gedcom;application/x-gramps-package;application/x-gramps-xml;
Exec=gramps %F

View File

@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id$

View File

@ -5,7 +5,7 @@
#
# Copyright (C) 2001 Graham J. Williams
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2010-2014 Nick Hall
# Copyright (C) 2010-2011 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
@ -19,21 +19,21 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# $Id$
-->
<!--
This is the Document Type Definition file for v1.6.0
This is the Document Type Definition file for v1.5.0
of the GRAMPS XML genealogy data format.
Please use the following formal public identifier to identify it:
"-//GRAMPS//DTD GRAMPS XML V1.6.0//EN"
"-//GRAMPS//DTD GRAMPS XML V1.5.0//EN"
For example:
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.6.0//EN"
"http://gramps-project.org/xml/1.6.0/grampsxml.dtd"
<!DOCTYPE database PUBLIC "-//GRAMPS//DTD GRAMPS XML V1.5.0//EN"
"http://gramps-project.org/xml/1.5.0/grampsxml.dtd"
[...]>
-->
@ -62,7 +62,7 @@ DATABASE
<!ELEMENT database (header, name-formats?, tags?, events?, people?, families?,
citations?, sources?, places?, objects?, repositories?,
notes?, bookmarks?, namemaps?)>
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.6.0/">
<!ATTLIST database xmlns CDATA #FIXED "http://gramps-project.org/xml/1.5.0/">
<!-- ************************************************************
@ -215,8 +215,7 @@ EVENT
<!ELEMENT events (event)*>
<!ELEMENT event (type?, (daterange|datespan|dateval|datestr)?, place?, cause?,
description?, attribute*, noteref*, citationref*, objref*,
tagref*)>
description?, attribute*, noteref*, citationref*, objref*)>
<!ATTLIST event
id CDATA #IMPLIED
handle ID #REQUIRED
@ -230,7 +229,7 @@ SOURCES
<!ELEMENT sources (source)*>
<!ELEMENT source (stitle?, sauthor?, spubinfo?, sabbrev?,
noteref*, objref*, srcattribute*, reporef*, tagref*)>
noteref*, objref*, data_item*, reporef*)>
<!ATTLIST source
id CDATA #IMPLIED
handle ID #REQUIRED
@ -248,20 +247,16 @@ PLACES
<!ELEMENT places (placeobj)*>
<!ELEMENT placeobj (ptitle?, code?, alt_name*, coord?, placeref*, location*,
objref*, url*, noteref*, citationref*, tagref*)>
<!ELEMENT placeobj (ptitle?, coord?, location*, objref*, url*, noteref*,
citationref*)>
<!ATTLIST placeobj
id CDATA #IMPLIED
handle ID #REQUIRED
priv (0|1) #IMPLIED
change CDATA #REQUIRED
name CDATA #REQUIRED
type CDATA #REQUIRED
>
<!ELEMENT ptitle (#PCDATA)>
<!ELEMENT code (#PCDATA)>
<!ELEMENT alt_name (#PCDATA)>
<!ELEMENT coord EMPTY>
<!ATTLIST coord
@ -301,7 +296,6 @@ OBJECTS
<!ATTLIST file
src CDATA #REQUIRED
mime CDATA #REQUIRED
checksum CDATA #IMPLIED
description CDATA #REQUIRED
>
@ -311,7 +305,7 @@ REPOSITORIES
<!ELEMENT repositories (repository)*>
<!ELEMENT repository (rname, type, address*, url*, noteref*, tagref*)>
<!ELEMENT repository (rname, type, address*, url*, noteref*)>
<!ATTLIST repository
id CDATA #IMPLIED
handle ID #REQUIRED
@ -373,8 +367,8 @@ CITATIONS
<!ELEMENT citations (citation)*>
<!ELEMENT citation ((daterange|datespan|dateval|datestr)?, page?, confidence,
noteref*, objref*, srcattribute*, sourceref, tagref*)>
<!ELEMENT citation ((daterange|datespan|dateval|datestr)?, page?, confidence?,
noteref*, objref*, data_item*, sourceref)>
<!ATTLIST citation
id CDATA #IMPLIED
handle ID #REQUIRED
@ -499,13 +493,6 @@ SHARED ELEMENTS
value CDATA #REQUIRED
>
<!ELEMENT srcattribute EMPTY>
<!ATTLIST srcattribute
priv (0|1) #IMPLIED
type CDATA #REQUIRED
value CDATA #REQUIRED
>
<!ELEMENT place EMPTY>
<!ATTLIST place hlink IDREF #REQUIRED>
@ -526,11 +513,6 @@ SHARED ELEMENTS
priv (0|1) #IMPLIED
>
<!ELEMENT placeref ((daterange|datespan|dateval|datestr)?)>
<!ATTLIST placeref
hlink IDREF #REQUIRED
>
<!ELEMENT region EMPTY>
<!ATTLIST region
corner1_x CDATA #REQUIRED

View File

@ -4,7 +4,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2005-2007 Donald N. Allingham
# Copyright (C) 2010-2014 Nick Hall
# Copyright (C) 2010-2011 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
@ -18,20 +18,21 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Written by Alex Roitman
# $Id$
-->
<!--
This is the RELAX NG schema for the Gramps XML genealogy data format.
This is the RELAX NG schema for the GRAMPS XML genealogy data format.
-->
<grammar
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://gramps-project.org/xml/1.6.0/"
ns="http://gramps-project.org/xml/1.5.0/"
xmlns="http://relaxng.org/ns/structure/1.0">
<start><element name="database">
@ -427,31 +428,26 @@
<zeroOrMore><element name="objref">
<ref name="objref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="tagref">
<ref name="tagref-content"/>
</element></zeroOrMore>
</define>
<define name="citation-content">
<ref name="primary-object"/>
<optional><ref name="date-content"/></optional>
<optional><element name="page"><text/></element></optional>
<element name="confidence"><text/></element>
<optional><element name="confidence"><text/></element></optional>
<zeroOrMore><element name="noteref">
<ref name="noteref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="objref">
<ref name="objref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="srcattribute">
<ref name="srcattribute-content"/>
<zeroOrMore><element name="data_item">
<attribute name="key"><text/></attribute>
<attribute name="value"><text/></attribute>
</element></zeroOrMore>
<element name="sourceref">
<ref name="sourceref-content"/>
</element>
<zeroOrMore><element name="tagref">
<ref name="tagref-content"/>
</element></zeroOrMore>
</define>
<define name="source-content">
@ -466,31 +462,22 @@
<zeroOrMore><element name="objref">
<ref name="objref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="srcattribute">
<ref name="srcattribute-content"/>
<zeroOrMore><element name="data_item">
<attribute name="key"><text/></attribute>
<attribute name="value"><text/></attribute>
</element></zeroOrMore>
<zeroOrMore><element name="reporef">
<ref name="reporef-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="tagref">
<ref name="tagref-content"/>
</element></zeroOrMore>
</define>
<define name="place-content">
<ref name="primary-object"/>
<attribute name="name"><text/></attribute>
<attribute name="type"><text/></attribute>
<optional><element name="ptitle"><text/></element></optional>
<optional><element name="code"><text/></element></optional>
<zeroOrMore><element name="alt_name"><text/></element></zeroOrMore>
<optional><element name="coord">
<attribute name="long"><text/></attribute>
<attribute name="lat"><text/></attribute>
</element></optional>
<zeroOrMore><element name="placeref">
<ref name="placeref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="location">
<optional><attribute name="street"><text/></attribute></optional>
<optional><attribute name="locality"><text/></attribute></optional>
@ -514,9 +501,6 @@
<zeroOrMore><element name="citationref">
<ref name="citationref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="tagref">
<ref name="tagref-content"/>
</element></zeroOrMore>
</define>
<define name="object-content">
@ -524,8 +508,7 @@
<element name="file">
<attribute name="src"><text/></attribute>
<attribute name="mime"><text/></attribute>
<optional><attribute name="checksum"><text/></attribute></optional>
<optional><attribute name="description"><text/></attribute></optional>
<attribute name="description"><text/></attribute>
</element>
<zeroOrMore><element name="attribute">
<ref name="attribute-content"/>
@ -555,9 +538,6 @@
<zeroOrMore><element name="noteref">
<ref name="noteref-content"/>
</element></zeroOrMore>
<zeroOrMore><element name="tagref">
<ref name="tagref-content"/>
</element></zeroOrMore>
</define>
<define name="bookmark-content">
@ -700,14 +680,6 @@
<ref name="noteref-content"/>
</element></zeroOrMore>
</define>
<define name="srcattribute-content">
<optional><attribute name="priv">
<ref name="priv-content"/>
</attribute></optional>
<attribute name="type"><text/></attribute>
<attribute name="value"><text/></attribute>
</define>
<define name="url-content">
<optional><attribute name="priv">
@ -772,11 +744,6 @@
<text/>
</define>
<define name="placeref-content">
<attribute name="hlink"><data type="IDREF"/></attribute>
<optional><ref name="date-content"/></optional>
</define>
<define name="tagref-content">
<attribute name="hlink"><data type="IDREF"/></attribute>
</define>

14
data/man/Makefile.am Normal file
View File

@ -0,0 +1,14 @@
# 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)

View File

@ -48,9 +48,9 @@ copyright = u'2012, Gramps project'
# built documents.
#
# The short X.Y version.
version = '4.1'
version = '4.0'
# The full version, including alpha/beta/rc tags.
release = '4.1.0'
release = '4.0.0-alpha2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

14
data/man/cs/Makefile.am Normal file
View File

@ -0,0 +1,14 @@
# 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)

14
data/man/fr/Makefile.am Normal file
View File

@ -0,0 +1,14 @@
# 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)

View File

@ -48,9 +48,9 @@ copyright = u'2012, Gramps project'
# built documents.
#
# The short X.Y version.
version = '4.1'
version = '4.0'
# The full version, including alpha/beta/rc tags.
release = 'trunk'
release = '4.0.0-alpha2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -152,7 +152,7 @@ gramps(1) @VERSION@ gramps(1)
**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
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.

View File

@ -172,7 +172,7 @@ Imprime le numéro de version pour gramps puis quitte.
.UNINDENT
.TP
.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
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.

15
data/man/nl/Makefile.am Normal file
View File

@ -0,0 +1,15 @@
# 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)

14
data/man/pl/Makefile.am Normal file
View File

@ -0,0 +1,14 @@
# 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)

View File

@ -0,0 +1,14 @@
# 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)

14
data/man/sv/Makefile.am Normal file
View File

@ -0,0 +1,14 @@
# 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)

View File

@ -19,7 +19,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
update_man.py for command line documentation.
@ -52,11 +52,11 @@ SPHINXBUILD = 'sphinx-build'
if sys.platform == 'win32':
pythonCmd = os.path.join(sys.prefix, 'bin', 'python.exe')
sphinxCmd = os.path.join(sys.prefix, 'bin', 'sphinx-build.exe')
elif sys.platform in ['linux2', 'darwin', 'cygwin']:
elif sys.platform == 'linux2' or os.name == 'darwin':
pythonCmd = os.path.join(sys.prefix, 'bin', 'python')
sphinxCmd = SPHINXBUILD
else:
print ("Update Man ERROR: unknown system, don't know sphinx, ... commands")
print ("ERROR: unknown system, don't know sphinx, ... commands")
sys.exit(0)
def tests():

28
debian/README.Debian vendored
View File

@ -1,18 +1,18 @@
Gramps for Debian
gramps for Debian
----------------------
This is the Debian package of the 4.0 series of GRAMPS.
This is the Debian package of GRAMPS.
It is a major update of Gramps to upgrade to GTK 3. A switch was also made to distutils from autotools.
Regarding the extra dependencies:
The 4.0 series of Gramps is being packaged for the experimental distribution until all dependencies are available
and it proves stable.
Webkit - gir1.2-webkit-3.0 crashes. Gramps has been patched disable the hidden
HTML view instead until a solution is found.
Goocanvas2 - The latest Goocanvas is not available in Debian yet. If you miss
the Graphview plugin, you could try installing the gir1.2-goocanvas-2.0-9 which
is available in Ubuntu.
-- Ross Gammon <rossgammon@mail.dk> Sat, 25 Jan 2014 18:00:00 +0100
Recommends: graphviz
Enable creation of graphs
Recommends: python-gtkmozembed
Recommends: python-webkit
Enable html rendering for Geographic view and Web view. If both
are installed webkit will be used. python-gtkmozembed may be more
stable.
Suggests: ttf-freefont
Allows more fonts in reports
Suggests: python-gtkspell python-enchant
allows spell checking in the notes. Both need to be installed.

18
debian/changelog vendored
View File

@ -1,21 +1,3 @@
gramps (4.0.3) precise; urgency=low
* - 4.0.4-git.f08e40 Experimental stream gramps.git
-- Jérôme Rapinat <romjerome@yahoo.fr> Tue, 04 Feb 2014 19:49:32 +0100
gramps (4.0.2) precise; urgency=low
* experimental .deb for gramps 4.0.2
-- Jérôme Rapinat <romjerome@yahoo.fr> Wed, 04 Dec 2013 10:23:36 +0100
gramps (4.0.1-2) precise; urgency=low
* bug 6918: make package more compliant according to Debian policy
-- Jérôme Rapinat <romjerome@yahoo.fr> Mon, 29 Jul 2013 18:00:11 +0200
gramps (3.3.0-1) lucid; urgency=low
* New upstream release

2
debian/compat vendored
View File

@ -1 +1 @@
9
7

48
debian/control vendored
View File

@ -1,42 +1,20 @@
Source: gramps
Section: python
Section: gnome
Priority: optional
Maintainer: Ross Gammon <rossgammon@mail.dk>
Build-Depends-Indep:
dh-linktree,
gettext,
intltool,
libxml-parser-perl,
python-all,
python-setuptools
Build-Depends:
debhelper (>= 9.0.0)
Standards-Version: 3.9.5
Vcs-Git: git://anonscm.debian.org/collab-maint/gramps.git
Vcs-browser: http://anonscm.debian.org/gitweb/?p=collab-maint/gramps.git
Maintainer: Stéphane Charette <stephanecharette@gmail.com>
Build-Depends-Indep: libxml-parser-perl, python-gtk2, gettext, python-central (>= 0.5.6), python, intltool
Build-Depends: debhelper (>= 7)
Standards-Version: 3.8.3
Homepage: http://www.gramps-project.org/
X-Python-Version: >= 2.7
XS-Python-Version: >=2.5
Package: python-gramps
Package: gramps
Architecture: all
Depends:
gir1.2-gtk-3.0,
librsvg2-2,
python-gi,
python-gi-cairo,
xdg-utils,
${misc:Depends},
${python:Depends}
Recommends:
graphviz,
libosmgpsmap-1.0-0-dev,
python-pyicu
Suggests:
fonts-freefont-ttf,
gir1.2-gexiv2-0.4,
gir1.2-gtk-gtkspell3-3.0,
python-pil,
rcs
Depends: ${python:Depends}, librsvg2-common, python-gtk2, python-pyexiv2, xdg-utils, graphviz, python-osmgpsmap ${misc:Depends}
Replaces: gramps-manual, gramps-extending-doc
Conflicts: gramps-manual, gramps-extending-doc, gramps-common, python-gtk-1.2
Recommends:
Suggests: ttf-freefont, python-enchant, python-gtkspell
Description: Genealogical research program
GRAMPS is an Open Source genealogy program written in Python, using
the GTK/GNOME interface. It is an extremely flexible program fitting
@ -45,3 +23,5 @@ Description: Genealogical research program
GRAMPS has the ability to import GEDCOM files exported from many
proprietary genealogy programs and can produce a large number of
reports in many popular formats.
XB-Python-Version: ${python:Versions}

529
debian/copyright vendored
View File

@ -1,314 +1,251 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Gramps
Source: http://gramps-project.org
This package was originally debianized by Brandon L. Griffith
<brandon@debian.org> on Sat, 19 May 2001 13:37:24 -0400.
Files: *
Copyright: 2000-2007, Alex Roitman
2000-2002, Bruce J. DeGrasse
2000-2008, Donald N. Allingham
2000-2007, Martin Hawlisch
2001, Andrés Sepúlveda
2001, David R. Hampton
2001-2013, Free Software Foundation, Inc.
2001, Graham J. Williams
2001, Jesper Zedlitz
2001-2013, The Gramps Project
2002, Gary Shao
2003-2006, Josiah Carlson
2004-2006, Eero Tamminen
2004-2013, Julio Sánchez
2004, Toshio Kuratomi
2005-2011, Serge Noiraud
2006-2011, Brian G. Matherly
2006, 2008-2011, Kees Bakker
2006-2008, Steve Hall
2007-2012, Benny Malengier
2007-2012, Douglas S. Blank
2007-2012, Gary Burton
2007-2011, Jerome Rapinat
2007, Johan Gronqvist
2007, Robert Cawley
2007-2009, Stephane Charette
2007, Thom Sturgill
2007-2008, Zsolt Foldvari
2008-2010, 2012, Craig J. Anderson
2008-2009, James Friedmann
2008-2009, Jason Simanek
2008, Lukasz Rymarczyk
2008-2010, Peter G. Landgren
2008, 2010, Raphael Ackermann
2008-2011, Reinhard Mueller
2008, 2011, Robert Cheramy
2008-2012, Rob G. Healey
2008, Stefan Siegel
2008-2010, Stephen George
2009-2010, Andrew I Baznikin
2009, 2011, The Dojo Foundation
2009, Florian Heinle
2009, Gerald W. Britton
2009, Igal Shapira
2009, 2011, John Resig
2009-2013, Nick Hall
2009, Pander Musubi
2009, Robert Ham
2009, Swoon on bug tracker
2009, Yevgeny Zegzda
2010, Gramps
2010, Jakim Friant
2010, Josip
2010, lcc & Robert Jerome
2010-2012, Michiel D. Nauta
2010-2013, Tim G L Lyons
2010-2011, Vlada Perić
2011, Adam Stein
2011-2012, Harald Rosemann
2011, 2013, Heinz Brinker
2011, Helge Herz
2011, 2013 John Ralls
2011, Matt Keenan
2011-2013, Paul Franklin
2012, Mathieu MD
2012, Nicolas Adenis-Lamarre
2013, Fedir Zinchuk
2013, Oleh Petrivk
2013, Vassilii Khachaturov
2013, Zissis Papadopoulos
License: GPL-2+
The current Debian maintainer is James A. Treacy <treacy@debian.org>
Files: data/javascript/jquery-1.3.2.min.js
Copyright: 2009, John Resig
License: MIT and GPL
It was downloaded from http://gramps-project.org
Files: data/javascript/jquery-1.7.1.js
Copyright: 2011, John Resig
2011, The Dojo Foundation
License: BSD and MIT and GPL-2
Upstream Authors:
Donald N. Allingham, Alexander Roitman, Martin Hawlisch, Richard Taylor,
Brian Matherly, Tim Waugh, Donald A. Peterson, David Hampton
Files: data/javascript/jquery-ui-1.7.2.custom.min.js
Copyright: 2009, jQuery UI Team (http://jqueryui.com/about/)
License: MIT and GPL-2
========================================================
Copyright: 2001-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.
Files: data/javascript/jquery.flexbox*
Copyright: 2008-2010, Noah Heldman and Fairway Technologies
License: Ms-PL
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.
Files: data/jhtmlarea/Readme.txt
Copyright: 2009, Chris Pietschmann
License: Ms-RL
You should have received a copy of the GNU General Public License with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
Files: data/jhtmlarea/scripts/jHtmlArea*
Copyright: 2009, Chris Pietschmann
License: Ms-RL
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL
Files: data/jhtmlarea/scripts/jquery-1.3.2*
Copyright: 2009, John Resig
2009, The Dojo Foundation
License: MIT
========================================================
The files in help/C directory are Copyright 2006 Alexander Roitman
This documentation 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.
Files: data/jhtmlarea/scripts/jquery-ui-*
Copyright: 2009, jQuery UI Team (http://jqueryui.com/about)
License: MIT and GPL
This documentation 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.
Files: debian/*
Copyright: 2001-2002, Brandon L. Griffith
2002, Alex Roitman
2002-2012, James A. Treacy
2013, Ross Gammon
License: GPL-2+
You should have received a copy of the GNU General Public License with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
Files: gramps/webapp/grampsdb/view/png.py
Copyright: 2006, Johann C. Rocholl
2009, David Jones
2006, Nicko van Someren
License: MIT
========================================================
The files in help/fr directory are Copyright 2003-2006 Jerome Rapinat
This documentation 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.
License: BSD
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY John Resig ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This documentation 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.
License: GPL
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 1 only of the License.
.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
You should have received a copy of the GNU General Public License with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
License: GPL-2
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 only of the License.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-2'.
========================================================
The data/grampsxml.dtd file is Copyright 2001 Graham J. William
and Copyright 2000-2006 Donald N. Allingham
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-2'.
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.
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
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.
License: Ms-PL
This license governs use of the accompanying software. If you use the
software, you accept this license. If you do not accept the license, do not
use the software.
.
1. Definitions
.
The terms "reproduce," "reproduction," "derivative works," and "distribution"
have the same meaning here as under U.S. copyright law.
.
A "contribution" is the original software, or any additions or changes to the
software.
.
A "contributor" is any person that distributes its contribution under this
license.
.
"Licensed patents" are a contributor's patent claims that read directly on its
contribution.
.
2. Grant of Rights
.
(A) Copyright Grant- Subject to the terms of this license, including the
license conditions and limitations in section 3, each contributor grants you a
non-exclusive, worldwide, royalty-free copyright license to reproduce its
contribution, prepare derivative works of its contribution, and distribute its
contribution or any derivative works that you create.
.
(B) Patent Grant- Subject to the terms of this license, including the license
conditions and limitations in section 3, each contributor grants you a
non-exclusive, worldwide, royalty-free license under its licensed patents to
make, have made, use, sell, offer for sale, import, and/or otherwise dispose of
its contribution in the software or derivative works of the contribution in the
software.
.
3. Conditions and Limitations
.
(A) No Trademark License- This license does not grant you rights to use any
contributors' name, logo, or trademarks.
.
(B) If you bring a patent claim against any contributor over patents that you
claim are infringed by the software, your patent license from such contributor
to the software ends automatically.
.
(C) If you distribute any portion of the software, you must retain all copyright,
patent, trademark, and attribution notices that are present in the software.
.
(D) If you distribute any portion of the software in source code form, you may do
so only under this license by including a complete copy of this license with your
distribution. If you distribute any portion of the software in compiled or object
code form, you may only do so under a license that complies with this license.
.
(E) The software is licensed "as-is." You bear the risk of using it. The
contributors give no express warranties, guarantees or conditions. You may have
additional consumer rights under your local laws which this license cannot change.
To the extent permitted under your local laws, the contributors exclude the
implied warranties of merchantability, fitness for a particular purpose and
non-infringement.
You should have received a copy of the GNU General Public License with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
License: Ms-RL
This license governs use of the accompanying software. If you use the software,
you accept this license. If you do not accept the license, do not use the software.
.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have
the same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the
software.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its
contribution.
.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license
conditions and limitations in section 3, each contributor grants you a
non-exclusive, worldwide, royalty-free copyright license to reproduce its
contribution, prepare derivative works of its contribution, and distribute its
contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license
conditions and limitations in section 3, each contributor grants you a
non-exclusive, worldwide, royalty-free license under its licensed patents to make,
have made, use, sell, offer for sale, import, and/or otherwise dispose of its
contribution in the software or derivative works of the contribution in the software.
.
3. Conditions and Limitations
(A) Reciprocal Grants- For any file you distribute that contains code from the
software (in source code or binary format), you must provide recipients the source
code to that file along with a copy of this license, which license will govern that
file. You may license other files that are entirely your own work and do not contain
code from the software under any terms you choose.
(B) No Trademark License- This license does not grant you rights to use any
contributors' name, logo, or trademarks.
(C) If you bring a patent claim against any contributor over patents that you claim
are infringed by the software, your patent license from such contributor to the
software ends automatically.
(D) If you distribute any portion of the software, you must retain all copyright,
patent, trademark, and attribution notices that are present in the software.
(E) If you distribute any portion of the software in source code form, you may do so
only under this license by including a complete copy of this license with your
distribution. If you distribute any portion of the software in compiled or object code
form, you may only do so under a license that complies with this license.
(F) The software is licensed "as-is." You bear the risk of using it. The contributors
give no express warranties, guarantees or conditions. You may have additional consumer
rights under your local laws which this license cannot change. To the extent permitted
under your local laws, the contributors exclude the implied warranties of
merchantability, fitness for a particular purpose and non-infringement.
========================================================
The src/TreeTips.py file is Copyright 2004 Toshio Kuratomi
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 with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
========================================================
The src/data/fdl.txt file is Copyright 2000,2001,2002
Free Software Foundation, Inc.
59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
========================================================
The file src/docgen/ODFDoc.py file is Copyright 2005-2006 Serge Noiraud
and Copyright 2005-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 with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
========================================================
The file src/Mime/_WinMime.py file is Copyright 2006 Brian Matherly
and Copyright 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 with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
========================================================
The src/plugins/Ancestors.py file is Copyright 2003 Tim Waugh
and Copyright 2003-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 with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
========================================================
The src/plugins/CountAncestors.py file is Copyright 2001 Jesper Zedlitz
and Copyright 2001-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 with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
========================================================
The files:
src/plugins/DetAncestralReport.py
src/plugins/DetDescendantReport.py
are Copyright 2000-2002 Bruce J. DeGrasse
and Copyright 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 with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
========================================================
The files:
src/date_test.py
src/DataViews/_PedigreeView.py
src/plugins/DumpGenderStats.py
src/plugins/ExportVCalendar.py
src/plugins/ExportVCard.py
src/plugins/ImportGeneWeb.py
src/plugins/ImportvCard.py
src/plugins/TestcaseGenerator.py
src/plugins/WriteGeneWeb.py
are Copyright 2001-2006 Martin Hawlisch, 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 with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
========================================================
The files:
src/ReportBase/__init__.py
src/ReportBase/_Report.py
are Copyright 2001 David R. Hampton
and Copyright 2001-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 with
the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA

2
debian/gramps-help.docs vendored Normal file
View File

@ -0,0 +1,2 @@
NEWS
README

2
debian/gramps.dirs vendored Normal file
View File

@ -0,0 +1,2 @@
usr/share/pixmaps
usr/share/mime/packages

5
debian/gramps.docs vendored Normal file
View File

@ -0,0 +1,5 @@
AUTHORS
FAQ
NEWS
README
TODO

3
debian/gramps.files vendored Normal file
View File

@ -0,0 +1,3 @@
/usr/bin/
/usr/share/
/etc

View File

@ -1,2 +0,0 @@
# Install icon to the correct place
debian/gramps.xpm usr/share/pixmaps/

1
debian/gramps.manpages vendored Normal file
View File

@ -0,0 +1 @@
data/man/gramps.1

3
debian/gramps.menu vendored Normal file
View File

@ -0,0 +1,3 @@
?package(gramps):needs="X11" section="Applications/Office"\
title="gramps" command="/usr/bin/gramps"\
icon="/usr/share/pixmaps/gramps.xpm"

3
debian/gramps.postinst vendored Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
#DEBHELPER#

3
debian/gramps.postrm vendored Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
#DEBHELPER#

3
debian/gramps.prerm vendored Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh -e
# #DEBHELPER#

View File

@ -1,13 +0,0 @@
diff --git a/setup.py b/setup.py
index 3f702ae..9622d75 100644
--- a/setup.py
+++ b/setup.py
@@ -248,7 +248,7 @@ class install(_install):
'utils', 'resource-path')
with io.open(resource_file, 'w', encoding='utf-8',
errors='strict') as fp:
- path = os.path.abspath(os.path.join(self.install_data, 'share'))
+ path = '/usr/share'
if sys.version_info[0] < 3:
path = unicode(path)
fp.write(path)

View File

@ -1,22 +0,0 @@
diff --git a/gramps/plugins/view/htmlrenderer.py b/gramps/plugins/view/htmlrenderer.py
index c41942a..8f35b16 100644
--- a/gramps/plugins/view/htmlrenderer.py
+++ b/gramps/plugins/view/htmlrenderer.py
@@ -122,11 +122,12 @@ user_pref("general.useragent.locale, %(lang)s);
TOOLKIT = NOWEB
-try:
- from gi.repository import WebKit as webkit
- TOOLKIT = WEBKIT
-except:
- pass
+#Disable webkit as it is causing a crash in Gramps 4.0.2
+#try:
+# from gi.repository import WebKit as webkit
+# TOOLKIT = WEBKIT
+#except:
+# pass
#no interfaces present, raise Error so that options for GeoView do not show
if TOOLKIT == NOWEB :

View File

@ -1,2 +0,0 @@
0001-Correct-resource-path-in-setup.py.patch
0002-Disable-HTML-View.patch

1
debian/pycompat vendored Normal file
View File

@ -0,0 +1 @@
2

94
debian/rules vendored
View File

@ -1,37 +1,73 @@
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DH_OPTIONS=-v
build: build-stamp
build-stamp:
dh_testdir
%:
dh $@ --with python2
#./autogen.sh --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc
./configure --enable-packager-mode --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc
# ./configure --prefix=`pwd`/debian/tmp/usr --mandir=\$${prefix}/share/man
$(MAKE)
# $(MAKE) html
# Override auto test because upstream do not use the standard unittest discover
override_dh_auto_test:
touch build-stamp
# Override of auto_build
override_dh_auto_build:
python setup.py build
clean:
dh_testdir
dh_testroot
# Override of auto_install to remove information from package
override_dh_auto_install:
#dh_auto_install
# Remove duplicate copyright information
#rm $(CURDIR)/debian/python-gramps/usr/share/doc/gramps/COPYING
# Remove install file as it is not needed by package users
#rm $(CURDIR)/debian/python-gramps/usr/share/doc/gramps/INSTALL
# Remove duplicate license information
#rm $(CURDIR)/debian/python-gramps/usr/share/doc/gramps/LICENSE
python setup.py install --root=debian/python-gramps --install-layout=deb
# [ ! -f Makefile ] || $(MAKE) distclean
# -rm -f src/*.pyo src/*/*.pyo
# -rm -f config.status config.log
# Make css style sheets and png icons non-executable
override_dh_fixperms:
dh_fixperms
chmod a-x $(CURDIR)/debian/python-gramps/usr/share/gramps/css/Web_*.css
chmod a-x $(CURDIR)/debian/python-gramps/usr/share/gramps/images/22x22/gramps*.png
chmod a-x $(CURDIR)/debian/python-gramps/usr/share/gramps/images/16x16/gramps*.png
dh_auto_clean
dh_clean
# Avoid compressing COPYING file so that it can appear in the "About" dialog
override_dh_compress:
dh_compress -X COPYING
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Add here commands to install the package into debian/tmp.
# GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
$(MAKE) install DESTDIR=`pwd`/debian/gramps
-rm -f debian/gramps/usr/share/gramps/COPYING
ln -s /usr/share/common-licenses/GPL-2 debian/gramps/usr/share/gramps/COPYING
-rm -rf debian/gramps/usr/var
# cp src/data/gramps.xml debian/gramps/usr/share/mime/packages
-find debian/gramps/usr/share/ -name "*.pyo" -exec rm -f '{}' ';'
cp debian/gramps.xpm debian/gramps/usr/share/pixmaps/
# cp src/gramps.xpm debian/tmp/usr/share/pixmaps/
# cp src/images/gramps.svg debian/gramps/usr/share/pixmaps/
# chmod 644 debian/gramps/usr/share/pixmaps/gramps.svg
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installdocs FAQ
dh_installmenu
# dh_installman
dh_installmime -i
# dh_installchangelogs ChangeLog
dh_installchangelogs
dh_icons
# dh_movefiles -i
# dh_gconf -i
dh_link -i
dh_compress -i
dh_fixperms -i
dh_pycentral -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

View File

@ -1 +0,0 @@
1.0

View File

@ -1 +0,0 @@
unapply-patches

2
debian/substvars vendored Normal file
View File

@ -0,0 +1,2 @@
shlibs:Depends=libbonobo2-0 (>= 2.4.3), libc6 (>= 2.3.2.ds1-4), libglib2.0-0 (>= 2.2.3), libgnomevfs2-0 (>= 2.4.1), libgnomevfs2-common (>= 2.4.1), liborbit2 (>= 1:2.8.0)
python:Depends=python (>= 2.3), python (<< 2.4)

4
debian/watch vendored
View File

@ -1,4 +0,0 @@
version=3
opts="dversionmangle=s/\+dfsg//g" \
http://sf.net/gramps/gramps-(.+)\.tar\.gz

View File

@ -3,7 +3,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = GRAMPS_RESOURCES=$$PWD/.. sphinx-build
SPHINXBUILD = sphinx-build
PAPER =
# Internal variables.

View File

@ -2,12 +2,12 @@
Code Documentation
##################
*Gramps* provides several general API. The most important is the *gen* module, providing access to all code that can be of interest outside of the Gramps program.
*GRAMPS* provides several general API. The most important is the *gen* module, providing access to all code that can be of interest outside of the GRAMPS program.
The :mod:`gen` Module
=======================
.. automodule:: gramps.gen
.. automodule:: gen
Contents:
@ -22,7 +22,7 @@ Contents:
gen/gen_proxy
gen/gen_utils
The Gramps Application
The GRAMPS Application
========================
Contents:
@ -32,12 +32,11 @@ Contents:
corecli/cli
coregui/gui
coregui/gui_widgets
date
relationship
simple
Useful snippets
Usefull snippets
===================
Contents:

View File

@ -18,8 +18,13 @@ import sys, os
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.append(os.path.abspath('.'))
#documentation in root/docs, allow import from root
sys.path.append(os.path.abspath(os.pardir))
#documentation in root/docs, allow import from root/src where GRAMPS modules life
sourcedir = (os.path.abspath('.')).split(os.sep)[:-1] + ['gramps']
sys.path.append((os.sep).join(sourcedir))
#make it possible to add plugins --> walk the plugin dir and add to sys.path.append
for (dirpath, dirnames, filenames) in os.walk((os.sep).join(sourcedir + ['plugins'])):
# add the directory to the python search path
sys.path.append(dirpath)
# -- General configuration -----------------------------------------------------
@ -48,9 +53,9 @@ copyright = u'2012, The Gramps Project'
# built documents.
#
# The short X.Y version.
version = '4.1'
version = '4.0'
# The full version, including alpha/beta/rc tags.
release = '4.0.99-trunk'
release = '4.0.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -89,8 +94,6 @@ pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, todo entries will be included in the output.
todo_include_todos = True
# -- Options for HTML output ---------------------------------------------------

View File

@ -2,12 +2,12 @@
The :mod:`cli` Module
##########################
.. automodule:: gramps.cli
.. automodule:: cli
*****************************
Argument Handler
*****************************
.. automodule:: gramps.cli.arghandler
.. automodule:: cli.arghandler
.. autoclass:: ArgHandler
:members:
:undoc-members:
@ -16,7 +16,7 @@ Argument Handler
*****************************
Argument Parser
*****************************
.. automodule:: gramps.cli.argparser
.. automodule:: cli.argparser
.. autoclass:: ArgParser
:members:
:undoc-members:
@ -25,7 +25,7 @@ Argument Parser
*****************************
CLI DB manager
*****************************
.. automodule:: gramps.cli.clidbman
.. automodule:: cli.clidbman
.. autoclass:: CLIDbManager
:members:
:undoc-members:
@ -34,7 +34,7 @@ CLI DB manager
*****************************
Gramps CLI
*****************************
.. automodule:: gramps.cli.grampscli
.. automodule:: cli.grampscli
.. autoclass:: CLIDbLoader
:members:
:undoc-members:
@ -47,7 +47,7 @@ Gramps CLI
*****************************
User
*****************************
.. automodule:: gramps.cli.user
.. automodule:: cli.user
.. autoclass:: User
:members:
:undoc-members:

View File

@ -1,6 +1,6 @@
############################
##########################
The :mod:`gramps.gui` Module
############################
##########################
.. automodule:: gramps.gui
@ -153,6 +153,23 @@ Filter Editor
:undoc-members:
:show-inheritance:
*****************************
Gramps Bar
*****************************
.. automodule:: gramps.gui.grampsbar
.. autoclass:: DetachedWindow
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GrampsBar
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: TabGramplet
:members:
:undoc-members:
:show-inheritance:
*****************************
Navigator
*****************************
@ -163,7 +180,7 @@ Navigator
:show-inheritance:
*****************************
Plugin Manager
Plugins Manager
*****************************
.. automodule:: gramps.gui.pluginmanager
.. autoclass:: GuiPluginManager
@ -198,7 +215,7 @@ Utils
:show-inheritance:
*****************************
View Manager
Views Manager
*****************************
.. automodule:: gramps.gui.viewmanager
.. autoclass:: ViewManager

View File

@ -1,433 +0,0 @@
####################################
The :mod:`gramps.gui.widgets` Module
####################################
.. automodule:: gramps.gui.widgets
*****************************
Basic Entry
*****************************
.. automodule:: gramps.gui.widgets.basicentry
.. autoclass:: BasicEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Buttons
*****************************
.. automodule:: gramps.gui.widgets.buttons
.. autoclass:: IconButton
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: WarnButton
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: SimpleButton
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: PrivacyButton
:members:
:undoc-members:
:show-inheritance:
*****************************
Date Entry
*****************************
.. automodule:: gramps.gui.widgets.dateentry
.. autoclass:: DateEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Expand Collapse Arrow
*****************************
.. automodule:: gramps.gui.widgets.expandcollapsearrow
.. autoclass:: ExpandCollapseArrow
:members:
:undoc-members:
:show-inheritance:
*****************************
Fanchart
*****************************
.. automodule:: gramps.gui.widgets.fanchart
.. autoclass:: FanChartBaseWidget
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: FanChartWidget
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: FanChartGrampsGUI
:members:
:undoc-members:
:show-inheritance:
*****************************
Fanchart Descendant
*****************************
.. automodule:: gramps.gui.widgets.fanchartdesc
.. autoclass:: FanChartDescWidget
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: FanChartDescGrampsGUI
:members:
:undoc-members:
:show-inheritance:
*****************************
Gramplet Bar
*****************************
.. automodule:: gramps.gui.widgets.grampletbar
.. autoclass:: DetachedWindow
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GrampletBar
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: TabGramplet
:members:
:undoc-members:
:show-inheritance:
*****************************
Gramplet Pane
*****************************
.. automodule:: gramps.gui.widgets.grampletpane
.. autoclass:: LinkTag
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GrampletWindow
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GuiGramplet
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GridGramplet
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GrampletPane
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: Configuration
:members:
:undoc-members:
:show-inheritance:
*****************************
Labels
*****************************
.. automodule:: gramps.gui.widgets.labels
.. autoclass:: LinkLabel
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: EditLabel
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: BasicLabel
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GenderLabel
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MarkupLabel
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: DualMarkupLabel
:members:
:undoc-members:
:show-inheritance:
*****************************
Link Box
*****************************
.. automodule:: gramps.gui.widgets.linkbox
.. autoclass:: LinkBox
:members:
:undoc-members:
:show-inheritance:
*****************************
Menu Item
*****************************
.. automodule:: gramps.gui.widgets.menuitem
.. autoclass:: MenuItemWithData
:members:
:undoc-members:
:show-inheritance:
*****************************
Monitored Widgets
*****************************
.. automodule:: gramps.gui.widgets.monitoredwidgets
.. autoclass:: MonitoredCheckbox
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredEntry
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredEntryIndicator
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredSpinButton
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredText
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredType
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredDataType
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredMenu
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredStrMenu
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredDate
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredComboSelectedEntry
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MonitoredTagList
:members:
:undoc-members:
:show-inheritance:
*****************************
Multi Tree View
*****************************
.. automodule:: gramps.gui.widgets.multitreeview
.. autoclass:: MultiTreeView
:members:
:undoc-members:
:show-inheritance:
*****************************
Photo
*****************************
.. automodule:: gramps.gui.widgets.photo
.. autoclass:: Photo
:members:
:undoc-members:
:show-inheritance:
*****************************
Progress Dialog
*****************************
.. automodule:: gramps.gui.widgets.progressdialog
.. autoclass:: LongOpStatus
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: ProgressMonitor
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GtkProgressDialog
:members:
:undoc-members:
:show-inheritance:
*****************************
Shortlist ComboEntry
*****************************
.. automodule:: gramps.gui.widgets.shortlistcomboentry
.. autoclass:: ShortlistComboEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Spring Separator
*****************************
.. automodule:: gramps.gui.widgets.springseparator
.. autoclass:: SpringSeparatorToolItem
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: SpringSeparatorAction
:members:
:undoc-members:
:show-inheritance:
*****************************
Statusbar
*****************************
.. automodule:: gramps.gui.widgets.statusbar
.. autoclass:: Statusbar
:members:
:undoc-members:
:show-inheritance:
*****************************
Styled Text Buffer
*****************************
.. automodule:: gramps.gui.widgets.styledtextbuffer
.. autoclass:: LinkTag
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: GtkSpellState
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: StyledTextBuffer
:members:
:undoc-members:
:show-inheritance:
*****************************
Styled Text Editor
*****************************
.. automodule:: gramps.gui.widgets.styledtexteditor
.. autoclass:: StyledTextEditor
:members:
:undoc-members:
:show-inheritance:
*****************************
Tool ComboEntry
*****************************
.. automodule:: gramps.gui.widgets.toolcomboentry
.. autoclass:: ToolComboEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Undoable Buffer
*****************************
.. automodule:: gramps.gui.widgets.undoablebuffer
.. autoclass:: Stack
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableInsert
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableDelete
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableBuffer
:members:
:undoc-members:
:show-inheritance:
*****************************
Undoable Entry
*****************************
.. automodule:: gramps.gui.widgets.undoableentry
.. autoclass:: UndoableInsertEntry
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableDeleteEntry
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Undoable Styled Buffer
*****************************
.. automodule:: gramps.gui.widgets.undoablestyledbuffer
.. autoclass:: UndoableInsertStyled
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableDeleteStyled
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableApplyStyle
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: UndoableStyledBuffer
:members:
:undoc-members:
:show-inheritance:
*****************************
Validated Combo Entry
*****************************
.. automodule:: gramps.gui.widgets.validatedcomboentry
.. autoclass:: ValidatedComboEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Validated Masked Entry
*****************************
.. automodule:: gramps.gui.widgets.validatedmaskedentry
.. autoclass:: FadeOut
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: MaskedEntry
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: ValidatableMaskedEntry
:members:
:undoc-members:
:show-inheritance:
*****************************
Value Action
*****************************
.. automodule:: gramps.gui.widgets.valueaction
.. autoclass:: ValueAction
:members:
:undoc-members:
:show-inheritance:
*****************************
Value Tool Item
*****************************
.. automodule:: gramps.gui.widgets.valuetoolitem
.. autoclass:: ValueToolItem
:members:
:undoc-members:
:show-inheritance:

View File

@ -4,22 +4,15 @@ The :class:`Date Handler` Classes
DateParser
====================================
.. automodule:: gramps.gen.datehandler._dateparser
.. automodule:: gen.datehandler._dateparser
.. autoclass:: DateParser
:members:
:undoc-members:
:show-inheritance:
DateStrings
===========
.. automodule:: gramps.gen.datehandler._datestrings
.. autoclass:: DateStrings
:members:
:show-inheritance:
DateDisplay
====================================
.. automodule:: gramps.gen.datehandler._datedisplay
.. automodule:: gen.datehandler._datedisplay
.. autoclass:: DateDisplay
:members:
:undoc-members:
@ -31,14 +24,14 @@ DateDisplay
DateUtils
====================================
.. automodule:: gramps.gen.datehandler._dateutils
.. automodule:: gen.datehandler._dateutils
:members:
:undoc-members:
:show-inheritance:
DateHandler
====================================
.. automodule:: gramps.gen.datehandler._datehandler
.. automodule:: gen.datehandler._datehandler
:members:
:undoc-members:
:show-inheritance:
@ -49,11 +42,11 @@ Localized Date Handlers
*****************************
DateHandler (Bulgarian)
*****************************
.. autoclass:: gramps.gen.datehandler._date_bg.DateParserBG
.. autoclass:: gen.datehandler._date_bg.DateParserBG
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_bg.DateDisplayBG
.. autoclass:: gen.datehandler._date_bg.DateDisplayBG
:members:
:undoc-members:
:show-inheritance:
@ -61,11 +54,11 @@ DateHandler (Bulgarian)
*****************************
DateHandler (Catalan)
*****************************
.. autoclass:: gramps.gen.datehandler._date_ca.DateParserCA
.. autoclass:: gen.datehandler._date_ca.DateParserCA
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_ca.DateDisplayCA
.. autoclass:: gen.datehandler._date_ca.DateDisplayCA
:members:
:undoc-members:
:show-inheritance:
@ -73,11 +66,11 @@ DateHandler (Catalan)
*****************************
DateHandler (Czech)
*****************************
.. autoclass:: gramps.gen.datehandler._date_cs.DateParserCZ
.. autoclass:: gen.datehandler._date_cs.DateParserCZ
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_cs.DateDisplayCZ
.. autoclass:: gen.datehandler._date_cs.DateDisplayCZ
:members:
:undoc-members:
:show-inheritance:
@ -85,11 +78,11 @@ DateHandler (Czech)
*****************************
DateHandler (German)
*****************************
.. autoclass:: gramps.gen.datehandler._date_de.DateParserDE
.. autoclass:: gen.datehandler._date_de.DateParserDE
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_de.DateDisplayDE
.. autoclass:: gen.datehandler._date_de.DateDisplayDE
:members:
:undoc-members:
:show-inheritance:
@ -97,11 +90,11 @@ DateHandler (German)
*****************************
DateHandler (Spanish)
*****************************
.. autoclass:: gramps.gen.datehandler._date_es.DateParserES
.. autoclass:: gen.datehandler._date_es.DateParserES
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_es.DateDisplayES
.. autoclass:: gen.datehandler._date_es.DateDisplayES
:members:
:undoc-members:
:show-inheritance:
@ -109,11 +102,11 @@ DateHandler (Spanish)
*****************************
DateHandler (Finnish)
*****************************
.. autoclass:: gramps.gen.datehandler._date_fi.DateParserFI
.. autoclass:: gen.datehandler._date_fi.DateParserFI
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_fi.DateDisplayFI
.. autoclass:: gen.datehandler._date_fi.DateDisplayFI
:members:
:undoc-members:
:show-inheritance:
@ -121,11 +114,11 @@ DateHandler (Finnish)
*****************************
DateHandler (French)
*****************************
.. autoclass:: gramps.gen.datehandler._date_fr.DateParserFR
.. autoclass:: gen.datehandler._date_fr.DateParserFR
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_fr.DateDisplayFR
.. autoclass:: gen.datehandler._date_fr.DateDisplayFR
:members:
:undoc-members:
:show-inheritance:
@ -133,11 +126,11 @@ DateHandler (French)
*****************************
DateHandler (Croatian)
*****************************
.. autoclass:: gramps.gen.datehandler._date_hr.DateParserHR
.. autoclass:: gen.datehandler._date_hr.DateParserHR
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_hr.DateDisplayHR
.. autoclass:: gen.datehandler._date_hr.DateDisplayHR
:members:
:undoc-members:
:show-inheritance:
@ -145,11 +138,11 @@ DateHandler (Croatian)
*****************************
DateHandler (Italian)
*****************************
.. autoclass:: gramps.gen.datehandler._date_it.DateParserIT
.. autoclass:: gen.datehandler._date_it.DateParserIT
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_it.DateDisplayIT
.. autoclass:: gen.datehandler._date_it.DateDisplayIT
:members:
:undoc-members:
:show-inheritance:
@ -157,11 +150,11 @@ DateHandler (Italian)
*****************************
DateHandler (Lituanian)
*****************************
.. autoclass:: gramps.gen.datehandler._date_lt.DateParserLT
.. autoclass:: gen.datehandler._date_lt.DateParserLT
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_lt.DateDisplayLT
.. autoclass:: gen.datehandler._date_lt.DateDisplayLT
:members:
:undoc-members:
:show-inheritance:
@ -169,11 +162,11 @@ DateHandler (Lituanian)
*****************************
DateHandler (Norwegian)
*****************************
.. autoclass:: gramps.gen.datehandler._date_nb.DateParserNb
.. autoclass:: gen.datehandler._date_nb.DateParserNb
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_nb.DateDisplayNb
.. autoclass:: gen.datehandler._date_nb.DateDisplayNb
:members:
:undoc-members:
:show-inheritance:
@ -181,11 +174,11 @@ DateHandler (Norwegian)
*****************************
DateHandler (Dutch)
*****************************
.. autoclass:: gramps.gen.datehandler._date_nl.DateParserNL
.. autoclass:: gen.datehandler._date_nl.DateParserNL
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_nl.DateDisplayNL
.. autoclass:: gen.datehandler._date_nl.DateDisplayNL
:members:
:undoc-members:
:show-inheritance:
@ -193,11 +186,11 @@ DateHandler (Dutch)
*****************************
DateHandler (Polish)
*****************************
.. autoclass:: gramps.gen.datehandler._date_pl.DateParserPL
.. autoclass:: gen.datehandler._date_pl.DateParserPL
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_pl.DateDisplayPL
.. autoclass:: gen.datehandler._date_pl.DateDisplayPL
:members:
:undoc-members:
:show-inheritance:
@ -205,11 +198,11 @@ DateHandler (Polish)
*****************************
DateHandler (Portuguese)
*****************************
.. autoclass:: gramps.gen.datehandler._date_pt.DateParserPT
.. autoclass:: gen.datehandler._date_pt.DateParserPT
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_pt.DateDisplayPT
.. autoclass:: gen.datehandler._date_pt.DateDisplayPT
:members:
:undoc-members:
:show-inheritance:
@ -217,11 +210,11 @@ DateHandler (Portuguese)
*****************************
DateHandler (Russian)
*****************************
.. autoclass:: gramps.gen.datehandler._date_ru.DateParserRU
.. autoclass:: gen.datehandler._date_ru.DateParserRU
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_ru.DateDisplayRU
.. autoclass:: gen.datehandler._date_ru.DateDisplayRU
:members:
:undoc-members:
:show-inheritance:
@ -229,11 +222,11 @@ DateHandler (Russian)
*****************************
DateHandler (Slovak)
*****************************
.. autoclass:: gramps.gen.datehandler._date_sk.DateParserSK
.. autoclass:: gen.datehandler._date_sk.DateParserSK
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_sk.DateDisplaySK
.. autoclass:: gen.datehandler._date_sk.DateDisplaySK
:members:
:undoc-members:
:show-inheritance:
@ -241,11 +234,11 @@ DateHandler (Slovak)
*****************************
DateHandler (Slovenian)
*****************************
.. autoclass:: gramps.gen.datehandler._date_sl.DateParserSL
.. autoclass:: gen.datehandler._date_sl.DateParserSL
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_sl.DateDisplaySL
.. autoclass:: gen.datehandler._date_sl.DateDisplaySL
:members:
:undoc-members:
:show-inheritance:
@ -253,11 +246,11 @@ DateHandler (Slovenian)
*****************************
DateHandler (Serbian)
*****************************
.. autoclass:: gramps.gen.datehandler._date_sr.DateParserSR
.. autoclass:: gen.datehandler._date_sr.DateParserSR
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_sr.DateDisplaySR_latin
.. autoclass:: gen.datehandler._date_sr.DateDisplaySR_latin
:members:
:undoc-members:
:show-inheritance:
@ -265,11 +258,11 @@ DateHandler (Serbian)
*****************************
DateHandler (Swedish)
*****************************
.. autoclass:: gramps.gen.datehandler._date_sv.DateParserSv
.. autoclass:: gen.datehandler._date_sv.DateParserSv
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: gramps.gen.datehandler._date_sv.DateDisplaySv
.. autoclass:: gen.datehandler._date_sv.DateDisplaySv
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,13 +1,13 @@
############################
The :mod:`gramps.gen` Module
############################
##########################
The :mod:`gen` Module
##########################
.. automodule:: gramps.gen
.. automodule:: gen
*****************************
Database State
*****************************
.. automodule:: gramps.gen.dbstate
.. automodule:: gen.dbstate
.. autoclass:: DbState
:members:
:undoc-members:
@ -16,7 +16,7 @@ Database State
*****************************
Errors
*****************************
.. automodule:: gramps.gen.errors
.. automodule:: gen.errors
.. autoclass:: DatabaseError
:members:
:undoc-members:
@ -35,7 +35,7 @@ TODO
*****************************
Recent Files
*****************************
.. automodule:: gramps.gen.recentfiles
.. automodule:: gen.recentfiles
.. autoclass:: RecentFiles
:members:
:undoc-members:
@ -52,7 +52,7 @@ Recent Files
*****************************
Sort
*****************************
.. automodule:: gramps.gen.sort
.. automodule:: gen.sort
.. autoclass:: Sort
:members:
:undoc-members:
@ -61,7 +61,7 @@ Sort
*****************************
Update callback
*****************************
.. automodule:: gramps.gen.updatecallback
.. automodule:: gen.updatecallback
.. autoclass:: UpdateCallback
:members:
:undoc-members:
@ -70,7 +70,7 @@ Update callback
*****************************
User
*****************************
.. automodule:: gramps.gen.user
.. automodule:: gen.user
.. autoclass:: User
:members:
:undoc-members:

View File

@ -1,78 +1,78 @@
###############################
The :mod:`gramps.gen.db` Module
###############################
##########################
The :mod:`gen.db` Module
##########################
.. automodule:: gramps.gen.db
.. automodule:: gen.db
GrampsDbBase
====================================
.. automodule:: gramps.gen.db.base
.. automodule:: gen.db.base
:members:
:undoc-members:
:show-inheritance:
GrampsDbRead
====================================
.. automodule:: gramps.gen.db.read
.. automodule:: gen.db.read
:members:
:show-inheritance:
GrampsDbWrite
====================================
.. automodule:: gramps.gen.db.write
.. automodule:: gen.db.write
:members:
:undoc-members:
:show-inheritance:
GrampsCursor
====================================
.. automodule:: gramps.gen.db.cursor
.. automodule:: gen.db.cursor
:members:
:undoc-members:
:show-inheritance:
BSDDBtxn
====================================
.. automodule:: gramps.gen.db.bsddbtxn
.. automodule:: gen.db.bsddbtxn
:members:
:undoc-members:
:show-inheritance:
GrampsDbTxn
====================================
.. automodule:: gramps.gen.db.txn
.. automodule:: gen.db.txn
:members:
:undoc-members:
:show-inheritance:
GrampsDbUndo
====================================
.. automodule:: gramps.gen.db.undoredo
.. automodule:: gen.db.undoredo
:members:
:undoc-members:
:show-inheritance:
DbConst
====================================
.. automodule:: gramps.gen.db.dbconst
.. automodule:: gen.db.dbconst
:members:
GrampsDbException
====================================
.. automodule:: gramps.gen.db.exceptions
.. automodule:: gen.db.exceptions
:members:
:undoc-members:
:show-inheritance:
Upgrade utilities
====================================
.. automodule:: gramps.gen.db.upgrade
.. automodule:: gen.db.upgrade
:members:
:undoc-members:
Backup
====================================
.. automodule:: gramps.gen.db.backup
.. automodule:: gen.db.backup
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,12 +1,12 @@
####################################
The :mod:`gramps.gen.display` Module
####################################
#############################
The :mod:`gen.display` Module
#############################
.. automodule:: gramps.gen.display
.. automodule:: gen.display
Name
====================================
.. automodule:: gramps.gen.display.name
.. automodule:: gen.display.name
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,8 +1,8 @@
################################
The :mod:`gramps.gen.lib` Module
################################
##########################
The :mod:`gen.lib` Module
##########################
.. automodule:: gramps.gen.lib
.. automodule:: gen.lib
*****************************
Base objects
@ -10,60 +10,39 @@ Base objects
BaseObject
====================================
.. automodule:: gramps.gen.lib.baseobj
.. autoclass:: gramps.gen.lib.baseobj.BaseObject
.. automodule:: gen.lib.baseobj
.. autoclass:: gen.lib.baseobj.BaseObject
:members:
:undoc-members:
:show-inheritance:
AddressBase
====================================
.. automodule:: gramps.gen.lib.addressbase
.. automodule:: gen.lib.addressbase
.. autoclass:: AddressBase
:members:
:undoc-members:
:show-inheritance:
AttributeRootBase
====================================
.. automodule:: gramps.gen.lib.attrbase
.. autoclass:: AttributeRootBase
:members:
:undoc-members:
:show-inheritance:
AttributeBase
====================================
.. automodule:: gen.lib.attrbase
.. autoclass:: AttributeBase
:members:
:undoc-members:
:show-inheritance:
SrcAttributeBase
====================================
.. autoclass:: SrcAttributeBase
:members:
:undoc-members:
:show-inheritance:
CitationBase
====================================
.. automodule:: gramps.gen.lib.citationbase
.. automodule:: gen.lib.citationbase
.. autoclass:: CitationBase
:members:
:undoc-members:
:show-inheritance:
IndirectCitationBase
====================================
.. autoclass:: IndirectCitationBase
:members:
:undoc-members:
:show-inheritance:
DateBase
====================================
.. automodule:: gramps.gen.lib.datebase
.. automodule:: gen.lib.datebase
.. autoclass:: DateBase
:members:
:undoc-members:
@ -71,7 +50,7 @@ DateBase
LdsOrdBase
====================================
.. automodule:: gramps.gen.lib.ldsordbase
.. automodule:: gen.lib.ldsordbase
.. autoclass:: LdsOrdBase
:members:
:undoc-members:
@ -79,7 +58,7 @@ LdsOrdBase
LocationBase
====================================
.. automodule:: gramps.gen.lib.locationbase
.. automodule:: gen.lib.locationbase
.. autoclass:: LocationBase
:members:
:undoc-members:
@ -87,7 +66,7 @@ LocationBase
MediaBase
====================================
.. automodule:: gramps.gen.lib.mediabase
.. automodule:: gen.lib.mediabase
.. autoclass:: MediaBase
:members:
:undoc-members:
@ -95,7 +74,7 @@ MediaBase
NoteBase
====================================
.. automodule:: gramps.gen.lib.notebase
.. automodule:: gen.lib.notebase
.. autoclass:: NoteBase
:members:
:undoc-members:
@ -103,7 +82,7 @@ NoteBase
PlaceBase
====================================
.. automodule:: gramps.gen.lib.placebase
.. automodule:: gen.lib.placebase
.. autoclass:: PlaceBase
:members:
:undoc-members:
@ -111,7 +90,7 @@ PlaceBase
PrivacyBase
====================================
.. automodule:: gramps.gen.lib.privacybase
.. automodule:: gen.lib.privacybase
.. autoclass:: PrivacyBase
:members:
:undoc-members:
@ -119,7 +98,7 @@ PrivacyBase
RefBase
====================================
.. automodule:: gramps.gen.lib.refbase
.. automodule:: gen.lib.refbase
.. autoclass:: RefBase
:members:
:undoc-members:
@ -127,7 +106,7 @@ RefBase
SurnameBase
====================================
.. automodule:: gramps.gen.lib.surnamebase
.. automodule:: gen.lib.surnamebase
.. autoclass:: SurnameBase
:members:
:undoc-members:
@ -135,7 +114,7 @@ SurnameBase
TagBase
====================================
.. automodule:: gramps.gen.lib.tagbase
.. automodule:: gen.lib.tagbase
.. autoclass:: TagBase
:members:
:undoc-members:
@ -143,7 +122,7 @@ TagBase
UrlBase
====================================
.. automodule:: gramps.gen.lib.urlbase
.. automodule:: gen.lib.urlbase
.. autoclass:: UrlBase
:members:
:undoc-members:
@ -155,7 +134,7 @@ Primary objects
BasicPrimaryObject
====================================
.. automodule:: gramps.gen.lib.primaryobj
.. automodule:: gen.lib.primaryobj
.. autoclass:: BasicPrimaryObject
:members:
:undoc-members:
@ -170,7 +149,7 @@ PrimaryObject
Person
====================================
.. automodule:: gramps.gen.lib.person
.. automodule:: gen.lib.person
.. autoclass:: Person
:members:
:undoc-members:
@ -178,7 +157,7 @@ Person
Family
====================================
.. automodule:: gramps.gen.lib.family
.. automodule:: gen.lib.family
.. autoclass:: Family
:members:
:undoc-members:
@ -186,7 +165,7 @@ Family
Event
====================================
.. automodule:: gramps.gen.lib.event
.. automodule:: gen.lib.event
.. autoclass:: Event
:members:
:undoc-members:
@ -194,7 +173,7 @@ Event
Place
====================================
.. automodule:: gramps.gen.lib.place
.. automodule:: gen.lib.place
.. autoclass:: Place
:members:
:undoc-members:
@ -202,7 +181,7 @@ Place
Source
====================================
.. automodule:: gramps.gen.lib.src
.. automodule:: gen.lib.src
.. autoclass:: Source
:members:
:undoc-members:
@ -210,7 +189,7 @@ Source
Citation
====================================
.. automodule:: gramps.gen.lib.citation
.. automodule:: gen.lib.citation
.. autoclass:: Citation
:members:
:undoc-members:
@ -218,7 +197,7 @@ Citation
Media Object
====================================
.. automodule:: gramps.gen.lib.mediaobj
.. automodule:: gen.lib.mediaobj
.. autoclass:: MediaObject
:members:
:undoc-members:
@ -226,7 +205,7 @@ Media Object
Repository
====================================
.. automodule:: gramps.gen.lib.repo
.. automodule:: gen.lib.repo
.. autoclass:: Repository
:members:
:undoc-members:
@ -234,7 +213,7 @@ Repository
Note
====================================
.. automodule:: gramps.gen.lib.note
.. automodule:: gen.lib.note
.. autoclass:: Note
:members:
:undoc-members:
@ -246,7 +225,7 @@ Secondary objects
Secondary Object
====================================
.. automodule:: gramps.gen.lib.secondaryobj
.. automodule:: gen.lib.secondaryobj
.. autoclass:: SecondaryObject
:members:
:undoc-members:
@ -254,7 +233,7 @@ Secondary Object
Address
====================================
.. automodule:: gramps.gen.lib.address
.. automodule:: gen.lib.address
.. autoclass:: Address
:members:
:undoc-members:
@ -262,22 +241,15 @@ Address
Attribute
====================================
.. automodule:: gramps.gen.lib.attribute
.. automodule:: gen.lib.attribute
.. autoclass:: Attribute
:members:
:undoc-members:
:show-inheritance:
AttributeRoot
====================================
.. autoclass:: AttributeRoot
:members:
:undoc-members:
:show-inheritance:
LdsOrd
====================================
.. automodule:: gramps.gen.lib.ldsord
.. automodule:: gen.lib.ldsord
.. autoclass:: LdsOrd
:members:
:undoc-members:
@ -285,7 +257,7 @@ LdsOrd
Location
====================================
.. automodule:: gramps.gen.lib.location
.. automodule:: gen.lib.location
.. autoclass:: Location
:members:
:undoc-members:
@ -293,7 +265,7 @@ Location
Name
====================================
.. automodule:: gramps.gen.lib.name
.. automodule:: gen.lib.name
.. autoclass:: Name
:members:
:undoc-members:
@ -301,7 +273,7 @@ Name
Surname
====================================
.. automodule:: gramps.gen.lib.surname
.. automodule:: gen.lib.surname
.. autoclass:: Surname
:members:
:undoc-members:
@ -309,7 +281,7 @@ Surname
Url
====================================
.. automodule:: gramps.gen.lib.url
.. automodule:: gen.lib.url
.. autoclass:: Url
:members:
:undoc-members:
@ -321,7 +293,7 @@ Reference objects
ChildRef
====================================
.. automodule:: gramps.gen.lib.childref
.. automodule:: gen.lib.childref
.. autoclass:: ChildRef
:members:
:undoc-members:
@ -329,7 +301,7 @@ ChildRef
EventRef
====================================
.. automodule:: gramps.gen.lib.eventref
.. automodule:: gen.lib.eventref
.. autoclass:: EventRef
:members:
:undoc-members:
@ -337,7 +309,7 @@ EventRef
MediaRef
====================================
.. automodule:: gramps.gen.lib.mediaref
.. automodule:: gen.lib.mediaref
.. autoclass:: MediaRef
:members:
:undoc-members:
@ -345,43 +317,27 @@ MediaRef
PersonRef
====================================
.. automodule:: gramps.gen.lib.personref
.. automodule:: gen.lib.personref
.. autoclass:: PersonRef
:members:
:undoc-members:
:show-inheritance:
PlaceRef
====================================
.. automodule:: gramps.gen.lib.placeref
.. autoclass:: PlaceRef
:members:
:undoc-members:
:show-inheritance:
RepoRef
====================================
.. automodule:: gramps.gen.lib.reporef
.. automodule:: gen.lib.reporef
.. autoclass:: RepoRef
:members:
:undoc-members:
:show-inheritance:
*****************************
Table objects
Table object
*****************************
Table object
====================================
.. automodule:: gramps.gen.lib.tableobj
:members:
:undoc-members:
:show-inheritance:
Tag
====================================
.. automodule:: gramps.gen.lib.tag
.. autoclass:: Tag
.. automodule:: gen.lib.tableobj
:members:
:undoc-members:
:show-inheritance:
@ -389,7 +345,7 @@ Tag
*****************************
Date objects
*****************************
.. automodule:: gramps.gen.lib.date
.. automodule:: gen.lib.date
Date
====================================
@ -415,7 +371,7 @@ Text objects
StyledTextTag
===================
.. automodule:: gramps.gen.lib.styledtexttag
.. automodule:: gen.lib.styledtexttag
.. autoclass:: StyledTextTag
:members:
:undoc-members:
@ -423,7 +379,7 @@ StyledTextTag
StyledText
===========
.. automodule:: gramps.gen.lib.styledtext
.. automodule:: gen.lib.styledtext
.. autoclass:: StyledText
:members:
:undoc-members:
@ -436,7 +392,7 @@ Meta data
GenderStats
============
.. automodule:: gramps.gen.lib.genderstats
.. automodule:: gen.lib.genderstats
.. autoclass:: GenderStats
:members:
:undoc-members:
@ -444,7 +400,7 @@ GenderStats
Researcher
===========
.. automodule:: gramps.gen.lib.researcher
.. automodule:: gen.lib.researcher
.. autoclass:: Researcher
:members:
:undoc-members:
@ -453,7 +409,7 @@ Researcher
*****************************
Type classes
*****************************
.. automodule:: gramps.gen.lib.grampstype
.. automodule:: gen.lib.grampstype
.. autoclass:: GrampsTypeMeta
:members:
:undoc-members:
@ -468,21 +424,21 @@ GrampsType
AttributeType
=============
.. automodule:: gramps.gen.lib.attrtype
.. automodule:: gen.lib.attrtype
:members:
:undoc-members:
:show-inheritance:
ChildRefType
=============
.. automodule:: gramps.gen.lib.childreftype
.. automodule:: gen.lib.childreftype
:members:
:undoc-members:
:show-inheritance:
EventType
===========
.. automodule:: gramps.gen.lib.eventtype
.. automodule:: gen.lib.eventtype
.. autoclass:: EventType
:members:
:undoc-members:
@ -490,77 +446,70 @@ EventType
EventRoleType
==============
.. automodule:: gramps.gen.lib.eventroletype
.. automodule:: gen.lib.eventroletype
:members:
:undoc-members:
:show-inheritance:
FamilyRelType
=============
.. automodule:: gramps.gen.lib.familyreltype
.. automodule:: gen.lib.familyreltype
:members:
:undoc-members:
:show-inheritance:
MarkerType
==========
.. automodule:: gramps.gen.lib.markertype
.. automodule:: gen.lib.markertype
:members:
:undoc-members:
:show-inheritance:
NameType
===========
.. automodule:: gramps.gen.lib.nametype
.. automodule:: gen.lib.nametype
:members:
:undoc-members:
:show-inheritance:
NameOriginType
==============
.. automodule:: gramps.gen.lib.nameorigintype
.. automodule:: gen.lib.nameorigintype
:members:
:undoc-members:
:show-inheritance:
NoteType
=========
.. automodule:: gramps.gen.lib.notetype
:members:
:undoc-members:
:show-inheritance:
PlaceType
=========
.. automodule:: gramps.gen.lib.placetype
.. automodule:: gen.lib.notetype
:members:
:undoc-members:
:show-inheritance:
RepositoryType
==============
.. automodule:: gramps.gen.lib.repotype
.. automodule:: gen.lib.repotype
:members:
:undoc-members:
:show-inheritance:
SourceMediaType
================
.. automodule:: gramps.gen.lib.srcmediatype
.. automodule:: gen.lib.srcmediatype
:members:
:undoc-members:
:show-inheritance:
StyledTextTagType
==================
.. automodule:: gramps.gen.lib.styledtexttagtype
.. automodule:: gen.lib.styledtexttagtype
:members:
:undoc-members:
:show-inheritance:
UrlType
========
.. automodule:: gramps.gen.lib.urltype
.. automodule:: gen.lib.urltype
:members:
:undoc-members:
:show-inheritance:
@ -570,9 +519,9 @@ Privacy
*****************************
PrivateSourceNote
=================
============
.. automodule:: gramps.gen.lib.privsrcnote
.. automodule:: gen.lib.privsrcnote
.. autoclass:: PrivateSourceNote
:members:
:undoc-members:

View File

@ -1,119 +1,119 @@
#################################
The :mod:`gramps.gen.plug` Module
#################################
############################
The :mod:`gen.plug` Module
############################
.. automodule:: gramps.gen.plug
.. automodule:: gen.plug
Plugin
====================================
.. automodule:: gramps.gen.plug._plugin
.. automodule:: gen.plug._plugin
:members:
:undoc-members:
:show-inheritance:
BaseManager
====================================
.. automodule:: gramps.gen.plug._manager
.. automodule:: gen.plug._manager
:members:
:undoc-members:
:show-inheritance:
Export
====================================
.. automodule:: gramps.gen.plug._export
.. automodule:: gen.plug._export
:members:
:undoc-members:
:show-inheritance:
Gramplet
====================================
.. automodule:: gramps.gen.plug._gramplet
.. automodule:: gen.plug._gramplet
:members:
:undoc-members:
:show-inheritance:
Import
====================================
.. automodule:: gramps.gen.plug._import
.. automodule:: gen.plug._import
:members:
:undoc-members:
:show-inheritance:
Menu
====================================
.. automodule:: gramps.gen.plug.menu._menu
.. automodule:: gen.plug.menu._menu
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._boolean
.. automodule:: gen.plug.menu._boolean
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._booleanlist
.. automodule:: gen.plug.menu._booleanlist
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._color
.. automodule:: gen.plug.menu._color
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._destination
.. automodule:: gen.plug.menu._destination
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._enumeratedlist
.. automodule:: gen.plug.menu._enumeratedlist
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._family
.. automodule:: gen.plug.menu._family
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._filter
.. automodule:: gen.plug.menu._filter
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._media
.. automodule:: gen.plug.menu._media
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._note
.. automodule:: gen.plug.menu._note
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._number
.. automodule:: gen.plug.menu._number
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._option
.. automodule:: gen.plug.menu._option
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._person
.. automodule:: gen.plug.menu._person
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._personlist
.. automodule:: gen.plug.menu._personlist
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._placelist
.. automodule:: gen.plug.menu._placelist
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._string
.. automodule:: gen.plug.menu._string
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._style
.. automodule:: gen.plug.menu._style
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._surnamecolor
.. automodule:: gen.plug.menu._surnamecolor
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.menu._text
.. automodule:: gen.plug.menu._text
:members:
:undoc-members:
:show-inheritance:
@ -121,38 +121,38 @@ Menu
*****************************
Options
*****************************
.. automodule:: gramps.gen.plug._options
.. automodule:: gen.plug._options
:members:
:undoc-members:
:show-inheritance:
Reports
====================================
.. automodule:: gramps.gen.plug.report._options
.. automodule:: gen.plug.report._options
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.report._bibliography
.. automodule:: gen.plug.report._bibliography
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.report._constants
.. automodule:: gen.plug.report._constants
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.report.endnotes
.. automodule:: gen.plug.report.endnotes
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.report._paper
.. automodule:: gen.plug.report._paper
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.report._reportbase
.. automodule:: gen.plug.report._reportbase
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.report.utils
.. automodule:: gen.plug.report.utils
:members:
:undoc-members:
:show-inheritance:
@ -160,7 +160,7 @@ Reports
*****************************
Docgen
*****************************
.. automodule:: gramps.gen.plug._docgenplugin
.. automodule:: gen.plug._docgenplugin
:members:
:undoc-members:
:show-inheritance:
@ -168,47 +168,47 @@ Docgen
*****************************
Generators
*****************************
.. automodule:: gramps.gen.plug.docgen.basedoc
.. automodule:: gen.plug.docgen.basedoc
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.docgen.drawdoc
.. automodule:: gen.plug.docgen.drawdoc
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.docgen.fontscale
.. automodule:: gen.plug.docgen.fontscale
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.docgen.fontstyle
.. automodule:: gen.plug.docgen.fontstyle
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.docgen.graphdoc
.. automodule:: gen.plug.docgen.graphdoc
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.docgen.graphicstyle
.. automodule:: gen.plug.docgen.graphicstyle
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.docgen.paperstyle
.. automodule:: gen.plug.docgen.paperstyle
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.docgen.paragraphstyle
.. automodule:: gen.plug.docgen.paragraphstyle
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.docgen.stylesheet
.. automodule:: gen.plug.docgen.stylesheet
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.docgen.tablestyle
.. automodule:: gen.plug.docgen.tablestyle
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.docgen.textdoc
.. automodule:: gen.plug.docgen.textdoc
:members:
:undoc-members:
:show-inheritance:
@ -216,25 +216,25 @@ Generators
*****************************
Doc Backend
*****************************
.. automodule:: gramps.gen.plug.docbackend.cairobackend
.. automodule:: gen.plug.docbackend.cairobackend
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.plug.docbackend.docbackend
.. automodule:: gen.plug.docbackend.docbackend
:members:
:undoc-members:
:show-inheritance:
Register
====================================
.. automodule:: gramps.gen.plug._pluginreg
.. automodule:: gen.plug._pluginreg
:members:
:undoc-members:
:show-inheritance:
Utils
====================================
.. automodule:: gramps.gen.plug.utils
.. automodule:: gen.plug.utils
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,40 +1,40 @@
##################################
The :mod:`gramps.gen.proxy` Module
##################################
############################
The :mod:`gen.proxy` Module
############################
.. automodule:: gramps.gen.proxy
.. automodule:: gen.proxy
Proxy Base
====================================
.. automodule:: gramps.gen.proxy.proxybase
.. automodule:: gen.proxy.proxybase
:members:
:undoc-members:
:show-inheritance:
Filter
====================================
.. automodule:: gramps.gen.proxy.filter
.. automodule:: gen.proxy.filter
:members:
:undoc-members:
:show-inheritance:
Living
====================================
.. automodule:: gramps.gen.proxy.living
.. automodule:: gen.proxy.living
:members:
:undoc-members:
:show-inheritance:
Private
====================================
.. automodule:: gramps.gen.proxy.private
.. automodule:: gen.proxy.private
:members:
:undoc-members:
:show-inheritance:
References
====================================
.. automodule:: gramps.gen.proxy.referencedbyselection
.. automodule:: gen.proxy.referencedbyselection
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,101 +1,78 @@
##################################
The :mod:`gramps.gen.utils` Module
##################################
############################
The :mod:`gen.utils` Module
############################
.. automodule:: gramps.gen.utils
.. automodule:: gen.utils
**********************************
Utilities
**********************************
Callback
Utils
====================================
.. automodule:: gramps.gen.utils.callback
.. automodule:: gen.utils.alive
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.callman
.. automodule:: gen.utils.callback
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.callman
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.cast
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.config
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.configmanager
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.db
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.file
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.id
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.image
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.keyword
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.lds
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.mactrans
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.place
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.string
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.trans
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gen.utils.unknown
:members:
:undoc-members:
:show-inheritance:
Configuration
====================================
.. automodule:: gramps.gen.utils.configmanager
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.config
:members:
:undoc-members:
:show-inheritance:
Database
====================================
.. automodule:: gramps.gen.utils.alive
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.db
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.unknown
:members:
:undoc-members:
:show-inheritance:
File
====================================
.. automodule:: gramps.gen.utils.file
:members:
:undoc-members:
:show-inheritance:
Image
====================================
.. automodule:: gramps.gen.utils.image
:members:
:undoc-members:
:show-inheritance:
Locale
====================================
.. automodule:: gramps.gen.utils.grampslocale
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.maclocale
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.keyword
:members:
:undoc-members:
:show-inheritance:
Place
====================================
.. automodule:: gramps.gen.utils.place
:members:
:undoc-members:
:show-inheritance:
Other
====================================
.. automodule:: gramps.gen.utils.cast
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.id
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.lds
:members:
:undoc-members:
:show-inheritance:
.. automodule:: gramps.gen.utils.string
:members:
:undoc-members:
:show-inheritance:

View File

@ -4,8 +4,8 @@ The :class:`Html` Class
Contents:
.. automodule:: gramps.plugins.lib.libhtml
.. automodule:: libhtml
.. autoclass:: Html
:members:
:undoc-members:
:show-inheritance:
:show-inheritance:

View File

@ -2,7 +2,7 @@
The :class:`RelationshipCalculator` Class
#########################################
.. automodule:: gramps.gen.relationship
.. automodule:: gen.relationship
.. autoclass:: RelationshipCalculator
:members:
:undoc-members:
@ -14,119 +14,119 @@ Localized Handlers
Relationship (Czech)
====================================
.. autoclass:: gramps.plugins.rel.rel_cs.RelationshipCalculator
.. autoclass:: rel_cs.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Danish)
====================================
.. autoclass:: gramps.plugins.rel.rel_da.RelationshipCalculator
.. autoclass:: rel_da.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (German)
====================================
.. autoclass:: gramps.plugins.rel.rel_de.RelationshipCalculator
.. autoclass:: rel_de.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Spanish)
====================================
.. autoclass:: gramps.plugins.rel.rel_es.RelationshipCalculator
.. autoclass:: rel_es.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Finnish)
====================================
.. autoclass:: gramps.plugins.rel.rel_fi.RelationshipCalculator
.. autoclass:: rel_fi.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (French)
====================================
.. autoclass:: gramps.plugins.rel.rel_fr.RelationshipCalculator
.. autoclass:: rel_fr.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Croatian)
====================================
.. autoclass:: gramps.plugins.rel.rel_hr.RelationshipCalculator
.. autoclass:: rel_hr.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Hungarian)
====================================
.. autoclass:: gramps.plugins.rel.rel_hu.RelationshipCalculator
.. autoclass:: rel_hu.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Italian)
====================================
.. autoclass:: gramps.plugins.rel.rel_it.RelationshipCalculator
.. autoclass:: rel_it.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Dutch)
====================================
.. autoclass:: gramps.plugins.rel.rel_nl.RelationshipCalculator
.. autoclass:: rel_nl.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Norwegian)
====================================
.. autoclass:: gramps.plugins.rel.rel_no.RelationshipCalculator
.. autoclass:: rel_no.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Polish)
====================================
.. autoclass:: gramps.plugins.rel.rel_pl.RelationshipCalculator
.. autoclass:: rel_pl.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Portuguese)
====================================
.. autoclass:: gramps.plugins.rel.rel_pt.RelationshipCalculator
.. autoclass:: rel_pt.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Russian)
====================================
.. autoclass:: gramps.plugins.rel.rel_ru.RelationshipCalculator
.. autoclass:: rel_ru.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Slovak)
====================================
.. autoclass:: gramps.plugins.rel.rel_sk.RelationshipCalculator
.. autoclass:: rel_sk.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Slovenian)
====================================
.. autoclass:: gramps.plugins.rel.rel_sl.RelationshipCalculator
.. autoclass:: rel_sl.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:
Relationship (Swedish)
====================================
.. autoclass:: gramps.plugins.rel.rel_sv.RelationshipCalculator
.. autoclass:: rel_sv.RelationshipCalculator
:members:
:undoc-members:
:show-inheritance:

View File

@ -2,25 +2,25 @@
The :class:`Simple` Classes
###########################
.. automodule:: gramps.gen.simple
.. automodule:: gen.simple
Simple Access
====================================
.. automodule:: gramps.gen.simple._simpleaccess
.. automodule:: gen.simple._simpleaccess
:members:
:undoc-members:
:show-inheritance:
Simple Doc
====================================
.. automodule:: gramps.gen.simple._simpledoc
.. automodule:: gen.simple._simpledoc
:members:
:undoc-members:
:show-inheritance:
Simple Table
====================================
.. automodule:: gramps.gen.simple._simpletable
.. automodule:: gen.simple._simpletable
:members:
:undoc-members:
:show-inheritance:

View File

@ -19,7 +19,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
update_doc.py for Gramps API(s) documentation.
@ -42,11 +42,11 @@ SPHINXBUILD = 'sphinx-build'
if sys.platform == 'win32':
pythonCmd = os.path.join(sys.prefix, 'bin', 'python.exe')
sphinxCmd = os.path.join(sys.prefix, 'bin', 'sphinx-build.exe')
elif sys.platform in ['linux2', 'darwin', 'cygwin']:
elif sys.platform == 'linux2' or os.name == 'darwin':
pythonCmd = os.path.join(sys.prefix, 'bin', 'python')
sphinxCmd = SPHINXBUILD
else:
print ("Update Docs ERROR: unknown system, don't know sphinx, ... commands")
print ("ERROR: unknown system, don't know sphinx, ... commands")
sys.exit(0)
def tests():

View File

@ -1,7 +0,0 @@
person,surname,given
a,"CSV Surname","Given 1"
b,"CSV Surname","Given 2"
marriage,mother,father
1,a,b
1 person surname given
2 a CSV Surname Given 1
3 b CSV Surname Given 2
4 marriage mother father
5 1 a b

View File

@ -25,7 +25,7 @@
1 BIRT
2 TYPE Birth of Anna Hansdotter
2 DATE 2 OCT 1864
2 PLAC Löderup, Malmöhus Län, Sweden
2 PLAC Loderup, Malmous Lan, Sweden
1 DEAT
2 TYPE Death of Anna Hansdotter
2 DATE 29 SEP 1945
@ -55,7 +55,7 @@
1 BIRT
2 TYPE Birth of Hans Peter Smith
2 DATE 17 APR 1904
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 DEAT
2 TYPE Death of Hans Peter Smith
2 DATE 29 JAN 1977
@ -74,7 +74,7 @@
1 BIRT
2 TYPE Birth of Hanna Smith
2 DATE 29 JAN 1821
2 PLAC Gladsax, Kristianstad Län, Sweden
2 PLAC Gladsax, Kristianstad Lan, Sweden
1 FAMC @F0@
1 CHAN
2 DATE 21 DEC 2007
@ -87,7 +87,7 @@
1 BIRT
2 TYPE Birth of Herman Julius Nielsen
2 DATE 31 AUG 1889
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 DEAT
2 TYPE Death of Herman Julius Nielsen
2 DATE 1945
@ -128,7 +128,7 @@
1 BIRT
2 TYPE Birth of Gus Smith
2 DATE 11 SEP 1897
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 DEAT
2 TYPE Death of Gus Smith
2 DATE 21 OCT 1963
@ -146,7 +146,7 @@
1 BIRT
2 TYPE Birth of Jennifer Anderson
2 DATE 5 NOV 1907
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 DEAT
2 TYPE Death of Jennifer Anderson
2 DATE 29 MAY 1985
@ -163,7 +163,7 @@
1 BIRT
2 TYPE Birth of Lillie Harriet Jones
2 DATE 2 MAY 1910
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 DEAT
2 TYPE Death of Lillie Harriet Jones
2 DATE 26 JUN 1990
@ -227,7 +227,7 @@
1 BIRT
2 TYPE Birth of Carl Emil Smith
2 DATE 20 DEC 1899
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 DEAT
2 TYPE Death of Carl Emil Smith
2 DATE 28 JAN 1959
@ -245,11 +245,11 @@
1 BIRT
2 TYPE Birth of Hjalmar Smith
2 DATE 31 JAN 1893
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 DEAT
2 TYPE Death of Hjalmar Smith
2 DATE 25 SEP 1894
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 FAMC @F3@
1 CHAN
2 DATE 21 DEC 2007
@ -262,7 +262,7 @@
1 BIRT
2 TYPE Birth of Martin Smith
2 DATE 19 NOV 1830
2 PLAC Gladsax, Kristianstad Län, Sweden
2 PLAC Gladsax, Kristianstad Lan, Sweden
1 DEAT
2 TYPE Death of Martin Smith
2 DATE BET 1899 AND 1905
@ -270,7 +270,7 @@
1 BAPM
2 TYPE Baptism of Martin Smith
2 DATE 23 NOV 1830
2 PLAC Gladsax, Kristianstad Län, Sweden
2 PLAC Gladsax, Kristianstad Lan, Sweden
1 FAMC @F0@
1 FAMS @F2@
1 NOTE @N0002@
@ -285,7 +285,7 @@
1 BIRT
2 TYPE Birth of Astrid Shermanna Augusta Smith
2 DATE 31 JAN 1889
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 DEAT
2 TYPE Death of Astrid Shermanna Augusta Smith
2 DATE 21 DEC 1963
@ -304,7 +304,7 @@
1 BIRT
2 TYPE Birth of Gustaf Smith, Sr.
2 DATE 28 NOV 1862
2 PLAC Grostorp, Kristianstad Län, Sweden
2 PLAC Grostorp, Kristianstad Lan, Sweden
1 DEAT
2 TYPE Death of Gustaf Smith, Sr.
2 DATE BEF 23 JUL 1930
@ -316,7 +316,7 @@
1 CHR
2 TYPE Christening of Gustaf Smith, Sr.
2 DATE 7 DEC 1862
2 PLAC Gladsax, Kristianstad Län, Sweden
2 PLAC Gladsax, Kristianstad Lan, Sweden
1 FAMC @F2@
1 FAMS @F3@
1 CHAN
@ -343,7 +343,7 @@
1 BIRT
2 TYPE Birth of Kirsti Marie Smith
2 DATE 15 DEC 1886
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 DEAT
2 TYPE Death of Kirsti Marie Smith
2 DATE 18 JUL 1966
@ -378,7 +378,7 @@
1 DEAT
2 TYPE Death of Anna Streiffert
2 DATE 2 FEB 1927
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 FAMS @F11@
1 CHAN
2 DATE 21 DEC 2007
@ -407,11 +407,11 @@
1 BIRT
2 TYPE Birth of Magnes Smith
2 DATE 6 OCT 1858
2 PLAC Simrishamn, Kristianstad Län, Sweden
2 PLAC Simrishamn, Kristianstad Lan, Sweden
1 DEAT
2 TYPE Death of Magnes Smith
2 DATE 20 FEB 1910
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 FAMC @F2@
1 FAMS @F11@
1 CHAN
@ -515,14 +515,14 @@
1 BIRT
2 TYPE Birth of Elna Jefferson
2 DATE 14 SEP 1800
2 PLAC Gladsax, Kristianstad Län, Sweden
2 PLAC Gladsax, Kristianstad Lan, Sweden
1 DEAT
2 TYPE Death of Elna Jefferson
2 PLAC Sweden
1 CHR
2 TYPE Christening of Elna Jefferson
2 DATE 16 SEP 1800
2 PLAC Gladsax, Kristianstad Län, Sweden
2 PLAC Gladsax, Kristianstad Lan, Sweden
1 FAMS @F0@
1 CHAN
2 DATE 21 DEC 2007
@ -560,7 +560,7 @@
1 BIRT
2 TYPE Birth of Kerstina Hansdotter
2 DATE 29 NOV 1832
2 PLAC Smestorp, Kristianstad Län, Sweden
2 PLAC Smestorp, Kristianstad Lan, Sweden
1 DEAT
2 TYPE Death of Kerstina Hansdotter
2 DATE BEF 1908
@ -577,7 +577,7 @@
1 BIRT
2 TYPE Birth of Martin Smith
2 DATE BET 1794 AND 1796
2 PLAC Tommarp, Kristianstad Län, Sweden
2 PLAC Tommarp, Kristianstad Lan, Sweden
1 DEAT
2 TYPE Death of Martin Smith
2 PLAC Sweden
@ -594,7 +594,7 @@
1 BIRT
2 TYPE Birth of Ingeman Smith
2 DATE 29 JAN 1826
2 PLAC Gladsax, Kristianstad Län, Sweden
2 PLAC Gladsax, Kristianstad Lan, Sweden
1 FAMC @F0@
1 CHAN
2 DATE 21 DEC 2007
@ -661,7 +661,7 @@
1 BIRT
2 TYPE Birth of Ingar Smith
2 DATE AFT 1823
2 PLAC Gladsax, Kristianstad Län, Sweden
2 PLAC Gladsax, Kristianstad Lan, Sweden
1 FAMC @F0@
1 CHAN
2 DATE 21 DEC 2007
@ -674,7 +674,7 @@
1 BIRT
2 TYPE Birth of Hjalmar Smith
2 DATE 7 APR 1895
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 DEAT
2 TYPE Death of Hjalmar Smith
2 DATE 26 JUN 1975
@ -682,7 +682,7 @@
1 BAPM
2 TYPE Baptism of Hjalmar Smith
2 DATE 3 JUN 1895
2 PLAC Rønne Bornholm, Denmark
2 PLAC Ronne Bornholm, Denmark
1 EVEN
2 TYPE Immi
2 DATE 14 NOV 1912
@ -701,7 +701,7 @@
1 BIRT
2 TYPE Birth of Emil Smith
2 DATE 27 SEP 1860
2 PLAC Simrishamn, Kristianstad Län, Sweden
2 PLAC Simrishamn, Kristianstad Lan, Sweden
1 FAMC @F2@
1 CHAN
2 DATE 21 DEC 2007
@ -712,7 +712,7 @@
1 MARR
2 TYPE Marriage of Martin Smith and Elna Jefferson
2 DATE ABT 1816
2 PLAC Gladsax, Kristianstad Län, Sweden
2 PLAC Gladsax, Kristianstad Lan, Sweden
1 CHIL @I11@
1 CHIL @I7@
1 CHIL @I4@
@ -748,7 +748,7 @@
1 MARR
2 TYPE Marriage of Magnes Smith and Anna Streiffert
2 DATE 24 AUG 1884
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 CHAN
2 DATE 21 DEC 2007
3 TIME 01:35:26
@ -805,7 +805,7 @@
1 MARR
2 TYPE Marriage of Gustaf Smith, Sr. and Anna Hansdotter
2 DATE 27 NOV 1885
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 CHIL @I26@
1 CHIL @I23@
1 CHIL @I21@
@ -831,7 +831,7 @@
1 MARR
2 TYPE Marriage of Herman Julius Nielsen and Astrid Shermanna Augusta Smith
2 DATE 30 NOV 1912
2 PLAC Rønne, Bornholm, Denmark
2 PLAC Ronne, Bornholm, Denmark
1 CHAN
2 DATE 21 DEC 2007
3 TIME 01:35:26

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -15,9 +15,11 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# gen/__init__.py
# $Id$
#
"""
The core gramps module provides the different packages

View File

@ -14,9 +14,11 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
"""
Package init for the cli package.
"""

View File

@ -8,7 +8,7 @@
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2012 Doug Blank
# Copyright (C) 2012-2013 Paul Franklin
# Copyright (C) 2012 Paul Franklin
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -22,11 +22,13 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
"""
Module responsible for handling the command line arguments for Gramps.
Module responsible for handling the command line arguments for GRAMPS.
"""
#-------------------------------------------------------------------------
@ -37,6 +39,7 @@ Module responsible for handling the command line arguments for Gramps.
from __future__ import print_function
import os
import sys
from gramps.gen.ggettext import gettext as _
#-------------------------------------------------------------------------
#
@ -44,16 +47,15 @@ import sys
#
#-------------------------------------------------------------------------
from gramps.gen.recentfiles import recent_files
from gramps.gen.utils.file import rm_tempdir, get_empty_tempdir
from gramps.gen.utils.file import (rm_tempdir, get_empty_tempdir,
get_unicode_path_from_env_var)
from gramps.gen.db import DbBsddb
from .clidbman import CLIDbManager, NAME_FILE, find_locker_name
from gramps.gen.plug import BasePluginManager
from gramps.gen.plug.report import CATEGORY_BOOK, CATEGORY_CODE, BookList
from .plug import cl_report, cl_book
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
from gramps.gen.constfunc import conv_to_unicode
from .user import User
#-------------------------------------------------------------------------
#
@ -65,31 +67,24 @@ def _split_options(options_str):
Split the options for the action.
Rules:
* Entries in the list of options are separated by commas without
spaces between entries
* List values must be inclosed in brackets ("[" and "]")
* Entries within a list value are separated by commas
* Text values (as a value or as entries in a list) do not have to be
enclosed in quotes unless they include commas or quotation marks.
* Text containing double quotes must be contained in single quotes
* Text containing single quotes must be contained in double quotes
* Text cannot include both single and double quotes
* Entries in the list of options are separated by commas without
spaces between entries
* List values must be inclosed in brackets ("[" and "]")
* Entries within a list value are separated by commas
* Text values (as a value or as entries in a list) do not have to be
enclosed in quotes unless they include commas or quotation marks.
* Text containing double quotes must be contained in single quotes
* Text containing single quotes must be contained in double quotes
* Text cannot include both single and double quotes
Examples:
Multiple options specified::
report -p 'name=ancestor_chart,father_disp=["$n born $b"]'
Using text with commas and quotes::
title="This is some text with ,s and 's"
title='This is some text with ,s and "s'
Using a list of text::
textlist=[row1,row2,"row3 with ' and ,"]
* Multiple options specified:
report -p 'name=ancestor_chart,father_disp=["$n born $b"]'
* Using text with commas and quotes:
title="This is some text with ,s and 's"
title='This is some text with ,s and "s'
* Using a list of text
textlist=[row1,row2,"row3 with ' and ,"]
"""
name = ""
value = ""
@ -152,7 +147,7 @@ class ArgHandler(object):
"""
This class is responsible for the non GUI handling of commands.
The handler is passed a parser object, sanitizes it, and can execute the
actions requested working on a :class:`.DbState`.
actions requested working on a DbState.
"""
def __init__(self, dbstate, parser, sessionmanager,
@ -161,7 +156,6 @@ class ArgHandler(object):
self.sm = sessionmanager
self.errorfunc = errorfunc
self.gui = gui
self.user = sessionmanager.user
if self.gui:
self.actions = []
self.list = False
@ -171,7 +165,6 @@ class ArgHandler(object):
self.actions = parser.actions
self.list = parser.list
self.list_more = parser.list_more
self.list_table = parser.list_table
self.open_gui = parser.open_gui
self.imp_db_path = None
self.dbman = CLIDbManager(self.dbstate)
@ -190,9 +183,11 @@ class ArgHandler(object):
if self.errorfunc:
self.errorfunc(msg1)
else:
print(msg1, file=sys.stderr)
# Need to convert to system file encoding before printing
# For non latin characters in path/file/user names
print(msg1.encode(sys.getfilesystemencoding()), file=sys.stderr)
if msg2 is not None:
print(msg2, file=sys.stderr)
print(msg2.encode(sys.getfilesystemencoding()), file=sys.stderr)
#-------------------------------------------------------------------------
# Argument parser: sorts out given arguments
@ -214,7 +209,7 @@ class ArgHandler(object):
"""
if value is None:
return None
value = conv_to_unicode(value, sys.stdin.encoding)
value = get_unicode_path_from_env_var(value)
db_path = self.__deduce_db_path(value)
if db_path:
@ -223,7 +218,7 @@ class ArgHandler(object):
if not self.check_db(db_path, self.force_unlock):
sys.exit(0)
if create:
self.__error( _("Error: Family Tree '%s' already exists.\n"
self.__error( _("Error: Family tree '%s' already exists.\n"
"The '-C' option cannot be used.") % value)
sys.exit(0)
return db_path
@ -232,9 +227,9 @@ class ArgHandler(object):
db_path, title = self.dbman.create_new_db_cli(title=value)
return db_path
else:
self.__error( _('Error: Input Family Tree "%s" does not exist.\n'
self.__error( _('Error: Input family tree "%s" does not exist.\n'
"If GEDCOM, Gramps-xml or grdb, use the -i option "
"to import into a Family Tree instead.") % value)
"to import into a family tree instead.") % value)
sys.exit(0)
def __handle_import_option(self, value, family_tree_format):
@ -244,7 +239,8 @@ class ArgHandler(object):
"""
# Need to convert path/filename to unicode before opening
# For non latin characters in Windows path/file/user names
fname = conv_to_unicode(value, sys.stdin.encoding)
value = get_unicode_path_from_env_var(value)
fname = value
fullpath = os.path.abspath(os.path.expanduser(fname))
if fname != '-' and not os.path.exists(fullpath):
self.__error(_('Error: Import file %s not found.') % fname)
@ -273,30 +269,41 @@ class ArgHandler(object):
def __handle_export_option(self, value, family_tree_format):
"""
Handle the "-e" or "--export" option.
.. note:: this can only happen in the CLI version.
Handle the "-e" or "--export" option.
Note: this can only happen in the CLI version.
"""
if self.gui:
return
# Need to convert path/filename to unicode before opening
# For non latin characters in Windows path/file/user names
fname = conv_to_unicode(value, sys.stdin.encoding)
value = get_unicode_path_from_env_var(value)
fname = value
if fname == '-':
fullpath = '-'
else:
fullpath = os.path.abspath(os.path.expanduser(fname))
if os.path.exists(fullpath):
message = _("WARNING: Output file already exists!\n"
"WARNING: It will be overwritten:\n %s"
) % fullpath
accepted = self.user.prompt(_('OK to overwrite?'), message,
_('yes'), _('no'))
if accepted:
self.__error(_("Will overwrite the existing file: %s")
% fullpath)
else:
sys.exit(0)
self.__error(_("WARNING: Output file already exists!\n"
"WARNING: It will be overwritten:\n %s") %
fullpath)
answer = None
while not answer:
try:
if sys.version_info[0] < 3:
ask = raw_input
else:
ask = input
ans = ask(_('OK to overwrite? (yes/no) ') \
.encode(sys.getfilesystemencoding()))
except EOFError:
print()
sys.exit(0)
if ans.upper() in ('Y', 'YES', _('YES').upper()):
self.__error( _("Will overwrite the existing file: %s")
% fullpath)
answer = "ok"
else:
sys.exit(0)
if family_tree_format is None:
# Guess the file format based on the file extension.
@ -321,8 +328,8 @@ class ArgHandler(object):
"""
Attempt to find a database path for the given parameter.
:returns: The path to a Gramps DB or None if a database can not be
deduced.
@return: The path to a Gramps DB
or None if a database can not be deduced.
"""
# First, check if this is the name of a family tree
db_path = self.dbman.get_family_tree_path(db_name_or_path)
@ -345,16 +352,15 @@ class ArgHandler(object):
#-------------------------------------------------------------------------
def handle_args_gui(self):
"""
Method to handle the arguments that can be given for a GUI session.
:returns: the filename of the family tree that should be opened if
user just passed a famtree or a filename.
1. no options: a family tree can be given, if so, this name is tested
and returned. If a filename, it is imported in a new db and name of
new db returned
2. an open and/or import option can have been given, if so, this is
handled, and None is returned
method to handle the arguments that can be given for a GUI session.
Returns the filename of the family tree that should be opened if
user just passed a famtree or a filename
1/no options: a family tree can be given, if so, this name is
tested and returned. If a filename, it is imported
in a new db and name of new db returned
2/an open and/or import option can have been given, if so, this
is handled, and None is returned
"""
if self.open_gui:
# First check if a Gramps database was provided
@ -364,15 +370,19 @@ class ArgHandler(object):
if not db_path:
# Apparently it is not a database. See if it is a file that
# can be imported.
db_path, title = self.dbman.import_new_db(self.open_gui, self.user)
db_path, title = self.dbman.import_new_db(self.open_gui, None)
if db_path:
# Test if not locked or problematic
if not self.check_db(db_path, self.force_unlock):
sys.exit(0)
# Add the file to the recent items
title = self.dbstate.db.get_dbname()
if not title:
path = os.path.join(db_path, "name.txt")
try:
ifile = open(path)
title = ifile.readline().strip()
ifile.close()
except:
title = db_path
recent_files(db_path, title)
self.open = db_path
@ -392,67 +402,52 @@ class ArgHandler(object):
Depending on the given arguments, import or open data, launch
session, write files, and/or perform actions.
:param: climan: the manager of a CLI session
:type: :class:`.CLIManager` object
@param: climan: the manager of a CLI session
@type: CLIManager object
"""
if self.list:
print(_('List of known Family Trees in your database path\n'))
print(_('List of known family trees in your database path\n').\
encode(sys.getfilesystemencoding()))
for name, dirname in sorted(self.dbman.family_tree_list(),
key=lambda pair: pair[0].lower()):
print(_("%(full_DB_path)s with name \"%(f_t_name)s\"")
% {'full_DB_path' : dirname, 'f_t_name' : name})
print((_("%(full_DB_path)s with name \"%(f_t_name)s\"") % \
{'full_DB_path' : dirname,
'f_t_name' : name}).encode(sys.getfilesystemencoding()))
sys.exit(0)
if self.list_more:
print(_('Gramps Family Trees:'))
print(_('Gramps Family Trees:').encode(sys.getfilesystemencoding()))
summary_list = self.dbman.family_tree_summary()
for summary in sorted(summary_list,
key=lambda sum: sum[_("Family Tree")].lower()):
print(_("Family Tree \"%s\":") % summary[_("Family Tree")])
key=lambda sum: sum["Family tree"].lower()):
print(_("Family Tree \"%s\":").\
encode(sys.getfilesystemencoding()) % summary["Family tree"])
for item in sorted(summary):
if item != "Family Tree":
# translators: needed for French, ignore otherwise
print(_(" %s: %s") % (item, summary[item]))
if item != "Family tree":
print((" %s: %s" % (item, summary[item])).\
encode(sys.getfilesystemencoding()))
sys.exit(0)
if self.list_table:
print(_('Gramps Family Trees:'))
summary_list = self.dbman.family_tree_summary()
if not summary_list:
sys.exit(0)
print(_("Family Tree"), end="")
for key in sorted(summary_list[0]):
if key != "Family Tree":
print("\t ", end="")
print(key, end="")
print()
for summary in sorted(summary_list,
key=lambda sum: sum[_("Family Tree")].lower()):
print('"%s"' % summary[_("Family Tree")], end="")
for item in sorted(summary):
if item != _("Family Tree"):
print("\t ", end="")
print('"%s"' % summary[item], end="")
print()
sys.exit(0)
self.__open_action()
self.__import_action()
for (action, op_string) in self.actions:
print(_("Performing action: %s.") % action, file=sys.stderr)
if op_string:
print(_("Using options string: %s")
% op_string, file=sys.stderr)
print(_("Using options string: %s") % op_string, file=sys.stderr)
self.cl_action(action, op_string)
for expt in self.exports:
print(_("Exporting: file %(filename)s, format %(format)s.")
% {'filename' : expt[0],
'format' : expt[1]}, file=sys.stderr)
# Need to convert path/filename to str before printing
# For non latin characters in Windows path/file/user names
fn = expt[0].encode(sys.getfilesystemencoding())
fmt = str(expt[1])
print(_("Exporting: file %(filename)s, "
"format %(format)s.") % \
{'filename' : fn,
'format' : fmt}, file=sys.stderr)
self.cl_export(expt[0], expt[1])
if cleanup:
@ -469,10 +464,8 @@ class ArgHandler(object):
def __import_action(self):
"""
Take action for all given import files.
.. note:: Family trees are not supported.
Take action for all given import files. Note: Family trees are
not supported.
If a family tree is open, the import happens on top of it. If not
open, a new family tree is created, and the import done. If this
is CLI, the created tree is deleted at the end (as some action will
@ -486,13 +479,14 @@ class ArgHandler(object):
if self.gui:
self.imp_db_path, title = self.dbman.create_new_db_cli()
else:
self.imp_db_path = get_empty_tempdir("import_dbdir")
self.imp_db_path = get_empty_tempdir("import_dbdir") \
.encode(sys.getfilesystemencoding())
newdb = DbBsddb()
newdb.write_version(self.imp_db_path)
try:
self.sm.open_activate(self.imp_db_path)
msg = _("Created empty Family Tree successfully")
msg = _("Created empty family tree successfully")
print(msg, file=sys.stderr)
except:
print(_("Error opening the file."), file=sys.stderr)
@ -500,8 +494,10 @@ class ArgHandler(object):
sys.exit(0)
for imp in self.imports:
fn = imp[0].encode(sys.getfilesystemencoding())
fmt = str(imp[1])
msg = _("Importing: file %(filename)s, format %(format)s.") % \
{'filename' : imp[0], 'format' : imp[1]}
{'filename' : fn, 'format' : fmt}
print(msg, file=sys.stderr)
self.cl_import(imp[0], imp[1])
@ -554,7 +550,13 @@ class ArgHandler(object):
for plugin in pmgr.get_import_plugins():
if family_tree_format == plugin.get_extension():
import_function = plugin.get_import_function()
import_function(self.dbstate.db, filename, self.user)
import_function(self.dbstate.db, filename, User())
if not self.cl:
if self.imp_db_path:
return self.sm.open_activate(self.imp_db_path)
else:
return self.sm.open_activate(self.open)
#-------------------------------------------------------------------------
#
@ -570,7 +572,7 @@ class ArgHandler(object):
for plugin in pmgr.get_export_plugins():
if family_tree_format == plugin.get_extension():
export_function = plugin.get_export_function()
export_function(self.dbstate.db, filename, self.user)
export_function(self.dbstate.db, filename, User(error=self.__error))
#-------------------------------------------------------------------------
#
@ -587,8 +589,7 @@ class ArgHandler(object):
options_str_dict = _split_options(options_str)
except:
options_str_dict = {}
print(_("Ignoring invalid options string."),
file=sys.stderr)
print(_("Ignoring invalid options string."), file=sys.stderr)
name = options_str_dict.pop('name', None)
_cl_list = pmgr.get_reg_reports(gui=False)
@ -616,17 +617,16 @@ class ArgHandler(object):
msg = _("Report name not given. "
"Please use one of %(donottranslate)s=reportname") % \
{'donottranslate' : '[-p|--options] name'}
print(_("%s\n Available names are:") % msg, file=sys.stderr)
for pdata in sorted(_cl_list, key= lambda pdata: pdata.id.lower()):
# Print cli report name ([item[0]), GUI report name (item[4])
if len(pdata.id) <= 25:
print(" %s%s- %s"
% ( pdata.id, " " * (26 - len(pdata.id)),
pdata.name), file=sys.stderr)
print(" %s%s- %s" % ( pdata.id, " " * (26 - len(pdata.id)),
pdata.name.encode(sys.getfilesystemencoding())), file=sys.stderr)
else:
print(" %s\t- %s"
% (pdata.id, pdata.name), file=sys.stderr)
print(" %s\t- %s" % (pdata.id,
pdata.name.encode(sys.getfilesystemencoding())), file=sys.stderr)
elif action == "tool":
from gramps.gui.plug import tool
@ -635,8 +635,7 @@ class ArgHandler(object):
chunk in options_str.split(',') ] )
except:
options_str_dict = {}
print(_("Ignoring invalid options string."),
file=sys.stderr)
print(_("Ignoring invalid options string."), file=sys.stderr)
name = options_str_dict.pop('name', None)
_cli_tool_list = pmgr.get_reg_tools(gui=False)
@ -650,40 +649,32 @@ class ArgHandler(object):
category = pdata.category
tool_class = eval('mod.' + pdata.toolclass)
options_class = eval('mod.' + pdata.optionclass)
tool.cli_tool(
dbstate=self.dbstate,
name=name,
category=category,
tool_class=tool_class,
options_class=options_class,
options_str_dict=options_str_dict,
user=self.user)
tool.cli_tool(self.dbstate, name, category, tool_class,
options_class, options_str_dict)
return
msg = _("Unknown tool name.")
else:
msg = _("Tool name not given. "
"Please use one of %(donottranslate)s=toolname.") % \
{'donottranslate' : '[-p|--options] name'}
print(_("%s\n Available names are:") % msg, file=sys.stderr)
for pdata in sorted(_cli_tool_list,
key=lambda pdata: pdata.id.lower()):
# Print cli report name ([item[0]), GUI report name (item[4])
if len(pdata.id) <= 25:
print(" %s%s- %s"
% ( pdata.id, " " * (26 - len(pdata.id)),
pdata.name), file=sys.stderr)
print(" %s%s- %s" % ( pdata.id, " " * (26 - len(pdata.id)),
pdata.name.encode(sys.getfilesystemencoding())), file=sys.stderr)
else:
print(" %s\t- %s"
% (pdata.id, pdata.name), file=sys.stderr)
print(" %s\t- %s" % (pdata.id,
pdata.name.encode(sys.getfilesystemencoding())), file=sys.stderr)
elif action == "book":
try:
options_str_dict = _split_options(options_str)
except:
options_str_dict = {}
print(_("Ignoring invalid options string."),
file=sys.stderr)
print(_("Ignoring invalid options string."), file=sys.stderr)
name = options_str_dict.pop('name', None)
book_list = BookList('books.xml', self.dbstate.db)

View File

@ -8,7 +8,7 @@
# Copyright (C) 2008 Raphael Ackermann
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2012 Doug Blank
# Copyright (C) 2012-2013 Paul Franklin
# Copyright (C) 2012 Paul Franklin
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -22,11 +22,13 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
"""
Module responsible for handling the command line arguments for Gramps.
Module responsible for handling the command line arguments for GRAMPS.
"""
#-------------------------------------------------------------------------
@ -34,9 +36,10 @@ Module responsible for handling the command line arguments for Gramps.
# Standard python modules
#
#-------------------------------------------------------------------------
from __future__ import print_function, unicode_literals
from __future__ import print_function
import sys
import getopt
from gramps.gen.ggettext import gettext as _
import logging
#-------------------------------------------------------------------------
@ -46,11 +49,10 @@ import logging
#-------------------------------------------------------------------------
from gramps.gen.const import LONGOPTS, SHORTOPTS
from gramps.gen.config import config
from gramps.gen.utils.cast import get_type_converter
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
from gramps.gen.constfunc import conv_to_unicode
from gramps.gen.utils.configmanager import safe_eval
from gramps.gen.utils.file import get_unicode_path_from_env_var
# Note: Make sure to edit const.py.in POPT_TABLE too!
_HELP = _("""
Usage: gramps.py [OPTION...]
--load-modules=MODULE1,MODULE2,... Dynamic modules to load
@ -60,22 +62,19 @@ Help options
--usage Display brief usage message
Application options
-O, --open=FAMILY_TREE Open Family Tree
-C, --create=FAMILY_TREE Create on open if new Family Tree
-O, --open=FAMILY_TREE Open family tree
-C, --create=FAMILY_TREE Create on open if new family tree
-i, --import=FILENAME Import file
-e, --export=FILENAME Export file
-f, --format=FORMAT Specify Family Tree format
-f, --format=FORMAT Specify family tree format
-a, --action=ACTION Specify action
-p, --options=OPTIONS_STRING Specify options
-d, --debug=LOGGER_NAME Enable debug logs
-l List Family Trees
-L List Family Trees in Detail
-t List Family Trees, tab delimited
-u, --force-unlock Force unlock of Family Tree
-u, --force-unlock Force unlock of family tree
-s, --show Show config settings
-c, --config=[config.setting[:value]] Set config setting(s) and start Gramps
-y, --yes Don't ask to confirm dangerous actions (non-GUI mode only)
-q, --quiet Suppress progress indication output (non-GUI mode only)
-v, --version Show versions
""")
@ -111,7 +110,7 @@ Use the name=timeline,show=all to find out about all available options for the t
To find out details of a particular option, use show=option_name , e.g. name=timeline,show=off string.
To learn about available report names, use name=show string.
9. To convert a Family Tree on the fly to a .gramps xml file:
9. To convert a family tree on the fly to a .gramps xml file:
gramps -O 'Family Tree 1' -e output.gramps -f gramps-xml
10. To generate a web site into an other locale (in german):
@ -131,58 +130,35 @@ class ArgParser(object):
"""
This class is responsible for parsing the command line arguments (if any)
given to gramps, and determining if a GUI or a CLI session must be started.
A filename and/or options may be specified as arguments.
The valid arguments are:
The valid options are:
-O, --open=FAMILY_TREE Open Family Tree
-C, --create=FAMILY_TREE Create on open if new Family Tree
-i, --import=FILENAME Import file
-e, --export=FILENAME Export file
-f, --format=FORMAT Specify Family Tree format
-a, --action=ACTION Specify action
-p, --options=OPTIONS_STRING Specify options
-d, --debug=LOGGER_NAME Enable debug logs
-l List Family Trees
-L List Family Trees in Detail
-t List Family Trees, tab delimited
-u, --force-unlock Force unlock of Family Tree
-s, --show Show config settings
-c, --config=SETTINGS Set config setting(s) and start Gramps
-y, --yes Don't ask to confirm dangerous actions
-q, --quiet Suppress progress indication output
-v, --version Show versions
-h, --help Display the help
--usage Display usage information
If the filename (no options) is specified, the interactive session is
launched using data from filename. In this mode (filename, no options), the
rest of the arguments are ignored. This is a mode suitable by default for
GUI launchers, mime type handlers, and the like.
Possible:
1/ FAMTREE : Just the family tree (name or database dir)
2/ -O, --open=FAMTREE, Open of a family tree
3/ -i, --import=FILE, Import a family tree of any format understood
by an importer, optionally provide -f to indicate format
4/ -e, --export=FILE, export a family tree in required format,
optionally provide -f to indicate format
5/ -f, --format=FORMAT : format after a -i or -e option
6/ -a, --action: An action (possible: 'report', 'tool')
7/ -p, --options=OPTIONS_STRING : specify options
8/ -u, --force-unlock: A locked database can be unlocked by giving
this argument when opening it
If the filename (no flags) is specified, the interactive session is
launched using data from filename.
In this mode (filename, no flags), the rest of the arguments is ignored.
This is a mode suitable by default for GUI launchers, mime type handlers,
and the like
If no filename or -i option is given, a new interactive session (empty
database) is launched, since no data is given anyway.
If -O or -i option is given, but no -e or -a options are given, an
interactive session is launched with the ``FILENAME`` (specified with -i).
interactive session is launched with the FILE (specified with -i).
If both input (-O or -i) and processing (-e or -a) options are given,
interactive session will not be launched.
When using import ot export options (-i or -e), the -f option may be
specified to indicate the family tree format.
Possible values for ``ACTION`` are: 'report', 'book' and 'tool'.
Configuration ``SETTINGS`` may be specified using the -c option. The
settings are of the form config.setting[:value]. If used without a value,
the setting is shown.
If the -y option is given, the user's acceptance of any CLI prompt is
assumed. (see :meth:`.cli.user.User.prompt`)
If the -q option is given, extra noise on sys.stderr, such as progress
indicators, is suppressed.
interactive session will not be launched.
"""
def __init__(self, args):
@ -199,14 +175,11 @@ class ArgParser(object):
self.imp_db_path = None
self.list = False
self.list_more = False
self.list_table = False
self.help = False
self.usage = False
self.force_unlock = False
self.create = None
self.runqml = False
self.quiet = False
self.auto_accept = False
self.errors = []
self.parse_args()
@ -219,6 +192,23 @@ class ArgParser(object):
Fill in lists with open, exports, imports, and actions options.
Any errors are added to self.errors
Possible:
1/ Just the family tree (name or database dir)
2/ -O, --open: Open of a family tree
3/ -i, --import: Import a family tree of any format understood by
an importer, optionally provide -f to indicate format
4/ -e, --export: export a family tree in required format, optionally
provide -f to indicate format
5/ -f, --format=FORMAT : format after a -i or -e option
6/ -a, --action: An action (possible: 'report', 'tool')
7/ -p, --options=OPTIONS_STRING : specify options
8/ -u, --force-unlock: A locked database can be unlocked by giving
this argument when opening it
9/ -s --show : Show config settings
10/ -c --config=config.setting:value : Set config.setting and start
Gramps without :value, the actual config.setting is shown
"""
try:
# Convert arguments to unicode, otherwise getopt will not work
@ -227,8 +217,7 @@ class ArgParser(object):
# -Ärik is '-\xc3\x84rik' and getopt will respond :
# option -\xc3 not recognized
for arg in range(len(self.args) - 1):
self.args[arg+1] = conv_to_unicode(self.args[arg + 1],
sys.stdin.encoding)
self.args[arg+1] = get_unicode_path_from_env_var(self.args[arg + 1])
options, leftargs = getopt.getopt(self.args[1:],
SHORTOPTS, LONGOPTS)
except getopt.GetoptError as msg:
@ -252,8 +241,7 @@ class ArgParser(object):
# if there were an argument without option,
# use it as a file to open and return
self.open_gui = leftargs[0]
print(_("Trying to open: %s ...") % leftargs[0],
file=sys.stderr)
print ("Trying to open: %s ..." % leftargs[0], file=sys.stderr)
#see if force open is on
for opt_ix in range(len(options)):
option, value = options[opt_ix]
@ -267,55 +255,52 @@ class ArgParser(object):
need_to_quit = False
for opt_ix in range(len(options)):
option, value = options[opt_ix]
if option in ['-O', '--open']:
if option in ( '-O', '--open'):
self.open = value
elif option in ['-C', '--create']:
elif option in ( '-C', '--create'):
self.create = value
elif option in ['-i', '--import']:
elif option in ( '-i', '--import'):
family_tree_format = None
if opt_ix < len(options) - 1 \
and options[opt_ix + 1][0] in ( '-f', '--format'):
family_tree_format = options[opt_ix + 1][1]
self.imports.append((value, family_tree_format))
elif option in ['-e', '--export']:
elif option in ( '-e', '--export' ):
family_tree_format = None
if opt_ix < len(options) - 1 \
and options[opt_ix + 1][0] in ( '-f', '--format'):
family_tree_format = options[opt_ix + 1][1]
self.exports.append((value, family_tree_format))
elif option in ['-a', '--action']:
elif option in ( '-a', '--action' ):
action = value
if action not in ('report', 'tool', 'book'):
print(_("Unknown action: %s. Ignoring.") % action,
file=sys.stderr)
print ("Unknown action: %s. Ignoring." % action, file=sys.stderr)
continue
options_str = ""
if opt_ix < len(options)-1 \
and options[opt_ix+1][0] in ( '-p', '--options' ):
options_str = options[opt_ix+1][1]
self.actions.append((action, options_str))
elif option in ['-d', '--debug']:
print(_('setup debugging'), value, file=sys.stderr)
elif option in ('-d', '--debug'):
print ('setup debugging', value, file=sys.stderr)
logger = logging.getLogger(value)
logger.setLevel(logging.DEBUG)
cleandbg += [opt_ix]
elif option in ['-l']:
elif option in ('-l'):
self.list = True
elif option in ['-L']:
elif option in ('-L'):
self.list_more = True
elif option in ['-t']:
self.list_table = True
elif option in ['-s','--show']:
print(_("Gramps config settings from %s:")
% config.filename)
elif option in ('-s','--show'):
print ("Gramps config settings from %s:" % \
config.filename.encode(sys.getfilesystemencoding()))
for section in config.data:
for setting in config.data[section]:
print("%s.%s=%s"
% (section, setting,
repr(config.data[section][setting])))
print()
print ("%s.%s=%s" % (
section, setting,
repr(config.data[section][setting])))
print ('')
sys.exit(0)
elif option in ['-c', '--config']:
elif option in ('-c', '--config'):
setting_name = value
set_value = False
if setting_name:
@ -324,45 +309,34 @@ class ArgParser(object):
set_value = True
if config.has_default(setting_name):
setting_value = config.get(setting_name)
print(_("Current Gramps config setting: "
"%(name)s:%(value)s")
% {'name' : setting_name,
'value' : repr(setting_value)},
file=sys.stderr)
print ("Current Gramps config setting: " \
"%s:%s" % (setting_name, repr(setting_value)), file=sys.stderr)
if set_value:
# does a user want the default config value?
if new_value in ("DEFAULT", _("DEFAULT")):
if new_value == "DEFAULT":
new_value = config.get_default(setting_name)
else:
converter = get_type_converter(setting_value)
new_value = converter(new_value)
new_value = safe_eval(new_value)
config.set(setting_name, new_value)
# translators: indent "New" to match "Current"
print(_(" New Gramps config setting: "
"%(name)s:%(value)s") %
{'name' : setting_name,
'value' : repr(
config.get(setting_name))},
file=sys.stderr)
print (" New Gramps config " \
"setting: %s:%s" % (
setting_name,
repr(config.get(setting_name))
), file=sys.stderr)
else:
need_to_quit = True
else:
print(_("Gramps: no such config setting: '%s'")
% setting_name, file=sys.stderr)
print ("Gramps: no such config setting:" \
" '%s'" % setting_name, file=sys.stderr)
need_to_quit = True
cleandbg += [opt_ix]
elif option in ['-h', '-?', '--help']:
elif option in ('-h', '-?', '--help'):
self.help = True
elif option in ['-u', '--force-unlock']:
elif option in ('-u', '--force-unlock'):
self.force_unlock = True
elif option in ['--usage']:
elif option in ('--usage'):
self.usage = True
elif option in ['--qml']:
elif option in ('--qml'):
self.runqml = True
elif option in ['-y', '--yes']:
self.auto_accept = True
elif option in ['-q', '--quiet']:
self.quiet = True
#clean options list
cleandbg.reverse()
@ -370,16 +344,14 @@ class ArgParser(object):
del options[ind]
if len(options) > 0 and self.open is None and self.imports == [] \
and not (self.list or self.list_more or self.list_table or
self.help or self.runqml):
and not (self.list or self.list_more or self.help or self.runqml):
# Extract and convert to unicode the arguments in the list.
# The % operator replaces the list elements with repr() of
# the list elements, which is OK for latin characters
# but not for non-latin characters in list elements
cliargs = "[ "
for arg in range(len(self.args) - 1):
cliargs += conv_to_unicode(self.args[arg + 1],
sys.stdin.encoding) + ' '
cliargs += get_unicode_path_from_env_var(self.args[arg + 1]) + " "
cliargs += "]"
self.errors += [(_('Error parsing the arguments'),
_("Error parsing the arguments: %s \n"
@ -399,7 +371,7 @@ class ArgParser(object):
#errors in argument parsing ==> give cli error, no gui needed
return False
if self.list or self.list_more or self.list_table or self.help:
if self.list or self.list_more or self.help:
return False
if self.open_gui:
@ -429,13 +401,15 @@ class ArgParser(object):
If the user gives the --help or -h option, print the output to terminal.
"""
if self.help:
print(_HELP)
# Convert Help messages to file system encoding before printing
print (_HELP.encode(sys.getfilesystemencoding()))
sys.exit(0)
def print_usage(self):
"""
If the user gives the --usage print the output to terminal.
"""
if self.usage:
print(_USAGE)
# Convert Help messages to file system encoding before printing
print (_USAGE.encode(sys.getfilesystemencoding()))
sys.exit(0)

View File

@ -17,9 +17,11 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
"""
Provide the management of databases from CLI. This includes opening, renaming,
creating, and deleting of databases.
@ -35,7 +37,6 @@ from __future__ import print_function
import os
import sys
import time
import io
if sys.version_info[0] < 3:
from urlparse import urlparse
from urllib2 import urlopen, url2pathname
@ -43,6 +44,7 @@ else:
from urllib.parse import urlparse
from urllib.request import urlopen, url2pathname
import tempfile
from gramps.gen.ggettext import gettext as _
#-------------------------------------------------------------------------
#
# set up logging
@ -50,20 +52,16 @@ import tempfile
#-------------------------------------------------------------------------
import logging
LOG = logging.getLogger(".clidbman")
from gramps.gen.db.dbconst import DBLOGNAME
_LOG = logging.getLogger(DBLOGNAME)
#-------------------------------------------------------------------------
#
# gramps modules
#
#-------------------------------------------------------------------------
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
from gramps.gen.db import DbBsddb
from gramps.gen.plug import BasePluginManager
from gramps.gen.config import config
from gramps.gen.constfunc import win, conv_to_unicode, UNITYPE
from gramps.gen.constfunc import win, conv_to_unicode
#-------------------------------------------------------------------------
#
# constants
@ -133,103 +131,82 @@ class CLIDbManager(object):
self._populate_cli()
def empty(self, val):
"""
Callback that does nothing
"""Callback that does nothing
"""
pass
def get_dbdir_summary(self, dirpath, name):
def get_dbdir_summary(self, file_name):
"""
Returns (people_count, bsddb_version, schema_version) of
current DB.
Returns ("Unknown", "Unknown", "Unknown") if invalid DB or other error.
Returns (people_count, version_number) of current DB.
Returns ("Unknown", "Unknown") if invalid DB or other error.
"""
if config.get('preferences.use-bsddb3') or sys.version_info[0] >= 3:
from bsddb3 import dbshelve, db
else:
from bsddb import dbshelve, db
from gramps.gen.db import META, PERSON_TBL
from gramps.gen.db.dbconst import BDBVERSFN
bdbversion_file = os.path.join(dirpath, BDBVERSFN)
if os.path.isfile(bdbversion_file):
vers_file = open(bdbversion_file)
bsddb_version = vers_file.readline().strip()
else:
return "Unknown", "Unknown", "Unknown"
current_bsddb_version = str(db.version())
if bsddb_version != current_bsddb_version:
return "Unknown", bsddb_version, "Unknown"
env = db.DBEnv()
flags = db.DB_CREATE | db.DB_PRIVATE |\
db.DB_INIT_MPOOL |\
db.DB_INIT_LOG | db.DB_INIT_TXN
db.DB_INIT_MPOOL | db.DB_INIT_LOCK |\
db.DB_INIT_LOG | db.DB_INIT_TXN | db.DB_THREAD
try:
env.open(dirpath, flags)
except Exception as msg:
LOG.warning("Error opening db environment for '%s': %s" %
(name, str(msg)))
try:
env.close()
except Exception as msg:
LOG.warning("Error closing db environment for '%s': %s" %
(name, str(msg)))
return "Unknown", bsddb_version, "Unknown"
env.open(file_name, flags)
except:
return "Unknown", "Unknown"
dbmap1 = dbshelve.DBShelf(env)
fname = os.path.join(dirpath, META + ".db")
fname = os.path.join(file_name, META + ".db")
try:
dbmap1.open(fname, META, db.DB_HASH, db.DB_RDONLY)
except:
env.close()
return "Unknown", bsddb_version, "Unknown"
schema_version = dbmap1.get(b'version', default=None)
return "Unknown", "Unknown"
version = dbmap1.get('version', default=None)
dbmap1.close()
dbmap2 = dbshelve.DBShelf(env)
fname = os.path.join(dirpath, PERSON_TBL + ".db")
fname = os.path.join(file_name, PERSON_TBL + ".db")
try:
dbmap2.open(fname, PERSON_TBL, db.DB_HASH, db.DB_RDONLY)
except:
env.close()
return "Unknown", bsddb_version, schema_version
return "Unknown", "Unknown"
count = len(dbmap2)
dbmap2.close()
env.close()
return (count, bsddb_version, schema_version)
return (count, version)
def family_tree_summary(self):
"""
Return a list of dictionaries of the known family trees.
"""
# make the default directory if it does not exist
summary_list = []
list = []
for item in self.current_names:
(name, dirpath, path_name, last,
tval, enable, stock_id) = item
count, bsddb_version, schema_version = self.get_dbdir_summary(dirpath, name)
count, version = self.get_dbdir_summary(dirpath)
retval = {}
retval[_("Number of people")] = count
retval["Number of people"] = count
if enable:
retval[_("Locked?")] = _("yes")
retval["Locked?"] = "yes"
else:
retval[_("Locked?")] = _("no")
retval[_("Bsddb version")] = bsddb_version
retval[_("Schema version")] = schema_version
retval[_("Family Tree")] = name
retval[_("Path")] = dirpath
retval[_("Last accessed")] = time.strftime('%x %X',
retval["Locked?"] = "no"
retval["DB version"] = version
if sys.version_info[0] < 3:
retval["Family tree"] = name.encode(sys.getfilesystemencoding())
else:
retval["Family tree"] = name
retval["Path"] = dirpath
retval["Last accessed"] = time.strftime('%x %X',
time.localtime(tval))
summary_list.append( retval )
return summary_list
list.append( retval )
return list
def _populate_cli(self):
"""
Get the list of current names in the database dir
""" Get the list of current names in the database dir
"""
# make the default directory if it does not exist
dbdir = os.path.expanduser(config.get('behavior.database-path'))
if sys.version_info[0] < 3:
dbdir = dbdir.encode(sys.getfilesystemencoding())
db_ok = make_dbdir(dbdir)
self.current_names = []
@ -238,9 +215,8 @@ class CLIDbManager(object):
dirpath = os.path.join(dbdir, dpath)
path_name = os.path.join(dirpath, NAME_FILE)
if os.path.isfile(path_name):
file = io.open(path_name, 'r', encoding='utf8')
file = open(path_name)
name = file.readline().strip()
file.close()
(tval, last) = time_val(dirpath)
(enable, stock_id) = self.icon_values(dirpath, self.active,
@ -266,8 +242,7 @@ class CLIDbManager(object):
return None
def family_tree_list(self):
"""
Return a list of name, dirname of the known family trees
"""Return a list of name, dirname of the known family trees
"""
lst = [(x[0], x[1]) for x in self.current_names]
return lst
@ -284,7 +259,7 @@ class CLIDbManager(object):
"""
print(_('Import finished...'))
def create_new_db_cli(self, title=None, create_db=True):
def create_new_db_cli(self, title=None):
"""
Create a new database.
"""
@ -296,15 +271,14 @@ class CLIDbManager(object):
if title is None:
name_list = [ name[0] for name in self.current_names ]
title = find_next_db_name(name_list)
name_file = io.open(path_name, "w", encoding='utf8')
name_file = open(path_name, "w")
name_file.write(title)
name_file.close()
if create_db:
# write the version number into metadata
newdb = DbBsddb()
newdb.write_version(new_path)
# write the version number into metadata
newdb = DbBsddb()
newdb.write_version(new_path)
(tval, last) = time_val(new_path)
@ -324,40 +298,33 @@ class CLIDbManager(object):
A new database will only be created if an appropriate importer was
found.
:param filename: a fully-qualified path, filename, and
extension to open.
@param filename: a fully-qualified path, filename, and
extension to open.
:param user: a :class:`.cli.user.User` or :class:`.gui.user.User`
instance for managing user interaction.
@param user: a cli.User or gui.User instance for managing user
interaction.
:returns: A tuple of (new_path, name) for the new database
or (None, None) if no import was performed.
@return: A tuple of (new_path, name) for the new database
or (None, None) if no import was performed.
"""
pmgr = BasePluginManager.get_instance()
# check to see if it isn't a filename directly:
if not os.path.isfile(filename):
# Allow URL names here; make temp file if necessary
url = urlparse(filename)
if url.scheme != "":
if url.scheme == "file":
filename = url2pathname(filename[7:])
else:
url_fp = urlopen(filename) # open URL
# make a temp local file:
ext = os.path.splitext(url.path)[1]
fd, filename = tempfile.mkstemp(suffix=ext)
temp_fp = os.fdopen(fd, "w")
# read from URL:
data = url_fp.read()
# write locally:
temp_fp.write(data)
url_fp.close()
from gen.db.dbconst import BDBVERSFN
versionpath = os.path.join(name, BDBVERSFN)
_LOG.debug("Write bsddb version %s" % str(dbase.version()))
with open(versionpath, "w") as version_file:
version_file.write(str(dbase.version()))
temp_fp.close()
# Allow URL names here; make temp file if necessary
url = urlparse(filename)
if url.scheme != "":
if url.scheme == "file":
filename = url2pathname(filename[7:])
else:
url_fp = urlopen(filename) # open URL
# make a temp local file:
ext = os.path.splitext(url.path)[1]
fd, filename = tempfile.mkstemp(suffix=ext)
temp_fp = os.fdopen(fd, "w")
# read from URL:
data = url_fp.read()
# write locally:
temp_fp.write(data)
url_fp.close()
temp_fp.close()
(name, ext) = os.path.splitext(os.path.basename(filename))
format = ext[1:].lower()
@ -385,7 +352,7 @@ class CLIDbManager(object):
def is_locked(self, dbpath):
"""
Returns True if there is a lock file in the dirpath
returns True if there is a lock file in the dirpath
"""
if os.path.isfile(os.path.join(dbpath,"lock")):
return True
@ -393,7 +360,7 @@ class CLIDbManager(object):
def needs_recovery(self, dbpath):
"""
Returns True if the database in dirpath needs recovery
returns True if the database in dirpath needs recovery
"""
if os.path.isfile(os.path.join(dbpath,"need_recover")):
return True
@ -405,16 +372,14 @@ class CLIDbManager(object):
Returns old_name, new_name if success, None, None if no success
"""
try:
filepath = conv_to_unicode(filepath, 'utf8')
new_text = conv_to_unicode(new_text, 'utf8')
name_file = io.open(filepath, "r", encoding='utf8')
name_file = open(filepath, "r")
old_text=name_file.read()
name_file.close()
name_file = io.open(filepath, "w", encoding='utf8')
name_file = open(filepath, "w")
name_file.write(new_text)
name_file.close()
except (OSError, IOError) as msg:
CLIDbManager.ERROR(_("Could not rename Family Tree"),
CLIDbManager.ERROR(_("Could not rename family tree"),
str(msg))
return None, None
return old_text, new_text
@ -448,6 +413,7 @@ def make_dbdir(dbdir):
if not os.path.isdir(dbdir):
os.makedirs(dbdir)
except (IOError, OSError) as msg:
msg = conv_to_unicode(str(msg), sys.getfilesystemencoding())
LOG.error(_("\nERROR: Wrong database path in Edit Menu->Preferences.\n"
"Open preferences and set correct database path.\n\n"
"Details: Could not make database directory:\n %s\n\n") % msg)
@ -463,7 +429,7 @@ def find_next_db_name(name_list):
while True:
title = "%s %d" % (DEFAULT_TITLE, i)
if title not in name_list:
return conv_to_unicode(title)
return title
i += 1
def find_next_db_dir():
@ -475,6 +441,8 @@ def find_next_db_dir():
while True:
base = "%x" % int(time.time())
dbdir = os.path.expanduser(config.get('behavior.database-path'))
if sys.version_info[0] < 3:
dbdir = dbdir.encode(sys.getfilesystemencoding())
new_path = os.path.join(dbdir, base)
if not os.path.isdir(new_path):
break
@ -512,8 +480,12 @@ def find_locker_name(dirpath):
"""
try:
fname = os.path.join(dirpath, "lock")
ifile = io.open(fname, 'r', encoding='utf8')
ifile = open(fname, 'rb')
username = ifile.read().strip()
# Convert username to unicode according to system encoding
# Otherwise problems with non ASCII characters in
# username in Windows
username = conv_to_unicode(username, sys.getfilesystemencoding())
# feature request 2356: avoid genitive form
last = _("Locked by %s") % username
ifile.close()

View File

@ -16,14 +16,16 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
"""
Provides the startcli function, which the main program calls for CLI
execution of Gramps.
execution of GRAMPS.
Provides also two small base classes: :class:`CLIDbLoader`, :class:`CLIManager`
Provides also two small base classes: CLIDbLoader, CLIManager
"""
#-------------------------------------------------------------------------
@ -33,8 +35,7 @@ Provides also two small base classes: :class:`CLIDbLoader`, :class:`CLIManager`
#-------------------------------------------------------------------------
from __future__ import print_function
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
from gramps.gen.ggettext import gettext as _
import os
import sys
@ -53,13 +54,7 @@ from gramps.gen.errors import DbError
from gramps.gen.dbstate import DbState
from gramps.gen.db import DbBsddb
from gramps.gen.db.exceptions import (DbUpgradeRequiredError,
BsddbDowngradeError,
DbVersionError,
DbEnvironmentError,
BsddbUpgradeRequiredError,
BsddbDowngradeRequiredError,
PythonUpgradeRequiredError,
PythonDowngradeError)
DbVersionError)
from gramps.gen.plug import BasePluginManager
from gramps.gen.utils.config import get_researcher
from gramps.gen.recentfiles import recent_files
@ -71,8 +66,8 @@ from gramps.gen.recentfiles import recent_files
#-------------------------------------------------------------------------
class CLIDbLoader(object):
"""
Base class for Db loading action inside a :class:`.DbState`. Only the
minimum is present needed for CLI handling
Base class for Db loading action inside a dbstate. Only the minimum is
present needed for CLI handling
"""
def __init__(self, dbstate):
self.dbstate = dbstate
@ -81,24 +76,22 @@ class CLIDbLoader(object):
"""
Issue a warning message. Inherit for GUI action
"""
print(_('WARNING: %s') % warnmessage, file=sys.stderr)
print(_('WARNING: %s') % warnmessage)
def _errordialog(self, title, errormessage):
"""
Show the error. A title for the error and an errormessage
Inherit for GUI action
"""
print(_('ERROR: %s') % errormessage, file=sys.stderr)
print(_('ERROR: %s') % errormessage)
sys.exit(1)
def _dberrordialog(self, msg):
"""
Show a database error.
:param msg: an error message
:type msg : string
.. note:: Inherit for GUI action
@param: msg : an error message
@type: string
@note: Inherit for GUI action
"""
self._errordialog( '', _("Low level database corruption detected")
+ '\n' +
@ -164,35 +157,17 @@ class CLIDbLoader(object):
try:
self.dbstate.db.load(filename, self._pulse_progress, mode)
self.dbstate.db.set_save_path(filename)
except DbEnvironmentError as msg:
except gen.db.exceptions.DbUpgradeRequiredError as msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except BsddbUpgradeRequiredError as msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except BsddbDowngradeRequiredError as msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except BsddbDowngradeError as msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except DbUpgradeRequiredError as msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except PythonDowngradeError as msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except PythonUpgradeRequiredError as msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except DbVersionError as msg:
except gen.db.exceptions.DbVersionError as msg:
self.dbstate.no_database()
self._errordialog( _("Cannot open database"), str(msg))
except OSError as msg:
self.dbstate.no_database()
self._errordialog(
_("Could not open file: %s") % filename, str(msg))
except DbError as msg:
except Errors.DbError as msg:
self.dbstate.no_database()
self._dberrordialog(msg)
except Exception:
@ -208,12 +183,12 @@ class CLIDbLoader(object):
class CLIManager(object):
"""
Sessionmanager for Gramps. This is in effect a reduced :class:`.ViewManager`
Sessionmanager for GRAMPS. This is in effect a reduced viewmanager
instance (see gui/viewmanager), suitable for CLI actions.
Aim is to manage a dbstate on which to work (load, unload), and interact
with the plugin session
"""
def __init__(self, dbstate, setloader, user):
def __init__(self, dbstate, setloader):
self.dbstate = dbstate
if setloader:
self.db_loader = CLIDbLoader(self.dbstate)
@ -221,8 +196,7 @@ class CLIManager(object):
self.db_loader = None
self.file_loaded = False
self._pmgr = BasePluginManager.get_instance()
self.user = user
def open_activate(self, path):
"""
Open and make a family tree active
@ -233,7 +207,7 @@ class CLIManager(object):
"""
Show the error. A title for the error and an errormessage
"""
print(_('ERROR: %s') % errormessage, file=sys.stderr)
print(_('ERROR: %s') % errormessage)
sys.exit(1)
def _read_recent_file(self, filename):
@ -249,13 +223,6 @@ class CLIManager(object):
_("Family Tree does not exist, as it has been deleted."))
return
if os.path.isfile(os.path.join(filename, "lock")):
self._errordialog(
_("The database is locked."),
_("Use the --force-unlock option if you are sure "
"that the database is not in use."))
return
if self.db_loader.read_file(filename):
# Attempt to figure out the database title
path = os.path.join(filename, "name.txt")
@ -321,36 +288,36 @@ class CLIManager(object):
def startcli(errors, argparser):
"""
Starts a cli session of Gramps.
:param errors: errors already encountered
:param argparser: :class:`.ArgParser` instance
Starts a cli session of GRAMPS.
errors : errors already encountered
argparser : ArgParser instance
"""
if errors:
#already errors encountered. Show first one on terminal and exit
# Convert error message to file system encoding before print
errmsg = _('Error encountered: %s') % errors[0][0]
print(errmsg, file=sys.stderr)
errmsg = errmsg.encode(sys.getfilesystemencoding())
print(errmsg)
errmsg = _(' Details: %s') % errors[0][1]
print(errmsg, file=sys.stderr)
errmsg = errmsg.encode(sys.getfilesystemencoding())
print(errmsg)
sys.exit(1)
if argparser.errors:
# Convert error message to file system encoding before print
errmsg = _('Error encountered in argument parsing: %s') \
% argparser.errors[0][0]
print(errmsg, file=sys.stderr)
errmsg = errmsg.encode(sys.getfilesystemencoding())
print(errmsg)
errmsg = _(' Details: %s') % argparser.errors[0][1]
print(errmsg, file=sys.stderr)
errmsg = errmsg.encode(sys.getfilesystemencoding())
print(errmsg)
sys.exit(1)
#we need to keep track of the db state
dbstate = DbState()
#we need a manager for the CLI session
from .user import User
user=User(auto_accept=argparser.auto_accept,
quiet=argparser.quiet)
climanager = CLIManager(dbstate, setloader=True, user=user)
climanager = CLIManager(dbstate, True)
#load the plugins
climanager.do_reg_plugins(dbstate, uistate=None)
# handle the arguments

View File

@ -6,7 +6,7 @@
# Copyright (C) 2008 Raphael Ackermann
# Copyright (C) 2008-2011 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2011-2013 Paul Franklin
# Copyright (C) 2011-2012 Paul Franklin
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -20,11 +20,12 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# cli.plug.__init__
#
# $Id$
#-------------------------------------------------------------------------
@ -33,6 +34,8 @@
#
#-------------------------------------------------------------------------
from __future__ import print_function
from gramps.gen.ggettext import gettext as _
import traceback
import os
import sys
@ -56,15 +59,13 @@ from gramps.gen.display.name import displayer as name_displayer
from gramps.gen.errors import ReportError, FilterError
from gramps.gen.plug.report import (CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK,
CATEGORY_GRAPHVIZ, CATEGORY_CODE,
ReportOptions, append_styles)
ReportOptions, create_style_sheet)
from gramps.gen.plug.report._paper import paper_sizes
from gramps.gen.const import USER_HOME
from gramps.gen.dbstate import DbState
from gramps.gen.constfunc import STRTYPE, conv_to_unicode_direct
from ..grampscli import CLIManager
from ..user import User
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
#------------------------------------------------------------------------
#
@ -167,8 +168,7 @@ def _validate_options(options, dbase):
phandle = None
person = dbase.get_person_from_handle(phandle)
if not person:
print(_("ERROR: Please specify a person"),
file=sys.stderr)
print(_("ERROR: Please specify a person"))
if person:
option.set_value(person.get_gramps_id())
@ -192,7 +192,7 @@ def _validate_options(options, dbase):
family = dbase.get_family_from_handle(family_handle)
option.set_value(family.get_gramps_id())
else:
print(_("ERROR: Please specify a family"), file=sys.stderr)
print(_("ERROR: Please specify a family"))
#------------------------------------------------------------------------
#
@ -264,21 +264,17 @@ class CommandLineReport(object):
}
self.options_help = {
'of' : [_("=filename"), _("Output file name. MANDATORY"),""],
'off' : [_("=format"), _("Output file format."), []],
'style' : [_("=name"), _("Style name."), ""],
'papers' : [_("=name"), _("Paper size name."), ""],
'papero' : [_("=number"), _("Paper orientation number."), ""],
'paperml' : [_("=number"), _("Left paper margin"),
_("Size in cm")],
'papermr' : [_("=number"), _("Right paper margin"),
_("Size in cm")],
'papermt' : [_("=number"), _("Top paper margin"),
_("Size in cm")],
'papermb' : [_("=number"), _("Bottom paper margin"),
_("Size in cm")],
'css' : [_("=css filename"), _("CSS filename to use, "
"html format only"), ""],
'of' : ["=filename", "Output file name. MANDATORY", ""],
'off' : ["=format", "Output file format.", []],
'style' : ["=name", "Style name.", ""],
'papers' : ["=name", "Paper size name.", ""],
'papero' : ["=num", "Paper orientation number.", ""],
'paperml' : ["=num", "Left paper margin", "Size in cm"],
'papermr' : ["=num", "Right paper margin", "Size in cm"],
'papermt' : ["=num", "Top paper margin", "Size in cm"],
'papermb' : ["=num", "Bottom paper margin", "Size in cm"],
'css' : ["=css filename", "CSS filename to use, html format"
" only", ""],
}
if noopt:
@ -302,13 +298,13 @@ class CommandLineReport(object):
elif self.category == CATEGORY_GRAPHVIZ:
for graph_format in graphdoc.FORMATS:
self.options_help['off'][2].append(
graph_format["type"] + "\t" + graph_format["descr"] )
graph_format["ext"] + "\t" + graph_format["descr"] )
else:
self.options_help['off'][2] = "NA"
self.options_help['papers'][2] = \
[ paper.get_name() for paper in paper_sizes
if paper.get_name() != 'Custom Size' ]
if paper.get_name() != _("Custom Size") ]
self.options_help['papero'][2] = [
"%d\tPortrait" % PAPER_PORTRAIT,
@ -420,14 +416,12 @@ class CommandLineReport(object):
elif isinstance(option, Option):
self.options_help[name].append(option.get_help())
else:
print(_("Unknown option: %s") % option, file=sys.stderr)
print(_(" Valid options are:") +
", ".join(list(self.options_dict.keys())),
file=sys.stderr)
print(_(" Use '%(donottranslate)s' to see description "
"and acceptable values")
% {'donottranslate' : "show=option"},
file=sys.stderr)
print(_("Unknown option: %s") % option)
print(_(" Valid options are:"),
", ".join(list(self.options_dict.keys())))
print((_(" Use '%(donottranslate)s' to see description "
"and acceptable values") %
{'donottranslate' : "show=option"}))
def parse_options(self):
"""
@ -467,24 +461,23 @@ class CommandLineReport(object):
_chosen_format = plugin.get_extension()
elif self.category == CATEGORY_GRAPHVIZ:
for graph_format in graphdoc.FORMATS:
if graph_format['type'] == self.options_dict['off']:
if graph_format['ext'] == self.options_dict['off']:
if not self.format: # choose the first one, not the last
self.format = graph_format["class"]
if self.format is None:
# Pick the first one as the default.
self.format = graphdoc.FORMATS[0]["class"]
_chosen_format = graphdoc.FORMATS[0]["type"]
_chosen_format = graphdoc.FORMATS[0]["ext"]
else:
self.format = None
if _chosen_format and _format_str:
print(_("Ignoring '%(notranslate1)s=%(notranslate2)s' "
"and using '%(notranslate1)s=%(notranslate3)s'.")
% {'notranslate1' : "off",
'notranslate2' : self.options_dict['off'],
'notranslate3' : _chosen_format},
file=sys.stderr)
print(_("Use '%(notranslate)s' to see valid values.")
% {'notranslate' : "show=off"}, file=sys.stderr)
print((_("Ignoring '%(notranslate1)s=%(notranslate2)s' "
"and using '%(notranslate1)s=%(notranslate3)s'.") %
{'notranslate1' : "off",
'notranslate2' : self.options_dict['off'],
'notranslate3' : _chosen_format}))
print((_("Use '%(notranslate)s' to see valid values.") %
{'notranslate' : "show=off"}))
self.do_doc_options()
@ -496,23 +489,21 @@ class CommandLineReport(object):
self.option_class.handler.options_dict[opt] = \
self.options_dict[opt]
if menu and opt in menu_opt_names:
option = menu.get_option_by_name(opt)
option.set_value(self.options_dict[opt])
else:
print(_("Ignoring unknown option: %s") % opt, file=sys.stderr)
print(_("Ignoring unknown option: %s") % opt )
print(_(" Valid options are:"),
", ".join(list(self.options_dict.keys())),
file=sys.stderr)
", ".join(list(self.options_dict.keys())))
print(_(" Use '%(donottranslate)s' to see description "
"and acceptable values") %
{'donottranslate' : "show=option"}, file=sys.stderr)
{'donottranslate' : "show=option"})
self.option_class.handler.output = self.options_dict['of']
self.paper = paper_sizes[0] # make sure one exists
for paper in paper_sizes:
if paper.get_name() == self.options_dict['papers']:
self.paper = paper
@ -579,13 +570,14 @@ class CommandLineReport(object):
# Make the output nicer to read, assume a tab has 8 spaces
tabs = '\t\t' if len(key) < 10 else '\t'
optmsg = " %s%s%s (%s)" % (key, tabs, opt[1], opt[0])
print(optmsg.encode(sys.getfilesystemencoding()))
else:
optmsg = " %s%s%s" % (key, tabs,
_('(no help available)'))
print(optmsg)
print(_(" Use '%(donottranslate)s' to see description "
"and acceptable values")
% {'donottranslate' : "show=option"})
print(optmsg.encode(sys.getfilesystemencoding()))
print((_(" Use '%(donottranslate)s' to see description "
"and acceptable values") %
{'donottranslate' : "show=option"}))
elif self.show in self.options_help:
opt = self.options_help[self.show]
tabs = '\t\t' if len(self.show) < 10 else '\t'
@ -594,17 +586,17 @@ class CommandLineReport(object):
vals = opt[2]
if isinstance(vals, (list, tuple)):
for val in vals:
print(" %s" % val)
optmsg = " %s" % val
print(optmsg.encode(sys.getfilesystemencoding()))
else:
print(" %s" % opt[2])
optmsg = " %s" % opt[2]
print(optmsg.encode(sys.getfilesystemencoding()))
else:
#there was a show option given, but the option is invalid
print(_("option '%(optionname)s' not valid. "
"Use '%(donottranslate)s' to see all valid options.")
% {'optionname' : self.show,
'donottranslate' : "show=all"},
file=sys.stderr)
print((_("option '%(optionname)s' not valid. "
"Use '%(donottranslate)s' to see all valid options.") %
{'optionname' : self.show, 'donottranslate' : "show=all"}))
#------------------------------------------------------------------------
#
@ -652,10 +644,10 @@ def cl_report(database, name, category, report_class, options_class,
return clr
except ReportError as msg:
(m1, m2) = msg.messages()
print(err_msg, file=sys.stderr)
print(m1, file=sys.stderr)
print(err_msg)
print(m1)
if m2:
print(m2, file=sys.stderr)
print(m2)
except:
if len(log.handlers) > 0:
log.error(err_msg, exc_info=True)
@ -690,7 +682,7 @@ def run_report(db, name, **options_str_dict):
filename in clr.option_class.get_output()
"""
dbstate = DbState()
climanager = CLIManager(dbstate, setloader=False, user=User()) # don't load db
climanager = CLIManager(dbstate, False) # don't load db
climanager.do_reg_plugins(dbstate, None)
pmgr = BasePluginManager.get_instance()
cl_list = pmgr.get_reg_reports()
@ -734,7 +726,6 @@ def cl_book(database, name, book, options_str_dict):
clr.marginr, clr.margint, clr.marginb))
user = User()
rptlist = []
selected_style = StyleSheet()
for item in book.get_item_list():
# The option values were loaded magically by the book parser.
@ -750,15 +741,14 @@ def cl_book(database, name, book, options_str_dict):
report_class = item.get_write_item()
obj = write_book_item(database,
report_class, item.option_class, user)
if obj:
append_styles(selected_style, item)
rptlist.append(obj)
style_sheet = create_style_sheet(item)
rptlist.append((obj, style_sheet))
doc.set_style_sheet(selected_style)
doc.open(clr.option_class.get_output())
doc.init()
newpage = 0
for rpt in rptlist:
for rpt, style_sheet in rptlist:
doc.set_style_sheet(style_sheet)
if newpage:
doc.page_break()
newpage = 1
@ -778,10 +768,10 @@ def write_book_item(database, report_class, options, user):
return report_class(database, options, user)
except ReportError as msg:
(m1, m2) = msg.messages()
print("ReportError", m1, m2, file=sys.stderr)
print("ReportError", m1, m2)
except FilterError as msg:
(m1, m2) = msg.messages()
print("FilterError", m1, m2, file=sys.stderr)
print("FilterError", m1, m2)
except:
log.error("Failed to write book item.", exc_info=True)
return None

View File

@ -1,86 +0,0 @@
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2013 Vassilii Khachaturov <vassilii@tarunz.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
""" Unittest for argparser.py """
from __future__ import print_function
import unittest
from ..argparser import ArgParser
import sys
try:
if sys.version_info < (3,3):
from mock import Mock
else:
from unittest.mock import Mock
MOCKING = True
except:
MOCKING = False
print ("Mocking disabled", sys.exc_info()[0:2])
class TestArgParser(unittest.TestCase):
def setUp(self):
pass
def create_parser(*self_and_args):
return ArgParser(list(self_and_args))
def triggers_option_error(self, option):
ap = self.create_parser(option)
return (str(ap.errors).find("option "+option)>=0, ap)
def test_wrong_argument_triggers_option_error(self):
bad,ap = self.triggers_option_error('--I-am-a-wrong-argument')
assert bad, ap.__dict__
def test_y_shortopt_sets_auto_accept(self):
bad,ap = self.triggers_option_error('-y')
assert not bad, ap.errors
assert ap.auto_accept
def test_yes_longopt_sets_auto_accept(self):
bad,ap = self.triggers_option_error('--yes')
assert not bad, ap.errors
assert ap.auto_accept
def test_q_shortopt_sets_quiet(self):
bad,ap = self.triggers_option_error('-q')
assert not bad, ap.errors
assert ap.quiet
def test_quiet_longopt_sets_quiet(self):
bad,ap = self.triggers_option_error('--quiet')
assert not bad, ap.errors
assert ap.quiet
def test_quiet_exists_by_default(self):
ap = self.create_parser()
assert hasattr(ap,'quiet')
def test_auto_accept_unset_by_default(self):
ap = self.create_parser()
assert not ap.auto_accept
if __name__ == "__main__":
unittest.main()

View File

@ -1,169 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
""" CLI tests for gramps """
from __future__ import unicode_literals
import os
import unittest
import re
import io
import sys
import subprocess
from gramps.gen.constfunc import cuni
from gramps.gen.const import TEMP_DIR
test_ged = """0 HEAD
1 SOUR min1r.ged min 1-rec
1 SUBM @SUBM1@
1 GEDC
2 VERS 5.5
2 FORM LINEAGE-LINKED
1 CHAR ASCII
0 @I1@ INDI
0 TRLR
"""
# see gramps.grampsapp.py
## hack to avoid mentioning 'utf8' encoding everywhere unicode or str is is used
if sys.version_info[0] < 3:
reload(sys)
sys.setdefaultencoding('utf8')
##
ddir = os.path.dirname(__file__)
min1r = os.path.join(ddir, "min1r.ged")
out_ged = os.path.join(ddir, "test_out.ged")
class Test(unittest.TestCase):
def setUp(self):
self.tearDown()
def tearDown(self):
if os.path.exists(out_ged):
os.remove(out_ged)
@classmethod
def setUpClass(cls):
if not os.path.exists(min1r):
with io.open(min1r, "w") as f:
f.write(test_ged)
@classmethod
def tearDownClass(cls):
if os.path.exists(min1r):
os.remove(min1r)
# silly test just to illustrate unittest setUp behavior
def test1_setup_works(self):
self.assertTrue(os.path.exists(ddir), "data dir %r exists" % ddir)
self.assertTrue(os.path.exists(min1r), "data file %r exists" % min1r)
self.assertFalse(os.path.exists(out_ged),
"NO out file %r yet" % out_ged)
# This tests the fix for bug #1331-1334
# read trivial gedcom input, write gedcom output
def test2_exec_CLI(self):
ifile = min1r
ofile = out_ged
gcmd = "Gramps.py -i %s -e %s" % (ifile, ofile)
process = subprocess.Popen("python %s" % gcmd,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True)
result_str, err_str = process.communicate()
self.assertEqual(process.returncode, 0,
"executed CLI command %r" % gcmd)
# simple validation o output
self.assertTrue(os.path.isfile(ofile), "output file created")
with io.open(ofile) as f:
content = f.read()
g = re.search("INDI", content)
self.assertTrue(g, "found 'INDI' in output file")
# this verifies that files in the temporary "import dir"
# get cleaned before (and after) running a CLI
# (eg cleanout stale files from prior crash-runs)
def test3_files_in_import_dir(self):
ddir = os.path.join(TEMP_DIR, "import_dbdir")
os.makedirs(ddir)
bogofiles = [os.path.join(ddir, fn) for fn in ("family.db", "lock")]
for fn in bogofiles:
with io.open(fn, "w") as f:
f.write("garbage")
# ~same as test 2
ifile = min1r
ofile = out_ged
gcmd = "Gramps.py -i %s -e %s" % (ifile, ofile)
process = subprocess.Popen("python %s" % gcmd,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True)
result_str, err_str = process.communicate()
self.assertEqual(process.returncode, 0,
"executed CLI command %r" % gcmd)
for fn in bogofiles:
self.assertFalse(os.path.exists(fn))
class UnicodeTest(unittest.TestCase):
@unittest.skipIf(sys.version_info[0] < 3 and sys.platform == 'win32',
"Python2 bsddb doesn't handle unicode paths")
def setUp(self):
from gramps.cli.clidbman import CLIDbManager
from gramps.gen.config import set as setconfig
from gramps.gen.dbstate import DbState
self.newpath = os.path.join(os.path.dirname(__file__),
cuni('\u0393\u03c1\u03b1\u03bc\u03c3\u03c0'))
self.newtitle = cuni('Gr\u00e4mps T\u00e9st')
os.makedirs(self.newpath)
setconfig('behavior.database-path', self.newpath)
self.cli = CLIDbManager(DbState())
def tearDown(self):
for (dirpath, dirnames, filenames) in os.walk(self.newpath, False):
for afile in filenames:
os.remove(os.path.join(dirpath, afile))
for adir in dirnames:
os.rmdir(os.path.join(dirpath, adir))
os.rmdir(self.newpath)
pass
# Test that clidbman will open files in a path containing
# arbitrary Unicode characters.
def test4_arbitrary_uncode_path(self):
(dbpath, title) = self.cli.create_new_db_cli(self.newtitle)
self.assertEqual(self.newpath, os.path.dirname(dbpath),
"Compare paths %s and %s" % (repr(self.newpath),
repr(dbpath)))
self.assertEqual(self.newtitle, title, "Compare titles %s and %s" %
(repr(self.newtitle), repr(title)))
if __name__ == "__main__":
unittest.main()
#===eof===

View File

@ -1,192 +0,0 @@
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2013 Vassilii Khachaturov <vassilii@tarunz.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
""" Unittest for user.py """
from __future__ import print_function
import unittest
from .. import user
from ...gen.test.user_test import TestUser
import sys
try:
if sys.version_info < (3,3):
from mock import Mock, patch
else:
from unittest.mock import Mock, patch
MOCKING = True
except:
MOCKING = False
print ("Mocking disabled", sys.exc_info()[0:2])
class TestUser_prompt(unittest.TestCase):
def setUp(self):
self.real_user = user.User()
if MOCKING:
self.user = user.User()
self.user._fileout = Mock(spec=sys.stderr)
self.user._input = Mock(spec=input)
def test_default_fileout_has_write(self):
assert hasattr(self.real_user._fileout, 'write')
def test_default_input(self):
assert self.real_user._input.__name__.endswith('input')
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
def test_prompt_returns_True_if_ACCEPT_entered(self):
self.user._input.configure_mock(return_value = TestUser.ACCEPT)
assert self.user.prompt(
TestUser.TITLE, TestUser.MSG, TestUser.ACCEPT, TestUser.REJECT
), "True expected!"
self.user._input.assert_called_once_with()
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
def test_prompt_returns_False_if_REJECT_entered(self):
self.user._input.configure_mock(return_value = TestUser.REJECT)
assert not self.user.prompt(
TestUser.TITLE, TestUser.MSG, TestUser.ACCEPT, TestUser.REJECT
), "False expected!"
self.user._input.assert_called_once_with()
def assert_prompt_contains_text(self, text,
title=TestUser.TITLE, msg=TestUser.MSG,
accept=TestUser.ACCEPT, reject=TestUser.REJECT):
self.user._input.configure_mock(return_value = TestUser.REJECT)
self.user.prompt(title, msg, accept, reject)
for call in self.user._fileout.method_calls:
name, args, kwargs = call
for a in args:
if a.find(text) >= 0:
return
self.assertTrue(False,
"'{}' never printed in prompt: {}".format(
text, self.user._fileout.method_calls))
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
def test_prompt_contains_title_text(self):
self.assert_prompt_contains_text(TestUser.TITLE)
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
def test_prompt_contains_msg_text(self):
self.assert_prompt_contains_text(TestUser.MSG)
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
def test_prompt_contains_accept_text(self):
self.assert_prompt_contains_text(TestUser.ACCEPT)
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
def test_prompt_contains_reject_text(self):
self.assert_prompt_contains_text(TestUser.REJECT)
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
def test_prompt_strips_underscore_in_accept(self):
self.assert_prompt_contains_text("accepT", accept="accep_T")
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
def test_prompt_strips_underscore_in_reject(self):
self.assert_prompt_contains_text("reJect", reject="re_Ject")
if not MOCKING: #don't use SKIP, to avoid counting a skipped test
def test_manual_run(self):
b = self.real_user.prompt(
TestUser.TITLE, TestUser.MSG, TestUser.ACCEPT, TestUser.REJECT)
print ("Returned: {}".format(b))
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
def test_auto_accept_accepts_without_prompting(self):
u = user.User(auto_accept=True)
u._fileout = Mock(spec=sys.stderr)
assert u.prompt(
TestUser.TITLE, TestUser.MSG, TestUser.ACCEPT, TestUser.REJECT
), "True expected!"
assert len(u._fileout.method_calls) == 0, list(u._fileout.method_calls)
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
def test_EOFError_in_prompt_caught_as_False(self):
self.user._input.configure_mock(
side_effect = EOFError,
return_value = TestUser.REJECT)
assert not self.user.prompt(
TestUser.TITLE, TestUser.MSG, TestUser.ACCEPT, TestUser.REJECT
), "False expected!"
self.user._input.assert_called_once_with()
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
class TestUser_quiet(unittest.TestCase):
def setUp(self):
self.user = user.User(quiet=True)
self.user._fileout = Mock(spec=sys.stderr)
def test_progress_can_begin_step_end(self):
self.user.begin_progress("Foo", "Bar", 0)
for i in range(10):
self.user.step_progress()
self.user.end_progress()
def tearDown(self):
assert len(self.user._fileout.method_calls
) == 0, list(self.user._fileout.method_calls)
@unittest.skipUnless(MOCKING, "Requires unittest.mock to run")
class TestUser_progress(unittest.TestCase):
def setUp(self):
self.user = user.User()
self.user._fileout = Mock(spec=sys.stderr)
def test_can_step_using_with(self):
# Collect baseline output from the old-style interface (begin/step/end)
self._progress_begin_step_end()
self.expected_output = list(self.user._fileout.method_calls)
self.user._fileout.reset_mock()
self.assertTrue(
len(self.user._fileout.method_calls) == 0,
list(self.user._fileout.method_calls))
with self.user.progress("Foo", "Bar", 0) as step:
for i in range(10):
step()
# Output using `with' differs from one with `progress_...'
self.assertEqual(self.expected_output,
list(self.user._fileout.method_calls))
def test_ends_progress_upon_exception_in_with(self):
with patch('gramps.cli.user.User.end_progress') as MockEP:
try:
with self.user.progress("Foo", "Bar", 0) as step:
raise Exception()
except Exception:
pass
self.assertTrue(MockEP.called)
def _progress_begin_step_end(self):
self.user.begin_progress("Foo", "Bar", 0)
for i in range(10):
self.user.step_progress()
self.user.end_progress()
if __name__ == "__main__":
unittest.main()

View File

@ -15,7 +15,9 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
#
"""
@ -27,7 +29,8 @@ The User class provides basic interaction with the user.
# Python Modules
#
#------------------------------------------------------------------------
from __future__ import print_function, unicode_literals
from __future__ import print_function
import sys
#------------------------------------------------------------------------
@ -35,9 +38,8 @@ import sys
# Gramps Modules
#
#------------------------------------------------------------------------
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
from gramps.gen import user
from gramps.gen.ggettext import gettext as _
from gramps.gen.user import User
#------------------------------------------------------------------------
#
@ -51,53 +53,38 @@ _SPINNER = ['|', '/', '-', '\\']
# User class
#
#-------------------------------------------------------------------------
class User(user.User):
class User(User):
"""
This class provides a means to interact with the user via CLI.
It implements the interface in :class:`.gen.user.User`
It implements the interface in gramps.gen.user.User()
"""
def __init__(self, callback=None, error=None, auto_accept=False, quiet=False):
"""
Init.
:param error: If given, notify_error delegates to this callback
:type error: function(title, error)
"""
user.User.__init__(self, callback, error)
def __init__(self, callback=None, error=None):
self.steps = 0;
self.current_step = 0;
self._input = raw_input if sys.version_info[0] < 3 else input
def yes(*args):
return True
if auto_accept:
self.prompt = yes
if quiet:
self.begin_progress = self.end_progress = self.step_progress = \
self._default_callback = yes
self.callback_function = callback
self.error_function = error
def begin_progress(self, title, message, steps):
"""
Start showing a progress indicator to the user.
:param title: the title of the progress meter
:type title: str
:param message: the message associated with the progress meter
:type message: str
:param steps: the total number of steps for the progress meter.
a value of 0 indicates that the ending is unknown and the
meter should just show activity.
:type steps: int
:returns: none
@param title: the title of the progress meter
@type title: str
@param message: the message associated with the progress meter
@type message: str
@param steps: the total number of steps for the progress meter.
a value of 0 indicates that the ending is unknown and the
meter should just show activity.
@type steps: int
@returns: none
"""
self._fileout.write(message)
print(message)
self.steps = steps
self.current_step = 0;
if self.steps == 0:
self._fileout.write(_SPINNER[self.current_step])
sys.stdout.write(_SPINNER[self.current_step])
else:
self._fileout.write("00%")
sys.stdout.write("00%")
def step_progress(self):
"""
@ -106,83 +93,80 @@ class User(user.User):
self.current_step += 1
if self.steps == 0:
self.current_step %= 4
self._fileout.write("\r %s " % _SPINNER[self.current_step])
sys.stdout.write("\r %s " % _SPINNER[self.current_step])
else:
percent = int((float(self.current_step) / self.steps) * 100)
self._fileout.write("\r%02d%%" % percent)
sys.stdout.write("\r%02d%%" % percent)
def callback(self, percentage, text=None):
"""
Display the precentage.
"""
if self.callback_function:
if text:
self.callback_function(percentage, text)
else:
self.callback_function(percentage)
else:
if text is None:
sys.stdout.write("\r%02d%%" % percentage)
else:
sys.stdout.write("\r%02d%% %s" % (percentage, text))
def end_progress(self):
"""
Stop showing the progress indicator to the user.
"""
self._fileout.write("\r100%\n")
sys.stdout.write("\r100%\n")
def prompt(self, title, message, accept_label, reject_label):
def prompt(self, title, question):
"""
Prompt the user with a message to select an alternative.
Ask the user a question. The answer must be "yes" or "no".
The user will be forced to answer the question before proceeding.
:param title: the title of the question, e.g.: "Undo history warning"
:type title: str
:param message: the message, e.g.: "Proceeding with the tool will erase
the undo history. If you think you may want to revert
running this tool, please stop here and make a backup
of the DB."
:type question: str
:param accept_label: what to call the positive choice, e.g.: "Proceed"
:type accept_label: str
:param reject_label: what to call the negative choice, e.g.: "Stop"
:type reject_label: str
:returns: the user's answer to the question
:rtype: bool
@param title: the title of the question
@type title: str
@param question: the question
@type question: str
@returns: the user's answer to the question
@rtype: bool
"""
accept_label = accept_label.replace("_", "")
reject_label = reject_label.replace("_", "")
text = "{t}\n{m} ([{y}]/{n}): ".format(
t = title,
m = message,
y = accept_label,
n = reject_label)
print (text, file = self._fileout) # TODO python3 add flush=True
try:
reply = self._input()
return reply == "" or reply == accept_label
except EOFError:
return False
return False
def warn(self, title, warning=""):
"""
Warn the user.
:param title: the title of the warning
:type title: str
:param warning: the warning
:type warning: str
:returns: none
@param title: the title of the warning
@type title: str
@param warning: the warning
@type warning: str
@returns: none
"""
self._fileout.write("%s %s" % (title, warning))
print("%s %s" % (title, warning))
def notify_error(self, title, error=""):
"""
Notify the user of an error.
:param title: the title of the error
:type title: str
:param error: the error message
:type error: str
:returns: none
@param title: the title of the error
@type title: str
@param error: the error message
@type error: str
@returns: none
"""
if self.error_function:
self.error_function(title, error)
else:
self._fileout.write("%s %s" % (title, error))
print("%s %s" % (title, error))
def notify_db_error(self, error):
"""
Notify the user of a DB error.
:param error: the error message
:type error: str
:returns: none
@param error: the error message
@type error: str
@returns: none
"""
self.notify_error(
_("Low level database corruption detected"),
@ -195,4 +179,5 @@ class User(user.User):
"""
Displays information to the CLI
"""
self._fileout.write("{} {}\n".format(msg1, infotext))
print(msg1)
print(infotext)

21
gramps/data/Makefile.am Normal file
View File

@ -0,0 +1,21 @@
# 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)

View File

@ -1,10 +1,10 @@
{% extends "admin/base.html" %}
{% load i18n %}
{% block title %}{{ title }} | Adminstration{% endblock %}
{% block title %}{{ title }} | My New Title{% endblock %}
{% block branding %}
<h1 id="site-name">Administration</h1>
<h1 id="site-name">My new title for the Admin site!</h1>
{% endblock %}
{% block nav-global %}
@ -13,8 +13,9 @@
.ml {margin:0 10px 10px;display:block;float:left}
</style>
<a href="/" clas="ml">Home</a>
<a href="/admin/" class="ml">Administration home</a>
<a href="/" clas="ml">Website home</a>
<a href="/admin/" class="ml">Admin home</a>
<a href="/admin/members/invoice/" class="ml">Invoices</a>
<a href="/admin/auth/user/?is_active__exact=0" class="ml">New Users</a>
<a href="/admin/auth/user/" class="ml">All Users</a>
{% endif %}

View File

@ -390,7 +390,7 @@ function buttonOut(button) {
<p id="createdate">
<a href="http://www.gramps-project.org/wiki/index.php?title=Gramps-Connect">Gramps-Connect, version {{gramps_version}}</a>.
</p>
<p id="copyright">&copy; 2009-2013 <a href="http://www.gramps-project.org/">www.gramps-project.org</a>
<p id="copyright">&copy; 2009-2012 <a href="http://www.gramps-project.org/">www.gramps-project.org</a>
</p>
{% endblock %}
</div>

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