[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using local Wikipedia

From: Rick
Subject: using local Wikipedia
Date: Thu, 17 Jun 2004 19:11:00 -0400
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

I have a bit of a writeup on accessing a local Wikipedia
from emacs. See

Wikipedia (see is a user-created wiki-based

Here are some basic functions:

(defun wkp-get-article (title)
  (interactive "sArticle title:")
  (let ((id (string-to-int
             (wkp-select "cur_id"
                         (format "cur_namespace=0 AND cur_title='%s'"
    (wkp-select "cur_text" (format "cur_id=%d" id))))

(defun wkp-select (field condition)
   (format "echo \"use wikidb;SELECT %s FROM cur WHERE %s;\" | %s | tail -1"
           field condition
           "mysql --user=wikiuser --password=wikipass")))

You have to have a local Wikipedia installed
in mySQL as "wikiuser" and with a password "wikipass".

reply via email to

[Prev in Thread] Current Thread [Next in Thread]