giblish 0.8.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/unit_tests.yml +30 -0
  3. data/.gitignore +7 -3
  4. data/.ruby-version +1 -1
  5. data/Changelog.adoc +59 -0
  6. data/README.adoc +261 -0
  7. data/docs/concepts/text_search.adoc +213 -0
  8. data/docs/concepts/text_search_im/cgi-search_request.puml +35 -0
  9. data/docs/concepts/text_search_im/cgi-search_request.svg +397 -0
  10. data/docs/concepts/text_search_im/search_request.puml +40 -0
  11. data/docs/concepts/text_search_im/search_request.svg +408 -0
  12. data/docs/howtos/trigger_generation.adoc +180 -0
  13. data/docs/{setup_server_assets → howtos/trigger_generation_im}/Render Documents.png +0 -0
  14. data/docs/{setup_server_assets → howtos/trigger_generation_im}/View Documents.png +0 -0
  15. data/docs/{setup_server_assets → howtos/trigger_generation_im}/deploy_with_hooks.graphml +0 -0
  16. data/docs/{setup_server_assets → howtos/trigger_generation_im}/deploy_with_hooks.svg +0 -0
  17. data/docs/{setup_server_assets → howtos/trigger_generation_im}/deploy_with_jenkins.graphml +0 -0
  18. data/docs/{setup_server_assets → howtos/trigger_generation_im}/deploy_with_jenkins.svg +0 -0
  19. data/docs/howtos/trigger_generation_im/docgen_github.puml +51 -0
  20. data/docs/{setup_server_assets → howtos/trigger_generation_im}/giblish_deployment.graphml +0 -0
  21. data/docs/howtos/trigger_generation_im/post-receive-example.sh +50 -0
  22. data/docs/reference/box_flow_spec.adoc +22 -0
  23. data/docs/reference/search_spec.adoc +185 -0
  24. data/giblish.gemspec +50 -29
  25. data/lib/giblish/adocsrc_providers.rb +23 -0
  26. data/lib/giblish/application.rb +214 -41
  27. data/lib/giblish/cmdline.rb +273 -259
  28. data/lib/giblish/config_utils.rb +41 -0
  29. data/lib/giblish/configurator.rb +163 -0
  30. data/lib/giblish/conversion_info.rb +120 -0
  31. data/lib/giblish/docattr_providers.rb +125 -0
  32. data/lib/giblish/docid/docid.rb +181 -0
  33. data/lib/giblish/github_trigger/webhook_manager.rb +64 -0
  34. data/lib/giblish/gitrepos/checkoutmanager.rb +124 -0
  35. data/lib/giblish/{gititf.rb → gitrepos/gititf.rb} +30 -4
  36. data/lib/giblish/gitrepos/gitsummary.erb +61 -0
  37. data/lib/giblish/gitrepos/gitsummaryprovider.rb +78 -0
  38. data/lib/giblish/gitrepos/history_pb.rb +41 -0
  39. data/lib/giblish/indexbuilders/d3treegraph.rb +88 -0
  40. data/lib/giblish/indexbuilders/depgraphbuilder.rb +109 -0
  41. data/lib/giblish/indexbuilders/dotdigraphadoc.rb +174 -0
  42. data/lib/giblish/indexbuilders/standard_index.erb +10 -0
  43. data/lib/giblish/indexbuilders/subtree_indices.rb +132 -0
  44. data/lib/giblish/indexbuilders/templates/circles.html.erb +111 -0
  45. data/lib/giblish/indexbuilders/templates/flame.html.erb +61 -0
  46. data/lib/giblish/indexbuilders/templates/tree.html.erb +366 -0
  47. data/lib/giblish/indexbuilders/templates/treemap.html.erb +127 -0
  48. data/lib/giblish/indexbuilders/verbatimtree.rb +94 -0
  49. data/lib/giblish/pathtree.rb +473 -74
  50. data/lib/giblish/resourcepaths.rb +150 -0
  51. data/lib/giblish/search/expand_adoc.rb +55 -0
  52. data/lib/giblish/search/headingindexer.rb +312 -0
  53. data/lib/giblish/search/request_manager.rb +110 -0
  54. data/lib/giblish/search/searchquery.rb +68 -0
  55. data/lib/giblish/search/textsearcher.rb +349 -0
  56. data/lib/giblish/subtreeinfobuilder.rb +77 -0
  57. data/lib/giblish/treeconverter.rb +272 -0
  58. data/lib/giblish/utils.rb +142 -294
  59. data/lib/giblish/version.rb +1 -1
  60. data/lib/giblish.rb +10 -7
  61. data/scripts/hooks/post-receive.example +66 -0
  62. data/{docgen/scripts/githook_examples → scripts/hooks}/post-update.example +0 -0
  63. data/{docgen → scripts}/resources/css/adoc-colony.css +0 -0
  64. data/scripts/resources/css/giblish-serif.css +419 -0
  65. data/scripts/resources/css/giblish.css +1979 -419
  66. data/{docgen → scripts}/resources/fonts/Ubuntu-B.ttf +0 -0
  67. data/{docgen → scripts}/resources/fonts/Ubuntu-BI.ttf +0 -0
  68. data/{docgen → scripts}/resources/fonts/Ubuntu-R.ttf +0 -0
  69. data/{docgen → scripts}/resources/fonts/Ubuntu-RI.ttf +0 -0
  70. data/{docgen → scripts}/resources/fonts/mplus1p-regular-fallback.ttf +0 -0
  71. data/{docgen → scripts}/resources/images/giblish_logo.png +0 -0
  72. data/{docgen → scripts}/resources/images/giblish_logo.svg +0 -0
  73. data/{docgen → scripts}/resources/themes/giblish.yml +0 -0
  74. data/scripts/wserv_development.rb +32 -0
  75. data/web_apps/cgi_search/gibsearch.rb +43 -0
  76. data/web_apps/gh_webhook_trigger/config.ru +2 -0
  77. data/web_apps/gh_webhook_trigger/gh_webhook_trigger.rb +73 -0
  78. data/web_apps/gh_webhook_trigger/public/dummy.txt +3 -0
  79. data/web_apps/sinatra_search/config.ru +2 -0
  80. data/web_apps/sinatra_search/public/dummy.txt +3 -0
  81. data/web_apps/sinatra_search/sinatra_search.rb +34 -0
  82. data/web_apps/sinatra_search/tmp/restart.txt +0 -0
  83. metadata +180 -71
  84. data/.rubocop.yml +0 -7
  85. data/.travis.yml +0 -3
  86. data/Changelog +0 -16
  87. data/Gemfile +0 -4
  88. data/README.adoc +0 -1
  89. data/Rakefile +0 -41
  90. data/bin/console +0 -14
  91. data/bin/setup +0 -8
  92. data/data/testdocs/malformed/no_header.adoc +0 -5
  93. data/data/testdocs/toplevel.adoc +0 -19
  94. data/data/testdocs/wellformed/adorned_purpose.adoc +0 -17
  95. data/data/testdocs/wellformed/docidtest/docid_1.adoc +0 -24
  96. data/data/testdocs/wellformed/docidtest/docid_2.adoc +0 -8
  97. data/data/testdocs/wellformed/simple.adoc +0 -14
  98. data/data/testdocs/wellformed/source_highlighting/highlight_source.adoc +0 -38
  99. data/docgen/resources/css/giblish.css +0 -1979
  100. data/docgen/scripts/Jenkinsfile +0 -18
  101. data/docgen/scripts/gen_adoc_org.sh +0 -58
  102. data/docs/README.adoc +0 -387
  103. data/docs/setup_server.adoc +0 -202
  104. data/lib/giblish/buildgraph.rb +0 -216
  105. data/lib/giblish/buildindex.rb +0 -459
  106. data/lib/giblish/core.rb +0 -451
  107. data/lib/giblish/docconverter.rb +0 -308
  108. data/lib/giblish/docid.rb +0 -180
  109. data/lib/giblish/docinfo.rb +0 -75
  110. data/lib/giblish/indexheadings.rb +0 -251
  111. data/lib/giblish-search.cgi +0 -459
  112. data/scripts/hooks/post-receive +0 -57
  113. data/scripts/publish_html.sh +0 -99
