PmWiki»Page File Format

Page File Format

You may have many documents that you would like to use a local program to format in a format pmWiki can display.

You could open each document and copy/paste the content to new pmwiki pages or you could format the document in advance and upload it using a ftp client.

Only two lines are necessary in a PmWiki page file:

  1. urlencoded=1
  2. text=markup text

Any line break characters in the markup text need to be replaced by %0a and any percent signs replaced with %25. Alternately, one can use a different character sequence for newlines by doing

  1. newline=<newline sequence>
  2. text=markup text

Keys you could see in a raw pmWiki file:

version
version of PmWiki used to create the file
newline
character used for newlines
agent
browser used when saving page
author
last author to save page
host
host created this page
name
name of the page (e.g., Main.WikiSandbox)
rev
number of times the page has been edited
targets
targets for links in the page
time
time the page was last saved (seconds since 1 Jan 1970 00:00 UTC)

Creating a Page for Distribution

A simple way to create a wikipage file to for distribution (for example with a recipe or a skin) is to create the page with PmWiki and then use a text editor to delete all lines but version, text, and time. Example:

version=pmwiki-2.0.0 ordered=1 urlencoded=1 
text=This is a line.%0aThis is another.
time=1124826105