Skip to content
Newer
Older
100644 176 lines (133 sloc) 4.22 KB
aa064c9 @rstacruz Initial commit.
authored
1 Sparkup
2 =======
3
7550390 @rstacruz README changes again
authored
4 **Sparkup lets you write HTML code faster.** Don't believe us?
5 [See it in action!](http://www.youtube.com/watch?v=Jw3jipcenKc)
d9b80e5 @rstacruz Added more examples to the README file
authored
6
68893b3 @fortable1999 python 3 support
fortable1999 authored
7 Fixed by Zhao:
8 This is a fork of original version. This version support both python 2 and 3.
9
7550390 @rstacruz README changes again
authored
10 You can write HTML in a CSS-like syntax, and have Sparkup handle the expansion to full HTML
11 code. It is meant to help you write long HTML blocks in your text editor by letting you
12 type less characters than needed.
c421646 @rstacruz README changes
authored
13
7550390 @rstacruz README changes again
authored
14 Sparkup is written in Python, and requires Python 2.5 or newer (2.5 is preinstalled in
00907c3 @davidjb Update documentation around Vim integration
davidjb authored
15 Mac OS X Leopard). Sparkup also offers integration into common text editors. Support for VIM
7550390 @rstacruz README changes again
authored
16 and TextMate are currently included.
d9b80e5 @rstacruz Added more examples to the README file
authored
17
7550390 @rstacruz README changes again
authored
18 A short screencast is available here:
19 [http://www.youtube.com/watch?v=Jw3jipcenKc](http://www.youtube.com/watch?v=Jw3jipcenKc)
d9b80e5 @rstacruz Added more examples to the README file
authored
20
7550390 @rstacruz README changes again
authored
21 Usage and installation
583a640 @rstacruz Additional README comments
authored
22 ----------------------
00907c3 @davidjb Update documentation around Vim integration
davidjb authored
23 You may download Sparkup from GitHub. [Download the latest version here](http://github.com/rstacruz/sparkup/downloads).
583a640 @rstacruz Additional README comments
authored
24
25 - **TextMate**: Simply double-click on the `Sparkup.tmbundle` package in Finder. This
00907c3 @davidjb Update documentation around Vim integration
davidjb authored
26 will install it automatically. In TextMate, open an HTML file (or set the document type to
583a640 @rstacruz Additional README comments
authored
27 HTML) type in something (e.g., `#header > h1`), then press `Ctrl` + `E`. Pressing `Tab`
28 will cycle through empty elements.
29
00907c3 @davidjb Update documentation around Vim integration
davidjb authored
30 - **VIM**: See the `vim/README.txt` file for installation. In VIM,
31 create or open an HTML file (or set the filetype to ``html``), type in something (e.g.
32 `#header > h1`), then press `<C-E>` whilst in **insert mode** to expand to HTML.
33 Pressing `<C-n>` will cycle through empty elements. Variables specified in
34 `vim/README.txt` can be used to customise key mappings, and to add **normal mode** mappings
35 as well.
aa064c9 @rstacruz Initial commit.
authored
36
7550390 @rstacruz README changes again
authored
37 - **Others/command line use**: You may put `sparkup` in your `$PATH` somewhere. You may then
38 invoke it by typing `echo "(input here)" | sparkup`, or `sparkup --help` for a list of commands.
39
40 Credits
41 -------
42
43 Sparkup is written by Rico Sta. Cruz and is released under the MIT license.
44
45 This project is inspired by [Zen Coding](http://code.google.com/p/zen-coding/) of
46 [Vadim Makeev](http://pepelsbey.net). The Zen HTML syntax is forward-compatible with Sparkup
47 (anything that Zen HTML can parse, Sparkup can too).
48
1c3f071 @rstacruz Updated README with new contributor
authored
49 The following people have contributed code to the project:
430c17e @rstacruz Updated vim plugin with easier instructions; Updated README
authored
50
00907c3 @davidjb Update documentation around Vim integration
davidjb authored
51 - Guillermo O. Freschi (Tordek @ GitHub)
430c17e @rstacruz Updated vim plugin with easier instructions; Updated README
authored
52 Bugfixes to the parsing system
53
00907c3 @davidjb Update documentation around Vim integration
davidjb authored
54 - Eric Van Dewoestine (ervandew @ GitHub)
430c17e @rstacruz Updated vim plugin with easier instructions; Updated README
authored
55 Improvements to the VIM plugin
1c3f071 @rstacruz Updated README with new contributor
authored
56
aa064c9 @rstacruz Initial commit.
authored
57 Examples
58 --------
59
7550390 @rstacruz README changes again
authored
60 **`div`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
61
62 ```html
63 <div></div>
64 ```
aa064c9 @rstacruz Initial commit.
authored
65
7550390 @rstacruz README changes again
authored
66 **`div#header`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
67
68 ```html
aa064c9 @rstacruz Initial commit.
authored
69 <div id="header"></div>
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
70 ```
aa064c9 @rstacruz Initial commit.
authored
71
7550390 @rstacruz README changes again
authored
72 **`div.align-left#header`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
73
74 ```html
aa064c9 @rstacruz Initial commit.
authored
75 <div id="header" class="align-left"></div>
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
76 ```
aa064c9 @rstacruz Initial commit.
authored
77
7550390 @rstacruz README changes again
authored
78 **`div#header + div#footer`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
79
80 ```html
d9b80e5 @rstacruz Added more examples to the README file
authored
81 <div id="header"></div>
82 <div id="footer"></div>
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
83 ```
d9b80e5 @rstacruz Added more examples to the README file
authored
84
7550390 @rstacruz README changes again
authored
85 **`#menu > ul`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
86
87 ```html
aa064c9 @rstacruz Initial commit.
authored
88 <div id="menu">
89 <ul></ul>
90 </div>
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
91 ```
d9b80e5 @rstacruz Added more examples to the README file
authored
92
7550390 @rstacruz README changes again
authored
93 **`#menu > h3 + ul`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
94
95 ```html
d9b80e5 @rstacruz Added more examples to the README file
authored
96 <div id="menu">
97 <h3></h3>
98 <ul></ul>
99 </div>
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
100 ```
d9b80e5 @rstacruz Added more examples to the README file
authored
101
7550390 @rstacruz README changes again
authored
102 **`#header > h1{Welcome to our site}`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
103
104 ```html
d9b80e5 @rstacruz Added more examples to the README file
authored
105 <div id="header">
106 <h1>Welcome to our site</h1>
107 </div>
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
108 ```
d9b80e5 @rstacruz Added more examples to the README file
authored
109
7550390 @rstacruz README changes again
authored
110 **`a[href=index.html]{Home}`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
111
112 ```html
d9b80e5 @rstacruz Added more examples to the README file
authored
113 <a href="index.html">Home</a>
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
114 ```
d9b80e5 @rstacruz Added more examples to the README file
authored
115
7550390 @rstacruz README changes again
authored
116 **`ul > li*3`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
117
118 ```html
d9b80e5 @rstacruz Added more examples to the README file
authored
119 <ul>
120 <li></li>
121 <li></li>
122 <li></li>
123 </ul>
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
124 ```
d9b80e5 @rstacruz Added more examples to the README file
authored
125
7550390 @rstacruz README changes again
authored
126 **`ul > li.item-$*3`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
127
128 ```html
d9b80e5 @rstacruz Added more examples to the README file
authored
129 <ul>
130 <li class="item-1"></li>
131 <li class="item-2"></li>
132 <li class="item-3"></li>
133 </ul>
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
134 ```
d9b80e5 @rstacruz Added more examples to the README file
authored
135
7550390 @rstacruz README changes again
authored
136 **`ul > li.item-$*3 > strong`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
137
138 ```html
d9b80e5 @rstacruz Added more examples to the README file
authored
139 <ul>
140 <li class="item-1"><strong></strong></li>
141 <li class="item-2"><strong></strong></li>
142 <li class="item-3"><strong></strong></li>
143 </ul>
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
144 ```
d9b80e5 @rstacruz Added more examples to the README file
authored
145
7550390 @rstacruz README changes again
authored
146 **`table > tr*2 > td.name + td*3`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
147
148 ```html
d9b80e5 @rstacruz Added more examples to the README file
authored
149 <table>
150 <tr>
151 <td class="name"></td>
152 <td></td>
153 <td></td>
154 <td></td>
155 </tr>
156 <tr>
157 <td class="name"></td>
158 <td></td>
159 <td></td>
160 <td></td>
161 </tr>
162 </table>
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
163 ```
d9b80e5 @rstacruz Added more examples to the README file
authored
164
7550390 @rstacruz README changes again
authored
165 **`#header > ul > li < p{Footer}`** expands to:
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
166
167 ```html
d9b80e5 @rstacruz Added more examples to the README file
authored
168 <!-- The < symbol goes back up the parent; i.e., the opposite of >. -->
169 <div id="header">
170 <ul>
171 <li></li>
172 </ul>
173 <p>Footer</p>
174 </div>
076865a @grahamc Fix README examples to output formatted HTML.
grahamc authored
175 ```
Something went wrong with that request. Please try again.