Welcome to refracta

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

export didiwiki to html using a bash one-liner

Tips and Instructional topics. Not for support questions.

export didiwiki to html using a bash one-liner

Postby figlfdev » Sun Oct 30, 2016 4:42 am

* sudo apt-get install didiwiki
* in the browser:
* edit the wiki, save, and run the following:
Code: Select all
#public domain
mkdir -p didisite ; for p in $(ls /var/lib/didiwiki) ; do  wget -q -O- "$p" | cat -A | rev | cut -b 2- | rev | egrep "<title|<\/title|<body|<html|<head|<\/head" > "didisite/$p.html" ; wget -q -O- "$p" | cat -A | rev | cut -b 2- | rev | grep -v "\^$" | grep wikidata -A 1000000 | sed "s/<div/\n<div/g" | sed "s/WikiHome/index/g" | grep -v 'DidiWiki, Version' | sed "s/'>/\.html'>/g" >> "didisite/$p.html" ; done ; rm didisite/WikiHelp.html ; mv didisite/WikiHome.html didisite/index.html
Posts: 116
Joined: Tue May 31, 2016 6:23 pm

Return to How-to

Who is online

Users browsing this forum: No registered users and 1 guest