Aktuelle Änderungen - Suchen:


über unverdient











WikiHome

edit SideBar

PageFileFormat

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. newline=<newline sequence>
  2. text=markup text

The newline= line identifies the sequence of characters that are used to encode newlines in the remaining fields of the file. A good sequence for newlines is "%0a".

Another approach is to tell PmWiki that the values are urlencoded:

  1. version=xyz urlencoded=1
  2. text=markup text with newlines converted to %0a and percent signs as %25

The actual value of the "version=" parameter doesn't matter, as long as "urlencoded=1" appears somewhere in the line.

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)
title
page title set via (:title The Page Title:).

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

Note

It looks like the file does in fact need a time entry or PmWik? will mistakenly detect concurrent editing and refuse to save the page upon a manual edit.

That would make the minimum required lines:

  1. urlencoded=1
  2. text=markup text
  3. time=seconds since C-day

--Henning? December 16, 2005, at 10:53 AM

If you are mass-importing a large number of wikipage files that use the (:title:) markup, or plan to use RefCount, then its recommended that you also include these lines, as they will otherwise only be created when the pages are edited in PmWiki, and (:pagelist:) and RefCount can rely upon them:

targets=Group.PageOne,Group.PageTwo
title=This Page's Title

You should also be warned that it seems that html entities like &eacute; can cause problems inside links such as [[Caf&eacute;]], since this will be rendered as a link to the page CafEacute?, although it will display correctly. This seems to be due to the fact that these entities are usually converted to their corresponding characters during the normal PmWiki save process. --StirlingWestrup? February 20, 2006, at 03:03 PM

<< Functions | DocumentationIndex | Changes from PmWiki 1 >>

Bearbeiten - Historie - Druckansicht - Aktuelle Änderungen - Suchen
Page last modified on 09.03.2006 03:58 Uhr