Permalink
Browse files

Work in progress, everything is broken at the moment.

  • Loading branch information...
supernovus committed Oct 12, 2011
1 parent 22db717 commit 0f62e1480d326db24f8fc25e02f5defabb95cab9
View
@@ -1,7 +1,7 @@
{
"name" : "Flower",
"version" : "*",
- "description" : "Implementation of TAL and METAL template engines",
+ "description" : "XML Application Languages, including TAL.",
"depends" : [ "Exemel", "DateTime::Utils" ],
"source-url" : "git://github.com/supernovus/flower.git"
}
View
92 README
@@ -1,34 +1,45 @@
-=== Flower -- Petal for Perl 6
-
-NOTE: A massive rewrite is planned for Flower that will vastly change how
- it works, and what it's capable of. When it's done, Flower will be
- a LOT more than what it is now. See doc/TODO.txt for more details.
-
-Petal is the Perl Template Attribute Language (Perl 5), and is derived from the
-TAL, METAL and TALES specifications from Zope (Python).
-
-Flower is an implementation of Petal in Perl 6.
-
-It's not the same as the Perl 5 implementation, and has a different
-feature-set and parsing model.
-
-That said, it tries to implement as much of Petal as possible in a mostly
-compatible form, major differences are listed below.
-
-Status: Flower is currently usable, but there are still plenty of planned
- features. See the doc/TODO.txt for a list of things I'm planning.
-
-= Requirements:
-
- - Exemel, the XML library that powers Flower.
+=== Flower: XML Application Languages ===
+
+Flower is a library for building and using XML Application Languages.
+An XML Application Language can be anything that takes an XML document,
+and parses it using a set of data. It's perfect for creating template engines,
+custom XML syntax, and much more, all using pure XML as its input and output
+formats.
+
+Flower was originally written to create an implementation of the TAL and METAL
+template engines from Zope. Flower's name was originally a play on the Perl 5
+Petal library. Since then, Flower has outgrown its original scope, bringing
+in further ideas from Template::TAL, PHPTAL, and some of my own custom XML
+concepts. The original TAL/METAL/TALES parsers are still included, and can
+be easily used by using Flower::TAL, which is included (see below.)
+
+= Requirements =
+
+ - Rakudo Perl 6
+ http://rakudo.org/
+ NOTE: Unlike most of my libraries, Exemel and Flower only work on the
+ "ng" branch of Rakudo, and not the "nom" branch. Once grammars/regexes are
+ working fully in "nom", I'll make sure both libraries work on "nom" again.
+
+ - Exemel
+ The XML library that powers Flower.
http://github.com/supernovus/exemel/
= Optional libraries:
- - Temporal-Utils, needed if you want to use Flower::Utils::Date
+ - DateTime::Utils
+ Needed if you want to use Flower::TAL::TALES::Date
+ which is included in Flower::TAL's list of plugins.
http://github.com/supernovus/temporal-utils/
-= Major Differences from Petal:
+=== Flower::TAL ===
+
+This is an easily loadable library that extends Flower and automatically
+loads the Flower::TAL::TAL, Flower::TAL::METAL application languages
+by default, and offers the ability to easily load plugins for the
+Flower::TAL::TALES attribute parser (used by Flower::TAL::TAL)
+
+= Major Differences from Petal =
* The default local namespace is 'tal', and to override it, you must
declare http://xml.zope.org/namespaces/tal instead of the Petal namespace.
@@ -38,7 +49,7 @@ Status: Flower is currently usable, but there are still plenty of planned
* There is NO support for anything but well-formed XML.
There is no equivelant to the Petal::Parser::HTB, and no plans for one.
Use well-formed XML, it's just better.
- * Flower supports petal:block elements, as per the PHPTAL project.
+ * Flower supports tal:block elements, as per the PHPTAL project.
* While you can use the 'structure' keyword, it's not really needed.
If you want an unescaped XML structure for a replacement, send an
Exemel object (any class other than Document) and it will be added to
@@ -64,11 +75,11 @@ The above list will be updated as this project is developed, as I'm sure
other changes will be introduced that will be a gotchya for users of Petal,
Zope or PHPTAL.
-= Flower::Utils
+= Flower::TAL Plugins =
-Inspired by Petal::Utils, Flower includes a namespace called Flower::Utils::
-If you load modules in the Petal::Utils:: namespace, it will add additional
-modifiers. The following sets are currently included with Flower:
+Inspired by Petal::Utils, Flower includes a bunch of libraries in the
+Flower::TAL::TALES:: namespace. These are also available using Flower::TAL's
+add-tales() method.
- Text, same as the :text set from Petal::Utils
lc: make the string lowercase.
@@ -90,10 +101,6 @@ modifiers. The following sets are currently included with Flower:
strftime: Displays a date/time string in a specified format.
rfc: A modifier specifically for use with strftime, as the format.
now: A modifier specifically for use with strftime, as the object.
- - Perl, makes a 'perl:' modifier available, which is the counterpart
- to Zope's 'python:' or PHPTAL's 'php:' modifiers.
- There are some extra, more dangerous modifiers included, but they
- are not exported by default, and must be imported manually.
- Debug, similar to :debug set from Petal::Utils.
dump: modifier spits out the .perl representation of the object.
what: modifier spits out the class name of the object.
@@ -103,22 +110,29 @@ In addition, the following sets are planned for inclusion very soon:
- Logic, similar to the :logic set from Petal::Utils
- Hash, same as the :hash set from Petal::Utils
-The syntax for the Flower::Utils methods is based on the modifiers from
+The syntax for the Flower::TAL plugins is based on the modifiers from
Petal::Utils, but extended to use the Flower-specific extensions (the
same method that is used to parse method call parameters in queries.)
As is obvious, the syntax is not always the same, and not all of the
modifiers are the same.
Full documentation for the usage of Flower and the Flower::Utils modifiers
-will be included in the docs/ folder in an upcoming release, until then
+will be included in the doc/ folder in an upcoming release, until then
there are comments in the libraries, and test files in t/ that show the
proper usage.
The URI set from Petal::Utils is not planned for inclusion,
feel free to write it if you need it.
I'm sure new exciting libraries will be made adding onto these.
-= Author: Timothy Totten
-= License: Artistic License 2.0
- http://www.perlfoundation.org/artistic_license_2_0
+=== Author ===
+
+Timothy Totten
+http://huri.net/
+http://github.com/supernovus/
+
+=== License ===
+
+Artistic License 2.0
+http://www.perlfoundation.org/artistic_license_2_0
View
@@ -1,2 +0,0 @@
-exemel
-temporal-utils
View
@@ -1,22 +1,7 @@
Things yet to do (in the order they will likely be done in):
- - Massive rewrite! The original Flower was sort of based
- on Petal from Perl 5. Sort of, but not really.
- Since then, it's diverged quite significantly.
- However, I have also started my own fork of the Perl 5
- Template::TAL library, and really like the module way
- that it is structured. I intend to completely restructure
- Flower to be more modular like Template::TAL. The various
- XML sublangs will be separated out into their own libraries,
- the same way that 'modifiers' are done now.
- The exact implementation details are not quite settled upon yet.
- This will make Flower into an XML extension and manipulation framework
- rather than just an implementation of TAL/METAL/TALES,
- although those will still be the default sub-langs.
-
- - Finish implementing Flower::Utils, as per the README.
- Although they will no longer by in that namespace, as they will be
- using the new framework described above.
+ - Clean up the alpha-isms that are still hanging about.
+ - Finish implementing Flower::TAL::TALES::* plugins, as per the README.
- Implement query caching (it will be optional)
- Implement multiple paths (/test/path1 | /test/path2) support.
- Implement on-error.
Oops, something went wrong.

0 comments on commit 0f62e14

Please sign in to comment.