Giter VIP home page Giter VIP logo

sparkup's Introduction

Sparkup

Sparkup lets you write HTML code faster. Don't believe us? See it in action!

You can write HTML in a CSS-like syntax, and have Sparkup handle the expansion to full HTML code. It is meant to help you write long HTML blocks in your text editor by letting you type less characters than needed.

Sparkup is written in Python, and requires Python 2.5 or newer (2.5 is preinstalled in Mac OS X Leopard). Sparkup also offers intregration into common text editors. Support for VIM and TextMate are currently included.

A short screencast is available here: http://www.youtube.com/watch?v=Jw3jipcenKc

Usage and installation

You may download Sparkup from Github. Download the latest version here.

  • TextMate: Simply double-click on the Sparkup.tmbundle package in Finder. This will install it automatically. In TextMate, open an HTML file (orset the document type to HTML) type in something (e.g., #header > h1), then press Ctrl + E. Pressing Tab will cycle through empty elements.

  • VIM: See the vim/README.txt file for details.

  • Others/command line use: You may put sparkup in your $PATH somewhere. You may then invoke it by typing echo "(input here)" | sparkup, or sparkup --help for a list of commands.

Credits

Sparkup is written by Rico Sta. Cruz and is released under the MIT license.

This project is inspired by Zen Coding of Vadim Makeev. The Zen HTML syntax is forward-compatible with Sparkup (anything that Zen HTML can parse, Sparkup can too).

The following people have contributed code to the project:

  • Guillermo O. Freschi (Tordek @ github) Bugfixes to the parsing system

  • Eric Van Dewoestine (ervandew @ github) Improvements to the VIM plugin

Examples

div expands to:

div#header expands to:

div.align-left#header expands to:

div#header + div#footer expands to:

#menu > ul expands to:

    #menu > h3 + ul expands to:

      #header > h1{Welcome to our site} expands to:

      Welcome to our site

      a[href=index.html]{Home} expands to: Home

      ul > li*3 expands to:

      ul > li.item-$*3 expands to:

      ul > li.item-$*3 > strong expands to:

      table > tr*2 > td.name + td*3 expands to:

      #header > ul > li < p{Footer} expands to:

      Footer

      sparkup's People

      Contributors

      divad12 avatar ervandew avatar rstacruz avatar

      Stargazers

       avatar

      Watchers

       avatar  avatar  avatar

      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.