@@ -0,0 +1,419 @@
1
+ /* Modified from https://github.com/edwardtufte/tufte-css */
2
+
3
+ @charset "UTF-8";
4
+
5
+ @font-face {
6
+ font-family: "et-book";
7
+ src: url("https://edwardtufte.github.io/tufte-css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf");
8
+ font-weight: normal;
9
+ font-style: normal
10
+ }
11
+
12
+ @font-face {
13
+ font-family: "et-book";
14
+ src: url("https://edwardtufte.github.io/tufte-css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf");
15
+ font-weight: normal;
16
+ font-style: italic
17
+ }
18
+
19
+ @font-face {
20
+ font-family: "et-book";
21
+ src: url("https://edwardtufte.github.io/tufte-css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf");
22
+ font-weight: bold;
23
+ font-style: normal
24
+ }
25
+
26
+ @font-face {
27
+ font-family: "et-book-roman-old-style";
28
+ src: url("https://edwardtufte.github.io/tufte-css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf");
29
+ font-weight: normal;
30
+ font-style: normal;
31
+ }
32
+
33
+ /* Tufte CSS styles */
34
+ html {
35
+ font-size: 15px;
36
+ }
37
+
38
+ body {
39
+ width: 90%;
40
+ margin-left: auto;
41
+ margin-right: auto;
42
+ padding-left: 12.5%;
43
+ font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
44
+ background-color: #fffff8;
45
+ color: #111;
46
+ max-width: 1400px;
47
+ counter-reset: sidenote-counter;
48
+ /* background-repeat: no-repeat; */
49
+ /* background-attachment: fixed; */
50
+ /* background-position: center top; */
51
+ }
52
+
53
+ h1 { font-weight: 400;
54
+ margin-top: 4rem;
55
+ margin-bottom: 1.5rem;
56
+ font-size: 3.2rem;
57
+ line-height: 1; }
58
+
59
+ h2 {
60
+ font-style: normal;
61
+ font-weight: 400;
62
+ margin-top: 2.1rem;
63
+ margin-bottom: 0;
64
+ font-size: 2.2rem;
65
+ line-height: 1;
66
+ }
67
+
68
+ h3 {
69
+ font-style: italic;
70
+ font-weight: 400;
71
+ font-size: 1.7rem;
72
+ margin-top: 2rem;
73
+ margin-bottom: 0;
74
+ line-height: 1;
75
+ }
76
+
77
+ hr {
78
+ display: block;
79
+ height: 1px;
80
+ width: 50%;
81
+ border: 0;
82
+ border-top: 1px solid black;
83
+ margin: 2em;
84
+ padding: 0;
85
+ }
86
+
87
+ p.subtitle {
88
+ font-style: italic;
89
+ margin-top: 1rem;
90
+ margin-bottom: 1rem;
91
+ font-size: 1.8rem;
92
+ display: block;
93
+ line-height: 1;
94
+ }
95
+
96
+ .numeral {
97
+ font-family: et-book-roman-old-style;
98
+ }
99
+
100
+ .danger {
101
+ color: red;
102
+ }
103
+
104
+ article {
105
+ position: relative;
106
+ padding: 5rem 0rem;
107
+ }
108
+
109
+ section {
110
+ padding-top: 1rem;
111
+ padding-bottom: 1rem;
112
+ }
113
+
114
+ p, ol, ul {
115
+ font-size: 1.4rem;
116
+ }
117
+
118
+ p {
119
+ line-height: 2rem;
120
+ margin-top: 1.4rem;
121
+ margin-bottom: 1.4rem;
122
+ padding-right: 0;
123
+ vertical-align: baseline;
124
+ }
125
+
126
+ /* Chapter Epigraphs */
127
+ div.epigraph { margin: 5em 0; }
128
+
129
+ div.epigraph > blockquote { margin-top: 3em;
130
+ margin-bottom: 3em; }
131
+
132
+ div.epigraph > blockquote, div.epigraph > blockquote > p { font-style: italic; }
133
+
134
+ div.epigraph > blockquote > footer { font-style: normal; }
135
+
136
+ div.epigraph > blockquote > footer > cite { font-style: italic; }
137
+
138
+ /* end chapter epigraphs styles */
139
+
140
+ blockquote { font-size: 1.4rem; }
141
+
142
+ blockquote p { width: 50%; }
143
+
144
+ blockquote footer {
145
+ width: 50%;
146
+ font-size: 1.1rem;
147
+ text-align: right;
148
+ }
149
+
150
+ ol, ul {
151
+ width: 55%;
152
+ width: 89%;
153
+ -webkit-padding-start: 5%;
154
+ -webkit-padding-end: 5%;
155
+ }
156
+
157
+ li {
158
+ /* padding: 0.5rem 0; */
159
+ }
160
+
161
+ figure {
162
+ padding: 0;
163
+ border: 0;
164
+ font-size: 100%;
165
+ font: inherit;
166
+ vertical-align: baseline;
167
+ max-width: 55%;
168
+ -webkit-margin-start: 0;
169
+ -webkit-margin-end: 0;
170
+ margin: 0 0 3em 0;
171
+ }
172
+
173
+ figcaption {
174
+ float: right;
175
+ clear: right;
176
+ margin-right: -48%;
177
+ margin-top: 0;
178
+ margin-bottom: 0;
179
+ font-size: 1.1rem;
180
+ line-height: 1.6;
181
+ vertical-align: baseline;
182
+ position: relative;
183
+ max-width: 40%;
184
+ }
185
+
186
+ figure.fullwidth figcaption { margin-right: 24%; }
187
+
188
+ /* Links: replicate underline that clears descenders */
189
+ a:link, a:visited { color: inherit; }
190
+
191
+ a:link {
192
+ text-decoration: none;
193
+ background: -webkit-linear-gradient(#fffff8, #fffff8), -webkit-linear-gradient(#fffff8, #fffff8), -webkit-linear-gradient(#333, #333);
194
+ background: linear-gradient(#fffff8, #fffff8), linear-gradient(#fffff8, #fffff8), linear-gradient(#333, #333);
195
+ -webkit-background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
196
+ -moz-background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
197
+ background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
198
+ background-repeat: no-repeat, no-repeat, repeat-x;
199
+ text-shadow: 0.03em 0 #fffff8, -0.03em 0 #fffff8, 0 0.03em #fffff8, 0 -0.03em #fffff8, 0.06em 0 #fffff8, -0.06em 0 #fffff8, 0.09em 0 #fffff8, -0.09em 0 #fffff8, 0.12em 0 #fffff8, -0.12em 0 #fffff8, 0.15em 0 #fffff8, -0.15em 0 #fffff8;
200
+ background-position: 0% 93%, 100% 93%, 0% 93%;
201
+ }
202
+
203
+ #toc {
204
+ display: none;
205
+ }
206
+
207
+ video {
208
+ max-width: 100%;
209
+ }
210
+
211
+ @media screen and (-webkit-min-device-pixel-ratio: 0) { a:link { background-position-y: 87%, 87%, 87%; } }
212
+
213
+ a:link::selection { text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, -0.15em 0 #b4d5fe;
214
+ background: #b4d5fe; }
215
+
216
+ a:link::-moz-selection { text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, -0.15em 0 #b4d5fe;
217
+ background: #b4d5fe; }
218
+
219
+ /* Sidenotes, margin notes, figures, captions */
220
+ img {max-width: 100%;}
221
+
222
+ .image.right {
223
+ float: right;
224
+ }
225
+ .image.left {
226
+ float: left;
227
+ }
228
+
229
+ .footnote {
230
+ float: right;
231
+ clear: right;
232
+ margin-right: -60%;
233
+ width: 50%;
234
+ margin-top: 0;
235
+ margin-bottom: 0;
236
+ font-size: 1.1rem;
237
+ line-height: 1.3;
238
+ vertical-align: baseline;
239
+ position: relative;
240
+ }
241
+
242
+ .table-caption {
243
+ float:right;
244
+ clear:right;
245
+ margin-right: -60%;
246
+ width: 50%;
247
+ margin-top: 0;
248
+ margin-bottom: 0;
249
+ font-size: 1.0rem;
250
+ line-height: 1.6;
251
+ }
252
+
253
+ .footnote a:after, .footnote:before {
254
+ content: counter(sidenote-counter) " ";
255
+ font-family: et-book-roman-old-style;
256
+ position: relative;
257
+ vertical-align: baseline;
258
+ }
259
+
260
+ .footnote a:after {
261
+ content: counter(sidenote-counter);
262
+ font-size: 1rem;
263
+ top: -0.5rem;
264
+ left: 0.1rem;
265
+ }
266
+
267
+ .footnote:before {
268
+ content: counter(sidenote-counter) " ";
269
+ top: -0.5rem;
270
+ }
271
+
272
+ p, footer, table, div.table-wrapper-small, div.supertable-wrapper > p, div.booktabs-wrapper { width: 55%; }
273
+
274
+ div.fullwidth, table.fullwidth { width: 100%; }
275
+
276
+ div.table-wrapper {
277
+ overflow-x: auto;
278
+ font-family: "Trebuchet MS", "Gill Sans", "Gill Sans MT", sans-serif;
279
+ }
280
+
281
+ @media screen and (max-width: 760px) {
282
+ p, footer { width: 90%; }
283
+ pre.code { width: 87.5%; }
284
+ ul { width: 85%; }
285
+ figure { max-width: 90%; }
286
+ figcaption, figure.fullwidth figcaption {
287
+ margin-right: 0%;
288
+ max-width: none;
289
+ }
290
+ blockquote p, blockquote footer { width: 90%; }
291
+ }
292
+
293
+ .sans {
294
+ font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
295
+ letter-spacing: .03em;
296
+ }
297
+
298
+ .code {
299
+ font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
300
+ font-size: 1.125rem;
301
+ line-height: 1.6;
302
+ }
303
+
304
+ h1 .code, h2 .code, h3 .code { font-size: 0.80em; }
305
+
306
+ .marginnote .code, .sidenote .code { font-size: 1rem; }
307
+
308
+ pre.code {
309
+ width: 52.5%;
310
+ padding-left: 2.5%;
311
+ overflow-x: auto;
312
+ }
313
+
314
+ .fullwidth {
315
+ max-width: 90%;
316
+ clear:both;
317
+ }
318
+
319
+ span.newthought {
320
+ font-variant: small-caps;
321
+ font-size: 1.2em;
322
+ }
323
+
324
+ input.margin-toggle { display: none; }
325
+
326
+ label.sidenote-number { display: inline; }
327
+
328
+ label.margin-toggle:not(.sidenote-number) { display: none; }
329
+
330
+ @media (max-width: 760px) {
331
+ label.margin-toggle:not(.sidenote-number) {
332
+ display: inline;
333
+ }
334
+ .footnote, .marginnote {
335
+ display: none;
336
+ }
337
+ .margin-toggle:checked + .sidenote, .margin-toggle:checked + .marginnote {
338
+ display: block;
339
+ float: left;
340
+ left: 1rem;
341
+ clear: both;
342
+ width: 95%;
343
+ margin: 1rem 2.5%;
344
+ vertical-align: baseline;
345
+ position: relative;
346
+ }
347
+ label {
348
+ cursor: pointer;
349
+ }
350
+ pre.code {
351
+ width: 90%;
352
+ padding: 0;
353
+ }
354
+ .table-caption {
355
+ display: block;
356
+ float: right;
357
+ clear: both;
358
+ width: 98%;
359
+ margin-top: 1rem;
360
+ margin-bottom: 0.5rem;
361
+ margin-left: 1%;
362
+ margin-right: 1%;
363
+ vertical-align: baseline;
364
+ position: relative;
365
+ }
366
+ div.table-wrapper, table, table.booktabs {
367
+ width: 85%;
368
+ }
369
+ div.table-wrapper {
370
+ border-right: 1px solid #efefef;
371
+ }
372
+ img {
373
+ width: 100%;
374
+ }
375
+ }
376
+ .sidenote,
377
+ .marginnote {
378
+ float: right;
379
+ clear: right;
380
+ margin-right: -60%;
381
+ width: 50%;
382
+ margin-top: 0;
383
+ margin-bottom: 0;
384
+ font-size: 1.1rem;
385
+ line-height: 1.3;
386
+ vertical-align: baseline;
387
+ position: relative;
388
+ }
389
+
390
+ .sidenote-number {
391
+ counter-increment: sidenote-counter;
392
+ }
393
+
394
+ .sidenote-number:after,
395
+ .sidenote:before {
396
+ font-family: et-book-roman-old-style;
397
+ position: relative;
398
+ vertical-align: baseline;
399
+ }
400
+
401
+ .sidenote-number:after {
402
+ content: counter(sidenote-counter);
403
+ font-size: 1rem;
404
+ top: -0.5rem;
405
+ left: 0.1rem;
406
+ }
407
+
408
+ .sidenote:before {
409
+ content: counter(sidenote-counter) " ";
410
+ font-size: 1rem;
411
+ top: -0.5rem;
412
+ }
413
+
414
+ blockquote .sidenote,
415
+ blockquote .marginnote {
416
+ margin-right: -82%;
417
+ min-width: 59%;
418
+ text-align: left;
419
+ }