Bayeux 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. data/.hgrc +2 -0
  2. data/.rvmrc +27 -0
  3. data/Gemfile +42 -0
  4. data/Gemfile.lock +42 -0
  5. data/HISTORY +63 -0
  6. data/README.rdoc +19 -0
  7. data/Rakefile +89 -0
  8. data/VERSION +1 -0
  9. data/bib/Modules.bib +21 -0
  10. data/code/render/latex/active4d.render +132 -0
  11. data/code/render/latex/all_hallows_eve.render +96 -0
  12. data/code/render/latex/amy.render +171 -0
  13. data/code/render/latex/blackboard.render +111 -0
  14. data/code/render/latex/brilliance_black.render +552 -0
  15. data/code/render/latex/brilliance_dull.render +561 -0
  16. data/code/render/latex/cobalt.render +162 -0
  17. data/code/render/latex/dawn.render +126 -0
  18. data/code/render/latex/eiffel.render +132 -0
  19. data/code/render/latex/espresso_libre.render +123 -0
  20. data/code/render/latex/idle.render +93 -0
  21. data/code/render/latex/iplastic.render +99 -0
  22. data/code/render/latex/lazy.render +96 -0
  23. data/code/render/latex/mac_classic.render +135 -0
  24. data/code/render/latex/magicwb_amiga.render +117 -0
  25. data/code/render/latex/pastels_on_dark.render +204 -0
  26. data/code/render/latex/slush_poppies.render +123 -0
  27. data/code/render/latex/spacecadet.render +81 -0
  28. data/code/render/latex/sunburst.render +186 -0
  29. data/code/render/latex/twilight.render +153 -0
  30. data/code/render/latex/zenburnesque.render +126 -0
  31. data/code/render/old/txt2tags.render +131 -0
  32. data/code/render/xhtml/active4d.render +140 -0
  33. data/code/render/xhtml/all_hallows_eve.render +104 -0
  34. data/code/render/xhtml/amy.render +179 -0
  35. data/code/render/xhtml/blackboard.render +119 -0
  36. data/code/render/xhtml/brilliance_black.render +560 -0
  37. data/code/render/xhtml/brilliance_dull.render +569 -0
  38. data/code/render/xhtml/cobalt.render +170 -0
  39. data/code/render/xhtml/dawn.render +134 -0
  40. data/code/render/xhtml/eiffel.render +140 -0
  41. data/code/render/xhtml/espresso_libre.render +131 -0
  42. data/code/render/xhtml/files/css/active4d.css +114 -0
  43. data/code/render/xhtml/files/css/all_hallows_eve.css +72 -0
  44. data/code/render/xhtml/files/css/amy.css +147 -0
  45. data/code/render/xhtml/files/css/blackboard.css +88 -0
  46. data/code/render/xhtml/files/css/brilliance_black.css +605 -0
  47. data/code/render/xhtml/files/css/brilliance_dull.css +599 -0
  48. data/code/render/xhtml/files/css/cobalt.css +149 -0
  49. data/code/render/xhtml/files/css/dawn.css +121 -0
  50. data/code/render/xhtml/files/css/eiffel.css +121 -0
  51. data/code/render/xhtml/files/css/espresso_libre.css +109 -0
  52. data/code/render/xhtml/files/css/idle.css +62 -0
  53. data/code/render/xhtml/files/css/iplastic.css +80 -0
  54. data/code/render/xhtml/files/css/lazy.css +73 -0
  55. data/code/render/xhtml/files/css/mac_classic.css +123 -0
  56. data/code/render/xhtml/files/css/magicwb_amiga.css +104 -0
  57. data/code/render/xhtml/files/css/pastels_on_dark.css +188 -0
  58. data/code/render/xhtml/files/css/slush_poppies.css +85 -0
  59. data/code/render/xhtml/files/css/spacecadet.css +51 -0
  60. data/code/render/xhtml/files/css/sunburst.css +180 -0
  61. data/code/render/xhtml/files/css/twilight.css +137 -0
  62. data/code/render/xhtml/files/css/zenburnesque.css +91 -0
  63. data/code/render/xhtml/idle.render +101 -0
  64. data/code/render/xhtml/iplastic.render +107 -0
  65. data/code/render/xhtml/lazy.render +104 -0
  66. data/code/render/xhtml/mac_classic.render +143 -0
  67. data/code/render/xhtml/magicwb_amiga.render +125 -0
  68. data/code/render/xhtml/pastels_on_dark.render +212 -0
  69. data/code/render/xhtml/slush_poppies.render +131 -0
  70. data/code/render/xhtml/spacecadet.render +89 -0
  71. data/code/render/xhtml/sunburst.render +194 -0
  72. data/code/render/xhtml/twilight.render +161 -0
  73. data/code/render/xhtml/zenburnesque.render +134 -0
  74. data/code/syntax/actionscript.syntax +97 -0
  75. data/code/syntax/active4d.syntax +276 -0
  76. data/code/syntax/active4d_html.syntax +311 -0
  77. data/code/syntax/active4d_ini.syntax +50 -0
  78. data/code/syntax/active4d_library.syntax +21 -0
  79. data/code/syntax/ada.syntax +33 -0
  80. data/code/syntax/antlr.syntax +151 -0
  81. data/code/syntax/apache.syntax +191 -0
  82. data/code/syntax/applescript.syntax +384 -0
  83. data/code/syntax/asp.syntax +70 -0
  84. data/code/syntax/asp_vb.net.syntax +129 -0
  85. data/code/syntax/bibtex.syntax +151 -0
  86. data/code/syntax/blog_html.syntax +41 -0
  87. data/code/syntax/blog_markdown.syntax +42 -0
  88. data/code/syntax/blog_text.syntax +27 -0
  89. data/code/syntax/blog_textile.syntax +27 -0
  90. data/code/syntax/build.syntax +53 -0
  91. data/code/syntax/bulletin_board.syntax +287 -0
  92. data/code/syntax/cake.syntax +55 -0
  93. data/code/syntax/camlp4.syntax +36 -0
  94. data/code/syntax/cm.syntax +32 -0
  95. data/code/syntax/coldfusion.syntax +119 -0
  96. data/code/syntax/context_free.syntax +176 -0
  97. data/code/syntax/cs.syntax +59 -0
  98. data/code/syntax/css.syntax +195 -0
  99. data/code/syntax/css_experimental.syntax +1925 -0
  100. data/code/syntax/csv.syntax +68 -0
  101. data/code/syntax/d.syntax +142 -0
  102. data/code/syntax/diff.syntax +81 -0
  103. data/code/syntax/dokuwiki.syntax +204 -0
  104. data/code/syntax/dot.syntax +47 -0
  105. data/code/syntax/doxygen.syntax +43 -0
  106. data/code/syntax/dylan.syntax +62 -0
  107. data/code/syntax/eiffel.syntax +78 -0
  108. data/code/syntax/erlang.syntax +922 -0
  109. data/code/syntax/f-script.syntax +80 -0
  110. data/code/syntax/fortran.syntax +141 -0
  111. data/code/syntax/fxscript.syntax +142 -0
  112. data/code/syntax/greasemonkey.syntax +34 -0
  113. data/code/syntax/gri.syntax +83 -0
  114. data/code/syntax/groovy.syntax +191 -0
  115. data/code/syntax/gtd.syntax +22 -0
  116. data/code/syntax/gtdalt.syntax +143 -0
  117. data/code/syntax/haml.syntax +88 -0
  118. data/code/syntax/haskell.syntax +88 -0
  119. data/code/syntax/html-asp.syntax +27 -0
  120. data/code/syntax/html.syntax +362 -0
  121. data/code/syntax/html_django.syntax +36 -0
  122. data/code/syntax/html_for_asp.net.syntax +424 -0
  123. data/code/syntax/html_mason.syntax +119 -0
  124. data/code/syntax/html_rails.syntax +40 -0
  125. data/code/syntax/html_tcl.syntax +26 -0
  126. data/code/syntax/icalendar.syntax +32 -0
  127. data/code/syntax/inform.syntax +48 -0
  128. data/code/syntax/ini.syntax +55 -0
  129. data/code/syntax/installer_distribution_script.syntax +77 -0
  130. data/code/syntax/io.syntax +81 -0
  131. data/code/syntax/java.syntax +211 -0
  132. data/code/syntax/javaproperties.syntax +20 -0
  133. data/code/syntax/javascript.syntax +256 -0
  134. data/code/syntax/javascript_+_prototype.syntax +72 -0
  135. data/code/syntax/javascript_+_prototype_bracketed.syntax +140 -0
  136. data/code/syntax/jquery_javascript.syntax +114 -0
  137. data/code/syntax/json.syntax +136 -0
  138. data/code/syntax/languagedefinition.syntax +708 -0
  139. data/code/syntax/latex.syntax +566 -0
  140. data/code/syntax/latex_beamer.syntax +41 -0
  141. data/code/syntax/latex_log.syntax +50 -0
  142. data/code/syntax/latex_memoir.syntax +64 -0
  143. data/code/syntax/lexflex.syntax +219 -0
  144. data/code/syntax/lighttpd.syntax +54 -0
  145. data/code/syntax/lilypond.syntax +492 -0
  146. data/code/syntax/lisp.syntax +61 -0
  147. data/code/syntax/literate_haskell.syntax +24 -0
  148. data/code/syntax/logo.syntax +29 -0
  149. data/code/syntax/logtalk.syntax +152 -0
  150. data/code/syntax/lua.syntax +86 -0
  151. data/code/syntax/m.syntax +142 -0
  152. data/code/syntax/macports_portfile.syntax +163 -0
  153. data/code/syntax/makefile.syntax +36 -0
  154. data/code/syntax/man.syntax +17 -0
  155. data/code/syntax/mediawiki.syntax +567 -0
  156. data/code/syntax/mips.syntax +66 -0
  157. data/code/syntax/mod_perl.syntax +50 -0
  158. data/code/syntax/modula-3.syntax +47 -0
  159. data/code/syntax/moinmoin.syntax +189 -0
  160. data/code/syntax/mootools.syntax +572 -0
  161. data/code/syntax/movable_type.syntax +162 -0
  162. data/code/syntax/multimarkdown.syntax +39 -0
  163. data/code/syntax/objective-c++.syntax +18 -0
  164. data/code/syntax/objective-c.syntax +233 -0
  165. data/code/syntax/ocaml.syntax +764 -0
  166. data/code/syntax/ocamllex.syntax +167 -0
  167. data/code/syntax/ocamlyacc.syntax +184 -0
  168. data/code/syntax/opengl.syntax +14 -0
  169. data/code/syntax/pascal.syntax +77 -0
  170. data/code/syntax/perl.syntax +1115 -0
  171. data/code/syntax/plain_text.syntax +32 -0
  172. data/code/syntax/postscript.syntax +114 -0
  173. data/code/syntax/processing.syntax +106 -0
  174. data/code/syntax/prolog.syntax +40 -0
  175. data/code/syntax/property_list.syntax +635 -0
  176. data/code/syntax/python.syntax +868 -0
  177. data/code/syntax/python_django.syntax +21 -0
  178. data/code/syntax/qmake_project.syntax +114 -0
  179. data/code/syntax/qt_c++.syntax +26 -0
  180. data/code/syntax/quake3_config.syntax +32 -0
  181. data/code/syntax/r.syntax +81 -0
  182. data/code/syntax/r_console.syntax +16 -0
  183. data/code/syntax/ragel.syntax +201 -0
  184. data/code/syntax/rd_r_documentation.syntax +91 -0
  185. data/code/syntax/regexp.syntax +50 -0
  186. data/code/syntax/release_notes.syntax +46 -0
  187. data/code/syntax/remind.syntax +253 -0
  188. data/code/syntax/restructuredtext.syntax +250 -0
  189. data/code/syntax/rez.syntax +80 -0
  190. data/code/syntax/ruby.syntax +1035 -0
  191. data/code/syntax/ruby_experimental.syntax +145 -0
  192. data/code/syntax/ruby_on_rails.syntax +88 -0
  193. data/code/syntax/s5.syntax +69 -0
  194. data/code/syntax/scheme.syntax +347 -0
  195. data/code/syntax/scilab.syntax +41 -0
  196. data/code/syntax/setext.syntax +147 -0
  197. data/code/syntax/shell-unix-generic.syntax +384 -0
  198. data/code/syntax/slate.syntax +149 -0
  199. data/code/syntax/sql.syntax +237 -0
  200. data/code/syntax/sql_rails.syntax +18 -0
  201. data/code/syntax/ssh-config.syntax +33 -0
  202. data/code/syntax/standard_ml.syntax +121 -0
  203. data/code/syntax/strings_file.syntax +39 -0
  204. data/code/syntax/subversion_commit_message.syntax +36 -0
  205. data/code/syntax/sweave.syntax +84 -0
  206. data/code/syntax/swig.syntax +57 -0
  207. data/code/syntax/tcl.syntax +152 -0
  208. data/code/syntax/template_toolkit.syntax +121 -0
  209. data/code/syntax/tex.syntax +86 -0
  210. data/code/syntax/tex_math.syntax +49 -0
  211. data/code/syntax/textile.syntax +215 -0
  212. data/code/syntax/tsv.syntax +50 -0
  213. data/code/syntax/twiki.syntax +241 -0
  214. data/code/syntax/txt2tags.syntax +79 -0
  215. data/code/syntax/vectorscript.syntax +57 -0
  216. data/code/syntax/xhtml_1.0.syntax +4027 -0
  217. data/code/syntax/xml.syntax +180 -0
  218. data/code/syntax/xml_strict.syntax +92 -0
  219. data/code/syntax/xsl.syntax +60 -0
  220. data/code/syntax/yaml.syntax +160 -0
  221. data/code/syntax/yui_javascript.syntax +176 -0
  222. data/lib/bayeux/bayeux.rb +727 -0
  223. data/lib/bayeux/html_gen.rb +506 -0
  224. data/lib/bayeux/latex_gen.rb +333 -0
  225. data/lib/bayeux/para_block.rb +201 -0
  226. data/lib/bayeux/text_gen.rb +307 -0
  227. data/lib/bayeux/tree_walker.rb +166 -0
  228. data/lib/filters/bayeux.rb +44 -0
  229. data/lib/filters/pandoc.rb +23 -0
  230. data/lib/filters/section_id.rb +105 -0
  231. data/lib/helpers/breadcrumbs.rb +64 -0
  232. data/lib/helpers/site_toc.rb +11 -0
  233. data/lib/lib/uv.rb +92 -0
  234. data/lib/lib/uv/render_processor.rb +146 -0
  235. data/lib/lib/uv/utility.rb +67 -0
  236. data/lib/refs/Doc_Blocks.rb +2 -0
  237. data/lib/refs/References.rb +104 -0
  238. metadata +415 -0
