Jamie's Weblog

Procrastination and utter drivel since 2001!
  • Email
  • Github
  • Linkedin
  • Twitter
  • Rss
  • Home
  • About
  • Archives
  • Publications
Home» Projects » Trimming MoinMoin

Trimming MoinMoin

Posted on July 13, 2005 by Jamie Lawrence in Projects, Python

A small script to remove the extra language files from MoinMoin (probably now out-of-date)
I use “MoinMoin”:http://moinmoin.wikiwikiweb.de as a personal notebook but I’ve found that it’s a little hard to manage the backups/merges when it comes with some many default pages. Upon investigation I’ve discovered that most of these redundant pages are not even in English. Since I’m the only person using the wiki, and my human-language capabilities are limited to English, I thought I’d delete the spare, foreign language, pages. Of course, since I’m a programmer, I’d rather let the computer do this tedious task for me!

Here’s a python script that iterates through a MoinMoin directory (e.g. c:\\Moin\\notebook\\data\\pages), then reads the current version for each page directory, loads the current revision of that page, checks for “#language XX”, and if XX != en (i.e., this is not an English page), it deletes the whole page directory. This is a *very* dangerous script to use. *Always backup first!* There are no command-line options, so you have to hand-edit the paths but, hopefully, this means that you will also read the script, understand what it’s doing, and then you won’t blame me when it deletes everything on your PC!

1 Comment

One comment on “Trimming MoinMoin”

  1. Jenhsun Lo (Andy) says:
    December 28, 2005 at 3:11 pm

    Hi,Jamie
    I like your blog’s contents…very impressive.
    About the research problem on notes gathering and organizing, Recently I found a site http://wikindx.sourceforge.net/
    but no time to try. Maybe you can give me a comment.

    …a researcher as you are from Taiwan.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Contact Me

  • jamie@ideasasylum.com
  • ideasasylum
    • Twitter

Categories

  • BalanceTrackr (2)
  • C# (1)
  • dualpricing.ie (2)
  • hack (1)
  • Java (4)
  • Linux (3)
  • Measure it to change it (2)
  • Parenting (2)
  • Personal (36)
  • Photography (13)
  • Projects (7)
  • Python (3)
  • rant (20)
  • Reviews (20)
  • Ruby on Rails (18)
  • Taskmonifier (1)
  • Tech (1)
  • Tips & Tricks (7)
  • tuesdaypush (1)
  • Uncategorized (877)
  • Useful (3)
  • Weekly Picks (5)
  • Work (2)

Tags

accident backups barcampcork batteries bizcamp business car copyright depression dual pricing eneloop fowadublin fun gallstones git svn health ipad iphone lens life motivation nginx Personal phd photographers photography photos pinterest podcasts prism quote rails rant renault scenic review rspec ruby sew shutterscouts ssl startups swimming vagrant windows wrap

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

(c) 2012 Jamie's Weblog