Skip to content

Latest commit

 

History

History
193 lines (115 loc) · 4.36 KB

Story.pod

File metadata and controls

193 lines (115 loc) · 4.36 KB

NAME

Page::Story is a series of functions that parses text data with Lady Aleena's unique markup.

USAGE

Sample lines note: The sample lines below will have spaces at the beginnings of the lines. Those spaces must be removed or the lines will all be returned as paragraphs.

Block elements

Headings

Lines starting with a 1, 2, 3, 4, 5, or 6 will create headings.

1 Heading level one
2 Heading level two
3 Heading level three
4 Heading level four
5 Heading level five
6 Heading level six

Should the number be followed, without spaces, by an n, it will be returned with the noclear class.

1n Heading level one with noclear class
2n Heading level two with noclear class
3n Heading level three with noclear class
4n Heading level four with noclear class
5n Heading level five with noclear class
6n Heading level six with noclear class

If a + is the last character of the string, links to Google and Wikipedia will follow directly after the heading.

1 Topic +

Paragraphs

Normal paragraghs do not have any line notation.

Indented paragraphs

Lines starting with >NUM will be printed with an indent class.

>1 will have "indent_01" class.
>2 will have "indent_02" class.
>10 will have "indent_10" class.

Stanzas

Lines starting with stanza will be a paragraph with line breaks in it, broken at |. They will be given the stanza class. This is helpful for poetry.

stanza This line will break|So you can eat cake.

Other paragraphs

Lines starting with the words as, by, from, and with will be paragraphs with the author class.

1 Some Person
as Some Other Person

1 Some Book
by Some Author

bq Some item
from Some Source

1 Main Author
with Some Other Author or Authors

Block quotes

Lines starting with bq will be block quotes.

bq This is a block quote from Lady Aleena.

Preformatted text

Lines starting with : will be grouped into a <pre> tag.

: This line will be preformatted.
: So will this one.

Lines starting with :| will give the pre tag a class.

:| perl

The above will give the pre tag the class perl.

<pre class="perl">
</pre>

Lists

Lines starting with * or # return a list. They can be mixed.

Unordered lists

Lines starting with * will return an unordered list. Lines starting with *| are setting the class of the list.

* Red
* Green
* Blue

Ordered lists

Lines starting with # will return an ordered list. Lines starting with #| are setting the class of the list.

# First
# Second
# Third

Should the # be followed by a number, the list will begin at that number.

#2 Second
# Third
# Fourth

Mixed list

* Red
* Green
* Blue
*# First
*# Second
*# Third

Tables

Lines starting with | are tables

  • |# - the table's id

  • || - the table's class(es)

  • |! - the table's caption

  • |^ - the rows that go into the table's thead. These rows will be header cells.

  • |= - the rows that go into the tables' tfoot. These rows will start with a header cell.

  • |* - rows that are just headings

  • |+ - rows that have a header for the first cell

  • |- - normal rows

|# table-id
|| table-class
|! Table caption
|^ thead 1      | thead 2      | thead 3
|= tfoot header | tfoot 2 cell | tfoot 3 cell
|* sub header   | sub header   | sub header
|+ row header   | row cell     | row cell
|- row cell     | row cell     | row cell

Breaks

Lines that are only br or hr will be a line break or horizontal rule respectively.

Normal HTML

A line can have normal HTML on it.

<p>A paragraph.</p>

Inserting code

Lines that begin with & will be code brought into the story with the doc magic option.

& hash key

DEPENDENCIES

Page::Story depends on List::Util, Page::Columns, Page::HTML, Page::Line, Page::Link::External, Page::Story::Inline, Fancy::Join::Grammatical, and Util::Convert.

AUTHOR

Lady Aleena

LICENSE AND COPYRIGHT

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

Copyright © 2020, Lady Aleena ([email protected]). All rights reserved.