yst 0.2.3.2 → 0.2.4
raw patch · 5 files changed
+13/−3 lines, 5 files
Files
- README.markdown +6/−2
- Yst/Data.hs +4/−0
- Yst/Render.hs +1/−0
- Yst/Types.hs +1/−0
- yst.cabal +1/−1
README.markdown view
@@ -271,8 +271,12 @@ conditions*. A *basic condition* is of the form `value op value`, where `value` may be either a fieldname or a constant. Note that all constants must be enclosed in quotes. `op` may be one of the-following: `=`, `>=`, `<=`, `>`, `<`.+following: `=`, `>=`, `<=`, `>`, `<` and 'contains'. +> The basic condition `arg1 contains arg2` succeeds if and only if+`arg1` is a fieldname whose value is a list containing the value of+`arg2`.+ Note that the order of transformations is significant. You can get different results if you use `LIMIT` before or after `ORDER BY`, for example.@@ -280,7 +284,7 @@ If you want to specify an attribute's value directly, rather than reading it from a file, just omit the "FROM": - date:+ data: deadline: 11/20/2009 Any YAML value can be given to an attribute in this way.
Yst/Data.hs view
@@ -73,6 +73,9 @@ filterTestPred TestLt = (<) filterTestPred TestGtEq = (>=) filterTestPred TestLtEq = (<=)+filterTestPred TestContains = \n1 n2 -> case n1 of+ NList ns -> elem n2 ns+ _ -> False filterArgToNode :: FilterArg -> Node -> Node filterArgToNode (AttrValue attr) (NMap ns) = fromMaybe NNil (lookup attr ns)@@ -253,6 +256,7 @@ , ("<=",TestLtEq) , (">",TestGt) , ("<",TestLt)+ , ("contains",TestContains) ] pSpace :: GenParser Char st ()
Yst/Render.hs view
@@ -121,6 +121,7 @@ 0 -> "" n -> concat $ replicate n "../" return $ render+ . setManyAttrib attrs . setAttribute "sitetitle" (siteTitle site) . setAttribute "pagetitle" (pageTitle page) . setAttribute "gendate" todaysDate
Yst/Types.hs view
@@ -99,6 +99,7 @@ | TestLt | TestGtEq | TestLtEq+ | TestContains deriving (Show, Read, Eq) data SortDirection = Ascending | Descending deriving (Show, Read, Eq)
yst.cabal view
@@ -1,5 +1,5 @@ name: yst-version: 0.2.3.2+version: 0.2.4 Tested-With: GHC == 6.10.4, GHC == 6.12.1 Cabal-version: >= 1.2 build-type: Simple