Permalink
Browse files

Merge branch 'master' of ssh://bitbucket.org/joearms/elib1

  • Loading branch information...
2 parents a4e794d + c59676f commit c1083d818559845ad4908e9ae1428ede0201378d @joearms committed Mar 1, 2012
Showing with 43,165 additions and 0 deletions.
  1. +20 −0 MIT-LICENSE
  2. +19 −0 Makefile
  3. +27 −0 Readme
  4. +67 −0 announce
  5. +5 −0 bin/efind_similar_files
  6. +3 −0 bin/eindex
  7. +14 −0 bin/openurl
  8. +68 −0 bin/term.sh
  9. +41 −0 bin/term_osx.sh
  10. +32 −0 doc/Makefile
  11. +46 −0 doc/about.ehtml
  12. +120 −0 doc/bin.ehtml
  13. +220 −0 doc/edit.html
  14. +37 −0 doc/glossary.ehtml
  15. +36 −0 doc/index.ehtml
  16. +14 −0 doc/trawl.ehtml
  17. +53 −0 doc/webserver.ehtml
  18. BIN include/354984si.ngl.gz
  19. +11 −0 include/dtd/catalog.xml
  20. +68 −0 include/dtd/readdme.html
  21. +196 −0 include/dtd/xhtml-lat1.ent
  22. +80 −0 include/dtd/xhtml-special.ent
  23. +237 −0 include/dtd/xhtml-symbol.ent
  24. +1,201 −0 include/dtd/xhtml1-transitional.dtd
  25. +6 −0 include/dtd/xml_check
  26. +54 −0 include/elib1.css
  27. BIN include/images/dir_icon.jpg
  28. BIN include/images/dir_icon_thumb.jpg
  29. BIN include/images/github.png
  30. BIN include/images/joe.jpg
  31. BIN include/images/joe_thumb.jpg
  32. BIN include/images/pdf_icon.jpg
  33. BIN include/images/pdf_icon_thumb.jpg
  34. BIN include/images/ring.gif
  35. BIN include/images/ringtxt.jpg
  36. +19 −0 include/jquery-1.3.2.min.js
  37. +28 −0 include/jquery-slides.js
  38. +653 −0 include/jquery.form.js
  39. +612 −0 include/jquery.simplemodal-1.3.3.js
  40. +75 −0 include/plain.css
  41. +35 −0 include/slides.css
  42. +2 −0 lib/doc/edoc-info
  43. +30 −0 lib/doc/elib1_best.html
  44. +54 −0 lib/doc/elib1_blob_store.html
  45. +19 −0 lib/doc/elib1_chunks.html
  46. +19 −0 lib/doc/elib1_content_edit.html
  47. +54 −0 lib/doc/elib1_diff.html
  48. +48 −0 lib/doc/elib1_doc.html
  49. +66 −0 lib/doc/elib1_docmaker.html
  50. +19 −0 lib/doc/elib1_ensure_copyrighted.html
  51. +66 −0 lib/doc/elib1_expand.html
  52. +53 −0 lib/doc/elib1_fast_read.html
  53. +48 −0 lib/doc/elib1_fast_write.html
  54. +36 −0 lib/doc/elib1_file_finder.html
  55. +60 −0 lib/doc/elib1_find.html
  56. +78 −0 lib/doc/elib1_gamma.html
  57. +19 −0 lib/doc/elib1_geom.html
  58. +48 −0 lib/doc/elib1_guid_store.html
  59. +54 −0 lib/doc/elib1_http_driver.html
  60. +161 −0 lib/doc/elib1_indexer.html
  61. +48 −0 lib/doc/elib1_indexer_plugin_erl.html
  62. +19 −0 lib/doc/elib1_indexer_results.html
  63. +933 −0 lib/doc/elib1_misc.html
  64. +84 −0 lib/doc/elib1_ml9.html
  65. +36 −0 lib/doc/elib1_ml9_2_html.html
  66. +78 −0 lib/doc/elib1_mysql.html
  67. +108 −0 lib/doc/elib1_new_webkit.html
  68. +42 −0 lib/doc/elib1_porter.html
  69. +96 −0 lib/doc/elib1_rfc4627.html
  70. +19 −0 lib/doc/elib1_screen.html
  71. +19 −0 lib/doc/elib1_search.html
  72. +42 −0 lib/doc/elib1_seq_web_server1.html
  73. +36 −0 lib/doc/elib1_sha1.html
  74. +36 −0 lib/doc/elib1_similar.html
  75. +30 −0 lib/doc/elib1_simple_kv_db.html
  76. +90 −0 lib/doc/elib1_store.html
  77. +60 −0 lib/doc/elib1_tagger.html
  78. +19 −0 lib/doc/elib1_telnet.html
  79. +131 −0 lib/doc/elib1_webkit.html
  80. +19 −0 lib/doc/elib1_webquery.html
  81. +78 −0 lib/doc/elib1_xml.html
  82. BIN lib/doc/erlang.png
  83. +17 −0 lib/doc/index.html
  84. +12 −0 lib/doc/modules-frame.html
  85. +15 −0 lib/doc/overview-summary.html
  86. +11 −0 lib/doc/packages-frame.html
  87. +36 −0 lib/doc/password.html
  88. +55 −0 lib/doc/stylesheet.css
  89. +19 −0 lib/doc/tryxform.html
  90. +1 −0 lib/ebin/README
  91. +77 −0 lib/src/Makefile
  92. +44 −0 lib/src/elib1_best.erl
  93. +43 −0 lib/src/elib1_blob_store.erl
  94. +356 −0 lib/src/elib1_chunks.erl
  95. +111 −0 lib/src/elib1_content_edit.erl
  96. +110 −0 lib/src/elib1_diff.erl
  97. +60 −0 lib/src/elib1_doc.erl
  98. +452 −0 lib/src/elib1_docmaker.erl
  99. +31 −0 lib/src/elib1_ensure_copyrighted.erl
  100. +172 −0 lib/src/elib1_expand.erl
  101. +123 −0 lib/src/elib1_fast_read.erl
  102. +78 −0 lib/src/elib1_fast_write.erl
  103. +142 −0 lib/src/elib1_file_finder.erl
  104. +148 −0 lib/src/elib1_find.erl
  105. +251 −0 lib/src/elib1_gamma.erl
  106. +30 −0 lib/src/elib1_geom.erl
  107. +143 −0 lib/src/elib1_guid_store.erl
  108. +258 −0 lib/src/elib1_http_driver.erl
  109. +643 −0 lib/src/elib1_indexer.erl
  110. +117 −0 lib/src/elib1_indexer_plugin_erl.erl
  111. +42 −0 lib/src/elib1_indexer_results.erl
  112. +2,315 −0 lib/src/elib1_misc.erl
  113. +370 −0 lib/src/elib1_ml9.erl
  114. +103 −0 lib/src/elib1_ml9_2_html.erl
  115. +38 −0 lib/src/elib1_ml9_parse_header.yrl
  116. +585 −0 lib/src/elib1_mysql.erl
  117. +549 −0 lib/src/elib1_new_webkit.erl
  118. +397 −0 lib/src/elib1_parse_dtd.yrl
  119. +378 −0 lib/src/elib1_porter.erl
  120. +429 −0 lib/src/elib1_rfc4627.erl
  121. +185 −0 lib/src/elib1_screen.erl
  122. +26 −0 lib/src/elib1_search.erl
  123. +207 −0 lib/src/elib1_seq_web_server1.erl
  124. +103 −0 lib/src/elib1_sha1.erl
  125. +203 −0 lib/src/elib1_similar.erl
  126. +67 −0 lib/src/elib1_simple_kv_db.erl
  127. +432 −0 lib/src/elib1_store.erl
  128. +643 −0 lib/src/elib1_tagger.erl
  129. +130 −0 lib/src/elib1_telnet.erl
  130. +516 −0 lib/src/elib1_webkit.erl
  131. +25 −0 lib/src/elib1_webquery.erl
  132. +1,046 −0 lib/src/elib1_xml.erl
  133. +5 −0 lib/src/mkdoc
  134. +12 −0 lib/src/password.erl
  135. +33 −0 lib/src/slides.ehtml
  136. +50 −0 lib/src/tryxform.erl
  137. +558 −0 lib/tmp/elib1_ml9_parse_header.erl
  138. +1,403 −0 lib/tmp/elib1_parse_dtd.erl
  139. +1 −0 root
  140. +137 −0 src/elib1_spy.erl~
  141. +7 −0 supported/drivers/README
  142. +13 −0 supported/drivers/c_linked_in_driver/Makefile
  143. +88 −0 supported/drivers/c_linked_in_driver/complex.erl
  144. +68 −0 supported/drivers/c_linked_in_driver/port_driver.c
  145. +16 −0 supported/drivers/c_port_driver/Makefile
  146. +83 −0 supported/drivers/c_port_driver/example1.erl
  147. +83 −0 supported/drivers/c_port_driver/port_driver.c
  148. +14 −0 supported/drivers/cpp_linked_in_driver/Makefile
  149. +88 −0 supported/drivers/cpp_linked_in_driver/complex.erl
  150. +76 −0 supported/drivers/cpp_linked_in_driver/port_driver.cpp
  151. +11 −0 supported/drivers/doc.ehtml
  152. +19 −0 supported/indexer/Makefile
  153. +59 −0 supported/indexer/README
  154. +344 −0 supported/indexer/doc.ehtml
  155. +4 −0 supported/indexer/medium.in
  156. +313 −0 supported/indexer/slides.ehtml
  157. +35 −0 supported/indexer/web_query.ehtml
  158. +40 −0 supported/irc/Makefile
  159. +6 −0 supported/irc/README
  160. +141 −0 supported/irc/chat_erl.tcl
  161. +47 −0 supported/irc/chat_erl_test.tcl
  162. +139 −0 supported/irc/chat_tcl.tcl
  163. +255 −0 supported/irc/chat_widget.erl
  164. +34 −0 supported/irc/doc.ehtml
  165. +137 −0 supported/irc/elib1_spy.erl
  166. +505 −0 supported/irc/elib1_wish.erl
  167. +102 −0 supported/irc/elib1_wish.tcl
  168. +165 −0 supported/irc/irc.erl
  169. +104 −0 supported/irc/irc_expt.erl
  170. +147 −0 supported/irc/irc_server.bad
  171. +147 −0 supported/irc/irc_server.erl.test
  172. +78 −0 supported/irc/irc_text_client.erl
  173. +292 −0 supported/irc/ircd.erl
  174. BIN supported/irc/redball.gif
  175. +3,531 −0 supported/irc/rfc2812.txt
  176. +184 −0 supported/irc/session.txt
  177. +24 −0 supported/irc/test1.tcl
  178. BIN supported/irc/whiteball.gif
  179. +90 −0 supported/irc/widget_lib.erl
  180. +28 −0 supported/midi_driver/Makefile
  181. +9 −0 supported/midi_driver/doc.ehtml
  182. +185 −0 supported/midi_driver/endpoint_name.c
  183. +39 −0 supported/midi_driver/list_devices.c
  184. +112 −0 supported/midi_driver/midi_driver.erl
  185. +143 −0 supported/midi_driver/midi_in_driver.c
  186. +59 −0 supported/midi_driver/midi_in_driver.erl
  187. +122 −0 supported/midi_driver/midi_out_driver.c
  188. +68 −0 supported/midi_driver/midi_out_driver.erl
  189. +26 −0 supported/tagger/Makefile
  190. +17 −0 supported/tagger/Todo
  191. +19 −0 supported/tagger/doc.ehtml
  192. +10 −0 supported/tagger/html/erl.css
  193. +27 −0 supported/tagger/make_html.erl
  194. +1 −0 supported/template/Readme
  195. +17 −0 supported/template/Todo
  196. +9 −0 supported/template/doc.ehtml
  197. +1 −0 supported/template/doc.html
  198. +207 −0 supported/versions/doc.ehtml
  199. +91 −0 supported/versions/elib1_lin.erl
  200. +143 −0 supported/versions/elib1_publish.erl
  201. +70 −0 supported/versions/elib1_ran.erl
  202. +238 −0 supported/versions/elib1_rsa.erl
  203. BIN supported/versions/joe.pri
  204. BIN supported/versions/joe.pub
  205. +17 −0 supported/versions/nmap.erl
  206. +14 −0 supported/versions/nmap.erl.bak
  207. +93 −0 supported/versions/versions.chap
  208. +219 −0 supported/versions/versions.html
  209. +1 −0 supported/website/.#test.html
  210. +1 −0 supported/website/.#test1.html
  211. +1 −0 supported/website/.#test4.html
  212. +24 −0 supported/website/Makefile
  213. +2 −0 supported/website/browse.ehtml
  214. +135 −0 supported/website/browser.html
  215. +49 −0 supported/website/captions.html
  216. BIN supported/website/dave.jpg
  217. +55 −0 supported/website/doc.ehtml
  218. +98 −0 supported/website/editor.html
  219. +127 −0 supported/website/file_lister.erl
  220. +162 −0 supported/website/ibrowser.html
  221. +178 −0 supported/website/index.ehtml
  222. BIN supported/website/joe.jpg
  223. BIN supported/website/johnny.jpg
  224. +197 −0 supported/website/my_simple_server.erl
  225. +1 −0 supported/website/nav.html
  226. +152 −0 supported/website/new.html
  227. BIN supported/website/pdf_icon.jpg
  228. +40 −0 supported/website/simple.css
  229. +19 −0 supported/website/simple.js
  230. +98 −0 supported/website/simple_web_server.erl
  231. +115 −0 supported/website/slides.ehtml
  232. +77 −0 supported/website/test.html
  233. +110 −0 supported/website/test1.html
  234. +158 −0 supported/website/test4.html
  235. +88 −0 supported/website/test5.html
  236. +49 −0 supported/website/test6.html
  237. +15 −0 supported/website/todo.ehtml
  238. +42 −0 supported/website/web_server_one.erl
  239. +42 −0 supported/website/web_server_two.erl
  240. +29 −0 unsupported/epeg/Makefile
  241. +15 −0 unsupported/epeg/Readme
  242. +14 −0 unsupported/epeg/bug.peg
  243. +26 −0 unsupported/epeg/doc.ehtml
  244. +725 −0 unsupported/epeg/epeg.erl
  245. +290 −0 unsupported/epeg/epeg.peg
  246. +2 −0 unsupported/epeg/epeg2erl
  247. +337 −0 unsupported/epeg/epeg_bootstrap.erl
  248. +170 −0 unsupported/epeg/epeg_compiler.erl
  249. +152 −0 unsupported/epeg/epeg_pc.erl
  250. +444 −0 unsupported/epeg/epeg_tests.erl
  251. +167 −0 unsupported/epeg/erlterm.peg
  252. +22 −0 unsupported/epeg/peglib.peg
  253. +31 −0 unsupported/epeg/pegtest.peg
  254. +50 −0 unsupported/epeg/string_metrics.erl
  255. +89 −0 unsupported/epeg/test.erl
  256. +576 −0 unsupported/epeg/testall.peg
  257. +30 −0 unsupported/folding/doc.ehtml
  258. +158 −0 unsupported/folding/dragger.js
  259. +497 −0 unsupported/folding/experiment.html
  260. +297 −0 unsupported/folding/f1.html
  261. +329 −0 unsupported/folding/f2.html
  262. +338 −0 unsupported/folding/f3.html
  263. +234 −0 unsupported/folding/folder.js
  264. +66 −0 unsupported/folding/folding_editor.html
  265. +20 −0 unsupported/folding/instructions.js
  266. +497 −0 unsupported/folding/new.html
  267. +219 −0 unsupported/folding/render.js
  268. +497 −0 unsupported/folding/structure_editor.html
  269. +497 −0 unsupported/folding/structure_editor1.html
  270. +354 −0 unsupported/folding/test_js6.html
  271. +87 −0 unsupported/jpeg/decode.erl
  272. +10 −0 unsupported/jpeg/doc.ehtml
  273. BIN unsupported/jpeg/itu-t81.pdf
  274. BIN unsupported/jpeg/jfif3.pdf
  275. +77 −0 unsupported/jpeg/jpeg_fugi.erl
  276. +61 −0 unsupported/work/circle.html
  277. +31 −0 unsupported/work/circle.svg
  278. +142 −0 unsupported/work/fft.erl
  279. +34 −0 unsupported/xml/chap.dtd
  280. +11 −0 unsupported/xml/doc.ehtml
  281. +250 −0 unsupported/xml/elib1_xml_validate.erl
  282. +1 −0 unsupported/xml/entry.dtd
  283. +23 −0 unsupported/xml/log.dtd
  284. +12 −0 unsupported/xml/my_catalog.xml
  285. +4 −0 unsupported/xml/story.dtd
  286. +13 −0 unsupported/xml/story.xml
  287. +34 −0 unsupported/xml/test.dtd
  288. +120 −0 unsupported/xml/test1.dtd
  289. +82 −0 unsupported/xml/validate.ehtml
  290. +237 −0 unsupported/xml/xhtml-lat1.ent
  291. +121 −0 unsupported/xml/xhtml-special.ent
  292. +283 −0 unsupported/xml/xhtml-symbol.ent
  293. +1,201 −0 unsupported/xml/xhtml1-transitional.dtd
  294. +33 −0 wanted/doc.ehtml
  295. +14 −0 wanted/notes/registry.ehtml
  296. +6 −0 wanted/src/elib1_bloom.erl
