Git Product home page Git Product logo

damsel-python's People

Contributors

dskinner 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

Watchers

 avatar  avatar  avatar  avatar

damsel-python's Issues

builtin filter for html comment blocks

  • Should be able to prepend to any line to create an html comment.
  • Should be able to prepend to any root node and the resulting children will be part of the block comment, just as filters are intended to work
  • Should be able to use inline to comment out a specific portion of a line

Tag Hash Order

since attributes follow the css attribute selector style, all attributes must follow id and class hashes, which i find to be more readable but could be setup for mixed ordering.

:include with conditionals fails

:include that does basic conditional and in main template is followed by a block, fails. This might not be an issue in trunk.

Multiline Text missing at end of document

When document has multiline plain text at end of document, it will get dropped. This is avoidable currently just by sticking a blank element below the multiline text

formatter and dict conflicts

curly braces get recognized as a formatter before a dict in statements such as for. This should never happen, ever, total goof

Inline content too restrictive

Considering the rendering code dmsl.Template('index.dmsl').render(hello="World")

The following crashes in a template: %p Hello, { hello }

Where %p Hello, {hello} does not.

The whitespace here shouldn't matter to the parser. Also, the PEP-8 states that variables enclosed in dictionaries and tuples should have a space on both ends.

PEP-8 approves: a = { 'foo' : 'bar' } and discourages a = {'foo':'bar'} making this restriction feel unnatural.

Better Error Reporting

daml on a whole could use much better error reporting with template problems, warnings, etc

Fails to build

$ python setup.py build_ext -i
running build_ext
cythoning dmsl/cdoc.pyx to dmsl/cdoc.c
building 'dmsl.cdoc' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/dmsl
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c dmsl/cdoc.c -o build/temp.linux-x86_64-2.7/dmsl/cdoc.o
dmsl/cdoc.c:8:22: error fatal: pyconfig.h: No existe el fichero o el directorio
compilación terminada.
error: command 'gcc' failed with exit status 1

Feature Request: Pretty Source Formatting

Dmsl generates some nastily formatted HTML output. Sensible newlines would be nice.

From the template:

%html
    %head
        %title Headshots Backend API Manager
    %body
        %h2 Overview
        %p This is the webservice to manage images stored within S3.
        %h2 Submit a New Thumbnail Request
        %form[action="/create"][method="post"]
            %label[for="create_form_url"] Url 
            %input[id="create_form_url"][type="text"][name="url"]
            %input[id="create_form_submit"][type="submit"][name="submit"]

DMSL generates:

<!DOCTYPE html><html><head><title>Headshots Backend API Manager</title></head><body><h2>Overview</h2><p>This is the webserive to manage images stored within S3.</p><h2>Submit a New Thumbnail Request</h2><form action="/create" method="post"><label for="create_form_url">Url</label><input id="create_form_url" type="text" name="url"></input><input id="create_form_submit" type="submit" name="submit"></input></form></body></html>

I would like for it to generate:

<!DOCTYPE html>
<html>
    <head>
        <title>Headshots Backend API Manager</title>
    </head>
    <body>
        <h2>Overview</h2>
        <p>This is the webserive to manage images stored within S3.</p>
        <h2>Submit a New Thumbnail Request</h2>
        <form action="/create" method="post">
            <label for="create_form_url">Url</label>
            <input id="create_form_url" type="text" name="url"></input>
            <input id="create_form_submit" type="submit" name="submit"></input>
        </form>
    </body>
</html>

Tabs dont work

Im pretty sure anyways, and mixed tabs/spaces definitely dont. This should be easily rectifiable since python has string.expandtabs

pass arg to include for limiting selection

it might be helpful to be able to pass an arg to builtin include that specifies which top-level blocks to include, ignoring the rest.

This stems from noticing a need to abstract out certain reusable blocks into seperate files for reuse in many places, but the creation of so many files with little bits of information creates confusion. Typically, it seems there is a particular page that outlines the majority of these blocks for use there, and reuse elsewhere. Workflow might be simplified with this addition as well as keeping the original work contained in its more intended usage, and removing the file cruft.

Colon Crashes Label Tag

Awesome job with this.

If you include the character ':' after some text in a label tag dmsl crashes.

%label[for="someid"] Url

is okay but

%label[for="someid"] Url:

causes dmsl to throw the error => IndexError('list index out of range',)

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.