Recent Changes - Search:

PmWiki

pmwiki.org

PageFileFormat-Talk

File extensions

I am trying to use a php replace tool, but it requires a file mask to identify the file; .htm, etc. Are pmwiki page files of any particular type? What would the file extension be? Jagtig.

The files are named Groupname.Pagename, there is no extension, or a tool could consider the extension to be .Pagename which changes for each page, eg. the file containing this page would be named pmwiki/wiki.d/PmWiki.PageFileFormat-Talk. --Petko November 02, 2011, at 09:19 AM

Observations

I had a bunch of pages incorrectly attributed to the PmWiki group in my instance, so being the admin I decided it would be easier to take care of this via the "backdoor". I changed the name of a bunch of files to the new group from the old, and everything seemed to work fine. I used VI to peer inside and noticed that the "name" attribute was equal to the old filenames. BE CAREFUL if you choose to edit pmwiki page content files in an editor like VI. You can lose all of your content so make sure to back everything up first! (I did)Most of my resaved files were fine, but files that had "line too long" issues in VI, clobbered all content. I did some further research and discovered that pmwiki will actually change the internal name file attributes if you just go into each page thru the pmwiki interface and Save them. No changes are necessary and the name attributes correct themselves once saved. --JJ


Perl snippet to pmwik-ize text:

    sub wikiize_text {
        my $t = shift @_;

        $t =~ s/%/%25/g;
        $t =~ s/\</%3c/g;
        $t =~ s/\n/%0a/g;
        return $t;
    }
tamouse October 22, 2011, at 04:53 PM


This is a talk page for improving PmWiki.PageFileFormat.

Edit - History - Print - Recent Changes - Search
Page last modified on December 28, 2011, at 11:32 AM