Permalink
Browse files

fixed merge conflict

  • Loading branch information...
2 parents aaaef69 + 7f0e9ef commit 57dab94f6225b02f6cd0a73daefe483deffa26f0 Dale Harvey committed Feb 4, 2011
View
@@ -1,3 +1,8 @@
-/ebin
-/priv/www
+.eunit
+deps
+*.o
+*.beam
+ebin
+priv/www
!/priv/www/index.html
+erldocs
View
@@ -0,0 +1,13 @@
+.PHONY: deps
+
+all: deps
+ ./rebar compile escriptize
+
+deps:
+ ./rebar get-deps
+
+clean:
+ @./rebar clean
+
+distclean: clean
+ @rm -rf erldocs deps
View
@@ -1,8 +1,35 @@
Erldocs
=======
-this is the code used to generate documentation for erlang projects in the format of [erldocs.com](http://erldocs.com)
+This is the code used to generate documentation for erlang projects in the format of [erldocs.com](http://erldocs.com)
-To build the documentation for your own project, add the paths to your erlang files to priv/sys.conf (its recommended to download and add the erlang otp files as well, they are not included in this source) and run the command
+Dependencies
+============
+
+Erlang R13B04 or greater
+
+Building
+========
+
+ git clone git://github.com/dreverri/erldocs.git
+ cd erldocs
+ make
+
+Usage
+=====
+
+Calling the erldocs script with no arguments will generate documentation for the application in the current working. The documentation will be output to "doc/erldocs".
`./erldocs`
+
+Calling erldocs with one argument will changes the output directory to the one specified in the argument.
+
+`./erldocs docs/alternate_location`
+
+Calling erldocs with multiple arguments changes both the destination of the generated documentation and the source of the documentation.
+
+`./erldocs path/to/erlang/otp/lib/edoc doc/edoc_docs`
+
+Source arguments can use wildcards.
+
+`./erldocs path/to/erlang/otp/lib/* doc/otp_docs`
View
56 erldocs
@@ -1,56 +0,0 @@
-#!/usr/bin/env escript
-%% -*- erlang -*-
-
-%% @doc Called automatically by escript
--spec main(list()) -> ok.
-main(Args) ->
- ok = file:set_cwd(filename:dirname(escript:script_name())),
- ok = filelib:ensure_dir("ebin/"),
- code:add_path("ebin"),
-
- {ok, _} = compile:file("src/erldocs.erl", [{outdir, "ebin"}, verbose]),
-
- Conf = create_conf(Args),
- try erldocs:dispatch(Conf)
- catch Type:Error ->
- log("Error running script:~n~p~n~p~n",
- [erlang:get_stacktrace(), {Type, Error}])
- end.
-
--spec parse_options([string()]) -> [{atom(), _}].
-parse_options(Args) ->
- lists:flatmap(fun (Arg) -> parse_option(Arg) end, Args).
-
--spec parse_option(string()) -> [{atom(), _}].
-parse_option("--sys-conf=" ++ Path) ->
- [{sys_conf, Path}];
-parse_option("--gen-docsrc") ->
- [{gen_docsrc, true}];
-parse_option("copystatic") ->
- [{copystatic, true}];
-parse_option("--name=" ++ Name) ->
- [{name, Name}];
-parse_option(Unknown) ->
- throw({unknown_option, Unknown}).
-
--spec getopt(atom(), [{atom(), _}], _) -> _.
-getopt(Key, Opts, Default) ->
- case lists:keyfind(Key, 1, Opts) of
- false ->
- Default;
- {_, V} ->
- V
- end.
-
--spec create_conf([string()]) -> [{atom(), _}].
-create_conf(Args) ->
- Opts = parse_options(Args),
- Path = getopt(sys_conf, Opts, "priv/sys.conf"),
- {ok, [Config]} = file:consult(Path),
- {erldocs, Conf} = lists:keyfind(erldocs, 1, Config),
- {ok, Root} = file:get_cwd(),
- Opts ++ [{root, Root} | Conf].
-
--spec log(string(), [_]) -> ok.
-log(Str, Args) ->
- io:format(Str, Args).
View
@@ -1,91 +0,0 @@
-# ``The contents of this file are subject to the Erlang Public License,
-# Version 1.1, (the "License"); you may not use this file except in
-# compliance with the License. You should have received a copy of the
-# Erlang Public License along with this software. If not, it can be
-# retrieved via the world wide web at http://www.erlang.org/.
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See
-# the License for the specific language governing rights and limitations
-# under the License.
-#
-# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
-# Portions created by Ericsson are Copyright 1999-2000, Ericsson
-# Utvecklings AB. All Rights Reserved.''
-#
-# $Id$
-#
-
-include $(ERL_TOP)/make/target.mk
-include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-# ----------------------------------------------------
-# Application version
-# ----------------------------------------------------
-include ../vsn.mk
-VSN=$(DOCB_VSN)
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/docbuilder-$(VSN)
-
-# ----------------------------------------------------
-# Common Macros
-# ----------------------------------------------------
-
-DTD_FILES = \
- application.dtd \
- appref.dtd \
- book.dtd \
- bookinsidecover.dtd \
- chapter.dtd \
- cites.dtd \
- common.dtd \
- common.entities.dtd \
- common.header.dtd \
- common.image.dtd \
- common.refs.dtd \
- common.table.dtd \
- comref.dtd \
- cref.dtd \
- erlref.dtd \
- fascicules.dtd \
- fileref.dtd \
- part.dtd \
- report.dtd \
- terms.dtd \
- xhtml-lat1.ent \
- xhtml-special.ent \
- xhtml-symbol.ent \
- xhtml1-frameset.dtd \
- xhtml1-strict.dtd \
- xhtml1-transitional.dtd
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-
-debug opt:
-
-clean:
-
-docs:
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_spec:
- $(INSTALL_DIR) $(RELSYSDIR)/dtd
- $(INSTALL_DATA) $(DTD_FILES) $(RELSYSDIR)/dtd
-
-release_docs_spec:
-
-
-
-
-
-
-
View
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
- ``The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved via the world wide web at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- The Initial Developer of the Original Code is Ericsson AB.
- Portions created by Ericsson are Copyright 1999-2007, Ericsson AB.
- All Rights Reserved.''
-
- $Id$
--->
-
-<!ENTITY % common SYSTEM "common.dtd" >
-%common;
-<!ENTITY % common.header SYSTEM "common.header.dtd" >
-%common.header;
-
-<!ELEMENT application (header,description?,include+) >
-<!ELEMENT description (%block;|quote|br|marker|warning|note)* >
-<!ELEMENT include EMPTY >
-<!ATTLIST include file CDATA #REQUIRED>
View
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
- ``The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved via the world wide web at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- The Initial Developer of the Original Code is Ericsson AB.
- Portions created by Ericsson are Copyright 1999-2007, Ericsson AB.
- All Rights Reserved.''
-
- $Id$
--->
-
-<!ENTITY % common.refs SYSTEM "common.refs.dtd" >
-%common.refs;
-
-<!-- Structure -->
-
-<!ELEMENT appref (header,app,appsummary,description,
- (section|funcs)*,authors?) >
-<!ELEMENT app (#PCDATA) >
-<!ELEMENT appsummary (#PCDATA) >
-
-<!-- `name' is used in common.refs.dtd and must therefore
- be defined in each *ref. dtd -->
-<!ELEMENT name (#PCDATA) >
View
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
- ``The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved via the world wide web at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- The Initial Developer of the Original Code is Ericsson AB.
- Portions created by Ericsson are Copyright 1999-2007, Ericsson AB.
- All Rights Reserved.''
-
- $Id$
--->
-
-<!ENTITY % common SYSTEM "common.dtd" >
-%common;
-<!ENTITY % common.header SYSTEM "common.header.dtd" >
-%common.header;
-<!ENTITY % common.table SYSTEM "common.table.dtd" >
-%common.table;
-
-<!ELEMENT book (header,
- insidecover?,
- pagetext,
- preamble,
- (applications|parts|headline|pagetext)+,
- (listoffigures?,
- listoftables?,
- listofterms?,
- bibliography?,
- index?)) >
-
-<!ELEMENT pagetext (#PCDATA) >
-<!ELEMENT preamble (contents?,preface?) >
-<!ELEMENT preface (title?,(%block;|quote|br|marker|warning|note|table)*) >
-
-<!ELEMENT insidecover (#PCDATA|br|theheader|vfill|vspace|tt|bold|
- include)* >
-<!ELEMENT tt (#PCDATA|br|theheader|vfill)* >
-<!ELEMENT bold (#PCDATA|br|theheader|vfill)* >
-<!ELEMENT vfill EMPTY >
-<!ELEMENT theheader EMPTY >
-<!ATTLIST theheader tag (title|prepared|responsible|docno|
- approved|checked|date|rev|file|
- abbreviation|
- none) "none" >
-
-
-<!ELEMENT applications (include)* >
-<!ELEMENT parts (title?,description?,(include|onepart)*) >
-<!ATTLIST parts lift (yes|no) "no" >
-<!ELEMENT headline (#PCDATA) >
-<!ELEMENT index EMPTY >
-<!ELEMENT listoffigures EMPTY >
-<!ELEMENT listoftables EMPTY >
-<!ELEMENT listofterms EMPTY >
-<!ELEMENT bibliography EMPTY >
-<!ELEMENT contents EMPTY >
-<!ATTLIST contents level (0|1|2|3) "2">
-
-<!ELEMENT onepart (title?,description?,include+) >
-<!ATTLIST onepart lift (yes|no) "no" >
-
-<!ELEMENT description (%block;|quote|br|marker|warning|note)* >
-
-<!ELEMENT include EMPTY >
-<!ATTLIST include file CDATA #REQUIRED>
@@ -1,36 +0,0 @@
-<!--
- ``The contents of this file are subject to the Erlang Public License,
- Version 1.1, (the "License"); you may not use this file except in
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved via the world wide web at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- The Initial Developer of the Original Code is Ericsson AB.
- Portions created by Ericsson are Copyright 1999-2007, Ericsson AB.
- All Rights Reserved.''
-
- $Id$
--->
-<!ENTITY % ISOlat1 SYSTEM "xhtml-lat1.ent" >
-%ISOlat1;
-
-<!ENTITY amp "&#x0026;" >
-<!ENTITY gt "&#x003E;" >
-<!ENTITY lt "&#x003C;" >
-
-<!ELEMENT bookinsidecover (#PCDATA|br|theheader|vfill|tt|bold)* >
-
-<!ELEMENT tt (#PCDATA|br|theheader|vfill)* >
-<!ELEMENT bold (#PCDATA|br|theheader|vfill)* >
-<!ELEMENT vfill EMPTY >
-<!ELEMENT theheader EMPTY >
-<!ATTLIST theheader tag (title|prepared|responsible|docno|
- approved|checked|date|rev|file|
- none) "none" >
-
-<!ELEMENT br EMPTY >
Oops, something went wrong.

0 comments on commit 57dab94

Please sign in to comment.