The method behind my madness, so to speak, was that a given user could then fairly easily translate the nodes to a group of html files, one to a topic -- if, for instance, one had written extensively about a topic and wanted to make the information available to those who don't use E2 or Google.The initial version (which, admittedly, isn't posted yet) allows one to use a regexp to select which writeups a given user wants to save from the database, which could apply equally well to a single-file mode.

I was planning some sort of single-file functionality eventually, particularly so that one could pull out a group of nodes, revise them, and then auto-node them back into the database. I'm uncertain whether or not XML is the way to go, given I'm hardly an XML expert (or a Perl one, for that matter). Perhaps a single-XML-file option and a single-"text" file option.

FWIW, an E2 user whose code I <strikeout>stole</strikeout> borrowed from (don't worry, it's GPL) to create it suggested the following regexp to me: $nodefilename =~ y,/:\\?'*&quot;&lt;&gt;;&amp;!\0,,d;
, and I use a separate operation to translate spaces to underscores unless an option is selected that prevents this (for instance, if one is running Windows).


In reply to Re: Re: Re: Re: Re: Portably transforming a string to a valid filename by Anonymous Monk
in thread Portably transforming a string to a valid filename by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.