Skip to content

Commit

Permalink
fix some more esl targets
Browse files Browse the repository at this point in the history
  • Loading branch information
uwiger committed Sep 16, 2014
1 parent 0a7b47f commit d62ec85
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 32 deletions.
2 changes: 1 addition & 1 deletion priv/scripts/check_edown.script
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ case lists:member("doc", Args) of
{error, bad_name} ->
io:fwrite("cannot find edown~n", []),
D = {edown, ".*",
{git, "git://github.com/esl/edown.git", "HEAD"}},
{git, "git://github.com/uwiger/edown.git", "HEAD"}},
Deps = case lists:keyfind(deps, 1, CONFIG) of
false -> [D];
{_, Ds} ->
Expand Down
61 changes: 30 additions & 31 deletions samples/markedoc/SAMPLE3.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SAMPLE 3: markedoc 0.3 README of Feb 2011
'''
**markedoc helps you keep your project's README.md in sync with your overview.edoc.**
It is for use on Linux, FreeBSD and Mac OS X and any system that you can install **[sed][Requirements]** on.
Status: [pre-beta][Status]. Quite stable and usable. See [Status][].
Expand Down Expand Up @@ -75,17 +75,17 @@ to see the result. For something only vaguely related but pretty, try:
$ erl -noshell -run edoc_run application "'myapp'" '"samples"' '[{def,{vsn,""}},{stylesheet, "markedoc.css"}]'
This illustrates the motivation for the markedoc as it is now: to have all code lines in one block in order to be able to address them as one united div from css.
This illustrates the motivation for the markedoc as it is now: to have all code lines in one block in order to be able to address them as one united div from css.
For your own projects you'd copy markedoc.sed in the right place and do something like:
**FreeBSD, Mac OS X**
$ sed -E -f bin/markedoc.sed README.md > doc/README.edoc
$ erl -noshell -run edoc_run application "'myapp'" '"."' '[]'
$ erl -noshell -run edoc_run application "'myapp'" '"."' '[]'
**Linux**
$ sed -r -f bin/markedoc.sed README.md > doc/README.edoc
$ erl -noshell -run edoc_run application "'myapp'" '"."' '[]'
$ erl -noshell -run edoc_run application "'myapp'" '"."' '[]'
And that's it. This could also be part of your Makefile. For the intermediary README.edoc to automatically become part of your generated EDoc html pages, you would use a @docfile tag in your overview.edoc file, like so:
Expand All @@ -95,15 +95,15 @@ By running sed, then edoc, this makes the README.edoc part of the overview page.
Accordingly, the sample stub overview.edoc used for the samples here, looks like this:
@author You
@author You
@title a markedoc sample doc
@version 0.2
@docfile "samples/doc/SAMPLE.edoc"
Status
------
**Pre-Beta**. Quite usable, but still likes to trip up EDoc now and then, which is kind of easy to do.
**Pre-Beta**. Quite usable, but still likes to trip up EDoc now and then, which is kind of easy to do.
There are many ways to create formats that will make the EDoc generator tilt and unfortunately, the errors it throws are sometimes not quite so illuminating to the reader. But why not try an incremental approach and see what works. As you can see from this [source sample][sample], which works alright, it's quite a lot that *does* work and the murky bits can usally be worked out fast. Sometimes an additional line helps, some spaces at the end of a line, general intuitive stuff. Please experiment and push your fixes to me.
Expand All @@ -114,19 +114,19 @@ Notes
**[Erlang][]** is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecom, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance. Erlang comes bundled with the Open Telecom Platform, OTP.
[Erlang]: http://www.erlang.org/doc/
[Erlang]: http://www.erlang.org/doc/
**[EDoc][]** is the Erlang program documentation generator. Inspired by the Javadoc tool for the Java programming language, EDoc is adapted to the conventions of the Erlang world, and has several features not found in Javadoc. Edoc is part of the Erlang/OTP distribution.
[EDoc]: http://www.erlang.org/doc/apps/edoc/chapter.html
**[edown][]** is an EDoc extension for generating Github-flavored Markdown. It uses edoc-style commented Erlang sources to create markdown files from them.
**[edown][]** is an EDoc extension for generating Github-flavored Markdown. It uses edoc-style commented Erlang sources to create markdown files from them.
[edown]: https://github.com/esl/edown
[edown]: https://github.com/uwiger/edown
**[Markdown][]** is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).
[Markdown]: http://daringfireball.net/projects/markdown/
[Markdown]: http://daringfireball.net/projects/markdown/
**[sed][]** ('stream editor') is a Unix utility that parses text files and implements a programming language which can apply textual transformations to such files. It reads input files line by line (sequentially), applying the operation which has been specified via the command line (or a sed script), and then outputs the line. It is available today for most operating systems. There seems to be [one for Windows][winsed], too.
Expand All @@ -148,18 +148,18 @@ To test markedoc, see '[Test][]', above. Or use
sed -E -f bin/markedoc.sed samples/SAMPLE1.md > samples/doc/SAMPLE.edoc
erl -noshell -run edoc_run application "'myapp'" '"samples"' '[{def,{vsn,""}},{stylesheet, "markedoc.css"}]'
mv samples/doc/overview-summary.html samples/your-test-results/sample1.html
mv samples/doc/SAMPLE.edoc samples/your-test-results/SAMPLE1.edoc
mv samples/doc/SAMPLE.edoc samples/your-test-results/SAMPLE1.edoc
sed -E -f bin/markedoc.sed samples/SAMPLE2.md > samples/doc/SAMPLE.edoc
erl -noshell -run edoc_run application "'myapp'" '"samples"' '[]'
mv samples/doc/overview-summary.html samples/your-test-results/sample2.html
mv samples/doc/SAMPLE.edoc samples/your-test-results/SAMPLE2.edoc
sed -E -f bin/markedoc.sed samples/SAMPLE3.md > samples/doc/SAMPLE.edoc
erl -noshell -run edoc_run application "'myapp'" '"samples"' '[{def,{vsn,""}},{stylesheet, "markedoc.css"}]'
mv samples/doc/overview-summary.html samples/your-test-results/sample3.html
mv samples/doc/SAMPLE.edoc samples/your-test-results/SAMPLE3.edoc
mv samples/doc/SAMPLE.edoc samples/your-test-results/SAMPLE3.edoc
Then check samples/your-test-results/sample1.html - sample3.html and compare with samples/what-you-should-see/sample1.html, sample2.html and samples/what-you-could-see/sample3.html.
To create the reference samples:
Expand All @@ -174,37 +174,37 @@ or do the following to create six samples and save the results into samples/what
erl -noshell -run edoc_run application "'myapp'" '"samples"' '[]'
mv samples/doc/overview-summary.html samples/what-you-could-see/sample1.html
mv samples/doc/SAMPLE.edoc samples/what-you-should-see/SAMPLE1.edoc
sed -E -f bin/markedoc.sed samples/SAMPLE2.md > samples/doc/SAMPLE.edoc
erl -noshell -run edoc_run application "'myapp'" '"samples"' '[]'
mv samples/doc/overview-summary.html samples/what-you-could-see/sample2.html
mv samples/doc/SAMPLE.edoc samples/what-you-should-see/SAMPLE2.edoc
sed -E -f bin/markedoc.sed samples/SAMPLE3.md > samples/doc/SAMPLE.edoc
erl -noshell -run edoc_run application "'myapp'" '"samples"' '[]'
mv samples/doc/overview-summary.html samples/what-you-could-see/sample3.html
mv samples/doc/SAMPLE.edoc samples/what-you-should-see/SAMPLE3.edoc
sed -E -f bin/markedoc.sed samples/SAMPLE1.md > samples/doc/SAMPLE.edoc
erl -noshell -run edoc_run application "'myapp'" '"samples"' '[{def,{vsn,""}},{stylesheet, "markedoc.css"}]'
mv samples/doc/overview-summary.html samples/what-you-could-see/sample1.html
mv samples/doc/SAMPLE.edoc samples/what-you-could-see/SAMPLE1.edoc
sed -E -f bin/markedoc.sed samples/SAMPLE2.md > samples/doc/SAMPLE.edoc
erl -noshell -run edoc_run application "'myapp'" '"samples"' '[{def,{vsn,""}},{stylesheet, "markedoc.css"}]'
mv samples/doc/overview-summary.html samples/what-you-could-see/sample2.html
mv samples/doc/SAMPLE.edoc samples/what-you-could-see/SAMPLE2.edoc
sed -E -f bin/markedoc.sed samples/SAMPLE3.md > samples/doc/SAMPLE.edoc
erl -noshell -run edoc_run application "'myapp'" '"samples"' '[{def,{vsn,""}},{stylesheet, "markedoc.css"}]'
mv samples/doc/overview-summary.html samples/what-you-could-see/sample3.html
mv samples/doc/SAMPLE.edoc samples/what-you-could-see/SAMPLE3.edoc
mv samples/doc/SAMPLE.edoc samples/what-you-could-see/SAMPLE3.edoc
To test this very README.md, use markdown.lua, credit Niklas Frykholm, <[email protected]>:
lua etc/markdown.lua README.md
### HTML Special Signs
### HTML Special Signs
http://www.mountaindragon.com/html/iso.htm
Expand All @@ -218,31 +218,30 @@ H. Diedrich <[email protected]>
History
-------
02/03/11 - 0.3 - **rough edges polished:** Linux, FreeBSD, Mac OS X
* added doc for Linux use
* added support for multi-line '[..]: ... "..."' references
* added footnote signs and sepcial chars:
* dagger, double dagger: (+), (++), stars: (*), (**), (***)
* superscript 1, 2, 3: (*1), (*2), (*3), copyright (C), (R), (TM),
* dagger, double dagger: (+), (++), stars: (*), (**), (***)
* superscript 1, 2, 3: (*1), (*2), (*3), copyright (C), (R), (TM),
* guillemots <<, >> and middle dot ::
* added test batches etc/test-bsd.sh and etc/test-linux.sh
* added css sample in samples/what-you-could-see/
* added css sample in samples/what-you-could-see/
* added classes for `<li>' list item tags for '[..]:...'-references
* fixed italic and bold merker interference bullet points
* eliminated [..]: part of '[..]:...'-references, flipping "..." to lead
* dev: sample creation batch make_samples.sh added
02/02/11 - 0.2 - **basics complete:** FreeBSD / Mac OS X
* added support for === and --- headline format
* fixed cutting off of last lines
* fixed cutting off of last lines
* fixed page-local anchor jumps
* fixed space in javascript links
* eliminated end-space requirement at end of '[..]:...'-style references.
* eliminated need for echoing '@doc' first into edoc output file
* added javascript title tag setting for '[..]:...'-style references.
01/31/11 - 0.1 - **first release:** FreeBSD / Mac OS X

0 comments on commit d62ec85

Please sign in to comment.