Changes

Jump to: navigation, search

Rollover for the manual

183 bytes added, 06:15, 24 June 2019
Rolling over the Gramps user manual: update info / had to rollback wiki /error message: Duplicate entry in UNIQUE Key 'name_title' because MySQL fails to distinguish certain characters.
== Rolling over the Gramps user manual ==
On this page, <code>5.x</code> refers to the 'old' (current) version of the manual - <code>5.z</code> refers to the new, to be created, version...
#Use phpmyadmin to backup all of the wiki tables (or the commandline if phpmyadmin times out!use the commandline )! ## Command line: [https://au.godaddy.com/help/exporting-mysql-database-in-ssh-26367] <code>mysqldump -p -h hostname -u username database > dbname.sql</code>#Locate all pages on the wiki that have <code>5.x</code> in the title - from the {{man label|wiki menu: [[Special:AllPages|Tools > Special pages > All pages]]}}, page by page copy the text to get a full list of wiki pages.
#Copy/paste it into text processor - it may be in three columns separated by tabs. If so, 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>5.x</code> in the title: ''<code>grep "5\.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>5.x</code> in the title, but are not pages that we want duplicated into <code>5.z</code>...)
#Go to the {{man label|wiki menu: [[Special:Export|Tools > Special pages > Export pages]]}} and Copy/paste the new list of page titles into the {{man label|Add pages manually:}} section then {{man menu|Be sure the checkbox is ticked for {{man label|Include only the current revision, not the full history}}}} and then to create the xml to screen press the {{man label|Export}} button.
#Copy/paste the xml into a text processor and use search/replace to replace <code>5.x</code> with <code>5.z</code>
#Save the file (I'll call it <code>export.xml</code> for this example).

Navigation menu