Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 0f1895267a
Fetching contributors…

Cannot retrieve contributors at this time

132 lines (122 sloc) 6.165 kb
.[
&:[prince|=>[http://www.princexml.com/|Prince]]
&:[wkhtml|=>[http://code.google.com/p/wkhtmltopdf/|wkhtmltopdf]]
]section[txt[Glyph is a _Rapid Document Authoring Framework_.
With Glyph, creating and maintaining any kind of document becomes as easy as... _programming_. Glyph enables you to minimize text duplication, focus on content rather than presentation, manage references seamlessly and automate tedious tasks through a simple but effective macro language, specifically geared towards customization and extensibility.]
section[
@title[Main Features]
§txt[
@title[Command Line Interface]
Glyph is 100% command line. Its interface resambles =>[http://git-scm.com/|Git's] for its simplicity and power (thanks to the =>[http://github.com/davetron5000/gli|gli] gem). Here are some example commands:
* @glyph init@ -- to initialize a new Glyph project in the current (empty) directory.
* @glyph add introduction.textile@ -- to create a new file called _introduction.textile_.
* @glyph compile@ -- to compile the current document into a single HTML file.
* @glyph compile --auto@ -- to keep recompiling the current document every time a file is changed.
* @glyph compile -f pdf@ -- to compile the current document into HTML and then transform it into PDF.
* @glyph compile readme.glyph@ -- to compile a _readme.glyph_ located in the current directory into a single HTML file.
* @glyph outline -l 2@ -- Display the document outline, up to second-level headers.
* @glyph stats@ -- Display project statistics.
]
§[
@title[Minimalist Syntax]
p[Glyph syntax rules can be explained using Glyph itself:]
highlight[=plain|
section[
@title[Something about Glyph]
txt[
You can use Glyph macros in conjunction
with _Textile_ or _Markdown_ to
produce HTML files effortlessly.
]
p[Alternatively, you can just use em[Glyph itself] to generate HTML tags.]
section[
@title[What about PDFs?]
@id[pdf]
p[
Once you have a single, well-formatted HTML
file, converting it to PDF is
extremely easy with a free 3rd-party
renderer like =>[http://www.princexml.com\|Prince]
or =>[http://code.google.com/p/wkhtmltopdf/\|wkhtmltopdf].
]
]
]
=]
p[The Glyph code above corresponds to the following HTML code:]
highlight[=html|
<div class="section">
<h2 id="h_10">Something about Glyph</h2>
<p>
You can use Glyph macros in conjunction with
<em>Textile</em> or <em>Markdown</em> to
produce HTML files effortlessly.
</p>
<p>
Alternatively, you can just use <em>Glyph itself</em>
to generate HTML tags.
</p>
<div class="section">
<h3 id="pdf">What about PDFs?</h3>
<p>
Once you have a single, well-formatted HTML
file, converting it to PDF is
extremely easy with a free 3rd-party renderer
like <a href="http://www.princexml.com">Prince</a>
or <a href="http://code.google.com/p/wkhtmltopdf/\">wkhtmltopdf</a>.
</p>
</div>
</div>
=]
]
§[
@title[Content Reuse]
txt[Finding yourself repeating the same sentence over an over? Glyph allows you to create snippets. Within snippets. Within other snippets (and so on, for a long long time...) as long as you don't define a snippet by defining itself, which would be kinda nasty (and Glyph would complain!):]
highlight[=plain|
snippet:[entities\|snippets and macros]
snippet:[custom_definitions\|
p[Glyph allows you to define your own &[entities].]
]
&[custom_definitions]
=]
p[...which results in:]
highlight[=html|<p>Glyph allows you to define your own snippets and macros.</p>=]
txt[If yourself dreaming about _parametric_ snippets, just create your own macros (see the =>[http://github.com/h3rald/glyph/blob/master/book/text/changelog.glyph|source] of Glyph's changelog, just to have an idea).]
]
§txt[
@title[Automation of Common Tasks]
If you're writing a book, you shouldn't have to worry about pagination, headers, footers, table of contents, section numbering or similar. Glyph understands you, and will take care of everything for you (with a little help from CSS3, sometimes).
]
§txt[
@title[Reference Validation]
Feel free to add plenty of links, snippets, bookmarks, ... if Glyph doesn't find something, it will definitely complain. Broken references are a thing on the past, and you don't need to worry about it.
]
§txt[
@title[Extreme Extensibility]
* You miss a code[=!!!=] macro to format really, _really_ important things? Create it. In under 3 seconds, in Ruby or Glyph itself. And yes, you can use special characters, too.
* You want your own, very special special @glyph create --everything@ command to create all _you_ need in a Glyph project? You can do it. Using your own Rake tasks, too.
* You want Glyph to output ODF files? You can do it, and you'll be able to run @glyph generate -f odf@. This would probably require a little more time, but it's trivial, from a technical point of view.
]
§txt[
@title[Convention over Configuration]
Put your text files in @/text@, your images in @/images@, add custom macros in a @macro@ folder within your @/lib@ folder... you get the picture: Glyph has its special places.
Nonetheless, you also have 1 (_one_) configuration file to customize to your heart's content (with smart defaults).
]
§txt[
@title[Free and Open Source]
Glyph is 100% Open Source Software, developed using the Ruby Programming Language and licensed under the very permissive terms of the =>[http://www.opensource.org/licenses/mit-license.php|MIT License].
If you have Ruby installed, just run @gem install glyph@. That's all it takes.
]
]
§txt[
@title[Resources]
* Home Page: =>[http://www.h3rald.com/glyph/]
* Repository: =>[http://www.github.com/h3rald/glyph/]
* Bug Tracking: =>[http://www.github.com/h3rald/glyph/issues]
* Development Wiki =>[http://wiki.github.com/h3rald/glyph]
* RubyGem Download =>[http://www.rubygems.org/gems/glyph]
* Book (PDF): =>[http://github.com/downloads/h3rald/glyph/glyph.pdf]
* Book (Web): =>[http://www.h3rald.com/glyph/book/]
* Reference Documentation: =>[http://rubydoc.info/gems/glyph/]
* User Group: =>[http://groups.google.com/group/glyph-framework]
]
]
Jump to Line
Something went wrong with that request. Please try again.