View
@@ -0,0 +1,20 @@
+Copyright (c) 2006-2009 Joe Armstrong
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
View
@@ -0,0 +1,19 @@
+## Make
+
+all:
+ cd lib/src; make
+ cd supported/indexer; make
+ cd supported/tagger; make
+ cd supported/irc; make beam
+ cd supported/website; make
+ (sleep 1 && bin/openurl http://localhost:2246/supported/website/index.ehtml) & \
+ erl -pa ./supported/irc -pa ./supported/website -s simple_web_server start
+
+clean:
+ cd lib/src; make clean
+ cd supported/indexer; make clean
+ cd supported/tagger; make clean
+ cd supported/irc; make clean
+ cd supported/website; make clean
+
+
View
27 Readme
@@ -0,0 +1,27 @@
+
+ Elib1
+
+ An Erlang library and collection of applications
+
+You will also have to do the following:
+
+ 1) add a path to your ${HOME}/.erlang
+ code:add_patha(".../elib1-3/lib/ebin").
+
+ 2) add path to your .bash_profile (on a mac)
+ export PATH=/Users/joe/code/elib2-1/bin:$PATH
+
+ 3) make eindex and executable
+ chmod u+x elib1-3/bin/einidex
+ chnod u+x elib1-3/bin/elib2_find_similar_files
+
+Then make to compile the library and view
+the documentation.
+
+This should start a web server on port
+
+If it doesn't point your browser at:
+
+ http://localhost:2246/supported/website/index.ehtml
+
+Note - I have only tested this with firefox
View
@@ -0,0 +1,67 @@
+Announcing elib1
+
+Elib1 was released today.
+
+Elib1 is a library of Erlang modules and set of applications which use the modules.
+
+The Elib1 project now moves into phase 2
+
+The phases of the project are:
+
+ Phase 1: Define and implement a basic structure
+ and a small number of applications
+ Phase 2: Make project open source
+ Phase 3: Write books
+
+Each phase will take about 2-3 years.
+
+The first attempt at a library contains modules for the following:
+
+ xml parsing
+ fast tuple I/O (to disk)
+ full-text indexing
+ http parsing
+ telnet server
+ json parsing
+ porter stemming
+ mysql native interface
+ sha1
+ similar file locator
+ screen manipulation
+ miscellaneous missing functions (which should be in the standard libraries)
+ accurate tagging of Erlang so it can be turned into browsable HTML
+ (and more ...)
+
+The applications are divided it two areas. Supported and unsupported
+
+In supported:
+
+ indexer - a full text indexing engine (this is the of near production quality)
+ irc - and irc kit (includes a TCL wish interface) (somewhat incomplete)
+ tagger - an application to turn erlang into browsable HTML
+ drivers - example linked in and port drivers (currently broken)
+ midi_drivers - mac os X only
+ website - a webserver (used internally)
+ versions - a way of munging module names to make them secure
+
+In unsupported:
+
+ epeg - a peg grammar and parser combinators
+ folding - Javascript folding editor/organiser (needs some work, not erlang :-)
+ jpeg - image transformation in Erlang
+ xml - some xml stuff
+
+I have attempted to use "best practise" in making the library. Using
+the dialyzer, eunit and edoc.
+
+This code is far from perfect or polished - but the basic way things fit together
+is defined.
+
+Rather than have 500 small libraries each with a few users and a few routines I'd
+like to see one library with a much large number of tightly integrated routines.
+
+The code is available at:
+
+http://github.com/joearms/elib1
+
+
View
@@ -0,0 +1,5 @@
+#!/bin/sh
+## Usage efsim <Name>
+
+erl -noshell -s elib1_similar batch_find_similar $1
+
View
@@ -0,0 +1,3 @@
+#!/usr/bin/env escript
+main(Args) ->
+ elib1_indexer:do(Args).
View
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# an OS independent way to open a URL in a browser
+
+os=`uname`
+
+case $os in
+ Linux)
+ firefox $1;;
+ Darwin)
+ open -a firefox $1;;
+ *)
+ echo unknown OS $os;;
+esac
View
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# Open a new Mac OS X terminal window or tab in the current or another
+# directory and optionally run a command in the new window or tab.
+#
+# - Without any arguments, the new terminal window opens in
+# the current directory, i.e. the executed command is "cd $PWD".
+# - If the first argument is a directory, the new terminal will "cd" into
+# that directory before executing the remaining arguments as command.
+# - The optional "-t" flag executes the command in a new tab
+# instead of a new window.
+# - The optional "-x" flag closes the new window or tab
+# after the executed command finishes.
+# - The optional "-p" flag takes an argument of the form x,y (e.g. 40,50) and
+# positions the terminal window to the indicated location on the screen
+# - The optional "-s" flag takes an argument of the form w,h (e.g. 800,400) and
+# resizes the terminal window to the indicated width and height in pixels.
+#
+# Written by Marc Liyanage <http://www.entropy.ch>
+#
+# Version 2.1
+#
+
+set -e
+
+while getopts xtp:s: OPTION; do
+[ $OPTION = "x" ] && { EXIT='; exit'; }
+[ $OPTION = "t" ] && { TAB=1; }
+[ $OPTION = "p" ] && { POSITION="set position of window 1 to {$OPTARG}"; }
+[ $OPTION = "s" ] && { SIZE="set size of window 1 to {$OPTARG}"; }
+done
+
+for (( $OPTIND; $OPTIND-1; OPTIND=$OPTIND-1 )); do shift; done
+
+if [[ -d "$1" ]]; then WD=$(cd "$1"; pwd); shift; else WD=$PWD; fi
+
+
+COMMAND="cd '$WD' && echo -n \$'\\\\ec';"
+for i in "$@"; do
+ COMMAND="$COMMAND '$i'"
+done
+
+if [ $TAB ]; then
+
+osascript 2>/dev/null <<EOF
+ tell application "System Events"
+ tell process "Terminal" to keystroke "t" using command down
+ end
+ tell application "Terminal"
+ activate
+ do script with command "$COMMAND $EXIT" in window 1
+ $POSITION
+ $SIZE
+ end tell
+EOF
+
+else
+
+osascript <<EOF
+ tell application "Terminal"
+ activate
+ do script with command "$COMMAND $EXIT"
+ $POSITION
+ $SIZE
+ end tell
+EOF
+
+fi
View
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# Open a new Mac OS X terminal window with the command given
+# as argument.
+#
+# - If there are no arguments, the new terminal window will
+# be opened in the current directory, i.e. as if the command
+# would be "cd `pwd`".
+# - If the first argument is a directory, the new terminal will
+# "cd" into that directory before executing the remaining
+# arguments as command.
+# - If there are arguments and the first one is not a directory,
+# the new window will be opened in the current directory and
+# then the arguments will be executed as command.
+# - The optional, leading "-x" flag will cause the new terminal
+# to be closed immediately after the executed command finishes.
+#
+# Written by Marc Liyanage <http://www.entropy.ch>
+#
+# Version 1.0
+#
+
+if [ "x-x" = x"$1" ]; then
+ EXIT="; exit"; shift;
+fi
+
+if [[ -d "$1" ]]; then
+ WD=`cd "$1"; pwd`; shift;
+else
+ WD="'`pwd`'";
+fi
+
+COMMAND="cd $WD; $@"
+echo "$COMMAND $EXIT"
+
+osascript 2>/dev/null <<EOF
+ tell application "Terminal"
+ activate
+ do script with command "$COMMAND $EXIT"
+ end tell
+EOF
View
@@ -0,0 +1,32 @@
+.SUFFIXES: .erl .beam .yrl
+
+DOCS := $(wildcard *.ehtml)
+
+MODS := $(wildcard *.erl)
+
+%.beam: %.erl
+ erlc -W $<
+
+%.html: %.ehtml
+ erl -noshell -s elib1_doc batch $< -s init stop
+
+
+all: beam html
+
+
+beam: ${MODS:%.erl=%.beam}
+
+html: ${DOCS:%.ehtml=%.html}
+
+clean:
+ rm -rf *.aux *.beam
+ rm -rf ${DOCS:%.ehtml=%.html}
+ rm -rf *.log *.tmp erl_crash.dump
+
+veryclean:
+ rm ../bin/* ../doc/* ../tmp/*
+
+
+
+
+
View
@@ -0,0 +1,46 @@
+<html>
+
+ <h1>About</h1>
+
+ <h2>Restrictions</h2>
+
+ <p>All documentation <i>must be in a fixed directory</i>
+ <b>${ROOT}/doc</b> documentation is written with the extension
+ <b>.ehtml</b></p>
+
+ <p>Elib1 is a library of Erlang modules, together with a number of
+ complete applications built using the library. The applications have
+ been co-developed with the library. The test of any library is
+ <i>are the library functions useful?</i> The only way to answer
+ this is to write a largish number of applications using the library
+ functions. If the applications are useful and if they reuse large
+ amounts of library code then the library is probably OK, otherwise
+ not.</p>
+
+ <p>Usually when we write an application we often get to a point
+ where we think, "Oh dear the libraries are wrong." What we should
+ really do is stop work on the application, fix up the libraries then
+ return to the application. Now while this is what we <i>should</i>
+ do, we rarely do this in practice since we are keen to get the
+ application finished.</p>
+
+ <p>In writing the applications I have strictly followed the
+ principle: <i>If In find anything wrong with the libraries, then go
+ fix the libraries and return to the application</i>. This of course
+ breaks all the other application that depend on the libraries, so
+ I've had a spend end a lot of time fixing up the breakages.</p>
+
+ <h2>Organization</h2>
+
+ <pre> ${ROOT}/lib/src -- the library
+ /ebin -- compiled code
+ /bin -- runnable programs
+ /examples/XXX -- application XXX written using the
+ library
+ /doc -- documentation
+ </pre>
+
+
+
+
+</html>
Oops, something went wrong.

0 comments on commit c1083d8

Please sign in to comment.