MoinCMS

Upload Scripts

Use the syncweb script to manage uploading of content:

syncweb

lmoin
cd ~/MoinCMS/
wget --follow-tags=a,link -E -k -r -p http://localhost/mywiki/
~/bin/ftpup
umoin

ftpup

cd ~/MoinCMS/localhost/mywiki/
ftp -in < ~/bin/ftpcmds yourwebhost.com 21

ftpcmds

user username password
cd public_html/
lcd ~/MoinCMS/localhost/mywiki
put index.html
put MoinCMS.html
put VMware.html
put FreeBSD.html
put RB.html
dir
quit

Lock/Unlock MoinMoin Editing

Two commands to manage CMS editing, umoin and lmoin:

Unlock MoinMoin for editing

umoin script

 #!/bin/sh

 sudo cp /usr/local/lib/python2.5/site-packages/MoinMoin/theme/new-modern.py /usr/local/lib/python2.5/site-packages/MoinMoin/theme/modern.py
 sudo cp /usr/local/lib/python2.5/site-packages/MoinMoin/theme/org-__init__.py /usr/local/lib/python2.5/site-packages/MoinMoin/theme/__init__.py
Lock MoinMoin for publishing

lmoin script

 #!/bin/sh

 sudo cp /usr/local/lib/python2.5/site-packages/MoinMoin/theme/org-modern.py /usr/local/lib/python2.5/site-packages/MoinMoin/theme/modern.py
 sudo cp /usr/local/lib/python2.5/site-packages/MoinMoin/theme/org-__init__.py /usr/local/lib/python2.5/site-packages/MoinMoin/theme/__init__.py

MoinMoin Installation Notes

Installed from ports:

#cd /usr/ports/www/moinmoin
#make install
#make MOINTYPE=FCGI MOINDEST=/usr/local/www/wiki instance

Required MoinMoin Changes

org-modern.py is obviously just the orignal modern.py file.

The diff between new-modern.py and modern.py is:

# diff /usr/local/lib/python2.5/site-packages/MoinMoin/theme/new-modern.py /usr/local/lib/python2.5/site-packages/MoinMoin/theme/modern.py
26a27,41
>             u'<div id="header">',
>             self.logo(),
>             self.searchform(d),
>             self.username(d),
>             u'<div id="locationline">',
>             self.interwiki(d),
>             self.title(d),
>             u'</div>',
>             self.trail(d),
>             self.navibar(d),
>             #u'<hr id="pageline">',
>             u'<div id="pageline"><hr style="display:none;"></div>',
>             self.msg(d),
>             self.editbar(d),
>             u'</div>',
78a94,98
>             u'<div id="footer">',
>             self.editbar(d),
>             self.credits(d),
>             self.showversion(d, **keywords),
>             u'</div>',

The diff between new-__init__.py and __init__.py is:

# diff /usr/local/lib/python2.5/site-packages/MoinMoin/theme/new-__init__.py /usr/local/lib/python2.5/site-packages/MoinMoin/theme/__init__.py
894c894,895
<         return (u'<link rel="" type="" />')
---
>         return (u'<link rel="alternate" type="application/wiki" '
>                 u'title="%s" href="%s" />' % (text, url))
1632a1634
>         output.append('<link rel="Start" href="%s/%s">\n' % (scriptname, wikiutil.quoteWikinameURL(page_front_page)))
1633a1636,1639
>             output.append('<link rel="Alternate" title="%s" href="%s/%s?action=raw">\n' % (
>                 _('Wiki Markup'), scriptname, pagename_quoted, ))
>             output.append('<link rel="Alternate" media="print" title="%s" href="%s/%s?action=print">\n' % (
>                 _('Print View'), scriptname, pagename_quoted, ))
1664a1671,1677
>         output.extend([
>             '<link rel="Search" href="%s/%s">\n' % (scriptname, wikiutil.quoteWikinameURL(page_find_page)),
>             '<link rel="Index" href="%s/%s">\n' % (scriptname, wikiutil.quoteWikinameURL(page_title_index)),
>             '<link rel="Glossary" href="%s/%s">\n' % (scriptname, wikiutil.quoteWikinameURL(page_word_index)),
>             '<link rel="Help" href="%s/%s">\n' % (scriptname, wikiutil.quoteWikinameURL(page_help_formatting)),
>                       ])

Then use wget --follow-tags=a,link -E -k -r -p http://localhost/mywiki/ to make copy of the wiki (which will be made up of just standard html pages). Then upload wget'ed files to the web host! (see Upload Scripts above for a scripted method.)

Using <<Include()>> and <<MiniPage()>> to manage content

These are very useful to make flexible page layouts. An example of centering MoinMoin content:

||<tablewidth="100%"style="border-style: hidden; text-align: center;"> <<Include(MainC1)>>||

Another example of how the main page of this site is constructed:

= Mark Duller's Space =
||<tablewidth="100%" tablestyle="text-align: left;"style="vertical-align: top;"><<Include(MainC1_blog1)>> ||<30% style="vertical-align: top;"><<Include(MainC1_contents)>>||

Much more useful info on Include at: http://moinmo.in/HelpOnMacros/Include

As table syntax cannot contain new lines, several wiki markup do not work. <<MiniPage()>> allows one to add MoinMoin markup in a table:

||<tablewidth="50%"style="text-align: center;"> <<MiniPage(-----\n = heading 1 = \n )>>||

Produces:


heading

  • test

More at: http://moinmo.in/MacroMarket/MiniPage

HTML macro

HTML moin macro

Similar Existing Processes and/or Projects

Found this: http://moinmo.in/MoinMoinQuestions/Other#CanIexporttheWikitostatichtml.3F and this: http://moinmo.in/AdvertsIntegration
Will comment on that later!


back to main page

MoinCMS (last edited 2009-04-13 18:52:25 by MarkDuller)

Site Meter