Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Now including all source files in the repository

* Updated the README
* Moved some files around to accommodate the new directory structure
* Added a Rakefile, although it's kind of unnecessary
  • Loading branch information...
commit 28d6da67a7f9f906ed279f386a0a490a9e06d84b 1 parent ff1180a
@wafflesnatcha wafflesnatcha authored
View
23 README.md
@@ -4,19 +4,32 @@
## Install
+Run these commands from an open Terminal window:
+
mkdir -p ~/Library/Application\ Support/TextMate/Themes/Webpreview
cd ~/Library/Application\ Support/TextMate/Themes/Webpreview
curl -L https://github.com/downloads/wafflesnatcha/scott.textmate/scott.tar.gz | tar xz
Or, just [download the .zip][.zip] and extract it into `~/Library/Application Support/TextMate/Themes/Webpreview`
-### Download [.zip][] or [.tar.gz][]
+## Downloads
+
+[scott.zip][.zip] (7KB) 13 Apr 2012
+
+[scott.tar.gz][.tar.gz] (8KB) 13 Apr 2012
+
+## Screens
-<div class="gallery">
- <a class="image" href="http://wafflesnatcha.github.com/projects/scott.textmate/screenshot1.png"><img src="http://wafflesnatcha.github.com/projects/scott.textmate/screenshot1_small.png"></a>
- <a class="image" href="http://wafflesnatcha.github.com/projects/scott.textmate/screenshot2.png"><img src="http://wafflesnatcha.github.com/projects/scott.textmate/screenshot2_small.png"></a>
-</div>
+[![screen1small][]][screen1]
+[![screen2small][]][screen2]
[source]: https://github.com/wafflesnatcha/scott.textmate
+
[.zip]: https://github.com/downloads/wafflesnatcha/scott.textmate/scott.zip
[.tar.gz]: https://github.com/downloads/wafflesnatcha/scott.textmate/scott.tar.gz
+
+[screen1small]: http://github.com/wafflesnatcha/scott.textmate/raw/master/files/screens/1small.png
+[screen2small]: http://github.com/wafflesnatcha/scott.textmate/raw/master/files/screens/2small.png
+
+[screen1]: http://github.com/wafflesnatcha/scott.textmate/raw/master/files/screens/1.png
+[screen2]: http://github.com/wafflesnatcha/scott.textmate/raw/master/files/screens/2.png
View
21 files/Rakefile
@@ -0,0 +1,21 @@
+PATH_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
+PATH_SCSS = File.expand_path(File.join(PATH_ROOT, 'files'))
+
+task :default do
+ exec("rake --rakefile '#{__FILE__}' --tasks")
+end
+
+desc "Compile SCSS for development"
+task :development do
+ system("cd '#{PATH_SCSS}' &>/dev/null && compass compile --time -e development")
+end
+
+desc "Compile SCSS for production"
+task :production do
+ system("cd '#{PATH_SCSS}' &>/dev/null && compass compile --time -e production --force")
+end
+
+desc "Clear Compass cache"
+task :cache do
+ system("find '#{PATH_ROOT}' -type d -name '.sass-cache' -prune -print -exec rm -r \\{\\} \\;")
+end
View
6 config.rb → files/config.rb
@@ -1,7 +1,5 @@
sass_path = File.dirname(__FILE__)
-css_dir = ""
-images_dir = "images"
-
+css_dir = "../"
+images_dir = "../images"
relative_assets = true
-
output_style = (environment == :production) ? :compressed : :expanded
View
0  print.scss → files/print.scss
File renamed without changes
View
BIN  files/screens/1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  files/screens/1small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  files/screens/2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  files/screens/2small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
46 style.scss → files/style.scss
@@ -6,16 +6,16 @@ $experimental-support-for-opera: false;
@import "compass/css3";
-$font_body: "Lucida Grande", "Lucida Sans", Helvetica, sans-serif;
-$font_code: Menlo, Monaco, "Courier New", monospace;
-$font_heading: "Helvetica Neue", Helvetica, sans-serif;
+$font_body: "Lucida Grande", "Lucida Sans", "Helvetica", sans-serif;
+$font_code: "Menlo", "Monaco", "Courier New", monospace;
+$font_heading: "Helvetica Neue", "Helvetica", sans-serif;
$font_size: 12px;
$default: #000;
$default_bg: #fff;
-$header_height: 1.6em;
+$header_height: 2.4em;
body.scott {
background: $default_bg;
@@ -58,6 +58,14 @@ body.scott {
text-decoration: underline;
}
}
+
+ b, strong {
+ font-weight: 700;
+ }
+
+ i, em {
+ font-style: italic;
+ }
blockquote {
color: #444;
@@ -85,7 +93,7 @@ body.scott {
}
}
- code, pre, tt, textarea {
+ pre, tt, code, kbd, samp, textarea {
font: {
family: $font_code;
size: inherit;
@@ -121,13 +129,15 @@ body.scott {
margin: 0;
}
+ /** Header */
#tm_webpreview_header {
background: none;
border: none;
color: $default;
display: block;
- font-size: 18px;
+ font-size: $font_size;
height: $header_height;
+ line-height: $header_height;
left: -2px;
overflow: visible;
padding: 0;
@@ -154,11 +164,12 @@ body.scott {
@include box-sizing(border-box);
font: {
family: $font_heading;
+ size: 18px;
weight: bold;
}
margin: 0;
- height: $header_height;
- line-height: $header_height;
+ height: auto;
+ line-height: inherit;
overflow-x: hidden;
padding: 0 200px 0 12px;
position: relative;
@@ -185,6 +196,7 @@ body.scott {
size: $font-size - 1;
weight: bold;
}
+ line-height: $header_height * .5;
margin: 0 7px;
max-width: 92%;
min-height: 1px;
@@ -200,6 +212,8 @@ body.scott {
}
}
}
+
+ /** Theme switcher */
#theme_switcher {
@include box-sizing(border-box);
@@ -208,10 +222,10 @@ body.scott {
font-weight: bold;
margin: 0;
opacity: 1;
- height: $header_height;
- line-height: $header_height;
+ // height: $header_height;
+ // line-height: $header_height;
max-width: 20em;
- padding: .2em 1em;
+ padding: 0 1em 0 0;
position: absolute;
right: 0;
text-align: right;
@@ -247,6 +261,8 @@ body.scott {
}
}
+ /** Footer */
+
#tm_webpreview_footer {
@include text-shadow(none);
@include background-origin(border-box);
@@ -284,6 +300,8 @@ body.scott {
}
}
+ /** Content */
+
#tm_webpreview_content {
@include box-sizing(border-box);
background: none;
@@ -292,7 +310,7 @@ body.scott {
left: 0;
margin: 0;
overflow: auto;
- padding: $header_height + 1 1.5em 1.5em;
+ padding: $header_height 1.5em 1.5em;
position: absolute;
right: 0;
top: $header_height;
@@ -302,7 +320,9 @@ body.scott {
margin-top: auto;
}
}
-
+
+ /** Pro Table */
+
.pro_table {
border-bottom: 2px solid #eaeaea;
border-collapse: inherit;
View
140 files/tests/test1.html
@@ -0,0 +1,140 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>About Persistent Includes</title>
+ <link rel="stylesheet" href="../../style.css" type="text/css" charset="utf-8" media="screen">
+ <link rel="stylesheet" href="file:///Applications/TextMate.app/Contents/SharedSupport/Support/themes/default/print.css" type="text/css" charset="utf-8" media="print">
+ <link rel="stylesheet" href="../../print.css" type="text/css" charset="utf-8" media="print">
+ </head>
+<body id="tm_webpreview_body" class="scott">
+ <div id="tm_webpreview_header">
+ <img id="gradient" src="../../images/header.png" alt="header">
+ <p class="headline">Documentation for ‘IO#puts’</p>
+ <p class="type">RDoc</p>
+ <img id="teaser" src="../../images/teaser.png" alt="teaser">
+ <div id="theme_switcher">
+ <form action="#" onsubmit="return false;">
+ <div>
+ Theme:
+ <select id="theme_selector">
+ <option value="bright" title="/Applications/TextMate.app/Contents/SharedSupport/Support/themes/bright">Bright</option>
+ <option value="dark" title="/Applications/TextMate.app/Contents/SharedSupport/Support/themes/dark">Dark</option>
+ <option value="halloween" title="/Applications/TextMate.app/Contents/SharedSupport/Support/themes/halloween">Halloween</option>
+ <option value="night" title="/Applications/TextMate.app/Contents/SharedSupport/Support/themes/night">Night</option>
+ <option selected value="scott" title="/Users/scott/Library/Application Support/TextMate/Themes/Webpreview/scott">Scott</option>
+ <option value="shiny" title="/Applications/TextMate.app/Contents/SharedSupport/Support/themes/shiny">Shiny</option>
+ </select>
+ </div>
+ </form>
+ </div>
+ </div>
+ <div id="tm_webpreview_content" class="scott">
+<select id="search_history" style="float: right;">
+ <option value="IO#puts" selected="selected">IO#puts</option>
+<option value="IO">IO</option></select>
+<div id="actual_output" style="margin-top: 3em"><h2>Class: <a href="#">IO</a></h2>
+<pre> Class +IO+ is the basis for all input and output in Ruby. An I/O
+ stream may be _duplexed_ (that is, bidirectional), and so may use
+ more than one native operating system stream.
+
+ Many of the examples in this section use class +File+, the only
+ standard subclass of +IO+. The two classes are closely associated.
+
+ As used in this section, _portname_ may take any of the following
+ forms.
+
+ * A plain string represents a filename suitable for the
+ underlying operating system.
+
+ * A string starting with ``+|+'' indicates a subprocess. The
+ remainder of the string following the ``+|+'' is invoked as a
+ process with appropriate input/output channels connected to it.
+
+ * A string equal to ``+|-+'' will create another Ruby instance as
+ a subprocess.
+
+ Ruby will convert pathnames between different operating system
+ conventions if possible. For instance, on a Windows system the
+ filename ``+/gumby/ruby/test.rb+'' will be opened as
+ ``+\gumby\ruby\test.rb+''. When specifying a Windows-style filename
+ in a Ruby string, remember to escape the backslashes:
+
+ "c:\gumby\ruby\test.rb"
+
+ Our examples here will use the Unix-style forward slashes;
+ +File::SEPARATOR+ can be used to get the platform-specific
+ separator character.
+
+ I/O ports may be opened in any one of several different modes,
+ which are shown in this section as _mode_. The mode may either be a
+ Fixnum or a String. If numeric, it should be one of the operating
+ system specific constants (O_RDONLY, O_WRONLY, O_RDWR, O_APPEND and
+ so on). See man open(2) for more information.
+
+ If the mode is given as a String, it must be one of the values
+ listed in the following table.
+
+ Mode | Meaning
+ -----+--------------------------------------------------------
+ "r" | Read-only, starts at beginning of file (default mode).
+ -----+--------------------------------------------------------
+ "r+" | Read-write, starts at beginning of file.
+ -----+--------------------------------------------------------
+ "w" | Write-only, truncates existing file
+ | to zero length or creates a new file for writing.
+ -----+--------------------------------------------------------
+ "w+" | Read-write, truncates existing file to zero length
+ | or creates a new file for reading and writing.
+ -----+--------------------------------------------------------
+ "a" | Write-only, starts at end of file if file exists,
+ | otherwise creates a new file for writing.
+ -----+--------------------------------------------------------
+ "a+" | Read-write, starts at end of file if file exists,
+ | otherwise creates a new file for reading and
+ | writing.
+ -----+--------------------------------------------------------
+ "b" | (DOS/Windows only) Binary file mode (may appear with
+ | any of the key letters listed above).
+
+ The global constant ARGF (also accessible as $&lt;) provides an
+ IO-like stream which allows access to all files mentioned on the
+ command line (or STDIN if no files are mentioned). ARGF provides
+ the methods +#path+ and +#filename+ to access the name of the file
+ currently being read.</pre>
+
+<h2>Includes</h2>
+<pre> <a href="#">Enumerable</a>(<a href="#">all?</a>, <a href="#">any?</a>, <a href="#">as_json</a>, <a href="#">collect</a>, <a href="#">count</a>, <a href="#">cycle</a>, <a href="#">detect</a>,
+ <a href="#">drop</a>, <a href="#">drop_while</a>, <a href="#">each_cons</a>, <a href="#">each_slice</a>, <a href="#">each_with_index</a>,
+ <a href="#">each_with_object</a>, <a href="#">entries</a>, <a href="#">enum_cons</a>, <a href="#">enum_slice</a>, <a href="#">enum_with_index</a>,
+ <a href="#">exclude?</a>, <a href="#">find</a>, <a href="#">find_all</a>, <a href="#">find_index</a>, <a href="#">first</a>, <a href="#">grep</a>, <a href="#">group_by</a>,
+ <a href="#">include?</a>, <a href="#">index_by</a>, <a href="#">inject</a>, <a href="#">many?</a>, <a href="#">map</a>, <a href="#">max</a>, <a href="#">max_by</a>, <a href="#">member?</a>, <a href="#">min</a>,
+ <a href="#">min_by</a>, <a href="#">minmax</a>, <a href="#">minmax_by</a>, <a href="#">none?</a>, <a href="#">one?</a>, <a href="#">partition</a>, <a href="#">reduce</a>, <a href="#">reject</a>,
+ <a href="#">reverse_each</a>, <a href="#">select</a>, <a href="#">sort</a>, <a href="#">sort_by</a>, <a href="#">sum</a>, <a href="#">take</a>, <a href="#">take_while</a>, <a href="#">to_a</a>,
+ <a href="#">to_set</a>, <a href="#">zip</a>), File::<a href="#">Constants</a>()</pre>
+
+<h2>Constants</h2>
+<pre> SEEK_CUR: INT2FIX(SEEK_CUR)
+ SEEK_END: INT2FIX(SEEK_END)
+ SEEK_SET: INT2FIX(SEEK_SET)</pre>
+
+<h2>Class methods</h2>
+<pre> <a href="#">for_fd</a>, <a href="#">foreach</a>, <a href="#">new</a>, <a href="#">open</a>, <a href="#">pipe</a>, <a href="#">popen</a>, <a href="#">read</a>, <a href="#">readlines</a>, <a href="#">select</a>,
+ <a href="#">sysopen</a></pre>
+
+<h2>Instance methods</h2>
+<pre> <a href="#">&lt;&lt;</a>, <a href="#">binmode</a>, <a href="#">block_scanf</a>, <a href="#">bytes</a>, <a href="#">chars</a>, <a href="#">close</a>, <a href="#">close_read</a>,
+ <a href="#">close_write</a>, <a href="#">closed?</a>, <a href="#">each</a>, <a href="#">each_byte</a>, <a href="#">each_char</a>, <a href="#">each_line</a>, <a href="#">eof</a>,
+ <a href="#">eof?</a>, <a href="#">fcntl</a>, <a href="#">fileno</a>, <a href="#">flush</a>, <a href="#">fsync</a>, <a href="#">getbyte</a>, <a href="#">getc</a>, <a href="#">gets</a>, <a href="#">inspect</a>,
+ <a href="#">ioctl</a>, <a href="#">isatty</a>, <a href="#">lineno</a>, <a href="#">lineno=</a>, <a href="#">lines</a>, <a href="#">pid</a>, <a href="#">pos</a>, <a href="#">pos=</a>, <a href="#">print</a>,
+ <a href="#">printf</a>, <a href="#">putc</a>, <a href="#">puts</a>, <a href="#">read</a>, <a href="#">read_nonblock</a>, <a href="#">readbyte</a>, <a href="#">readbytes</a>,
+ <a href="#">readchar</a>, <a href="#">readline</a>, <a href="#">readlines</a>, <a href="#">readpartial</a>, <a href="#">reopen</a>, <a href="#">rewind</a>, <a href="#">scanf</a>,
+ <a href="#">seek</a>, <a href="#">soak_up_spaces</a>, <a href="#">stat</a>, <a href="#">sync</a>, <a href="#">sync=</a>, <a href="#">sysread</a>, <a href="#">sysseek</a>,
+ <a href="#">syswrite</a>, <a href="#">tell</a>, <a href="#">to_i</a>, <a href="#">to_io</a>, <a href="#">tty?</a>, <a href="#">ungetc</a>, <a href="#">write</a>, <a href="#">write_nonblock</a></pre>
+</div>
+ </div>
+
+
+</body>
+</html>
View
164 files/tests/test2.html
@@ -0,0 +1,164 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
+ <title>About Persistent Includes</title>
+ <link rel="stylesheet" href="../../style.css" type="text/css" charset="utf-8" media="screen">
+ <link rel="stylesheet" href="file:///Applications/TextMate.app/Contents/SharedSupport/Support/themes/default/print.css" type="text/css" charset="utf-8" media="print">
+ <link rel="stylesheet" href="../../print.css" type="text/css" charset="utf-8" media="print">
+ </head>
+<body id="tm_webpreview_body" class="scott">
+ <div id="tm_webpreview_header">
+ <img id="gradient" src="../../images/header.png" alt="header">
+ <p class="headline">About Persistent Includes</p>
+ <p class="type">HTML</p>
+ <img id="teaser" src="../../images/teaser.png" alt="teaser">
+ <div id="theme_switcher">
+ <form action="#" onsubmit="return false;">
+ <div>
+ Theme:
+ <select id="theme_selector">
+ <option value="bright" title="/Applications/TextMate.app/Contents/SharedSupport/Support/themes/bright">Bright</option>
+ <option value="dark" title="/Applications/TextMate.app/Contents/SharedSupport/Support/themes/dark">Dark</option>
+ <option value="halloween" title="/Applications/TextMate.app/Contents/SharedSupport/Support/themes/halloween">Halloween</option>
+ <option value="night" title="/Applications/TextMate.app/Contents/SharedSupport/Support/themes/night">Night</option>
+ <option selected value="scott" title="/Users/scott/Library/Application Support/TextMate/Themes/Webpreview/scott">Scott</option>
+ <option value="shiny" title="/Applications/TextMate.app/Contents/SharedSupport/Support/themes/shiny">Shiny</option>
+ </select>
+ </div>
+ </form>
+ </div>
+ </div>
+ <div id="tm_webpreview_content" class="scott">
+<p>The &#8220;Add Persistent Include&#8221; command allows you to embed an external file inside your HTML document. This inclusion is handled by TextMate itself. Once you&#8217;ve added the include statement, use the &#8220;Update Document&#8221; command to refresh any included files.</p>
+
+<h2>Including Files</h2>
+
+<p>An inclusion is done using a special HTML comment:</p>
+
+<pre><code>&lt;!-- #tminclude "footer.html" --&gt;
+&lt;!-- end tminclude --&gt;
+</code></pre>
+
+<p>Once you&#8217;ve updated the document, the contents are pulled inside the inclusion markup:</p>
+
+<pre><code>&lt;!-- #tminclude "footer.html" --&gt;
+&lt;div class="footer"&gt;Copyright (c) 2006, WebDesignCorp.&lt;/div&gt;
+&lt;!-- end tminclude --&gt;
+</code></pre>
+
+<p>Note: Included documents are also processed for additional inclusions and placeholders.</p>
+
+<h2>Include Parameters</h2>
+
+<p>You can optionally specify parameters for the included file. Parameters are provided following the filename.</p>
+
+<pre><code>&lt;!-- #tminclude "header.html" #title#="Home Page" --&gt;
+&lt;!-- end tminclude --&gt;
+</code></pre>
+
+<p>With a header.html file that looks like this:</p>
+
+<pre><code>&lt;h1 class="header"&gt;#title#&lt;/h1&gt;
+</code></pre>
+
+<p>Producing:</p>
+
+<pre><code>&lt;!-- #tminclude "header.html" #title#="Home Page" --&gt;
+&lt;h1 class="header"&gt;Home Page&lt;/h1&gt;
+&lt;!-- end tminclude --&gt;
+</code></pre>
+
+<h2>Placeholders</h2>
+
+<p>The update command also processes document &#8220;placeholders&#8221;. Placeholders are written in this format:</p>
+
+<pre><code>#variable#
+</code></pre>
+
+<p>The following placeholders are available:</p>
+
+<table class="pro_table" border="0" width="100%" cellpadding="5" cellspacing="0">
+<tr><th>Placeholder</th><th>Example Result</th></tr>
+<tr><td><tt>#abbrevdate# </tt></td><td>Abbreviated date: Sun, Aug 15, 2006</td></tr>
+<tr><td><tt>#basename# </tt></td><td>Filename without extension.</td></tr>
+<tr><td><tt>#compdate# </tt></td><td>Compact date: 15-Aug-06</td></tr>
+<tr><td><tt>#creationdate# </tt></td><td>Creation date: 15-Aug-06</td></tr>
+<tr><td><tt>#creationtime# </tt></td><td>Creation time: 1:20 PM</td></tr>
+<tr><td><tt>#docsize# </tt></td><td>Resulting document length in bytes</td></tr>
+<tr><td><tt>#dont_update# </tt></td><td>Special: presence will prevent document updating</td></tr>
+<tr><td><tt>#filename# </tt></td><td>Document filename</td></tr>
+<tr><td><tt>#file_extension#</tt></td><td>Document file extension</td></tr>
+<tr><td><tt>#generator# </tt></td><td>TextMate</td></tr>
+<tr><td><tt>#gmtime# </tt></td><td>GMT time</td></tr>
+<tr><td><tt>#localpath# </tt></td><td>Full path to current file</td></tr>
+<tr><td><tt>#localtime# </tt></td><td>Local computer time</td></tr>
+<tr><td><tt>#longdate# </tt></td><td>Long Date: Tuesday, August 15, 2006</td></tr>
+<tr><td><tt>#modifieddate# </tt></td><td>Modified date: 15-Aug-06</td></tr>
+<tr><td><tt>#modifiedtime# </tt></td><td>Modified time: 1:20 PM</td></tr>
+<tr><td><tt>#monthdaynum# </tt></td><td>Day of Month: 15</td></tr>
+<tr><td><tt>#monthnum# </tt></td><td>Month Number: 08</td></tr>
+<tr><td><tt>#shortdate# </tt></td><td>Short Date: 08/15/06</td></tr>
+<tr><td><tt>#shortusername# </tt></td><td>Login name of current user</td></tr>
+<tr><td><tt>#username# </tt></td><td>Name of current user</td></tr>
+<tr><td><tt>#yearnum# </tt></td><td>Current Year: 2006</td></tr>
+</table>
+
+<p>In addition to these, all of the TextMate environment variables (those starting with a &#8220;TM_&#8221; prefix) are available as placeholders. For example:</p>
+
+<pre><code>#organization_name#
+</code></pre>
+
+<p>Will populate using the <code>TM_ORGANIZATION_NAME</code> environment variable.</p>
+
+<h2>Formatting Time</h2>
+
+<p>The date-based placeholders may also specify a format that can be used to customize the date output. For example:</p>
+
+<pre><code>#gmtime %b %e, %Y# (Aug 15, 2006)
+</code></pre>
+
+<h2>Placeholder Example</h2>
+
+<p>If you want to make that footer.html include more useful, you can use placeholders. For example:</p>
+
+<pre><code>&lt;div class="footer"&gt;Copyright (c) #yearnum#, #oragnization_name#.&lt;/div&gt;
+</code></pre>
+
+<p>This would then produce the following, when included and processed:</p>
+
+<pre><code>&lt;!-- #tminclude "footer.html" --&gt;
+&lt;div class="footer"&gt;Copyright (c) 2006, WebDesignCorp.&lt;/div&gt;
+&lt;!-- end tminclude --&gt;
+</code></pre>
+
+<h2>Scripted Includes</h2>
+
+<p>It is also possible to produce included content using scripts. If the included file is a script, it is run and the output is placed inside the include block.</p>
+
+<pre><code>&lt;!-- #tminclude "scripts/header.pl" #class#="huge" --&gt;
+&lt;!-- end tminclude --&gt;
+</code></pre>
+
+<p>.pl (Perl), .py (Python) and .rb (Ruby) scripts are currently recognized. For the above example, the &#8220;header.pl&#8221; script is run with the following parameters:</p>
+
+<pre><code>header.pl (source_filename) class huge
+</code></pre>
+
+<p>The Perl script in this case can process the parameters like this.</p>
+
+<pre><code>#!/usr/bin/perl
+my ($filename, %args) = @ARGV;
+print "&lt;h1 class='$args{class}'&gt;Header for $filename&lt;/h1&gt;"
+</code></pre>
+
+<p>That would end up producing this:</p>
+
+<pre><code>&lt;!-- #tminclude "scripts/header.pl" #class#="huge" --&gt;
+&lt;h1 class='huge'&gt;Header for /path/to/example.html&lt;/h1&gt;
+&lt;!-- end tminclude --&gt;
+</code></pre>
+ </div>
+</body>
+</html>
View
2  style.css
@@ -1 +1 @@
-body.scott{background:#fff;color:#000;font-family:"Lucida Grande","Lucida Sans",Helvetica,sans-serif;font-size:12px;height:100%;margin:0;overflow:hidden;padding:0}.scott h1,.scott h2,.scott h3,.scott h4,.scott h5,.scott h6{color:#000;font-style:normal;font-weight:500}.scott h1{font-size:2em}.scott h2{font-size:1.5em}.scott h3{font-size:1.17em}.scott h4{font-size:1em}.scott h5{font-size:0.83em}.scott h6{font-size:0.67em}.scott a{color:#1525ab;text-decoration:none}.scott a:visited{color:#680094}.scott a:hover,.scott a:active,.scott a:focus{text-decoration:underline}.scott blockquote{color:#444;font-style:italic;margin-left:40px;margin-right:0}.scott h1,.scott h2,.scott h3,.scott h4,.scott h5,.scott h6,.scott p,.scott pre,.scott blockquote{-webkit-margin-after:15px;-webkit-margin-before:15px;-webkit-margin-collapse:collapse}.scott h1:first-of-type,.scott h2:first-of-type,.scott h3:first-of-type,.scott h4:first-of-type,.scott h5:first-of-type,.scott h6:first-of-type,.scott p:first-of-type,.scott pre:first-of-type,.scott blockquote:first-of-type{margin-top:auto}.scott dl,.scott dt,.scott dd{margin-left:0;margin-right:0}.scott code,.scott pre,.scott tt,.scott textarea{font-family:Menlo,Monaco,"Courier New",monospace;font-size:inherit}.scott pre{-webkit-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#eee;margin:1em 0;overflow:auto;padding:.6em .8em;position:relative;white-space:pre;word-wrap:normal}.scott pre code{white-space:pre;word-wrap:normal}.scott hr{background-color:#e0e0e0;border:none;height:1px;margin:1em 0;padding:0}.scott li>p{margin:0}.scott #tm_webpreview_header{background:none;border:none;color:#000;display:block;font-size:18px;height:1.6em;left:-2px;overflow:visible;padding:0;position:fixed;right:-2px;text-shadow:0 1px 0 rgba(255,255,255,0.4);top:0;width:auto;z-index:10000}.scott #tm_webpreview_header #gradient,.scott #tm_webpreview_header #teaser{display:none}.scott #tm_webpreview_header .headline{-webkit-background-origin:border;background-origin:border-box;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(215,215,215,0.88)), color-stop(100%, rgba(180,180,180,0.75))),url("images/noise.png");background-image:-webkit-linear-gradient(top, rgba(215,215,215,0.88),rgba(180,180,180,0.75)),url("images/noise.png");background-image:linear-gradient(top, rgba(215,215,215,0.88),rgba(180,180,180,0.75)),url("images/noise.png");background-color:transparent;border:none;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25),0 1px 2px rgba(0,0,0,0.5),0 -1px 0 rgba(255,255,255,0.15) inset;box-shadow:0 1px 0 rgba(0,0,0,0.25),0 1px 2px rgba(0,0,0,0.5),0 -1px 0 rgba(255,255,255,0.15) inset;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Helvetica Neue",Helvetica,sans-serif;font-weight:bold;margin:0;height:1.6em;line-height:1.6em;overflow-x:hidden;padding:0 200px 0 12px;position:relative;text-overflow:ellipsis;white-space:nowrap;z-index:10}.scott #tm_webpreview_header .type{background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(89,9,89,0.9)), color-stop(100%, rgba(153,15,135,0.9)));background-image:-webkit-linear-gradient(top, rgba(89,9,89,0.9),rgba(153,15,135,0.9));background-image:linear-gradient(top, rgba(89,9,89,0.9),rgba(153,15,135,0.9));-webkit-background-origin:border;background-origin:border-box;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-box-shadow:0 0 1px 0 rgba(0,0,0,0.3);box-shadow:0 0 1px 0 rgba(0,0,0,0.3);text-shadow:0 1px 0 #000;border-bottom:1px solid rgba(0,0,0,0.4);border-left:1px solid rgba(0,0,0,0.1);border-right:1px solid rgba(0,0,0,0.1);border-top:none;color:#fff;float:left;font-size:11px;font-weight:bold;margin:0 7px;max-width:92%;min-height:1px;overflow:hidden;padding:2px 10px;position:static;text-overflow:ellipsis;white-space:nowrap;width:auto}.scott #tm_webpreview_header .type:empty{display:none}.scott #theme_switcher{-webkit-box-sizing:border-box;box-sizing:border-box;color:#4a4a4a;font-size:10px;font-weight:bold;margin:0;opacity:1;height:1.6em;line-height:1.6em;max-width:20em;padding:.2em 1em;position:absolute;right:0;text-align:right;top:0;z-index:100}.scott #theme_switcher form{padding:0}.scott #theme_switcher #theme_selector{-webkit-appearance:none;appearance:none;background-image:url("images/arrow_down.png"),-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255,255,255,0.7)), color-stop(100%, rgba(201,201,201,0.7)));background-image:url("images/arrow_down.png"),-webkit-linear-gradient(top, rgba(255,255,255,0.7),rgba(201,201,201,0.7));background-image:url("images/arrow_down.png"),linear-gradient(top, rgba(255,255,255,0.7),rgba(201,201,201,0.7));-webkit-background-origin:border;background-origin:border-box;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:1px 0 0 rgba(255,255,255,0.15),-1px 0 0 rgba(255,255,255,0.15),0 1px 0 rgba(255,255,255,0.2);box-shadow:1px 0 0 rgba(255,255,255,0.15),-1px 0 0 rgba(255,255,255,0.15),0 1px 0 rgba(255,255,255,0.2);-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#ddd;background-position:right center;background-repeat:no-repeat, repeat-x;border:1px solid rgba(100,100,100,0.5);color:#444;font-weight:bold;max-width:13em;outline:none;padding:.2em .5em .3em}.scott #theme_switcher #theme_selector:hover{background-color:#fff}.scott #tm_webpreview_footer{text-shadow:none;-webkit-background-origin:border;background-origin:border-box;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(242,242,242,0.95)), color-stop(100%, rgba(242,242,242,0.95)));background-image:-webkit-linear-gradient(top, rgba(242,242,242,0.95),rgba(242,242,242,0.95));background-image:linear-gradient(top, rgba(242,242,242,0.95),rgba(242,242,242,0.95));-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 1px 0 rgba(255,255,255,0.7) inset,0 0 2px 0 rgba(0,0,0,0.4);box-shadow:0 1px 0 rgba(255,255,255,0.7) inset,0 0 2px 0 rgba(0,0,0,0.4);background-color:transparent;border:0;bottom:0;font-size:11px;font-weight:500;color:#222;display:block;height:auto;left:0;margin:0 auto;max-height:3em;overflow:hidden;padding:.3em .6em .4em;position:fixed;right:0;text-overflow:ellipsis;top:auto;white-space:nowrap;width:auto;z-index:10000}.scott #tm_webpreview_footer p{margin:0;padding:0}.scott #tm_webpreview_content{-webkit-box-sizing:border-box;box-sizing:border-box;background:none;bottom:0;height:auto;left:0;margin:0;overflow:auto;padding:2.6em 1.5em 1.5em;position:absolute;right:0;top:1.6em;width:auto}.scott #tm_webpreview_content :first-child{margin-top:auto}.scott .pro_table{border-bottom:2px solid #eaeaea;border-collapse:inherit;border-spacing:0;font-size:inherit;margin:0;padding:0}.scott .pro_table th,.scott .pro_table td{background-color:#fff;padding:4px 8px}.scott .pro_table th{background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255,255,255,0)), color-stop(100%, rgba(150,150,150,0.15)));background-image:-webkit-linear-gradient(top, rgba(255,255,255,0),rgba(150,150,150,0.15));background-image:linear-gradient(top, rgba(255,255,255,0),rgba(150,150,150,0.15));-webkit-background-origin:border;background-origin:border-box;-webkit-box-shadow:0 -3px 4px -3px rgba(0,0,0,0.2) inset;box-shadow:0 -3px 4px -3px rgba(0,0,0,0.2) inset;border-bottom:1px solid #bbb;font-weight:bold;text-align:left}.scott .pro_table td{vertical-align:top}.scott .pro_table>tbody>tr:nth-child(even)>td{background-color:#f3f6fa}.scott .pro_table p{margin:0}.scott .pro_table p+p{margin-top:1em}.scott div.footnotes{padding:1em;font-size:90%}.scott .alternate{background-color:#f0f0f0}
+body.scott{background:#fff;color:#000;font-family:"Lucida Grande","Lucida Sans","Helvetica",sans-serif;font-size:12px;height:100%;margin:0;overflow:hidden;padding:0}.scott h1,.scott h2,.scott h3,.scott h4,.scott h5,.scott h6{color:#000;font-style:normal;font-weight:500}.scott h1{font-size:2em}.scott h2{font-size:1.5em}.scott h3{font-size:1.17em}.scott h4{font-size:1em}.scott h5{font-size:0.83em}.scott h6{font-size:0.67em}.scott a{color:#1525ab;text-decoration:none}.scott a:visited{color:#680094}.scott a:hover,.scott a:active,.scott a:focus{text-decoration:underline}.scott b,.scott strong{font-weight:700}.scott i,.scott em{font-style:italic}.scott blockquote{color:#444;font-style:italic;margin-left:40px;margin-right:0}.scott h1,.scott h2,.scott h3,.scott h4,.scott h5,.scott h6,.scott p,.scott pre,.scott blockquote{-webkit-margin-after:15px;-webkit-margin-before:15px;-webkit-margin-collapse:collapse}.scott h1:first-of-type,.scott h2:first-of-type,.scott h3:first-of-type,.scott h4:first-of-type,.scott h5:first-of-type,.scott h6:first-of-type,.scott p:first-of-type,.scott pre:first-of-type,.scott blockquote:first-of-type{margin-top:auto}.scott dl,.scott dt,.scott dd{margin-left:0;margin-right:0}.scott pre,.scott tt,.scott code,.scott kbd,.scott samp,.scott textarea{font-family:"Menlo","Monaco","Courier New",monospace;font-size:inherit}.scott pre{-webkit-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#eee;margin:1em 0;overflow:auto;padding:.6em .8em;position:relative;white-space:pre;word-wrap:normal}.scott pre code{white-space:pre;word-wrap:normal}.scott hr{background-color:#e0e0e0;border:none;height:1px;margin:1em 0;padding:0}.scott li>p{margin:0}.scott #tm_webpreview_header{background:none;border:none;color:#000;display:block;font-size:12px;height:2.4em;line-height:2.4em;left:-2px;overflow:visible;padding:0;position:fixed;right:-2px;text-shadow:0 1px 0 rgba(255,255,255,0.4);top:0;width:auto;z-index:10000}.scott #tm_webpreview_header #gradient,.scott #tm_webpreview_header #teaser{display:none}.scott #tm_webpreview_header .headline{-webkit-background-origin:border;background-origin:border-box;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(215,215,215,0.88)), color-stop(100%, rgba(180,180,180,0.75))),url("images/noise.png");background-image:-webkit-linear-gradient(top, rgba(215,215,215,0.88),rgba(180,180,180,0.75)),url("images/noise.png");background-image:linear-gradient(top, rgba(215,215,215,0.88),rgba(180,180,180,0.75)),url("images/noise.png");background-color:transparent;border:none;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25),0 1px 2px rgba(0,0,0,0.5),0 -1px 0 rgba(255,255,255,0.15) inset;box-shadow:0 1px 0 rgba(0,0,0,0.25),0 1px 2px rgba(0,0,0,0.5),0 -1px 0 rgba(255,255,255,0.15) inset;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Helvetica Neue","Helvetica",sans-serif;font-size:18px;font-weight:bold;margin:0;height:auto;line-height:inherit;overflow-x:hidden;padding:0 200px 0 12px;position:relative;text-overflow:ellipsis;white-space:nowrap;z-index:10}.scott #tm_webpreview_header .type{background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(89,9,89,0.9)), color-stop(100%, rgba(153,15,135,0.9)));background-image:-webkit-linear-gradient(top, rgba(89,9,89,0.9),rgba(153,15,135,0.9));background-image:linear-gradient(top, rgba(89,9,89,0.9),rgba(153,15,135,0.9));-webkit-background-origin:border;background-origin:border-box;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-box-shadow:0 0 1px 0 rgba(0,0,0,0.3);box-shadow:0 0 1px 0 rgba(0,0,0,0.3);text-shadow:0 1px 0 #000;border-bottom:1px solid rgba(0,0,0,0.4);border-left:1px solid rgba(0,0,0,0.1);border-right:1px solid rgba(0,0,0,0.1);border-top:none;color:#fff;float:left;font-size:11px;font-weight:bold;line-height:1.2em;margin:0 7px;max-width:92%;min-height:1px;overflow:hidden;padding:2px 10px;position:static;text-overflow:ellipsis;white-space:nowrap;width:auto}.scott #tm_webpreview_header .type:empty{display:none}.scott #theme_switcher{-webkit-box-sizing:border-box;box-sizing:border-box;color:#4a4a4a;font-size:10px;font-weight:bold;margin:0;opacity:1;max-width:20em;padding:0 1em 0 0;position:absolute;right:0;text-align:right;top:0;z-index:100}.scott #theme_switcher form{padding:0}.scott #theme_switcher #theme_selector{-webkit-appearance:none;appearance:none;background-image:url("images/arrow_down.png"),-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255,255,255,0.7)), color-stop(100%, rgba(201,201,201,0.7)));background-image:url("images/arrow_down.png"),-webkit-linear-gradient(top, rgba(255,255,255,0.7),rgba(201,201,201,0.7));background-image:url("images/arrow_down.png"),linear-gradient(top, rgba(255,255,255,0.7),rgba(201,201,201,0.7));-webkit-background-origin:border;background-origin:border-box;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:1px 0 0 rgba(255,255,255,0.15),-1px 0 0 rgba(255,255,255,0.15),0 1px 0 rgba(255,255,255,0.2);box-shadow:1px 0 0 rgba(255,255,255,0.15),-1px 0 0 rgba(255,255,255,0.15),0 1px 0 rgba(255,255,255,0.2);-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#ddd;background-position:right center;background-repeat:no-repeat, repeat-x;border:1px solid rgba(100,100,100,0.5);color:#444;font-weight:bold;max-width:13em;outline:none;padding:.2em .5em .3em}.scott #theme_switcher #theme_selector:hover{background-color:#fff}.scott #tm_webpreview_footer{text-shadow:none;-webkit-background-origin:border;background-origin:border-box;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(242,242,242,0.95)), color-stop(100%, rgba(242,242,242,0.95)));background-image:-webkit-linear-gradient(top, rgba(242,242,242,0.95),rgba(242,242,242,0.95));background-image:linear-gradient(top, rgba(242,242,242,0.95),rgba(242,242,242,0.95));-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:0 1px 0 rgba(255,255,255,0.7) inset,0 0 2px 0 rgba(0,0,0,0.4);box-shadow:0 1px 0 rgba(255,255,255,0.7) inset,0 0 2px 0 rgba(0,0,0,0.4);background-color:transparent;border:0;bottom:0;font-size:11px;font-weight:500;color:#222;display:block;height:auto;left:0;margin:0 auto;max-height:3em;overflow:hidden;padding:.3em .6em .4em;position:fixed;right:0;text-overflow:ellipsis;top:auto;white-space:nowrap;width:auto;z-index:10000}.scott #tm_webpreview_footer p{margin:0;padding:0}.scott #tm_webpreview_content{-webkit-box-sizing:border-box;box-sizing:border-box;background:none;bottom:0;height:auto;left:0;margin:0;overflow:auto;padding:2.4em 1.5em 1.5em;position:absolute;right:0;top:2.4em;width:auto}.scott #tm_webpreview_content :first-child{margin-top:auto}.scott .pro_table{border-bottom:2px solid #eaeaea;border-collapse:inherit;border-spacing:0;font-size:inherit;margin:0;padding:0}.scott .pro_table th,.scott .pro_table td{background-color:#fff;padding:4px 8px}.scott .pro_table th{background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255,255,255,0)), color-stop(100%, rgba(150,150,150,0.15)));background-image:-webkit-linear-gradient(top, rgba(255,255,255,0),rgba(150,150,150,0.15));background-image:linear-gradient(top, rgba(255,255,255,0),rgba(150,150,150,0.15));-webkit-background-origin:border;background-origin:border-box;-webkit-box-shadow:0 -3px 4px -3px rgba(0,0,0,0.2) inset;box-shadow:0 -3px 4px -3px rgba(0,0,0,0.2) inset;border-bottom:1px solid #bbb;font-weight:bold;text-align:left}.scott .pro_table td{vertical-align:top}.scott .pro_table>tbody>tr:nth-child(even)>td{background-color:#f3f6fa}.scott .pro_table p{margin:0}.scott .pro_table p+p{margin-top:1em}.scott div.footnotes{padding:1em;font-size:90%}.scott .alternate{background-color:#f0f0f0}
Please sign in to comment.
Something went wrong with that request. Please try again.