Permalink
Browse files

Merge remote-tracking branch 'jafingerhut/develop'

Conflicts:
	README.markdown
	project.clj
	src/cd_client/core.clj

Man, this was an ugly merge.
  • Loading branch information...
2 parents b88e80b + e5512e5 commit 66988424d46e0a02a35bc9374b7ffd95aa097777 @dakrone dakrone committed Mar 29, 2012
Showing with 46,247 additions and 108 deletions.
  1. +21 −25 README.markdown
  2. +45,068 −0 clojuredocs-snapshot-2011-12-03.txt
  3. +645 −83 src/cd_client/core.clj
  4. +513 −0 test/partial-snapshot.clj
View
@@ -1,47 +1,43 @@
# cd-client
-A tiny client for the http://clojuredocs.org API
+A client for the http://clojuredocs.org API
## Usage
(use 'cd-client.core)
Examples work with strings for the ns and name, as well as just a
-symbol (no quoting needed). The symbol can be of a special form
-(e.g. let, try, catch), macros (e.g. for, areduce), or functions. Use
-'pr-examples' to pretty-print a list of all examples for a method.
+symbol (no quoting needed -- it will not work if you do). The symbol
+can be of a special form (e.g. let, try, catch), macros (e.g. for,
+areduce), or functions. Use 'cdoc' to pretty-print the normal Clojure
+doc string and the following information from clojuredocs.org:
+examples, see-also list of symbols, and comments.
- (examples "clojure.core" "map")
- (examples map)
- (pr-examples map) ; pretty-prints the examples
- (pr-examples clojure.string/join)
-
-If you like even shorter names for interactive use:
-
- (defmacro ex [sym] `(pr-examples ~sym))
- (ex let)
+ (cdoc "clojure.core" "map")
+ (cdoc map)
+ (cdoc clojure.string/join)
Search for a method using just the name or a namespace and name.
(search "pmap")
(search "clojure.core" "map")
-Comments works just like examples do, with strings, a symbol, and
-pretty-printing.
+Browse to the url for a symbol in your default browser (takes same
+arguments as cdoc):
- (comments "clojure.java.io" "reader")
- (comments read-json)
- (pr-comments read-json) ; pretty-prints the comments
-
-See-also works with either strings for ns/name or a symbol.
+ (browse-to "clojure.core" "map")
+ (browse-to map)
- (see-also "clojure.test" "are")
- (see-also map)
+By default, all of the above will query the clojuredocs web site for
+the results. As an option, you can load a 'snapshot file' of saved
+results, available in the github repository, and no Internet access is
+required (except for browse-to target pages, which still require
+Internet access).
-Browse to the url for a method in your default browser:
+ (set-local-mode! "clojuredocs-snapshot-2011-12-03.txt")
- (browse-to "clojure.core" "map")
- (browse-to map)
+You can switch back to web mode with (set-web-mode!) or show the
+current mode with (show-mode).
## As a dependency:
Oops, something went wrong.

0 comments on commit 6698842

Please sign in to comment.