Code Monkey home page Code Monkey logo

sgte's People

Contributors

davide avatar ericbmerritt avatar ngerakines avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sgte's Issues

Add StringTemplate-like iteration over attributes

As far as I am aware at the moment the only way to iterate over an array is a map operation. I think adding a StringTemplate style iteration would be great. I mean something like this:

$["john","mary", "mark", "peter"]:{ it | <b>name:</b> $it$}

Also, this should work for non-array values (treating such value as one-element array)

EDIT: It's just come to me that this is in fact an extension of http://github.com/filippo/sgte/issues/3 (applying function to an attribute) :-)

cut a new release

There where some interesting changes/fixes a few months ago. time to cut a new release.

use multiple attributes for apply

Apply should take multiple attributes:

$apply f var1 var2 var3$

translates to f(var1, var2, var3)

in the same way we could write something like:

$(var1, var2, var3):f$

sgte:render should return string() or {error, Reason}

If rendering fails due to wrong data type or missing attribute in data, it should return {error, Reason}. If rendering is successful, it should return {ok, string()}.

Currently there is no way to check at runtime if rendering failed or no.

To maintain backward compatibility a new flag (e.g. raise_error) should be added to options. If this flag is set and rendering fails {error, Reason} should be returned else string() should be returned.

Docstring discrepency

Line 317 of sgte_parse.erl - the function parse_ift has a different arity than the docstring, causing edoc, which is java-like-paranoid about such things, to not compile all the docs.

fix unicode

Improve unicode implementation with options in the compile and render phase to correctly handle input and output encodings

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.