data/.hgrc ADDED
@@ -0,0 +1,2 @@
1
+ [extensions]
2
+ rebase =
data/.rvmrc ADDED
@@ -0,0 +1,27 @@
1
+ ruby_string="ruby-1.9.2-p180"
2
+ gemset_name="bayeux"
3
+
4
+ if rvm list strings | grep -q "${ruby_string}" ; then
5
+
6
+ # Load or create the specified environment
7
+ if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
8
+ && -s "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}" ]] ; then
9
+ \. "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}"
10
+ else
11
+ rvm --create "${ruby_string}@${gemset_name}"
12
+ fi
13
+
14
+ # Ensure that Bundler is installed, install it if it is not.
15
+ if ! command -v bundle ; then
16
+ gem install bundler
17
+ fi
18
+
19
+ # Bundle while reducing excess noise.
20
+ bundle | grep -v 'Using' | grep -v 'complete' | sed '/^$/d'
21
+
22
+ else
23
+
24
+ # Notify the user to install the desired interpreter before proceeding.
25
+ echo "${ruby_string} was not found, please run 'rvm install ${ruby_string}' and then cd back into the project directory."
26
+
27
+ fi
data/Gemfile ADDED
@@ -0,0 +1,42 @@
1
+ ###
2
+ ### Sources
3
+ ###
4
+
5
+ # Main Ruby Gems site
6
+ source "http://rubygems.org"
7
+
8
+ ###
9
+ ### Core Gems. These are required in _all_ environments (additional environments
10
+ ### follow).
11
+ ###
12
+
13
+ # Tree Library (Additional Data Structure)
14
+ gem "rubytree", "~> 0.8.1"
15
+
16
+ # Code Syntax Highlighting Engine for the HTML Generator
17
+ gem "spox-plist", "~> 3.0.1"
18
+ gem "spox-textpow", "~> 0.10.3"
19
+ gem "spox-ultraviolet", "~> 0.10.5"
20
+
21
+ # Log Library
22
+ gem "log4r", "~> 1.1.9"
23
+
24
+ ###
25
+ ### Development Gems. All _additional_ gems required by development (as apposed to
26
+ ### production environments). If it is required at run-time, it
27
+ ### belongs above.
28
+ group :development do
29
+
30
+ # Gem management tools
31
+ gem "bundler", "~> 1.0.0"
32
+ gem "jeweler", "~> 1.6.0"
33
+
34
+ # Documentation Tools
35
+ gem "yard", "~> 0.6.0"
36
+ gem "vclog"
37
+
38
+ # Testing Tools
39
+ gem "minitest", ">= 0"
40
+ gem "riot"
41
+
42
+ end
@@ -0,0 +1,42 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ ansi (1.2.4)
5
+ facets (2.9.1)
6
+ git (1.2.5)
7
+ jeweler (1.6.0)
8
+ bundler (~> 1.0.0)
9
+ git (>= 1.2.5)
10
+ rake
11
+ log4r (1.1.9)
12
+ minitest (2.1.0)
13
+ rake (0.8.7)
14
+ riot (0.12.3)
15
+ rr
16
+ rr (1.0.2)
17
+ rubytree (0.8.1)
18
+ spox-plist (3.0.1)
19
+ spox-textpow (0.10.3)
20
+ spox-plist
21
+ spox-ultraviolet (0.10.5)
22
+ spox-textpow
23
+ vclog (1.8.1)
24
+ ansi (>= 1.2)
25
+ facets (>= 2.4)
26
+ yard (0.6.8)
27
+
28
+ PLATFORMS
29
+ ruby
30
+
31
+ DEPENDENCIES
32
+ bundler (~> 1.0.0)
33
+ jeweler (~> 1.6.0)
34
+ log4r (~> 1.1.9)
35
+ minitest
36
+ riot
37
+ rubytree (~> 0.8.1)
38
+ spox-plist (~> 3.0.1)
39
+ spox-textpow (~> 0.10.3)
40
+ spox-ultraviolet (~> 0.10.5)
41
+ vclog
42
+ yard (~> 0.6.0)
data/HISTORY ADDED
@@ -0,0 +1,63 @@
1
+ RELEASE HISTORY
2
+
3
+ HEAD / 2011-05-05
4
+
5
+ Current Development (David Love)
6
+
7
+ Changes:
8
+
9
+ * 52 General Enhancements
10
+
11
+ * Added JSON support to the blocks and syntax tree (needed for exporting the syntax tree to Redis)
12
+ * Move to the logger library.
13
+ * Added code to strip offending spaces from the HTML output. This stops spurious blanks being seen in the HTML output.
14
+ * Added branch pruning to the syntax tree generator. This removes some bugs added by the code to transform the tree (especially around quotes).
15
+ * Move nanoc filters and helpers into the correct directories.
16
+ * Added private changes to the spox-ultraviolet branch for Bayeux. These changes cover support for line-numbers that do not start at '1'.
17
+ * Re-base of Bayeux to include the full nanoc filters and associated code. This marks the start of Bayeux as an independent project.
18
+ * Change the way single quotes work: now treated as a pseudo-block, so the paragraph tree code can work with fewer exceptions.
19
+ * Tidy up the code for adding code blocks.
20
+ * More sophisticated parsing of description lists, which allows richer content in both the list header and list body.
21
+ * Added basic latex and plain text generators. Latex almost working: text needs to be re-built from the LaTeX version.
22
+ * Remove debug symbols, and add a very basic text generator instead.
23
+ * Fix a bug in the tree walker to make sure it doesn't go too far up the tree, and that it actually calls the hooks for the correct node.
24
+ * Enforce type normalisation, to make it easier for the generators
25
+ * Fix the tree walking algorithm so that it actually walks more than just the first child. Should now be able to cope with trees having lots of branches.
26
+ * Hoist certain node patterns, to make generating easier.
27
+ * Added ellipses support, and tidied a few bugs in the syntax tree output.
28
+ * Re-write of the syntax tree code, to tidy up the insertion (and deletion) logic using partial functions. This should make it easier to see what is going on (and therefore extend in the future). Hopefully this will also make the remaining bugs easier to find...
29
+ * Start of the re-write of the syntax node adding code.
30
+ * Change the end of paragraph regex to ignore 'blank' lines containing only whitespace. Makes it easier to copy and paste from existing markup.
31
+ * Basic support for code highlighting using the (modified) Ultraviolet engine.
32
+ * Add ability to use the acronym list from the master references
33
+ * Change the way type allocation works, to expose the tags attached to blocks.
34
+ * Add a tag for all blocks, and refine the type allocation a bit.
35
+ * Cleanup the HTML output a bit, and make it easier to do typographical changes if required.
36
+ * Pretty print the ToC lists.
37
+ * Added basic processing for lists. Added ToC generator for the HTML output.
38
+ * Remove the last remnants of the old parser.
39
+ * Better typography for the HTML generator.
40
+ * Change the null string detection code to make it more robust. Changed links so that they are now split by the parser, not the generator.
41
+ * Added recognises for em-dash and en-dash, and support for them in the HTML generator.
42
+ * Removed last_codepoint variable in favour of string_index, now that we need forward and reverse lookup.
43
+ * Added support for single and double quote blocks.
44
+ * Broken update for the quote blocks.
45
+ * Added HTML Tidy library for the HTML generator: this produces much nicer output more easily, and saves a lot of mucking about in the code for the sake of an external library and extra pass.
46
+ * Abstracted the tree walking logic into a separate class, using hooks to link back to the generator. The generator now work, and is much simpler. This should also allow additional generators to be written without much work.
47
+ * Largely working HTML generator, using the new AST. Also patched the nanoc filters to use the new generator.
48
+ * Split nodes for description lists.
49
+ * Cleaned up empty node processing, which clean up the AST generated. This should fix a few spurious features of the final output.
50
+ * First version integrated with Nanoc. Most bugs fixed, and basic parsing works.
51
+ * Re-wrote the high level block parser, and the Tree logic. Now require separate generators for the AST, but the AST is classically formed. New parser written for the top-level blocks (which are now distinct from in-line blocks).
52
+ * Added code to recognise quotation paragraphs.
53
+ * Fixed a bug in the link generator. Links should now be generated correctly.
54
+ * Be less aggressive about suppressing spaces that might be needed (PanDoc strip out empty strings for us anyway).
55
+ * Re-wrote the output to PanDoc as a string parser, rarther than an ad hoc collection of string replacements.
56
+ * Working version of the basic structural parser.
57
+ * Commit before re-work, changing to a tree instead of recursive blocks to avoid stack depth problems.
58
+ * Pause before another re-think.
59
+ * Pause before re-think.
60
+ * Pause before a re-think of the core algorithm.
61
+ * Added test file, showing most of the simple markup.
62
+ * First draft: basic outline of working emph and basic parsing infrastructure.
63
+
@@ -0,0 +1,19 @@
1
+ = Bayeux
2
+
3
+ Description goes here.
4
+
5
+ == Contributing to Bayeux
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
+ * Fork the project
10
+ * Start a feature/bugfix branch
11
+ * Commit and push until you are happy with your contribution
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2011 David Love. See LICENSE.txt for
18
+ further details.
19
+
@@ -0,0 +1,89 @@
1
+ # Copyright (c) 2011 David Love
2
+ #
3
+ # Permission to use, copy, modify, and/or distribute this software for
4
+ # any purpose with or without fee is hereby granted, provided that the
5
+ # above copyright notice and this permission notice appear in all copies.
6
+ #
7
+ # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
+ # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
+ # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10
+ # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
+ # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12
+ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13
+ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14
+ #
15
+ # encoding: utf-8
16
+
17
+ ###
18
+ ### Set-up. Actions to run before all tasks
19
+ ###
20
+
21
+ ## Use Bundler to make sure the gem environment is up-to-daterequire 'rubygems'
22
+ require 'bundler'
23
+ begin
24
+ Bundler.setup(:default, :development)
25
+ rescue Bundler::BundlerError => e
26
+ $stderr.puts e.message
27
+ $stderr.puts "Run `bundle install` to install missing gems"
28
+ exit e.status_code
29
+ end
30
+ require 'rake'
31
+
32
+ ###
33
+ ### Gemspec. Mangage the creation of the relevant gem and gemspec files. Most of this
34
+ ### is delegated to Jeweler
35
+ ###
36
+
37
+ require 'jeweler'
38
+ Jeweler::Tasks.new do |gem|
39
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
40
+ gem.name = "Bayeux"
41
+ gem.homepage = "http://github.com/dlove24/Bayeux"
42
+ gem.license = "MIT"
43
+ gem.summary = "Parsers and generators for the Bayeux long document markup"
44
+ gem.description = "The core parser for the Bayeux document markup language, optimised for long-form documents. Generators are also provided for HTML, LaTeX and PanDoc"
45
+ gem.email = "david@homeunix.org.uk"
46
+ gem.authors = ["David Love"]
47
+ # dependencies defined in Gemfile
48
+ end
49
+ Jeweler::RubygemsDotOrgTasks.new
50
+
51
+ ###
52
+ ### Testing. Run the unit/system/integration tests
53
+ ###
54
+
55
+ require 'rake/testtask'
56
+
57
+ desc "Run all our tests"
58
+ task :test do
59
+ Rake::TestTask.new do |t|
60
+ t.libs << "test"
61
+ t.pattern = "test/**/*_test.rb"
62
+ t.verbose = false
63
+ end
64
+ end
65
+
66
+ ## Set testing as the default action
67
+ task :default => :test
68
+
69
+ ###
70
+ ### Documentation. Generate/update the project documentation
71
+ ###
72
+
73
+ ## Use Yard to generate the documentations
74
+ require 'yard'
75
+ YARD::Rake::YardocTask.new
76
+
77
+ ###
78
+ ### Release. Additional actions to take when releasing the gem
79
+ ###
80
+
81
+ ## Additional actions for the release task
82
+ task :before_release do
83
+ # Update the HISTORY file
84
+ `vclog history -f gnu > HISTORY`
85
+ end
86
+
87
+ ## Extend the default (Jeweler) 'release' task
88
+ Rake::Task[:test].enhance(['before_release'])
89
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,21 @@
1
+ %% This BibTeX bibliography file was created using BibDesk.
2
+ %% http://bibdesk.sourceforge.net/
3
+
4
+
5
+ %% Created for David Love at 2011-04-27 12:22:27 +0100
6
+
7
+
8
+ %% Saved with string encoding Unicode (UTF-8)
9
+
10
+
11
+
12
+ @book{FitzGerald:Business,
13
+ Author = {Jerry FitzGerald and Alan Dennis},
14
+ Date-Added = {2011-04-26 10:49:01 +0100},
15
+ Date-Modified = {2011-04-26 10:50:21 +0100},
16
+ Edition = {9th Edition},
17
+ Isbn = {0-471-77116-3},
18
+ Publisher = {John Wiley {\&} Sons Inc},
19
+ Title = {Business Data Communications and Networking},
20
+ Year = {2007},
21
+ Bdsk-Url-1 = {http://www.amazon.com/Business-Communications-Networking-Jerry-FitzGerald/dp/0471771163?SubscriptionId=0JYN1NVW651KCA56C102&tag=techkie-20&linkCode=xm2&camp=2025&creative=165953&creativeASIN=0471771163}}
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: Active4D
3
+ line:
4
+ begin: ""
5
+ end: "}}\\\\"
6
+ tags:
7
+ - begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{ECF1FF}{\rule[-0.5ex]{0pt}{2.0ex}
8
+ end: "}"
9
+ selector: text.html source.active4d
10
+ - begin: "{\\color[HTML]{000000}"
11
+ end: "}"
12
+ selector: text.xml
13
+ - begin: "{\\color[HTML]{D33535}"
14
+ end: "}"
15
+ selector: comment.line
16
+ - begin: "{\\color[HTML]{D33435}"
17
+ end: "}"
18
+ selector: comment.block
19
+ - begin: "{\\color[HTML]{666666}"
20
+ end: "}"
21
+ selector: string
22
+ - begin: "{\\color[HTML]{66CCFF}\\textbf{"
23
+ end: "}}"
24
+ selector: string.interpolated variable
25
+ - begin: "{\\color[HTML]{A8017E}"
26
+ end: "}"
27
+ selector: constant.numeric
28
+ - begin: "{"
29
+ end: "}"
30
+ selector: constant.character, constant.other
31
+ - begin: "{\\color[HTML]{66CCFF}\\textbf{"
32
+ end: "}}"
33
+ selector: constant.other.date, constant.other.time
34
+ - begin: "{\\color[HTML]{A535AE}"
35
+ end: "}"
36
+ selector: constant.language
37
+ - begin: "{\\color[HTML]{6392FF}\\textbf{"
38
+ end: "}}"
39
+ selector: variable.other.local
40
+ - begin: "{\\color[HTML]{0053FF}\\textbf{"
41
+ end: "}}"
42
+ selector: variable
43
+ - begin: "{\\color[HTML]{0BB600}"
44
+ end: "}"
45
+ selector: variable.other.table-field
46
+ - begin: "{\\color[HTML]{006699}\\textbf{"
47
+ end: "}}"
48
+ selector: keyword
49
+ - begin: "{"
50
+ end: "}"
51
+ selector: keyword.operator
52
+ - begin: "{\\color[HTML]{FF5600}"
53
+ end: "}"
54
+ selector: storage
55
+ - begin: "{\\color[HTML]{21439C}"
56
+ end: "}"
57
+ selector: entity.name.type
58
+ - begin: "{"
59
+ end: "}"
60
+ selector: entity.other.inherited-class
61
+ - begin: "{\\color[HTML]{21439C}"
62
+ end: "}"
63
+ selector: entity.name.function
64
+ - begin: "{"
65
+ end: "}"
66
+ selector: variable.parameter
67
+ - begin: "{\\color[HTML]{7A7A7A}"
68
+ end: "}"
69
+ selector: meta.tag
70
+ - begin: "{\\color[HTML]{016CFF}"
71
+ end: "}"
72
+ selector: entity.name.tag
73
+ - begin: "{\\color[HTML]{963DFF}"
74
+ end: "}"
75
+ selector: entity.other.attribute-name
76
+ - begin: "{\\color[HTML]{45AE34}\\textbf{"
77
+ end: "}}"
78
+ selector: support.function
79
+ - begin: "{\\color[HTML]{B7734C}"
80
+ end: "}"
81
+ selector: support.constant
82
+ - begin: "{\\color[HTML]{A535AE}"
83
+ end: "}"
84
+ selector: support.type, support.class
85
+ - begin: "{\\color[HTML]{A535AE}"
86
+ end: "}"
87
+ selector: support.variable
88
+ - begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{990000}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFFFFF}
89
+ end: "}"
90
+ selector: invalid
91
+ - begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{656565}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFFFFF}
92
+ end: "}"
93
+ selector: meta.diff
94
+ - begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{1B63FF}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{FFFFFF}
95
+ end: "}"
96
+ selector: meta.diff.range
97
+ - begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{FF7880}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{000000}
98
+ end: "}"
99
+ selector: markup.deleted.diff
100
+ - begin: \setlength{\fboxsep}{0ex}\colorbox[HTML]{98FF9A}{\rule[-0.5ex]{0pt}{2.0ex}\color[HTML]{000000}
101
+ end: "}"
102
+ selector: markup.inserted.diff
103
+ - begin: "{\\color[HTML]{5E5E5E}"
104
+ end: "}"
105
+ selector: source.diff
106
+ listing:
107
+ begin: |
108
+ \newcolumntype{C}{>{\color[HTML]{000000}\columncolor[HTML]{FFFFFF}}l}
109
+ \newcolumntype{N}{>{\color[HTML]{000000}\columncolor[HTML]{BAD6FD}}l}
110
+ \begin{longtable}{NC}
111
+
112
+ end: |
113
+ \end{longtable}
114
+
115
+ document:
116
+ begin: |
117
+ \documentclass[a4paper,landscape]{article}
118
+ \usepackage{xcolor}
119
+ \usepackage{colortbl}
120
+ \usepackage{longtable}
121
+ \usepackage[left=2cm,top=1cm,right=3cm,nohead,nofoot]{geometry}
122
+ \usepackage[T1]{fontenc}
123
+ \usepackage[scaled]{beramono}
124
+ \begin{document}
125
+
126
+ end: |
127
+ \end{document}
128
+
129
+ filter: "@escaped.gsub(/(\\$)/, '\\\\\\\\\\1').gsub(/\\\\(?!\\$)/, '$\\\\\\\\backslash$').gsub(/(_|\\{|\\}|&|\\#|%)/, '\\\\\\\\\\1').gsub(/~/, '\\\\textasciitilde ').gsub(/ /,'\\\\hspace{1ex}').gsub(/\\t| /,'\\\\hspace{3ex}').gsub(/\\\"/, \"''\").gsub(/(\\^)/,'\\\\\\\\\\1{}')"
130
+ line-numbers:
131
+ begin: \texttt{
132
+ end: "}&\\mbox{\\texttt{"