Changes

Jump to: navigation, search

Gramps-Connect

1,626 bytes added, 20:01, 27 May 2012
no edit summary
= Getting Started =
 
Without installing Gramps-Connect, you can test it on-line at http://gramps-connect.org/ I'll try to keep that up to date with the current code. It is current as of May 27 2012. You can view the site in three modes:
 
* not logged in - should see data of people dead and public. If either a person is dead, or any data is marked private, you should not be able to see it. Living people are marked with "[Living]" (as determined in Preferences -> Text).
* logged in as regular user, ID: '''admin1''', password: '''gramps'''. You can see all data, run reports, export data, but cannot change the database.
* logged in as super user, ID: '''admin''', password: '''gramps'''. You can edit, delete, add, import, etc.
 
== Functionality ==
 
The search will query the database using some knowledge of the data. Generally, the search above a browse screen will search all of the visible data.
 
The person search has been enhanced some:
 
* Generally it will look for whatever you type, in surname, given, and ID
* If you use a comma, it assumes "Surname, Given" or "field=value, field=value, ..."
** It will match at the start of field
** '''S,G''' will give all people who have a surname that starts with "S" and a given name that starts with "G"
** '''S,''' will give all people who have a surname that starts with "S"
** ''',G''' will give all people who have a given name that starts with "G"
* There are some fields that you can also separate with commas:
** '''private=1, surname=Smith, given=Joe, death=1850, birth=2000'''
 
Family search will search spouse names.
 
There is a lot of search refinement that can be added here!
 
== Run your own Gramps-Connect in 30 seconds ==
Get the latest version of Gramps (currently "trunk" from SVN; see [http://gramps-project.org/wiki/index.php?title=Brief_introduction_to_SVN Brief introduction to SVN]). This will become an easy-to-install package once Gramps 3.5 is released. Below, it is assumed that you have the following installed:
You have three options for populating your on-line database:
First, you can enter data on the web. Currently only the add person function works.
Second, you can import data on the web. While running Gramps-Connect:
Finally, you can also export data to Django while running the Gramps desktop version. Just select the Django export option.
 
= Running on a real system =
 
Gramps-connect is written using the Django web development framework. You can deploy a Django application using many methods. You can also use many different database backends, such as MySQL and Postgresql. In this example, we will deploy using the simplest options: wsgi and sqlite3, respectively.
 
Dependencies: Apache we server, mod_wsgi for Apache, Django, and sqlite3.
 
# Install and start Apache
# Install mod_wsgi, django, and sqlite3
# Edit /etc/httpd/conf/httpd.conf
# Place the Gramps source in a proper location
# Create the wsgi script
# Set the file permissions
# Restart httpd
 
In this example, I have installed the files in /usr/local/wsgi
 
The contents are of that directory are:
 
* /usr/local/wsgi
** scripts - location of the myapp.wsgi script (below)
** static - contents of Django materials for admin views
** trunk - Gramps SVN trunk
 
Contents of /usr/local/wsgi/scripts/myapp.wsgi:
 
<pre>
import os
import sys
 
os.environ['DJANGO_SETTINGS_MODULE'] = 'webapp.settings'
os.environ['HOME'] = '/usr/local/wsgi'
sys.path.append('/usr/local/wsgi/trunk/src')
 
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
</pre>
 
Create the Gramps-Connect database, as above.
 
Permissions:
 
* chmod a+rw trunk/src/webapp/sqlite.db
* chmod a+xw trunk/src/webapp/
 
Additions to /etc/httpd/conf/httpd.conf, for example:
 
<pre>
<Directory /usr/local/wsgi/scripts>
Order allow,deny
Allow from all
</Directory>
 
<VirtualHost XXX.XXX.XX.XXX:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/
ServerName somename.org
ErrorLog logs/gramps-connect-error_log
CustomLog logs/gramps-connect-access_log common
WSGIScriptAlias / /usr/local/wsgi/scripts/myapp.wsgi
Alias /gramps-media/ /usr/local/wsgi/static/media/
</VirtualHost>
</pre>
 
The Gramps-Connect source is defined to match sqlite3 and the above settings. If you would like to change any of this, you'll probably also have to change [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/webapp/settings.py?view=markup trunk/src/webapp/settings.py].
 
One everything is setup, restart the webserver:
 
service httpd restart
= Working =
# Privacy: "[Living]" is used, but names still appear in alphabetical order
#: Related to patronymic privacy bug {{bug|4538}}? No, this is a different, gramps-connect specific issue. But the issue from #4538 is also a problem in Gramps-Connect, and will have to be solved a different way.
# Make it internationalized and localized (feature request {{bug|3417}})
# Make it look nice
## Some items need better CSS (tables)
## Some items need better HTML (buttons)
# Create interfaces for:
## Reports
### Options
## Imports
## Exports
## User settings
### CSS
### Password, email, etc
### Gramps preferences
# Make 100% of data editable
## Edit
## Delete
# Add additional functionality
## Bookmarks
## Maps
## Advanced search
= ToDo =
### References
## Tag
 = Running on a real system = Gramps-connect is written using the Django web development framework. You can deploy a Django application using many methods. You can also use many different database backends, such as MySQL and Postgresql. In this example, we will deploy using the simplest options: wsgi and sqlite3, respectively. Dependencies: Apache we server, mod_wsgi for Apache, Django, and sqlite3. # Make it internationalized Install and localized (feature request {{bug|3417}})start Apache# Install mod_wsgi, django, and sqlite3# Make it look niceEdit /etc/httpd/conf/httpd.conf#Place the Gramps source in a proper location# Some items need better CSS (tables)Create the wsgi script#Set the file permissions# Some items need better HTML Restart httpd In this example, I have installed the files in /usr/local/wsgi The contents are of that directory are: * /usr/local/wsgi** scripts - location of the myapp.wsgi script (buttonsbelow)# Create interfaces ** static - contents of Django materials foradmin views** trunk - Gramps SVN trunk Contents of /usr/local/wsgi/scripts/myapp.wsgi:## Reports### Options<pre>import os## Importsimport sys## Exports## User os.environ['DJANGO_SETTINGS_MODULE'] = 'webapp.settings'### CSSos.environ['HOME'] = '/usr/local/wsgi'sys.path.append('/usr/local/wsgi/trunk/src') import django.core.handlers.wsgiapplication = django.core.handlers.wsgi.WSGIHandler()</pre> Create the Gramps-Connect database, as above. Permissions: * chmod a+rw trunk/src/webapp/sqlite.db * chmod a+xw trunk/src/webapp/ Additions to /etc/httpd/conf/httpd.conf, for example: <pre> <Directory /usr/local/wsgi/scripts>### Password Order allow, deny Allow from all </Directory> <VirtualHost XXX.XXX.XX.XXX:80> ServerAdmin your@email, etc.com DocumentRoot /var/www/html/ ServerName somename.org ErrorLog logs/gramps-connect-error_log CustomLog logs/gramps-connect-access_log common WSGIScriptAlias / /usr/local/wsgi/scripts/myapp.wsgi Alias /gramps-media/ /usr/local/wsgi/static/media/### Gramps preferences</VirtualHost># Make 100% of data editable</pre>## Edit## DeleteThe Gramps-Connect source is defined to match sqlite3 and the above settings. If you would like to change any of this, you'll probably also have to change [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/webapp/settings.py?view=markup trunk/src/webapp/settings.py].# Add additional functionality## BookmarksOne everything is setup, restart the webserver:## Maps## Advanced search service httpd restart

Navigation menu