Browse files

Replace Github project page with docs

  • Loading branch information...
1 parent 1488182 commit 353300a1b97dccb2c680a9416d701b0d72ef8f2c @aerosol aerosol committed Oct 30, 2012
View
16 Makefile
@@ -1,16 +0,0 @@
-REBAR=rebar
-
-all: compile
-
-compile:
- $(REBAR) compile
-
-clean:
- $(REBAR) clean
-
-test: clean compile
- $(REBAR) eunit skip_deps=true
-
-docs:
- $(REBAR) doc skip_deps=true
-
View
61 README.md
@@ -1,61 +0,0 @@
-binpp - Erlang Binary Pretty Printer
-===================================
-
-Example usage:
-
- 1> Bin.
- <<12,242,207,49,82,69,45,130,212,69,80,88,8,81,23,36,86,7,
- 68,19,133,97,51,216,56,145,88,8,81,...>>
- 2> binpp:pprint(Bin).
- 0C F2 CF 31 52 45 2D 82 D4 45 50 58 08 51 17 24 .òÏ1RE-‚ÔEPX.Q.$
- 56 07 44 13 85 61 33 D8 38 91 58 08 51 17 24 56 V.D.…a3Ø8‘X.Q.$V
- 0A 14 20 4E 24 16 09 60 F4 0A 15 11 01 30 13 89 .. N$..`ô....0.‰
- 05 81 0F 09 15 C5 61 33 D8 54 91 52 5D 81 17 24 ....Åa3ØT‘R].$
- 11 14 60 23 D1 3D 55 80 ..`#Ñ=U€
- ok
-
-Binpp will use io:format to output the formatted binary by default, however
-there are options making pprint functions return formatted data instead
-of performing direct IO write:
-
- 1> Bin2 = <<"foo bar baz">>.
- <<"foo bar baz">>
- 2> binpp:pprint(Bin2, [{return, iolist}]).
- [["66 6F 6F 20 62 61 72 20 62 61 7A ",32,
- "foo bar baz","\n"]]
- 3> binpp:pprint(Bin2, [{return, binary}]).
- <<"66 6F 6F 20 62 61 72 20 62 61 7A foo bar baz\n">>
-
-You may use a custom printer function as well:
-
- 4> binpp:pprint(Bin2, [{printer, fun(O) -> io:format("~s~n", [O]) end}]).
- 66 6F 6F 20 62 61 72 20 62 61 7A foo bar baz
-
- ok
-
-An additional API is provided for printing binary fragments:
-
- 5> binpp:pprint(Bin2, {0, 3}, []).
- 66 6F 6F foo
-
-Also, binary byte-to-byte comparsion:
-
- 6> binpp:compare(<<1,2,1024:512,3,4>>, <<1,3,1024:512,5,6>>).
- -- 02 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 03 -- -- -- -- -- -- -- -- -- -- -- -- -- --
- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- -- -- 03 04 -- -- 05 06
- ok
-
-Plus a handy little helper:
-
- 7> binpp:compare(<<1,2,255,3,1024:512>>, binpp:from_str("01 02 FF CC")).
- -- -- -- 03 00 00 00 00 00 00 00 00 00 00 00 00 -- -- -- CC ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
- 00 00 04 00 ?? ?? ?? ??
- ok
-
-That's all folks!
View
92 doc/binpp.html
@@ -0,0 +1,92 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Module binpp</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<hr>
+
+<h1>Module binpp</h1>
+<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Pretty printer for Erlang binaries.
+
+
+<h2><a name="description">Description</a></h2>Pretty printer for Erlang binaries.
+
+<h2><a name="types">Data Types</a></h2>
+
+<h3 class="typedecl"><a name="type-opts">opts()</a></h3>
+<p><b>abstract datatype</b>: <tt>opts()</tt></p>
+
+
+<h2><a name="index">Function Index</a></h2>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#compare-2">compare/2</a></td><td>Pretty print byte-to-byte comparsion of two binaries to stdout.</td></tr>
+<tr><td valign="top"><a href="#convert-1">convert/1</a></td><td>Convert binary to hex string.</td></tr>
+<tr><td valign="top"><a href="#convert-2">convert/2</a></td><td>Convert binary to hex string or binary (base-2) string.</td></tr>
+<tr><td valign="top"><a href="#from_str-1">from_str/1</a></td><td>Construct binary from hex string.</td></tr>
+<tr><td valign="top"><a href="#pprint-1">pprint/1</a></td><td>Pretty print a binary to stdout using <em>io:format/2</em>
+ Note: <em>io:format/2</em> is a blocking call.</td></tr>
+<tr><td valign="top"><a href="#pprint-2">pprint/2</a></td><td>Print a binary using custom function or return the formatted result.</td></tr>
+<tr><td valign="top"><a href="#pprint-3">pprint/3</a></td><td>Pretty print a slice of binary.</td></tr>
+</table>
+
+<h2><a name="functions">Function Details</a></h2>
+
+<h3 class="function"><a name="compare-2">compare/2</a></h3>
+<div class="spec">
+<p><tt>compare(Bin1::binary() | bitstring(), Bin2::binary() | bitstring()) -&gt; ok</tt><br></p>
+</div><p>Pretty print byte-to-byte comparsion of two binaries to stdout.</p>
+
+<h3 class="function"><a name="convert-1">convert/1</a></h3>
+<div class="spec">
+<p><tt>convert(Bin::binary() | bitstring()) -&gt; {ok, list()}</tt><br></p>
+</div><p>Convert binary to hex string.</p>
+
+<h3 class="function"><a name="convert-2">convert/2</a></h3>
+<div class="spec">
+<p><tt>convert(Bin::binary() | bitstring(), X2::hex | bin) -&gt; {ok, list()}</tt><br></p>
+</div><p>Convert binary to hex string or binary (base-2) string.</p>
+
+<h3 class="function"><a name="from_str-1">from_str/1</a></h3>
+<div class="spec">
+<p><tt>from_str(Str::string()) -&gt; binary()</tt><br></p>
+</div><p>Construct binary from hex string.
+ Hex string octets can be optionally separated with spaces.
+ Valid hex strings:
+ <ul>
+ <li>"AA BB FF 01"</li>
+ <li>"AABBFF01"</li>
+ </ul></p>
+
+<h3 class="function"><a name="pprint-1">pprint/1</a></h3>
+<div class="spec">
+<p><tt>pprint(Bin::binary() | bitstring()) -&gt; ok</tt><br></p>
+</div><p>Pretty print a binary to stdout using <em>io:format/2</em>
+ Note: <em>io:format/2</em> is a blocking call.</p>
+
+<h3 class="function"><a name="pprint-2">pprint/2</a></h3>
+<div class="spec">
+<p><tt>pprint(Bin::binary() | bitstring(), Opts::<a href="#type-opts">opts()</a>) -&gt; ok | any()</tt><br></p>
+</div><p>Print a binary using custom function or return the formatted result.
+ Valid options are:
+ <ul>
+ <li>{return, binary}</li>
+ <li>{return, iolist}</li>
+ <li>{printer, CustomFunction}</li>
+ </ul>
+
+ Custom functions should be of arity 1, accepting the prettified result as
+ an <em>iolist()</em> input. Returned value can be <em>any()</em>.</p>
+
+<h3 class="function"><a name="pprint-3">pprint/3</a></h3>
+<div class="spec">
+<p><tt>pprint(Bin::binary() | bitstring(), X2::{non_neg_integer(), non_neg_integer()}, Opts::<a href="#type-opts">opts()</a>) -&gt; ok | any()</tt><br></p>
+</div><p>Pretty print a slice of binary.</p>
+<hr>
+
+<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<p><i>Generated by EDoc, Oct 30 2012, 14:26:44.</i></p>
+</body>
+</html>
View
3 doc/edoc-info
@@ -0,0 +1,3 @@
+{application,binpp}.
+{packages,[]}.
+{modules,[binpp]}.
View
BIN doc/erlang.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
17 doc/index.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>The binpp application</title>
+</head>
+<frameset cols="20%,80%">
+<frame src="modules-frame.html" name="modulesFrame" title="">
+
+<frame src="overview-summary.html" name="overviewFrame" title="">
+<noframes>
+<h2>This page uses frames</h2>
+<p>Your browser does not accept frames.
+<br>You should go to the <a href="overview-summary.html">non-frame version</a> instead.
+</p>
+</noframes>
+</frameset>
+</html>
View
12 doc/modules-frame.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>The binpp application</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<h2 class="indextitle">Modules</h2>
+<table width="100%" border="0" summary="list of modules">
+<tr><td><a href="binpp.html" target="overviewFrame" class="module">binpp</a></td></tr></table>
+</body>
+</html>
View
121 doc/overview-summary.html
@@ -0,0 +1,121 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>binpp - Erlang Binary Pretty Printer</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<h1>binpp - Erlang Binary Pretty Printer</h1>
+<p>Copyright © 2012 (c) Adam Rutkowski &lt;hq@mtod.org&gt;</p>
+<p><b>Version:</b> 1.1
+</p>
+<p>This lilbrary provides additional utility functions for working with Erlang
+<em>binary()</em> and <em>bitstring()</em> types.</p>
+
+You might find it useful if you are going to:
+<ul>
+ <li>Implement or debug arbitrary protocols</li>
+ <li>Log/dump binary data</li>
+ <li>Learn how Erlang binaries work</li>
+</ul>
+
+<h2>Installation</h2>
+
+<ol>
+
+<li><p>binpp comes with a Makefile that requires rebar build tool.</p>
+
+If you don't have rebar installed, you may get it from <a href="https://github.com/basho/rebar">Rebar Github repository</a>
+</li>
+
+<li><p>
+Download the sources from <a href="http://github.com/jtendo/binpp">binpp Github repository</a>.</p>
+
+ <ul>
+ <li>To build the library run <em>make</em>.</li>
+ <li>To run the tests run <em>make test</em>.</li>
+ <li>To generate documentation run <em>make docs</em>.</li>
+ </ul>
+</li>
+</ol>
+
+
+
+<h2>Example usage</h2>
+
+<pre> 1&gt; Bin.
+ &lt;&lt;12,242,207,49,82,69,45,130,212,69,80,88,8,81,23,36,86,7,
+ 68,19,133,97,51,216,56,145,88,8,81,...&gt;&gt;
+ 2&gt; binpp:pprint(Bin).
+ 0C F2 CF 31 52 45 2D 82 D4 45 50 58 08 51 17 24 .òÏ1RE-‚ÔEPX.Q.$
+ 56 07 44 13 85 61 33 D8 38 91 58 08 51 17 24 56 V.D.…a3Ø8‘X.Q.$V
+ 0A 14 20 4E 24 16 09 60 F4 0A 15 11 01 30 13 89 .. N$..`ô....0.‰
+ 05 81 0F 09 15 C5 61 33 D8 54 91 52 5D 81 17 24 ....Åa3ØT‘R].$
+ 11 14 60 23 D1 3D 55 80 ..`#Ñ=U€
+ ok</pre>
+
+<p>Binpp will use <em>io:format</em> to output the formatted binary by default, however
+there are options making pprint functions return formatted data instead
+of performing direct IO write:</p>
+
+<pre> 1&gt; Bin2 = &lt;&lt;"foo bar baz"&gt;&gt;.
+ &lt;&lt;"foo bar baz"&gt;&gt;
+ 2&gt; binpp:pprint(Bin2, [{return, iolist}]).
+ [["66 6F 6F 20 62 61 72 20 62 61 7A ",32,
+ "foo bar baz","\n"]]
+ 3&gt; binpp:pprint(Bin2, [{return, binary}]).
+ &lt;&lt;"66 6F 6F 20 62 61 72 20 62 61 7A foo bar baz\n"&gt;&gt;</pre>
+
+<p>You may use a custom printer function as well:</p>
+
+<pre> 4&gt; binpp:pprint(Bin2, [{printer, fun(O) -&gt; io:format("~s~n", [O]) end}]).
+ 66 6F 6F 20 62 61 72 20 62 61 7A foo bar baz
+
+ ok</pre>
+
+<p>An additional API is provided for printing binary fragments:</p>
+
+<pre> 5&gt; binpp:pprint(Bin2, {0, 3}, []).
+ 66 6F 6F foo</pre>
+
+<p>Also, binary byte-to-byte comparsion:</p>
+
+<pre> 6&gt; binpp:compare(&lt;&lt;1,2,1024:512,3,4&gt;&gt;, &lt;&lt;1,3,1024:512,5,6&gt;&gt;).
+ -- 02 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 03 -- -- -- -- -- -- -- -- -- -- -- -- -- --
+ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+ -- -- 03 04 -- -- 05 06
+ ok</pre>
+
+<p>Plus a handy little helper:</p>
+
+<pre> 7&gt; binpp:compare(&lt;&lt;1,2,255,3,1024:512&gt;&gt;, binpp:from_str("01 02 FF CC")).
+ -- -- -- 03 00 00 00 00 00 00 00 00 00 00 00 00 -- -- -- CC ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
+ 00 00 04 00 ?? ?? ?? ??
+ ok</pre>
+
+<p>That's all folks!</p>
+
+<h2>Get involved</h2>
+
+<p>Bug reports can be submitted to: <a href="http://github.com/jtendo/binpp/issues/">binpp issues @ Github</a>.</p>
+
+<p>Patches and feature requests are always welcome!</p>
+
+<h2>Module index:</h2>
+<dl>
+ <dt><a href="binpp.html"><code>binpp</code></a></dt>
+ <dd>Erlang Binary Pretty Printer</dd>
+</dl>
+
+<hr>
+<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
+<p><i>Generated by EDoc, Oct 30 2012, 14:26:44.</i></p>
+</body>
+</html>
View
11 doc/packages-frame.html
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>The binpp application</title>
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
+</head>
+<body bgcolor="white">
+<h2 class="indextitle">Packages</h2>
+<table width="100%" border="0" summary="list of packages"></table>
+</body>
+</html>
View
55 doc/stylesheet.css
@@ -0,0 +1,55 @@
+/* standard EDoc style sheet */
+body {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ margin-left: .25in;
+ margin-right: .2in;
+ margin-top: 0.2in;
+ margin-bottom: 0.2in;
+ color: #000000;
+ background-color: #ffffff;
+}
+h1,h2 {
+ margin-left: -0.2in;
+}
+div.navbar {
+ background-color: #add8e6;
+ padding: 0.2em;
+}
+h2.indextitle {
+ padding: 0.4em;
+ background-color: #add8e6;
+}
+h3.function,h3.typedecl {
+ background-color: #add8e6;
+ padding-left: 1em;
+}
+div.spec {
+ margin-left: 2em;
+ background-color: #eeeeee;
+}
+a.module,a.package {
+ text-decoration:none
+}
+a.module:hover,a.package:hover {
+ background-color: #eeeeee;
+}
+ul.definitions {
+ list-style-type: none;
+}
+ul.index {
+ list-style-type: none;
+ background-color: #eeeeee;
+}
+
+/*
+ * Minor style tweaks
+ */
+ul {
+ list-style-type: square;
+}
+table {
+ border-collapse: collapse;
+}
+td {
+ padding: 3
+}
View
BIN images/bkg.png
Deleted file not rendered
View
BIN images/blacktocat.png
Deleted file not rendered
View
85 index.html
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset='utf-8'>
- <meta http-equiv="X-UA-Compatible" content="chrome=1">
-
- <link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen" />
- <link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen" />
- <link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
-
- <title>binpp by jtendo</title>
- </head>
-
- <body>
-
- <header>
- <div class="container">
- <h1>binpp</h1>
- <h2>Erlang Binary Pretty Printer</h2>
-
- <section id="downloads">
- <a href="https://github.com/jtendo/binpp/zipball/master" class="btn">Download as .zip</a>
- <a href="https://github.com/jtendo/binpp/tarball/master" class="btn">Download as .tar.gz</a>
- <a href="https://github.com/jtendo/binpp" class="btn btn-github"><span class="icon"></span>View on GitHub</a>
- </section>
- </div>
- </header>
-
- <div class="container">
- <section id="main_content">
- <h1>binpp - Erlang Binary Pretty Printer</h1>
-
-<p>Example usage:</p>
-
-<pre><code>1&gt; Bin.
-&lt;&lt;12,242,207,49,82,69,45,130,212,69,80,88,8,81,23,36,86,7,
- 68,19,133,97,51,216,56,145,88,8,81,...&gt;&gt;
-2&gt; binpp:pprint(Bin).
-0C F2 CF 31 52 45 2D 82 D4 45 50 58 08 51 17 24 .òÏ1RE-‚ÔEPX.Q.$
-56 07 44 13 85 61 33 D8 38 91 58 08 51 17 24 56 V.D.…a3Ø8‘X.Q.$V
-0A 14 20 4E 24 16 09 60 F4 0A 15 11 01 30 13 89 .. N$..`ô....0.‰
-05 81 0F 09 15 C5 61 33 D8 54 91 52 5D 81 17 24 ....Åa3ØT‘R].$
-11 14 60 23 D1 3D 55 80 ..`#Ñ=U€
-ok
-3&gt; binpp:format(Bin, bin).
-"00001100 11110010 11001111 00110001 01010010 01000101 00101101 10000010
- 11010100 01000101 01010000 01011000 00001000 01010001 00010111 00100100
- 01010110 00000111 01000100 00010011 10000101 01100001 00110011 11011000
- 00111000 10010001 01011000 00001000 01010001 00010111 00100100 01010110
- 00001010 00010100 00100000 01001110 00100100 00010110 00001001 01100000
- 11110100 00001010 00010101 00010001 00000001 00110000 00010011 10001001
- 00000101 10000001 00001111 00001001 00010101 11000101 01100001 00110011
- 11011000 01010100 10010001 01010010 01011101 10000001 00010111 00100100
- 00010001 00010100 01100000 00100011 11010001 00111101 01010101 10000000"
-</code></pre>
-
-<p>Also, binary byte-to-byte comparsion:</p>
-
-<pre><code>4&gt; binpp:cmprint(&lt;&lt;1,2,1024:512,3,4&gt;&gt;, &lt;&lt;1,3,1024:512,5,6&gt;&gt;).
--- 02 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 03 -- -- -- -- -- -- -- -- -- -- -- -- -- --
--- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--- -- 03 04 -- -- 05 06
-ok
-</code></pre>
-
-<p>Plus a handy little helper:</p>
-
-<pre><code>5&gt; binpp:cmprint(&lt;&lt;1,2,255,3,1024:512&gt;&gt;, binpp:from_str("01 02 FF CC")).
--- -- -- 03 00 00 00 00 00 00 00 00 00 00 00 00 -- -- -- CC ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
-00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
-00 00 04 00 ?? ?? ?? ??
-ok
-</code></pre>
-
-<p>That's all folks!</p>
- </section>
- </div>
-
-
- </body>
-</html>
View
1 javascripts/main.js
@@ -1 +0,0 @@
-console.log('This would be the main JS file.');
View
1 params.json
@@ -1 +0,0 @@
-{"name":"binpp","body":"binpp - Erlang Binary Pretty Printer\r\n===================================\r\n\r\nExample usage:\r\n\r\n 1> Bin.\r\n <<12,242,207,49,82,69,45,130,212,69,80,88,8,81,23,36,86,7,\r\n 68,19,133,97,51,216,56,145,88,8,81,...>>\r\n 2> binpp:pprint(Bin).\r\n 0C F2 CF 31 52 45 2D 82 D4 45 50 58 08 51 17 24 .òÏ1RE-‚ÔEPX.Q.$\r\n 56 07 44 13 85 61 33 D8 38 91 58 08 51 17 24 56 V.D.…a3Ø8‘X.Q.$V\r\n 0A 14 20 4E 24 16 09 60 F4 0A 15 11 01 30 13 89 .. N$..`ô....0.‰\r\n 05 81 0F 09 15 C5 61 33 D8 54 91 52 5D 81 17 24 ....Åa3ØT‘R].$\r\n 11 14 60 23 D1 3D 55 80 ..`#Ñ=U€\r\n ok\r\n 3> binpp:format(Bin, bin).\r\n \"00001100 11110010 11001111 00110001 01010010 01000101 00101101 10000010\r\n 11010100 01000101 01010000 01011000 00001000 01010001 00010111 00100100\r\n 01010110 00000111 01000100 00010011 10000101 01100001 00110011 11011000\r\n 00111000 10010001 01011000 00001000 01010001 00010111 00100100 01010110\r\n 00001010 00010100 00100000 01001110 00100100 00010110 00001001 01100000\r\n 11110100 00001010 00010101 00010001 00000001 00110000 00010011 10001001\r\n 00000101 10000001 00001111 00001001 00010101 11000101 01100001 00110011\r\n 11011000 01010100 10010001 01010010 01011101 10000001 00010111 00100100\r\n 00010001 00010100 01100000 00100011 11010001 00111101 01010101 10000000\"\r\n\r\n\r\nAlso, binary byte-to-byte comparsion:\r\n\r\n 4> binpp:cmprint(<<1,2,1024:512,3,4>>, <<1,3,1024:512,5,6>>).\r\n -- 02 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 03 -- -- -- -- -- -- -- -- -- -- -- -- -- --\r\n -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\r\n -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\r\n -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\r\n -- -- 03 04 -- -- 05 06\r\n ok\r\n\r\nPlus a handy little helper:\r\n\r\n 5> binpp:cmprint(<<1,2,255,3,1024:512>>, binpp:from_str(\"01 02 FF CC\")).\r\n -- -- -- 03 00 00 00 00 00 00 00 00 00 00 00 00 -- -- -- CC ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??\r\n 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??\r\n 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??\r\n 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??\r\n 00 00 04 00 ?? ?? ?? ??\r\n ok\r\n\r\n\r\nThat's all folks!\r\n","tagline":"Erlang Binary Pretty Printer","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}
View
4 rebar.config
@@ -1,4 +0,0 @@
-{cover_enabled, true}.
-{cover_print_enabled, true}.
-{eunit_opts, [verbose,
- {report, {eunit_surefire, [{dir, "."}]}}]}.
View
6 src/binpp.app.src
@@ -1,6 +0,0 @@
-{application, binpp, [
- {description, "Erlang Binary Pretty Printer"},
- {vsn, "1.1"},
- {registered, []},
- {applications, [kernel, stdlib]}
-]}.
View
374 src/binpp.erl
@@ -1,374 +0,0 @@
-%%%
-%%% DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-%%% Version 2, December 2004
-%%%
-%%% Copyright (C) 2011 Adam Rutkowski <hq@mtod.org>
-%%%
-%%% Everyone is permitted to copy and distribute verbatim or modified
-%%% copies of this license document, and changing it is allowed as long
-%%% as the name is changed.
-%%%
-%%% DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-%%% TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-%%%
-
-%% @doc Pretty printer for Erlang binaries.
-%%
--module(binpp).
--author('Adam Rutkowski hq@mtod.org').
-
--export([pprint/1, pprint/2, pprint/3]).
--export([compare/2]).
--export([from_str/1]).
--export([convert/1, convert/2]).
-
--opaque opt() :: {return, iolist} | {return, binary} | {printer, function()}.
--opaque opts() :: list(opt()).
-
-%% Printer constants
--define(SPACE, $ ).
--define(SPECIAL, $.).
--define(FILL, $0).
-
-%% Comparison glyphs
--define(MISSING, "??").
--define(EQUAL, "--").
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% API %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%% @doc Pretty print a binary to stdout using <em>io:format/2</em>
-%% Note: <em>io:format/2</em> is a blocking call.
--spec pprint(binary() | bitstring()) -> ok.
-pprint(Bin) ->
- pprint(Bin, []).
-
-%% @doc Print a binary using custom function or return the formatted result.
-%% Valid option is one of:
-%% <ul>
-%% <li>{return, binary}</li>
-%% <li>{return, iolist}</li>
-%% <li>{printer, CustomFunction}</li>
-%% </ul>
-%%
-%% Custom printers should be of arity 1, accepting the prettified result as
-%% an <em>iolist()</em> input. Returned value can be <em>any()</em>.
--spec pprint(binary() | bitstring(), opts()) -> ok | any().
-pprint(Bin, Opts) when is_list(Opts) ->
- {ok, Octets} = convert(Bin, hex),
- Buckets = buckets(16, Octets),
- apply_opts(lists:map(fun print_bucket/1, Buckets), Opts).
-
-%% @doc Pretty print a slice of binary.
--spec pprint(binary() | bitstring(), {non_neg_integer(), non_neg_integer()},
- opts()) -> ok | any().
-pprint(Bin, {Pos, Len}, Opts) when Len =< byte_size(Bin), (Pos+Len) =< byte_size(Bin) ->
- pprint(binary:part(Bin, Pos, Len), Opts);
-pprint(Bin, {Pos, _}, Opts) ->
- pprint(binary:part(Bin, Pos, byte_size(Bin)-Pos), Opts).
-
-%% @doc Pretty print byte-to-byte comparsion of two binaries to stdout.
--spec compare(binary() | bitstring(), binary() | bitstring()) -> ok.
-compare(Bin1, Bin2) when is_binary(Bin1) orelse is_bitstring(Bin1),
- is_binary(Bin2) orelse is_bitstring(Bin2) ->
- {ok, Octets1} = convert(Bin1, hex),
- {ok, Octets2} = convert(Bin2, hex),
- {ok, {D1, D2}} = diff(Octets1, Octets2),
- print_comparison(buckets(16, D1), buckets(16, D2)).
-
-%% @doc Construct binary from hex string.
-%% Hex string octets can be optionally separated with spaces.
-%% Valid hex strings:
-%% <ul>
-%% <li>"AA BB FF 01"</li>
-%% <li>"AABBFF01"</li>
-%% </ul>
--spec from_str(string()) -> binary().
-from_str(Str) when is_list(Str) ->
- Bytes = case lists:member(?SPACE, Str) of
- true ->
- string:tokens(Str, [?SPACE]);
- false when length(Str) rem 2 =:= 0 ->
- buckets(2, Str)
- end,
- list_to_binary([list_to_integer(B, 16) || B <- Bytes]).
-
-%% @doc Convert binary to hex string.
--spec convert(binary() | bitstring()) -> {ok, list()}.
-convert(Bin) when is_binary(Bin) orelse is_bitstring(Bin) ->
- convert(Bin, hex).
-
-%% @doc Convert binary to hex string or binary (base-2) string.
--spec convert(binary() | bitstring(), hex | bin) -> {ok, list()}.
-convert(Bin, hex) when is_binary(Bin) orelse is_bitstring(Bin) ->
- convert(Bin, [], fun byte_to_hexstr/1);
-convert(Bin, bin) when is_binary(Bin) orelse is_bitstring(Bin) ->
- convert(Bin, [], fun byte_to_binstr/1).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Internals %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
--spec apply_opts(iolist(), opts()) -> ok | iolist() | binary().
-apply_opts(IoList, []) ->
- io:format("~s~n", [IoList]);
-apply_opts(IoList, [{return, iolist}]) ->
- IoList;
-apply_opts(IoList, [{return, binary}]) ->
- iolist_to_binary(IoList);
-apply_opts(IoList, [{printer, Fun}]) when is_function(Fun) ->
- Fun(IoList);
-apply_opts(_, _) -> erlang:error(badarg).
-
--spec convert(binary() | bitstring(), list(), function()) -> {ok, string()}.
-convert(<<>>, Acc, _) ->
- {ok, lists:reverse(Acc)};
-convert(Bin, [], FormatFun) when is_bitstring(Bin), not is_binary(Bin) ->
- %% byte align bistring() to make a complementary binary()
- Align = (8 - (bit_size(Bin) rem 8)),
- error_logger:info_msg("Aligned bitstring with ~.10B bit(s).~n", [Align]),
- convert(<<Bin/bitstring, 0:Align>>, [], FormatFun);
-convert(<<Bin:8/integer, Rest/binary>>, SoFar, FormatFun) ->
- convert(Rest, [FormatFun(Bin)|SoFar], FormatFun).
-
-print_bucket(Bucket) ->
- OctetLine = string:join(Bucket, [?SPACE]),
- OctetRepr = lists:map(
- fun(B) ->
- case list_to_integer(B, 16) of
- Code when Code >= ?SPACE -> Code;
- _ -> ?SPECIAL
- end
- end,
- Bucket),
- io_lib:format("~s ~s~n", [string:left(OctetLine, 16*2 + 16, ?SPACE), OctetRepr]).
-
--spec print_comparison(list(), list()) -> ok.
-print_comparison([], []) ->
- ok;
-print_comparison([L|LRest], [R|RRest]) ->
- Zfill = fun(Line) -> string:left(Line, 16*2 + 16, ?SPACE) end,
- DiffL = Zfill(string:join(L, [?SPACE])),
- DiffR = Zfill(string:join(R, [?SPACE])),
- io:format("~s ~s~n", [DiffL, DiffR]),
- print_comparison(LRest, RRest).
-
--spec diff(list(), list()) -> {ok, {list(), list()}}.
-diff(L1, L2) when is_list(L1), is_list(L2) ->
- diff(L1, L2, [], []).
-
--spec diff(list(), list(), list(), list()) -> {ok, {list(), list()}}.
-diff([], [], LD, RD) ->
- {ok, {lists:reverse(LD), lists:reverse(RD)}};
-diff([], [H2|R2], LD, RD) ->
- diff([], R2, [?MISSING|LD], [H2|RD]);
-diff([H1|R1], [], LD, RD) ->
- diff(R1, [], [H1|LD], [?MISSING|RD]);
-diff([H1|R1], [H1|R2], LD, RD) -> %% H1 =:= H2
- diff(R1, R2, [?EQUAL|LD], [?EQUAL|RD]);
-diff([H1|R1], [H2|R2], LD, RD) ->
- diff(R1, R2, [H1|LD], [H2|RD]).
-
--spec byte_to_hexstr(byte()) -> string().
-byte_to_hexstr(B) when B >= 0, B =< 255 ->
- to_hexstr(B, 16, 2).
-
--spec byte_to_binstr(byte()) -> string().
-byte_to_binstr(B) when B >= 0, B =< 255 ->
- to_hexstr(B, 2, 8).
-
--spec to_hexstr(byte(), non_neg_integer(), non_neg_integer()) -> string().
-to_hexstr(B, Base, Len) ->
- string:right(integer_to_list(B, Base), Len, ?FILL).
-
-%% @doc Divide list L into X lists of size N
-%% courtesy of MononcQc
--spec buckets(non_neg_integer(), list()) -> list(list()).
-buckets(N, L) ->
- buckets(1, N, length(L) div N, L, [[]]).
-buckets(_, _, 0, [], [[]|Acc]) ->
- lists:reverse(Acc);
-buckets(_, _, 0, Rest, [[]|Acc]) ->
- lists:reverse([Rest|Acc]);
-buckets(N, N, M, [H|T], [A|Acc]) ->
- buckets(1, N, M-1, T, [[], lists:reverse([H|A]) | Acc]);
-buckets(X, N, M, [H|T], [A|Acc]) ->
- buckets(X+1, N, M, T, [[H|A]|Acc]).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Tests %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
--ifdef(TEST).
--include_lib("eunit/include/eunit.hrl").
-
--define(MAX_BIN_SIZE, 2048).
--define(RUNS, 100).
-
-setup_random() ->
- _ = random:seed(erlang:now()),
- ok.
-
-binpp_random_test_() ->
- {setup, fun setup_random/0, [
- {generator, fun rand_pprint/0},
- {generator, fun rand_pprint_bitstring/0},
- {generator, fun rand_compare/0},
- {generator, fun rand_pprint_opts/0},
- {generator, fun rand_pprint_slice/0},
- {generator, fun rand_from_str/0}
- ]}.
-
-buckets_test_() ->
- F = fun buckets/2,
- Tests = [
- { {1, [1,2,3,4]}, [ [1], [2], [3], [4] ] },
- { {2, [1,2,3,4]}, [ [1,2], [3,4] ] },
- { {3, [1,2,3,4]}, [ [1,2,3], [4] ] },
- { {4, [1,2,3,4]}, [ [1,2,3,4] ] },
- { {5, [1,2,3,4]}, [ [1,2,3,4] ] }
- ],
- [ { <<"Buckets">>, fun() -> ?assertEqual(R, F(I1, I2)) end }
- || { {I1, I2}, R } <- Tests ].
-
-byte_to_binstr_test_() ->
- F = fun byte_to_binstr/1,
- Tests = [
- { 0, "00000000" },
- { 1, "00000001" },
- { 255, "11111111" }
- ],
- [ { iolist_to_binary(["Convert ", integer_to_list(I)]),
- fun() -> ?assertEqual(R, F(I)) end }
- || { I, R } <- Tests ].
-
-byte_to_hexstr_test_() ->
- F = fun byte_to_hexstr/1,
- Tests = [
- { 0, "00" },
- { 1, "01" },
- { 255, "FF" }
- ],
- [ { iolist_to_binary(["Convert ", integer_to_list(I)]),
- fun() -> ?assertEqual(R, F(I)) end }
- || { I, R } <- Tests ].
-
-diff_test_() ->
- F = fun diff/2,
- Tests = [
- { { [], [] }, { [], []} },
- { { [1, 2], [1, 1] }, { [?EQUAL, 2], [?EQUAL, 1]} },
- { { [1], [1, 1] }, { [?EQUAL, ?MISSING], [?EQUAL, 1]} },
- { { [1, 2, 3], [2, 1] }, { [1, 2, 3], [2, 1, ?MISSING]} },
- { { [], [2, 1] }, { [?MISSING, ?MISSING], [2, 1]} }
- ],
- [ { <<"Diff">>, fun() -> ?assertEqual({ok, R}, F(I1, I2)) end }
- || { {I1, I2}, R } <- Tests ].
-
-print_bucket_test_() ->
- F = fun print_bucket/1,
- Tests = [
- { ["00", "FF"],
- ["00 FF ", ?SPACE, [?SPECIAL, 255], "\n"] },
-
- { ["41" || _ <- lists:seq(1, 16) ],
- ["41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 ", ?SPACE, [$A || _ <- lists:seq(1, 16)], "\n"] }
- ],
- [ { iolist_to_binary(["Print ", I]), fun() -> ?assertEqual(R, F(I)) end }
- || { I, R } <- Tests ].
-
-convert_hex_test_() ->
- F = fun convert/1,
- Tests = [
- { <<1,2,3>>, ["01", "02", "03"] },
- { <<256:32>>, ["00", "00", "01", "00"] },
- { <<"AAA">>, ["41", "41", "41"] },
- { <<256:7>>, ["00"] },
- { <<256:9>>, ["80", "00"] }
- ],
- [ { <<"Convert">>, fun() -> ?assertEqual({ok, R}, F(I)) end } || { I, R } <- Tests ].
-
-convert_bin_test_() ->
- F = fun convert/2,
- Tests = [
- { <<1,2,3>>, ["00000001","00000010","00000011"] },
- { <<256:32>>, ["00000000","00000000","00000001", "00000000"] },
- { <<"AAA">>, ["01000001","01000001","01000001"] },
- { <<256:7>>, ["00000000"] },
- { <<256:9>>, ["10000000","00000000"] }
- ],
- [ { <<"Convert">>, fun() -> ?assertEqual({ok, R}, F(I, bin)) end } || { I, R } <- Tests ].
-
-rand_pprint() ->
- F = fun pprint/1,
- Tests = [ { crypto:rand_bytes(random:uniform(?MAX_BIN_SIZE)), ok } || _ <- lists:seq(1, ?RUNS) ],
- [ { <<"Random pprint">>, fun() -> ?assertEqual(R, F(I)) end }
- || { I, R } <- Tests ].
-
-rand_pprint_bitstring() ->
- F = fun pprint/1,
- Tests = [ { << (crypto:rand_bytes(random:uniform(?MAX_BIN_SIZE)))/binary, 0:(random:uniform(7))>>, ok }
- || _ <- lists:seq(1, ?RUNS) ],
- [ { <<"Random pprint (bitstring)">>, fun() -> ?assertEqual(R, F(I)) end }
- || { I, R } <- Tests ].
-
-rand_compare() ->
- F = fun compare/2,
- Rand = fun() -> crypto:rand_bytes(random:uniform(?MAX_BIN_SIZE)) end,
- Tests = [ { { Rand(), Rand() }, ok } || _ <- lists:seq(1, ?RUNS) ],
- [ { <<"Random compare">>, fun() -> ?assertEqual(R, F(I1, I2)) end }
- || { {I1, I2}, R } <- Tests ].
-
-rand_pprint_opts() ->
- F = fun pprint/2,
- CustomPrinter = fun(B) when is_list(B) -> works end,
- OptsMap = [
- %% Option %% Predicate
- { {return, binary}, fun erlang:is_binary/1 },
- { {return, iolist}, fun erlang:is_list/1 },
- { {printer, CustomPrinter}, fun(works) -> true; (_) -> false end },
- { {invalid, option}, fun({'EXIT', {badarg, _}}) -> true; (O) -> O end }
- ],
- Range = length(OptsMap),
- Rand = fun() ->
- Input = crypto:rand_bytes(random:uniform(?MAX_BIN_SIZE)),
- {Opt, Predicate} = lists:nth(random:uniform(Range), OptsMap),
- {Input, Opt, Predicate}
- end,
- Tests = [ Rand() || _ <- lists:seq(1, ?RUNS) ],
- Title = fun(Opt) ->
- iolist_to_binary([ "Random pprint w/ opt: ", io_lib:format("~p", [Opt]) ]) end,
- [ { Title(Opt), fun() -> ?assertEqual(true, Pred( catch( F(I, [Opt]) ) )) end }
- || {I, Opt, Pred} <- Tests ].
-
-rand_pprint_slice() ->
- F = fun pprint/3,
- Rand = fun() ->
- Bytes = crypto:rand_bytes(random:uniform(?MAX_BIN_SIZE)),
- Pos = random:uniform(byte_size(Bytes)),
- Len = random:uniform(byte_size(Bytes)),
- {Bytes, Pos, Len}
- end,
- Tests = [ Rand() || _ <- lists:seq(1, ?RUNS) ],
- Title = fun(Size, Slice) ->
- iolist_to_binary(io_lib:format("Random pprint w/ slice: (~p) ~p", [Size, Slice]))
- end,
- [ { Title(byte_size(Bytes), {Pos, Len}), fun() -> ?assertEqual(ok, F(Bytes, {Pos, Len}, [])) end }
- || { Bytes, Pos, Len } <- Tests ].
-
-rand_from_str() ->
- F = fun from_str/1,
- Rand = fun() ->
- Bytes = crypto:rand_bytes(random:uniform(?MAX_BIN_SIZE)),
- {ok, Converted} = convert(Bytes),
- case random:uniform(2) of
- 1 -> {lists:flatten(Converted), Bytes};
- 2 -> {string:join(Converted, " "), Bytes}
- end
- end,
- Tests = [ Rand() || _ <- lists:seq(1, ?RUNS) ],
- [ { <<"Random from_str">>, fun() -> ?assertEqual(R, F(I)) end }
- || { I, R } <- Tests ].
-
--endif.
View
68 stylesheets/pygment_trac.css
@@ -1,68 +0,0 @@
-.highlight .c { color: #999988; font-style: italic } /* Comment */
-.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
-.highlight .k { font-weight: bold } /* Keyword */
-.highlight .o { font-weight: bold } /* Operator */
-.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
-.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
-.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
-.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
-.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
-.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
-.highlight .ge { font-style: italic } /* Generic.Emph */
-.highlight .gr { color: #aa0000 } /* Generic.Error */
-.highlight .gh { color: #999999 } /* Generic.Heading */
-.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
-.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
-.highlight .go { color: #888888 } /* Generic.Output */
-.highlight .gp { color: #555555 } /* Generic.Prompt */
-.highlight .gs { font-weight: bold } /* Generic.Strong */
-.highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */
-.highlight .gt { color: #aa0000 } /* Generic.Traceback */
-.highlight .kc { font-weight: bold } /* Keyword.Constant */
-.highlight .kd { font-weight: bold } /* Keyword.Declaration */
-.highlight .kn { font-weight: bold } /* Keyword.Namespace */
-.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
-.highlight .kr { font-weight: bold } /* Keyword.Reserved */
-.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
-.highlight .m { color: #009999 } /* Literal.Number */
-.highlight .s { color: #d14 } /* Literal.String */
-.highlight .na { color: #008080 } /* Name.Attribute */
-.highlight .nb { color: #0086B3 } /* Name.Builtin */
-.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
-.highlight .no { color: #008080 } /* Name.Constant */
-.highlight .ni { color: #800080 } /* Name.Entity */
-.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
-.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
-.highlight .nn { color: #555555 } /* Name.Namespace */
-.highlight .nt { color: #CBDFFF } /* Name.Tag */
-.highlight .nv { color: #008080 } /* Name.Variable */
-.highlight .ow { font-weight: bold } /* Operator.Word */
-.highlight .w { color: #bbbbbb } /* Text.Whitespace */
-.highlight .mf { color: #009999 } /* Literal.Number.Float */
-.highlight .mh { color: #009999 } /* Literal.Number.Hex */
-.highlight .mi { color: #009999 } /* Literal.Number.Integer */
-.highlight .mo { color: #009999 } /* Literal.Number.Oct */
-.highlight .sb { color: #d14 } /* Literal.String.Backtick */
-.highlight .sc { color: #d14 } /* Literal.String.Char */
-.highlight .sd { color: #d14 } /* Literal.String.Doc */
-.highlight .s2 { color: #d14 } /* Literal.String.Double */
-.highlight .se { color: #d14 } /* Literal.String.Escape */
-.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
-.highlight .si { color: #d14 } /* Literal.String.Interpol */
-.highlight .sx { color: #d14 } /* Literal.String.Other */
-.highlight .sr { color: #009926 } /* Literal.String.Regex */
-.highlight .s1 { color: #d14 } /* Literal.String.Single */
-.highlight .ss { color: #990073 } /* Literal.String.Symbol */
-.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
-.highlight .vc { color: #008080 } /* Name.Variable.Class */
-.highlight .vg { color: #008080 } /* Name.Variable.Global */
-.highlight .vi { color: #008080 } /* Name.Variable.Instance */
-.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
-
-.type-csharp .highlight .k { color: #0000FF }
-.type-csharp .highlight .kt { color: #0000FF }
-.type-csharp .highlight .nf { color: #000000; font-weight: normal }
-.type-csharp .highlight .nc { color: #2B91AF }
-.type-csharp .highlight .nn { color: #000000 }
-.type-csharp .highlight .s { color: #A31515 }
-.type-csharp .highlight .sc { color: #A31515 }
View
247 stylesheets/stylesheet.css
@@ -1,247 +0,0 @@
-body {
- margin: 0;
- padding: 0;
- background: #151515 url("../images/bkg.png") 0 0;
- color: #eaeaea;
- font: 16px;
- line-height: 1.5;
- font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
-}
-
-/* General & 'Reset' Stuff */
-
-.container {
- width: 90%;
- max-width: 600px;
- margin: 0 auto;
-}
-
-section {
- display: block;
- margin: 0 0 20px 0;
-}
-
-h1, h2, h3, h4, h5, h6 {
- margin: 0 0 20px;
-}
-
-li {
- line-height: 1.4 ;
-}
-
-/* Header, <header>
- header - container
- h1 - project name
- h2 - project description
-*/
-
-header {
- background: rgba(0, 0, 0, 0.1);
- width: 100%;
- border-bottom: 1px dashed #b5e853;
- padding: 20px 0;
- margin: 0 0 40px 0;
-}
-
-header h1 {
- font-size: 30px;
- line-height: 1.5;
- margin: 0 0 0 -40px;
- font-weight: bold;
- font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
- color: #b5e853;
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1),
- 0 0 5px rgba(181, 232, 83, 0.1),
- 0 0 10px rgba(181, 232, 83, 0.1);
- letter-spacing: -1px;
- -webkit-font-smoothing: antialiased;
-}
-
-header h1:before {
- content: "./ ";
- font-size: 24px;
-}
-
-header h2 {
- font-size: 18px;
- font-weight: 300;
- color: #666;
-}
-
-#downloads .btn {
- display: inline-block;
- text-align: center;
- margin: 0;
-}
-
-/* Main Content
-*/
-
-#main_content {
- width: 100%;
- -webkit-font-smoothing: antialiased;
-}
-section img {
- max-width: 100%
-}
-
-h1, h2, h3, h4, h5, h6 {
- font-weight: normal;
- font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
- color: #b5e853;
- letter-spacing: -0.03em;
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1),
- 0 0 5px rgba(181, 232, 83, 0.1),
- 0 0 10px rgba(181, 232, 83, 0.1);
-}
-
-#main_content h1 {
- font-size: 30px;
-}
-
-#main_content h2 {
- font-size: 24px;
-}
-
-#main_content h3 {
- font-size: 18px;
-}
-
-#main_content h4 {
- font-size: 14px;
-}
-
-#main_content h5 {
- font-size: 12px;
- text-transform: uppercase;
- margin: 0 0 5px 0;
-}
-
-#main_content h6 {
- font-size: 12px;
- text-transform: uppercase;
- color: #999;
- margin: 0 0 5px 0;
-}
-
-dt {
- font-style: italic;
- font-weight: bold;
-}
-
-ul li {
- list-style: none;
-}
-
-ul li:before {
- content: ">>";
- font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
- font-size: 13px;
- color: #b5e853;
- margin-left: -37px;
- margin-right: 21px;
- line-height: 16px;
-}
-
-blockquote {
- color: #aaa;
- padding-left: 10px;
- border-left: 1px dotted #666;
-}
-
-pre {
- background: rgba(0, 0, 0, 0.9);
- border: 1px solid rgba(255, 255, 255, 0.15);
- padding: 10px;
- font-size: 14px;
- color: #b5e853;
- border-radius: 2px;
- -moz-border-radius: 2px;
- -webkit-border-radius: 2px;
- text-wrap: normal;
- overflow: auto;
- overflow-y: hidden;
-}
-
-table {
- width: 100%;
- margin: 0 0 20px 0;
-}
-
-th {
- text-align: left;
- border-bottom: 1px dashed #b5e853;
- padding: 5px 10px;
-}
-
-td {
- padding: 5px 10px;
-}
-
-hr {
- height: 0;
- border: 0;
- border-bottom: 1px dashed #b5e853;
- color: #b5e853;
-}
-
-/* Buttons
-*/
-
-.btn {
- display: inline-block;
- background: -webkit-linear-gradient(top, rgba(40, 40, 40, 0.3), rgba(35, 35, 35, 0.3) 50%, rgba(10, 10, 10, 0.3) 50%, rgba(0, 0, 0, 0.3));
- padding: 8px 18px;
- border-radius: 50px;
- border: 2px solid rgba(0, 0, 0, 0.7);
- border-bottom: 2px solid rgba(0, 0, 0, 0.7);
- border-top: 2px solid rgba(0, 0, 0, 1);
- color: rgba(255, 255, 255, 0.8);
- font-family: Helvetica, Arial, sans-serif;
- font-weight: bold;
- font-size: 13px;
- text-decoration: none;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
-}
-
-.btn:hover {
- background: -webkit-linear-gradient(top, rgba(40, 40, 40, 0.6), rgba(35, 35, 35, 0.6) 50%, rgba(10, 10, 10, 0.8) 50%, rgba(0, 0, 0, 0.8));
-}
-
-.btn .icon {
- display: inline-block;
- width: 16px;
- height: 16px;
- margin: 1px 8px 0 0;
- float: left;
-}
-
-.btn-github .icon {
- opacity: 0.6;
- background: url("../images/blacktocat.png") 0 0 no-repeat;
-}
-
-/* Links
- a, a:hover, a:visited
-*/
-
-a {
- color: #63c0f5;
- text-shadow: 0 0 5px rgba(104, 182, 255, 0.5);
-}
-
-/* Clearfix */
-
-.cf:before, .cf:after {
- content:"";
- display:table;
-}
-
-.cf:after {
- clear:both;
-}
-
-.cf {
- zoom:1;
-}

0 comments on commit 353300a

Please sign in to comment.