Changes

Jump to: navigation, search

Howto: Make a genealogy website with Gramps

2,305 bytes added, 19:58, 9 November 2020
m
Integration of NarrativeWeb in a CMS or MVS
{{cleanup}}
{{languages}}
{{man note|How to make a genealogy website with |Using Gramps 4.x. and the [[Gramps_4.1_Wiki_Manual_2_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|Narrated Web Site]] report, from conception, to uploading your genealogical website to an internet service provider (ISP).}}
This You can make a website will be made with the narrative website report, of which the interface is described at the: [[Gramps_4.1_Wiki_Manual_2_Wiki_Manual_-_Reports_-_part_7#Narrated_Web_Site|User manual for the Narrated Web Site]] report.
== Before you start ==
You can easily generate a nice looking web site website from within Gramps.
Before you start you should have an idea about the data you want to present on the website. If your complete family tree is large, the number of generated files can be '''huge''', and possibly take up a lot of file storage space.
==How to limit the amount of data==
If you have a large database, it is wise to start with a [[filter]] to limit the number of people: In the People view of Gramps, go to the View menu, and activate the Filter sidebar. Next, go to {{man menu|Edit --> Person Filter Editor}} menu, and make a suitable filter. Read the [[Gramps_4.1_Wiki_Manual_2_Wiki_Manual_-_Filters#Custom_Filter_Editor|help manual]] if necessary. Once a filter is defined, you can test it in the People view, by selecting the filter in the Filter Sidebar, and clicking find. You can combine filters (yes, it helps if you have experience with some basic and/or logic) until you have a selection of all the people you want on your website.
==Make a Home Page, Introduction Page, and more==
===How?===
{{out of date|stub}}<!--work differently in gramps 4 }}-->
Go to the Media View in Gramps, and click on the add icon. In the ''Select a media object'' dialog, you need to click on the option ''Internal Note'', and give a title, eg ''Home Page'', ''Footer'', ...
Choose a suitable directory where you want to generate your website locally. It is best to do this locally, and upload your website only afterwards.
In the '''Report Options''' tab, select the ''Filter'' you created previously if any. Change the ''Web site title:'' to something more meaningful to than "My Family Tree". Choose the ''StyleSheet'' you want (See [[Gramps_4.1_Wiki_Manual_2_Wiki_Manual_-_Reports_-_part_7#Report_Options|examples]]).
In the '''Page Generation''' tab, choose the internal notes you created above. It is recommended you "Suppress Gramps ID"'s, as visitors are not interested in this. Be careful with the option ''Include images and media objects''. '''Only choose this option if:
==Publishing==
{{out of date|stub}}<!--have not update below this}}-->
Now you can publish your work on the web.
*ftp/ssh: You can also use a wide range of ftp clients to upload your site. The easiest for new users is in GNOME/KDE, go to Remote Places, and click to add a new remote place. Choose the settings for your provider (ftp/ssh, login, password), and now you can drag and drop files in Nautilius/Konqueror, like on your own PC. You can also use one of the many specific ftp applications, like gFTP (it should be in the repositories of your distribution). Basically you transfer all the files to the server and that's it. However : as you have probably seen, you created with "NarrativeWeb" an awful lot of directories and files, so transferring the vast amount of files will take some time! If you update your site often, consider learning sitecopy!
== Examples of websitesNarrated Web Sites==Feel free to add your with Gramps generated website Narrated Web Site here. Please, remove missing links if you encounter those. Style is one of the Gramps styles, or custom.
{|{{prettytable}}
|- bgcolor="#8DA7D6" align="center" |'''!Site'''||'''Style'''||'''Language'''||'''Comment'''
|-
|[http://users.telenet.be/frederik.de.richter/stamvaders.html De Richter]||Custom made ||Dutch || version 2.2.6
|[http://family.dave.org.uk/ Cross Family Tree]||Basic (Ash)||English||version 3.2.5-1
|-
|[httphttps://www.xs4allbosharst.nl/~bosharst/gramps/ Van den Bos - Van der Harst]||Basic (Spruce)||Dutch||version 45.10.10
|}
 
{{man note|Website gone?|Please remove those example website links that have gone.}}
== Comparison with other programs==
What if your database is really really huge? I did not try this yet, but you could split your data, say ''the descendants of Jacobus Roelants'' on one Lycos site and the other part of the family ''the descendants of Sebadiah Johansson '' on another Lycos site and so on. It should be fairly easy to install links to switch between sites, eg in the home page, as the directory structure Gramps generates does not change.
===Changing Integrate with WordPress==={{stub}} Integrating GRAMPS and WordPress is a word present very straightforward activity. Not a lot of special skills or tools are required in order to make this integration work smoothly. A couple of points worth remembering (knowing?) first: *Don’t expect to update your GRAMPS data through WordPress. GRAMPS works best from a data collection and manipulation perspective as a stand alone PC application.*Neither database is ever truly linked in this integration;this is good for a number of reasons:**Your GRAMPS database can be secured (remain private)**Breaking one system doesn’t break everything; a good feature for those of us prone to checking our systems recovery processes regularly.*Websites are better for sharing information than they are for updating it. This is especially true if you have constrained network bandwidth, lots of different media and files of varying sizes including many that are BIG! These conditions probably encompass most people doing genealogy. So on multiple pagesto the integration… there are basically 5 major steps: # Get an iframe plug for use in WordPress- I use and like Iframe Embedder from de77.com# Modify one of the pre-existing GRAMPS css templates used by GRAMPS NAVWEB to generate websites to blend with your site look & feel (I use Geany as my css editor)##rename and save the new CSS template in /usr/share/gramps/data/ (Linux path to the templates– maybe one of our readers can tell us what the Windows path might be)##you also need to add the new css option to constants.py in /usr/share/gramps/ReportBase (Linux path to the templates)##if you are running on Linux- like me- you will need root privs to perform the above 2 steps# Go to Reports-Web Pages–Narrated Web Site and generate a web site via this GRAMPS function.# Copy the GRAMPS NAVWEB website that is generated on to your WordPress site somewhere where you will find it.# Generate a Page in WordPress for your GRAMPS Website to be located. Add the following if you are using Iframe Embedder : [ iframe NAVWEB-url 100% 200]==== See Also ====* Many Roads: Tips & Opinions, Tools - [https://www.many-roads.com/2010/04/30/further-wordpress-gramps-integration/ Further WordPress – GRAMPS Integration] ''<small>30 April 2010</small>''
#! /bin/sh===Integrate with Joomla CMS === # filename : replaceall # usage: ./replaceall X Y # ------------------------------------------------------- find . -type f -name '*.html' -print | while read i do sed -i.BAK "s|$1|$2|g" $i done{{stub}}
This will find all programs here [https://sourceforge.net/p/joomlagen/wiki/Home/ JoomlaGen!] is a free and below, and changes all X to Y. This uses the -i (inopen-place edits) available on most sed editor programs. It also creates backup copies source content management system (ending in .BAKCMS) of the files that change. You may need to use special escaping characters if you use replaceall.sh with more than just simple lettersfor publishing web content.
Save this as a file named ''replaceall''Integrating Gramps via the [https://sourceforge.net/p/joomlagen/wiki/Home/ JoomlaGen] component is [[Joomla|detailed in another article]]. The component was designed for use with the 1.5 Joomla! version. By late 2020, give it executive rights (chmod +x)version of Joomla! was at the 3.9.22 release. Then start The most recent JoomlaGen version is the script at 0.3 pre-release version and was posted in July 2012. The author tested for compatibilty with the root Gramps 3.3.0 version. (As of web site generated by {{CURRENTDAYNAME}}, {{CURRENTDAY}} {{CURRENTMONTHNAMEGEN}} {{CURRENTYEAR}}, Gramps :is at {{version}} version.)
$ ./replaceall Souche Arbre===Integration of NarrativeWeb in a CMS or MVS===
Which will change all instances of "Souche" with "Arbre" {{man warn| Warning |This section is a work in all files ending in .htmlprogress. To replace more than one word, use double quotes, like:}}
$ The feature request was [https://gramps-project.org/bugs/replaceall view.php?id=5530 #0005530] :The NarrativeWeb generate flat html files.If you use a <abbr title="Souche FamilyModel, View, Controller" >MVC</abbr> or a <abbr title="Arbre Family TreeContent Management System">CMS</abbr> like itseasy, [https://www.pmwiki.org/wiki?n=PmWiki.PmWiki PmWiki], ... you can't return to the home page.You lose all the look and feel of your website.If we create some <code>.php</code> files which include those <code>.html</code> files ( mode_rewrite ), it doesn't work because we have headers and <code>&lt;/html></code> in them.
Source : CMS=[Content Management System] and MVC=[ Model View Controller]
* [http://pascal====Patch for release 3.ledisque4 and 4.free.fr/wordpress/?p2====1122 Pascal Le Disqué]* Enhancement by D.S. Blank, Aug 18, 2009
The patchs are available and attached to the feature request : [https://gramps-project.org/bugs/view.php?id==Code modifications==5530 #0005530]
===Alternate Code=For release 5.0 and above====
See [http://wwwThe patch is integrated in 5.thomjoy.us/gramps.html ThomsWeb]0.
===Multilingual Web Site=How it works ?====
Some people generated multilingual web siteThe following show how to proceed with Joomla (3. 1.1):
[http://wwwI suppose NAVWEB is the directory under your root web site in which you put all the Gramps tree.chailloux.org/public/geneal/gramps/ Here] an attempt :
* Line change on 'NarrativeWebI suppose I only have html pages for Gramps. No other html application.py'
The <precode> _ML = [ '.htaccess<a href="/cgi-bin/changelanguage?fr" title="page en français"> ' '<img alt="drapeau français" title="drapeau français" ' 'src="%(fr_fname)s" /></a> ', '<a href="/cgi-bin/changelanguage?pl" title="Wersja Polska"> ' '<img alt="Polska Flaga" title="Polska Flaga" ' 'src="%(pl_fname)s" /></acode> ', '<a href="/cgi-bin/changelanguage?en" title="Page in English"> ' '<img alt="English Flag" title="English Flag" ' 'src="%(en_fname)s" /></a> ' ] </pre>the root web directory has now only the following lines :
RewriteEngine on # rules for narrativeweb RewriteRule ^(.*)\.html$ http://%{HTTP_HOST}/index. php/tree?page=$1.html [QSA,R,L] RewriteRule ^(css/.*)\.css$ http://%{HTTP_HOST}/NAVWEB/$1.css [QSA,R,L] RewriteRule ^(thumb/.*)$ http://%{HTTP_HOST}/NAVWEB/$1 [QSA,R,L] RewriteRule ^((images|img|thumb)\/.*\.(jpeg|jpg|gif|png)$) http://%{HTTP_HOST}/NAVWEB/$1 [QSA,R,L]
<pre> elif 0 < copy_nr < len(_CC): frfnm = os.path.join("graphics", "nav32x16_fr.png") frfnm = self.report.build_url_fname(frfnm, None, self.up) plfnm = os.path.join("graphics", "nav32x16_pl.png") plfnm = self.report.build_url_fname(plfnm, None, self.up) enfnm = os.path.join("graphics"For Joomla, "nav32x16_en.png") enfnm = self.report.build_url_fname(enfnm, None, self.up) fname = os.path.join("images", "somerights20.gif") fname = self.report.build_url_fname(fname, None, self.up) text = '' text += _ML[0] % {'fr_fname' : frfnm} text += _ML[1] % {'pl_fname' : plfnm} text += _ML[2] % {'en_fname' : enfnm} text += _CC[copy_nr] % {'gif_fname' I installed the plugin : fname} of.write('\t<p id="copyright">%s</p>\n' % text)</pre> DirectPHP
* The script for pages generationAnd I create an article named tree in which I put :
{source} <pre?php $rep = "/var/www/NAVWEB/"; // You can place PHP like this $page = JRequest::getVar('page'); // for security reason, don't allow .. in path $pageok = str_replace("..", "", $page); if ($pageok == "") $pageok = "index.html"; include($rep.$pageok); ?>#/bin {/shsource}
HOME='/home/jerome' SITE="$HOME/geneal/Sites" BASE="$SITE/www.chailloux.org/public/geneal/gramps" =What is necessary when creating the Narrative Web ?====
rm -r $BASEsave as a <code>tar</images/* rm -r $BASE/thumb/* rm -r $BASE/fr/* rm -r $BASE/pl/* rm -r $BASE/en/* code> file.
ln -s $BASE/images $BASE/fr/images ln -s $BASE/thumb $BASE/fr/thumb ln -s $BASE/images $BASE/pl/images ln -s $BASE/thumb $BASE/pl/thumb ln -s $BASE/images $BASE/en/images ln -s $BASE/thumb $BASE/en/thumb In the Narrative web Report options menu, choose the "CMS inclusion" tab and select the only option of this tab : "Do we include these pages in a cms web ?"
DB="/home/jerome/.gramps/grampsdb/49a46209" ==Changing a word present on multiple pages===
OPT1="of=$SITE," #! /bin/sh # filename : replaceall # usage: ./replaceall X YOPT2="filter=0,living=1,incpriv=0" # -------------------------------------------------------OPT3="encoding=utf find . -type f -name '*.html' -8" print | while read i doOPT4= sed -i.BAK "pid=I0000s|$1|$2|g" $i done
OPT=$OPT1$OPT2$OPT3$OPT4 This will find all programs here and below, and changes all X to Y. This uses the -i (in-place edits) available on most sed editor programs. It also creates backup copies (ending in .BAK) of the files that change. You may need to use special escaping characters if you use replaceall.sh with more than just simple letters.
# FR LANGUAGE=fr_FRSave this as a file named ''replaceall'', give it executive rights (chmod +x). Then start the script at the root of web site generated by Gramps :fr LANG=fr_FR.UTF-8
gramps -O $DB --action=report \ --options=name=navwebpage,target=$BASE./fr,homenote=N1010,title="replaceall Souche Arbre des familles Chailloux - Żelaska",$OPT
# PLLANGUAGE=pl_PLWhich will change all instances of "Souche" with "Arbre" in all files ending in .html. To replace more than one word, use double quotes, like:plLANG=pl_PL.UTF-8
gramps -O $DB --action=report \ --options=name=navwebpage,target=$BASE./pl,homenote=N1011,title=replaceall "Souche Family" "Drzewo rodziny Chailloux - ŻelaskichArbre Family Tree",$OPT
# EN LANGUAGE=en_ENSource :en LANG=en_EN.UTF-8
gramps -O $DB --action=report \ --options=name=navwebpage,target=$BASE* [http://pascal.ledisque.free.fr/wordpress/en,homenote?p=N10121122 Pascal Le Disqué]* Enhancement by D.S. Blank,title="Chailloux - Å»elaska family tree"Aug 18,$OPT </pre>2009
* The 'changelanguage' cgi-bin==Code modifications==
<pre>#!/usr/bin/perl my $ptr = $ENV{'HTTP_REFERER'}; my $new = "\/$ENV{'QUERY_STRING'}\/"; =Alternate Code===
my $fr = 'See [http:/fr/'; my $pl = 'www.thomjoy.us/pl/'; my $en = '/en/'; gramps.html ThomsWeb].
if ($ptr =~ $fr) { $ptr =~ s/$fr/$new/g; } elsif ($ptr =~ $pl) { $ptr Multilingual Web Site=~ s/$pl/$new/g; } elsif ($ptr =~ $en) { $ptr =~ s/$en/$new/g; } else { $ptr="changelanguage_error:$ptr:$new:" } print "Location: $ptr\n\n"; </pre>
* The resulting Web Site sizeSome people generated multilingual web site.
Why it The [http://www.chailloux.org/public/geneal/gramps/ Chailloux - Żelaska Family Web Site] is so important an attempt to share the images and the thumb directories among the various languages: <pre>$ du -s * 7328 en 7340 fr 64 graphics 42148 images 8 indexcreate a French / Polish / English website.html 7340 pl 3968 thumb $</pre>
==="Online maps" urls===
4,599
edits

Navigation menu