Button Button

"File storage" is the default option for storing the nodes with Versium. It is implemented by versium.storage.simple. All nodes are stored subdirectories of the same directory: For instance, on this server we currently have:

[yuri@web10]$ ls wiki-data/
Actions                             @Root
Advanced_Use                        Sandbox
@Album                              Sandbox2
Architecture                        SandboxPlus
Background                          SandboxTwo
...
_history                            Ticket%3A00001
Home_Page                           Ticket%3A000011
...
Projects                            _yui_reset
Protected_Pages                     Луа
Protection_Against_Spam             Спутник
_readme                             史潑尼克
Releases

Note that the module assumes that your filesystem can handle unicode names, such as "Спутник" or "史潑尼克". However, it escapes special characters. For instance, "Ticket:000011" is stored as "Ticket%3A000011"

Each directory contains a file for each version of the page, and an index page:

[yuri@web10]$ ls wiki-data/Sputnik
000001  000004  000007  000010  000013  000016  000019  000022  000025  index
000002  000005  000008  000011  000014  000017  000020  000023  000026
000003  000006  000009  000012  000015  000018  000021  000024  000027

Each file contains Lua code that specifies a set of key-value pairs, one of which is "content":

[yuri@web10]$ cat wiki-data/Installation/000078
 content= [=[This page shows a simple way to install Sputnik on UNIX using Kepler.  
 Those instructions won't work for Windows - please see [[Custom Installation]].  
 Also go to "Custom Installation" if you want to install Sputnik your way (e.g. 
 without using the Kepler installer).

 ## Installation

 On Linux (and perhaps other unices) you can install Sputnik with the following
 simple steps.

 ...

 ]=]
 actions= [=[]=]
 translations= [=[]=]
 config= [=[]=]
 title= [=[Installation]=]
 category= [=[Storage]=]
 permissions= [=[]=]
 fields= [=[]=]
 edit_ui= [=[]=]
 templates= [=[]=]

The index file is also Lua:

[yuri@web10]$ cat wiki-data/Installation/index
add_version{
 version   = [=[000078]=],
 timestamp = [=[2008-03-01 03:53:25]=],
 author    = [=[Yuri]=],
 comment   = [=[A note on the Kepler installer]=],
}
add_version{
 version   = [=[000077]=],
 timestamp = [=[2008-02-17 03:46:07]=],
 author    = [=[Yuri]=],
 comment   = [=[An updated installation script]=],
}
...
add_version{
 version   = [=[000001]=],
 timestamp = [=[2007-05-06 01:00:25]=],
 author    = [=[Yuri]=],
 comment   = [=[Updated the instructions for revision 11]=],
}