Jump to: navigation, search

Rollover for the manual

211 bytes added, 23:21, 3 August 2015
no edit summary
{{out of date|possibly}}
Technical details on how the Gramps wiki [[User manual]] is update updated for each release.
== Rolling over the Gramps user manual ==
#Copy/paste it into text processor - it is in three columns separated by tabs. Use regular expression search/replace to replace tabs with carriage returns. Using GEDIT, best to replace <code>\t</code> with <code>\n</code> rather than <code>\r</code>. You now have a list of all files on the wiki, one title per line. Save it as a text file (I'll call it <code>myfile.txt</code> for this example).
#Use grep to find only the pages with <code>3.x</code> in the title: ''<code>grep "3\.x" myfile.txt > mynewfile.txt</code>'' The backslash will make the full stop a literal rather than trying to be part of a regular expression.
#Use a text editor to view the new file, and delete any pages that you don't want to roll over (That is, some pages may refer to <code>3.x </code> in the title, but are not pages that we want duplicated into <code>3.z</code>...)#Copy/paste the new list of page titles into the wiki export using toolbox, Special pages, Export pages and create the xml to screen. {{man menu|Be sure box for Include only the current revision, not the full history is ticked.}}#Copy/paste the xml into a text processor and use search/replace to replace <code>3.x </code> with <code>3.z </code> #Save the file (I'll call it <code>export.xml </code> for this example).
For the change to <code>3.4 </code> and then from <code>3.4 </code> to <code>4.0</code>, I used a script in the maintenance directory to import xml from the command line. I was successful with (but I got an error in <code>importDump.php </code> and had to edit the file to ensure that <code>Maintenance.php </code> was included properly!):
'''-bash-3.2$ <code>php importDump.php 34.xml</code>'''
followed by:
'''-bash-3.2$ <code>php rebuildrecentchanges.php</code>'''
That should now have created all of the new pages.
''New pages created by this sort of import do not automatically get added into the search index of the wiki. Use phpmyadmin from the cpanel and use the repair tool for the searchindex table.''
Finally, if you want to set all the previous version pages to be protected, so only sysop mediawiki users are able to make changes (so all changes will be forced into the next set of pages...), you can use a series of sql statements in the form:
UPDATE `grampswiki2`.`page` SET `page_restrictions` = 0x656469743d7379736f703a6d6f76653d7379736f70 WHERE `page`.`page_title` ='Title_of_the_page_in_the_wiki' collate utf8_unicode_ci LIMIT 1;
({{man menu|You'll need to replace the spaces in the page title with underscores...}})
I do that concatenation in a spreadsheet, creating the (long) SQL statements by combining a first part, the page names and the last part. You'll need to search for any single quotes and put a backslash in front of them in the page names first, too...
As there is no [[Available_screenshots|naming scheme]] we are trying to follow a rule for manual upgrade :
<code>filename-{number of version}-{lang}.extension</code>
We need to know if we keep the {number of version} or if we use the new one on migration (3.1->3.2->4.0->15.0...) ?

Navigation menu