summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/ikiwiki-transition.mdwn12
-rw-r--r--doc/index/discussion.mdwn36
-rw-r--r--doc/tips/inside_dot_ikiwiki.mdwn65
3 files changed, 74 insertions, 39 deletions
diff --git a/doc/ikiwiki-transition.mdwn b/doc/ikiwiki-transition.mdwn
index 118050a6c..da3b3a8d5 100644
--- a/doc/ikiwiki-transition.mdwn
+++ b/doc/ikiwiki-transition.mdwn
@@ -4,7 +4,7 @@ ikiwiki-transition - transition ikiwiki pages to new syntaxes
# SYNOPSIS
-ikiwiki-transition prefix_directives page.mdwn...
+ikiwiki-transition type ...
# DESCRIPTION
@@ -12,8 +12,8 @@ ikiwiki-transition prefix_directives page.mdwn...
there's a major change in ikiwiki syntax.
Currently only one such transition is handled, the `prefix_directives` mode
-converts an ikiwiki page from the old preprocessor directive syntax,
-requiring a space, to the new syntax, prefixed by '!'.
+converts the specified ikiwiki page from the old preprocessor directive
+syntax, requiring a space, to the new syntax, prefixed by '!'.
Preprocessor directives which already use the new syntax will remain
unchanged.
@@ -22,6 +22,12 @@ Note that if the page contains wiki links with spaces, which some
older versions of ikiwiki accepted, the prefix_directives transition will
treat these as preprocessor directives and convert them.
+One other transition is handled, the `indexdb` mode handles converting
+a plain text `.ikiwiki/index` file to a binary `.ikiwiki/indexdb`. In this
+mode, you should specify the srcdir of the wiki as the second parameter.
+You do not normally need to run `ikiwiki-transition indexdb`; ikiwiki will
+automatically run it as necessary.
+
# AUTHOR
Josh Triplett <josh@freedesktop.org>
diff --git a/doc/index/discussion.mdwn b/doc/index/discussion.mdwn
index df4e57aba..3d17ddb2a 100644
--- a/doc/index/discussion.mdwn
+++ b/doc/index/discussion.mdwn
@@ -337,42 +337,6 @@ Clicking on an old "?" or going to a create link but new Markdown content exists
----
-# User database tools?
-
-Any tool to view user database?
-
-Any tool to edit the user database?
-
-> No, but it's fairly easy to write such tools in perl. For example, to
-> list all users in the user database:
-
- joey@kodama:~/src/joeywiki/.ikiwiki>perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); print $_ foreach keys %$userinfo'
- http://joey.kitenet.net/
- foo
-
-> To list each user's email address:
-
- joey@kodama:~/src/joeywiki/.ikiwiki>perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); print $userinfo->{$_}->{email} foreach keys %$userinfo'
-
- joey@kitenet.net
-
-> Editing is simply a matter of changing values and calling Storable::store().
-> I've not written actual utilities to do this yet because I've only needed
-> to do it rarely, and the data I've wanted has been different each time.
-> --[[Joey]]
-
->> Thanks for these examples -- I have been using them. I don't know the
->> Storable yet. Can someone share an example of removing a user? (I now
->> setup account\_creation\_password and I have some spammer with different
->> login names that I have banned that I might as well remove from the
->> userdb.)
-
->>> Let's see, you could do something like this:
->>> perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); delete $$userinfo{"joey"}; Storable::lock_store($userinfo, "userdb")'
->>> I suppose I should stop being lame and create a command line tool wrapping up these operations.. --[[Joey]]
-
-----
-
# Spaces in WikiLinks?
Hello Joey,
diff --git a/doc/tips/inside_dot_ikiwiki.mdwn b/doc/tips/inside_dot_ikiwiki.mdwn
new file mode 100644
index 000000000..69083a9a5
--- /dev/null
+++ b/doc/tips/inside_dot_ikiwiki.mdwn
@@ -0,0 +1,65 @@
+[[meta title="inside .ikiwiki"]]
+
+The `.ikiwiki` directory contains ikiwiki's internal state. Normally,
+you don't need to look in it, but here's some tips for how to do so if
+you need/want to.
+
+## the index
+
+`.ikiwiki/indexdb` contains a cache of information about pages, as well
+as all persisitant state about pages. It used to be a (semi) human-readable
+text file, but is not anymore.
+
+To dump the contents of the file, enter a perl command like this.
+
+ joey@kodama:~/src/joeywiki/.ikiwiki> perl -le 'use Storable; my $index=Storable::retrieve("indexdb"); use Data::Dumper; print Dumper $index' | head
+ $VAR1 = {
+ 'index' => {
+ 'ctime' => 1199739528,
+ 'dest' => [
+ 'index.html'
+ ],
+ 'mtime' => 1199739528,
+ 'src' => 'index.mdwn',
+ 'links' => [
+ 'index/discussion',
+
+## the user database
+
+`.ikiwiki/userdb` is the user database, which records preferences of all
+web users.
+
+To list all users in the database, enter a perl command like this.
+Note that the output can include both registered users, and known
+openids.
+
+ joey@kodama:~/src/joeywiki/.ikiwiki> perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); print $_ foreach keys %$userinfo'
+ http://joey.kitenet.net/
+ foo
+
+To list each user's email address:
+
+ joey@kodama:~/src/joeywiki/.ikiwiki> perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); print $userinfo->{$_}->{email} foreach keys %$userinfo'
+
+ joey@kitenet.net
+
+To dump the entire database contents:
+
+ joey@kodama:~/src/joeywiki/.ikiwiki> perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); use Data::Dumper; print Dumper $userinfo'
+ $VAR1 = {
+ 'http://joey.kitenet.net/' => {
+ 'email' => 'joey@kitenet.net',
+ [...]
+
+Editing values is simply a matter of changing values and calling Storable::nstore().
+So to change a user's password:
+
+ joey@kodama:~/src/joeywiki/.ikiwiki> perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); $userinfo->{"foo"}->{email}=q{foo@bar}; Storable::lock_nstore($userinfo, "underdb")'
+
+To remove that user:
+
+ joey@kodama:~/src/joeywiki/.ikiwiki> perl -le 'use Storable; my $userinfo=Storable::retrieve("userdb"); delete $userinfo->{"foo"}; Storable::lock_nstore($userinfo, "underdb")'
+
+I've not written actual utilities to do this yet because I've only needed
+to do it rarely, and the data I've wanted has been different each time.
+--[[Joey]]