Difference between revisions of "Gramps-Connect"

From Gramps
Jump to: navigation, search
(Getting Started)
(Options)
Line 37: Line 37:
 
## iff=gramps i=http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/example/gramps/example.gramps?revision=18333
 
## iff=gramps i=http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/example/gramps/example.gramps?revision=18333
 
# Press the "Run" button
 
# Press the "Run" button
# The data will begin to be imported. (Because the data is going into a sqlite3 database backend as a default, you won't be able to do much until the import is done. Warning: this is a bit slow at the moment!)
+
# The data will begin to be imported. (Because, as a default, the data is going into a sqlite3 database backend that has little concurrency, you won't be able to do much until the import is done. Warning: this is a little slower than Gramps import.)
 
# Once the import is done, you can browse most of the data (it is all there (except tags), which you can verify with an export)
 
# Once the import is done, you can browse most of the data (it is all there (except tags), which you can verify with an export)
  
Finally, you can also export data to Django while running the Gramps desktop version. Just select the Django export option. This is also a bit slow at the moment.
+
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 =
 
= Running on a real system =

Revision as of 05:31, 27 May 2012

Getting Started

Get the latest version of Gramps (currently "trunk" from SVN; see 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:

  • Latest Gramps, installed in a folder called "trunk"
  • Django version 1.4 or 1.3
  • Sqlite3

Once you have built Gramps trunk:

  • cd trunk
  • ./autogen.sh

you are then ready to make and run Gramps-Connect. These are the basic steps for running in a test development:

  1. cd trunk/src/webapp
  2. make
    1. this will build all tables, and populate with default information
    2. you should also define a superuser ID/Password here when prompted (this will be the account which can edit data, and can create new accounts).
  3. make run
    1. this will start-up a testing webserver
  4. Point your browser to http://localhost:8000/ and begin using Gramps-Connect

Options

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:

  1. Login with superuser ID/Password you created above
  2. Go to Reports
  3. Select an Import row
  4. Enter the Input File Format (iff) and Input URL (i), like so:
    1. iff=ged i=http://arborvita.free.fr/Kennedy/Kennedy.ged
    2. iff=gramps i=http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/example/gramps/example.gramps?revision=18333
  5. Press the "Run" button
  6. The data will begin to be imported. (Because, as a default, the data is going into a sqlite3 database backend that has little concurrency, you won't be able to do much until the import is done. Warning: this is a little slower than Gramps import.)
  7. Once the import is done, you can browse most of the data (it is all there (except tags), which you can verify with an export)

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.

  1. Install and start Apache
  2. Install mod_wsgi, django, and sqlite3
  3. Edit /etc/httpd/conf/httpd.conf
  4. Place the Gramps source in a proper location
  5. Create the wsgi script
  6. Set the file permissions
  7. 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:

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

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:

 <Directory /usr/local/wsgi/scripts>
    Order allow,deny
    Allow from all
 </Directory>

<VirtualHost XXX.XXX.XX.XXX:80>
    ServerAdmin your@email.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/
</VirtualHost>

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 trunk/src/webapp/settings.py.

One everything is setup, restart the webserver:

service httpd restart

Bugs

  1. Privacy: "[Living]" is used, but names still appear in alphabetical order
    Related to patronymic privacy 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.

ToDo

  1. Import/Export 100% of all data
    1. Tags missing
    2. Media missing (need a place to put them)
  2. Make 100% of data viewable
    1. Person
      1. Events
      2. Names
      3. Citations
      4. Attributes
      5. Addresses
      6. Notes
      7. Gallery
      8. Internet
      9. Associations
      10. LDS
      11. References
    2. Family
      1. Children
      2. Events
      3. Citations
      4. Attributes
      5. Notes
      6. Gallery
      7. LDS
    3. Event
      1. EventRef
        1. General
        2. Notes
        3. Attributes
      2. Shared
        1. General
        2. Citations
        3. Attributes
        4. Notes
        5. Gallery
        6. References
    4. Notes
    5. Media
      1. Citations
      2. Attributes
      3. Notes
      4. References
    6. Citation
      1. General
      2. Notes
      3. Gallery
      4. Data
      5. References
    7. Source
      1. General
      2. Notes
      3. Gallery
      4. Data
      5. Repository
      6. Reference
    8. Place
      1. General
      2. Location
      3. Alternate Locations
      4. Citations
      5. Notes
      6. Gallery
      7. Internet
      8. References
    9. Repository
      1. General
      2. Addresses
      3. Internet
      4. Notes
      5. References
    10. Tag
  3. Make it internationalized and localized (feature request 3417)
  4. Make it look nice
    1. Some items need better CSS (tables)
    2. Some items need better HTML (buttons)
  5. Create interfaces for:
    1. Reports
      1. Options
    2. Imports
    3. Exports
    4. User settings
      1. CSS
      2. Password, email, etc
      3. Gramps preferences
  6. Make 100% of data editable
    1. Edit
    2. Delete
  7. Add additional functionality
    1. Bookmarks
    2. Maps
    3. Advanced search