dyndoc-ruby-core 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dyndoc/base/tmpl/parse_do.rb +1 -1
- data/lib/dyndoc/common/tilt.rb +59 -32
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d61c9814fbee12e7690e969be05be1508045df8a
|
4
|
+
data.tar.gz: 894618eac5de35bb862ae6156ade8203da680907
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 754c502ef583d5da3e567ba0b64824e4cd3fff6a3b84ecca326ed562405495755df4ea2482d1001993d0e66cf7cd6415c469bbd9879ff2fe35520207c23900d3
|
7
|
+
data.tar.gz: 6783f7f70b01b0ed79ac6e1e65fca16fb92ba0ac6f2cc08fdc6e135f891e77e42be7085b8f94a438c786af1757996a981d588095b96046f0f36a849d4b436c0f
|
@@ -1201,7 +1201,7 @@ p call
|
|
1201
1201
|
i,*b2=next_block(blck,i)
|
1202
1202
|
codename=parse(b2,filter).strip
|
1203
1203
|
code[codename]=[:blck]
|
1204
|
-
when :do,:<,:out,:>,:"r<",:"R<",:"rb<",:"r>",:"R>",:"rb>",:nl,:"\n",:>>,:"?",:tag,:"??",:"=",:"+",:<<,:"%",:"html>",:"tex>",:"txtl>",:"md>",:"adoc>" #NO :yield because of infinite loops
|
1204
|
+
when :do,:<,:out,:>,:"r<",:"R<",:"rb<",:"r>",:"R>",:"R>>",:"rb>",:nl,:"\n",:>>,:"?",:tag,:"??",:"=",:"+",:<<,:"%",:"html>",:"tex>",:"txtl>",:"md>",:"adoc>" #NO :yield because of infinite loops
|
1205
1205
|
code[codename] << blck[i]
|
1206
1206
|
i,*b2=next_block(blck,i)
|
1207
1207
|
code[codename] += b2
|
data/lib/dyndoc/common/tilt.rb
CHANGED
@@ -1,40 +1,67 @@
|
|
1
|
-
require 'tilt' #this allows the use of any other template
|
1
|
+
require 'tilt' #this allows the use of any other template
|
2
2
|
require 'tilt/template' #for creating the dyndoc one
|
3
3
|
require 'redcloth'
|
4
4
|
|
5
5
|
|
6
6
|
module Tilt
|
7
|
-
|
7
|
+
|
8
8
|
class DynDocTemplate < Template
|
9
9
|
|
10
10
|
def DynDocTemplate.init(libs=nil)
|
11
|
-
unless $curDyn
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
11
|
+
# unless $curDyn
|
12
|
+
# require 'dyndoc/V3/init/dyn'
|
13
|
+
# CqlsDoc.init_dyn
|
14
|
+
# CqlsDoc.set_curDyn(:V3)
|
15
|
+
# $curDyn.init(false)
|
16
|
+
# $curDyn.tmpl_doc.init_doc
|
17
|
+
# if libs
|
18
|
+
# @@libs=libs
|
19
|
+
# $curDyn.tmpl_doc.require_dyndoc_libs(libs)
|
20
|
+
# end
|
21
|
+
# "options(bitmapType='cairo')".to_R
|
22
|
+
# $curDyn.tmpl.format_output="html"
|
23
|
+
# $curDyn.tmpl.dyndoc_mode=:web # No command line
|
24
|
+
# #p [$curDyn.tmpl.dyndocMode,$curDyn.tmpl.fmtOutput]
|
25
|
+
# end
|
26
|
+
|
27
|
+
## same as interactive-server
|
28
|
+
@tmpl_mngr=nil
|
29
|
+
@tmpl_filename=nil
|
30
|
+
init_dyndoc
|
31
|
+
end
|
32
|
+
|
33
|
+
def init_dyndoc
|
34
|
+
unless @tmpl_mngr
|
35
|
+
Dyndoc.cfg_dyn['dyndoc_session']=:interactive
|
36
|
+
@tmpl_mngr = Dyndoc::Ruby::TemplateManager.new({})
|
37
|
+
##is it really well-suited for interactive mode???
|
38
|
+
end
|
39
|
+
reinit_dyndoc
|
40
|
+
end
|
41
|
+
|
42
|
+
def reinit_dyndoc
|
43
|
+
if @tmpl_mngr
|
44
|
+
@tmpl_mngr.init_doc({:format_output=> "html"})
|
45
|
+
@tmpl_mngr.require_dyndoc_libs("DyndocWebTools")
|
46
|
+
puts "InteractiveServer (re)initialized!\n"
|
47
|
+
@tmpl_mngr.as_default_tmpl_mngr! #=> Dyndoc.tmpl_mngr activated!
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def process_dyndoc(content)
|
52
|
+
##p [:process_dyndoc_content,content]
|
53
|
+
@content=@tmpl_mngr.parse(content)
|
54
|
+
##Dyndoc.warn :content, @content
|
55
|
+
@tmpl_mngr.filterGlobal.envir["body.content"]=@content
|
56
|
+
if @tmpl_filename
|
57
|
+
@tmpl_mngr.filterGlobal.envir["_FILENAME_CURRENT_"]=@tmpl_filename.dup
|
58
|
+
@tmpl_mngr.filterGlobal.envir["_FILENAME_"]=@tmpl_filename.dup #register name of template!!!
|
59
|
+
@tmpl_mngr.filterGlobal.envir["_FILENAME_ORIG_"]=@tmpl_filename.dup #register name of template!!!
|
60
|
+
@tmpl_mngr.filterGlobal.envir["_PWD_"]=File.dirname(@tmpl_filename)
|
25
61
|
end
|
62
|
+
return @content
|
26
63
|
end
|
27
64
|
|
28
|
-
# def init_dyndoc
|
29
|
-
# unless @tmpl_mngr
|
30
|
-
# Dyndoc.cfg_dyn['dyndoc_session']=:interactive
|
31
|
-
# @tmpl_mngr = Dyndoc::Ruby::TemplateManager.new({})
|
32
|
-
# ##is it really well-suited for interactive mode???
|
33
|
-
# @tmpl_mngr.init_doc({:format_output=> "html"})
|
34
|
-
# puts "InteractiveServer initialized!\n"
|
35
|
-
# end
|
36
|
-
# end
|
37
|
-
|
38
65
|
def self.engine_initialized?
|
39
66
|
defined? ::DynDoc
|
40
67
|
end
|
@@ -47,11 +74,11 @@ module Tilt
|
|
47
74
|
|
48
75
|
|
49
76
|
def prepare_output
|
50
|
-
return
|
77
|
+
return process_dyndoc(data)
|
51
78
|
end
|
52
|
-
|
79
|
+
|
53
80
|
def evaluate(scope, locals, &block)
|
54
|
-
|
81
|
+
|
55
82
|
#=begin
|
56
83
|
#puts "locals";p locals
|
57
84
|
## first!!!!
|
@@ -104,9 +131,9 @@ module Tilt
|
|
104
131
|
% Macro for http reference inclusion, per hypertex.
|
105
132
|
\def\href#1#2{\special{html:<a href="#1">}#2\special{html:</a>}}
|
106
133
|
\def\urlend#1{#1\endgroup}
|
107
|
-
\def\url{\begingroup \tt
|
134
|
+
\def\url{\begingroup \tt
|
108
135
|
\catcode`\_=13 % Don't know why this works.
|
109
|
-
\catcode`\~=11 \catcode`\#=11 \catcode`\^=11
|
136
|
+
\catcode`\~=11 \catcode`\#=11 \catcode`\^=11
|
110
137
|
\catcode`\$=11 \catcode`\&=11 \catcode`\%=11
|
111
138
|
\urlend}% \url for plain \TeX.
|
112
139
|
PREAMBLE
|
@@ -146,4 +173,4 @@ Tilt.register Tilt::DynTxtlTemplate, '_txtl.dyn'
|
|
146
173
|
Tilt.register Tilt::DynTtmTemplate, '_ttm.dyn'
|
147
174
|
Tilt.register Tilt::DynHtmlTemplate, '_html.dyn'
|
148
175
|
Tilt.register Tilt::DynDocTemplate, '.dyn'
|
149
|
-
#puts "dyn registered in tilt!"
|
176
|
+
#puts "dyn registered in tilt!"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dyndoc-ruby-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CQLS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: configliere
|