switch from pycco and md to docco and rst
authorRalf Jung <post@ralfj.de>
Mon, 8 Jun 2015 19:43:02 +0000 (21:43 +0200)
committerRalf Jung <post@ralfj.de>
Mon, 8 Jun 2015 19:43:02 +0000 (21:43 +0200)
.gitignore
README.md [deleted file]
README.rst [new file with mode: 0644]
push-docs [deleted file]
pycco-rs [deleted file]
src/main.rs

index 7bac8aa4df1ea4f735bde9757710f407c216670c..bdde55abf0d546d700779e8b311646416018720e 100644 (file)
@@ -1,2 +1,3 @@
 target
 docs
 target
 docs
+sync-docs
diff --git a/README.md b/README.md
deleted file mode 100644 (file)
index 406acad..0000000
--- a/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-Rust-101
-========
-
-This is Rust-101, a tutorial for the [Rust language](http://www.rust-lang.org/).
-You can either read through the sources in `src/`, or generate the HTML
-in `docs/` using `./pycco-rs src/*.rs`, or go directly to
-[the rendered output](https://ralfjung.github.io/rust-101/main.html).
diff --git a/README.rst b/README.rst
new file mode 100644 (file)
index 0000000..ae56d3f
--- /dev/null
@@ -0,0 +1,10 @@
+Rust-101
+========
+
+This is Rust-101, a tutorial for the `Rust language`_. You can either read 
+through the sources in ``src/``, or generate the HTML in ``docs/`` using ``docco 
+src/*.rs`` (this step needs Docco_), or go directly to `the rendered output`_.
+
+.. _Rust language: http://www.rust-lang.org/
+.. _Docco: https://jashkenas.github.io/docco/
+.. _the rendered output: https://ralfjung.github.io/rust-101/main.html
diff --git a/push-docs b/push-docs
deleted file mode 100755 (executable)
index 8f86eed..0000000
--- a/push-docs
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-set -e
-
-cd "$(dirname "$0")"
-./pycco-rs src/*.rs
-cd docs
-git add .
-git commit -m "semi-auto-update of the documentation"
-git push
diff --git a/pycco-rs b/pycco-rs
deleted file mode 100755 (executable)
index e6199d9..0000000
--- a/pycco-rs
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/python
-# A little wrapper around pycco, to add Rust support.
-import pycco
-from pygments import lexers, formatters
-import re
-pycco.main.languages[".rs"] = { "name": "rust", "symbol": "//"}
-
-# need to re-build this stuff...
-for ext, l in pycco.main.languages.items():
-    # Does the line begin with a comment?
-    l["comment_matcher"] = re.compile(r"^\s*" + l["symbol"] + "\s?")
-    # The dividing token we feed into Pygments, to delimit the boundaries between
-    # sections.
-    l["divider_text"] = "\n" + l["symbol"] + "DIVIDER\n"
-    # The mirror of `divider_text` that we expect Pygments to return. We can split
-    # on this to recover the original sections.
-    l["divider_html"] = re.compile(r'\n*<span class="c[1]?">' + l["symbol"] + 'DIVIDER</span>\n*')
-    # Get the Pygments Lexer for this language.
-    l["lexer"] = lexers.get_lexer_by_name(l["name"])
-
-pycco.main.main()
index c2d94867b6f005b8de877a299a97807ca6787a57..51de479ea8c53fe4fae1514179edf8fea7a22bb3 100644 (file)
@@ -51,3 +51,5 @@ fn main() {
 // * [The Rust Book](https://doc.rust-lang.org/stable/book/)
 // * [Rust by Example](http://rustbyexample.com/)
 // * The [Rust Subreddit](https://www.reddit.com/r/rust/)
 // * [The Rust Book](https://doc.rust-lang.org/stable/book/)
 // * [Rust by Example](http://rustbyexample.com/)
 // * The [Rust Subreddit](https://www.reddit.com/r/rust/)
+
+// (This website has been generated with [Docco](https://jashkenas.github.io/docco/))