dyndoc-ruby 0.8.5 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/dpm +52 -14
- data/bin/dyn-html +123 -0
- data/bin/dyn-lint +6 -0
- data/bin/dyn-scan +42 -0
- data/lib/dyndoc-edit.rb +81 -0
- data/lib/dyndoc-linter.rb +40 -0
- data/share/etc/uv/syntax/source.rebol.syntax +304 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd5cab0885f06cf665c740d7116f5ba6d4704959
|
4
|
+
data.tar.gz: bb2c2c409258a3c030e764ec7d545293ce701e4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae5620049151112869f9aa9614f1f5b1f51daedada69ad37f587da8419b8a1f876f198db56e0add0353d2949c22795b531c3e2f38452a15f7e6bcf5884638b7a
|
7
|
+
data.tar.gz: c84c7513deb6f91827a6a8d495bebb9749bfbb48c6f99b432372912924b4bc60d977823685854b21004eef8a18ab4b37ab2861bb430d2a720ffff6bdbb35822e
|
data/bin/dpm
CHANGED
@@ -10,26 +10,64 @@ repo_dir = File.join(lib_dir,".repository")
|
|
10
10
|
|
11
11
|
old_pwd = Dir.pwd
|
12
12
|
|
13
|
-
cmd = ARGV[0].to_sym
|
13
|
+
cmd = ARGV.empty? ? :help : ARGV[0].to_sym
|
14
14
|
case cmd
|
15
|
+
when :help, :"--help", :"-h"
|
16
|
+
doc=<<ENDHELP
|
17
|
+
Install a repository
|
18
|
+
====================
|
19
|
+
dpm install <user>/<repo>
|
20
|
+
dpm install https://github.com/<user>/<repo> (equivalent to previous one)
|
21
|
+
dpm install <git-url>/<user>/<repo> (non necessarily on github)
|
22
|
+
|
23
|
+
Good to know: repository identifier is in any previous case <user>/<repo>
|
24
|
+
|
25
|
+
Update a repository
|
26
|
+
===================
|
27
|
+
# dpm update <user>/<repo>
|
28
|
+
|
29
|
+
Link library
|
30
|
+
============
|
31
|
+
dpm link <user>/<repo>/<subdir>/<libname> (default link to <libname>)
|
32
|
+
dpm link <user>/<repo>/<subdir>/<libname> <libname>
|
33
|
+
dpm link <real local path to expand>
|
34
|
+
|
35
|
+
Unlink library
|
36
|
+
==============
|
37
|
+
dpm unlink <libname>
|
38
|
+
|
39
|
+
This message
|
40
|
+
============
|
41
|
+
|
42
|
+
dpm help
|
43
|
+
|
44
|
+
List of repository
|
45
|
+
==================
|
46
|
+
dpm repo
|
47
|
+
|
48
|
+
List of libraries
|
49
|
+
=================
|
50
|
+
dpm ls
|
51
|
+
ENDHELP
|
52
|
+
puts doc
|
15
53
|
|
16
|
-
# dyndoc-package install rcqls/dyndoc-share
|
17
54
|
when :install #default is github from now!
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
55
|
+
location,url=ARGV[1],'https://github.com'
|
56
|
+
if (tmp=location.split("/")).length==5 and tmp[1].empty?
|
57
|
+
url=tmp[0...3].join("/")
|
58
|
+
location=tmp[3..-1].join("/")
|
59
|
+
end
|
60
|
+
owner,package=File.split(location)
|
61
|
+
package = package[0...-4] if package =~ /\.git$/
|
62
|
+
package_dir = File.join(repo_dir,owner)
|
63
|
+
FileUtils.mkdir_p package_dir
|
64
|
+
FileUtils.cd package_dir
|
65
|
+
`git clone #{url}/#{owner}/#{package}.git`
|
66
|
+
|
26
67
|
when :update
|
27
68
|
FileUtils.cd File.join(repo_dir,ARGV[1])
|
28
69
|
`git pull`
|
29
70
|
|
30
|
-
# dyndoc-package link rcqls/dyndoc-share/library/RCqls (default to RCqls)
|
31
|
-
# dyndoc-package link rcqls/dyndoc-share/library/RCqls RCqls
|
32
|
-
# dyndoc-package link <real local path to expand>
|
33
71
|
when :link
|
34
72
|
path = File.expand_path(ARGV[1])
|
35
73
|
unless (local = (File.directory? path) )
|
@@ -45,7 +83,7 @@ if RUBY_PLATFORM =~ /(?:msys|mingw)/
|
|
45
83
|
else
|
46
84
|
FileUtils.ln_sf source,target
|
47
85
|
end
|
48
|
-
|
86
|
+
|
49
87
|
when :unlink
|
50
88
|
package = ARGV[1]
|
51
89
|
if RUBY_PLATFORM =~ /(?:msys|mingw)/
|
data/bin/dyn-html
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'dyndoc-convert'
|
3
|
+
require 'dyndoc-edit'
|
4
|
+
require 'dyndoc/init/home'
|
5
|
+
dyndoc_home = Dyndoc.home
|
6
|
+
#p Dyndoc.home
|
7
|
+
|
8
|
+
cfg_yml = File.join(dyndoc_home,"etc","dyn-html.yml")
|
9
|
+
|
10
|
+
cfg=YAML::load_file(cfg_yml) if File.exist? cfg_yml
|
11
|
+
|
12
|
+
|
13
|
+
## To put inside yaml config file!
|
14
|
+
root = cfg["root"] || File.join(ENV["HOME"],"RCqls","RodaServer")
|
15
|
+
edit_root = File.join(root ,"edit")
|
16
|
+
pages_root = File.join(root ,"public","pages")
|
17
|
+
current_email = cfg["email"] || "rdrouilh@gmail.com" #default email user can be overriden by -u option
|
18
|
+
|
19
|
+
args=ARGV
|
20
|
+
args=["-h"] if args.empty?
|
21
|
+
|
22
|
+
require 'optparse'
|
23
|
+
|
24
|
+
$VERBOSE = nil
|
25
|
+
|
26
|
+
## Examples:
|
27
|
+
## 1) global mode:
|
28
|
+
## dyn-html /dev/R/test.dyn
|
29
|
+
## 2) user mode: relative path used instead of ~ since ~ is interpreted in bash mode!
|
30
|
+
## dyn-html -u remy.drouilhet@upmf-grenoble.fr cfies2017/index.dyn:index
|
31
|
+
## dyn-html -u remy.drouilhet@upmf-grenoble.fr cfies2017/index.dyn:all
|
32
|
+
|
33
|
+
options={watching: nil, refresh: nil, first: true}
|
34
|
+
|
35
|
+
OptionParser.new do |opts|
|
36
|
+
opts.banner = "Usage: dyn-html [-u email_user] [-w] [-r <url-to-refresh-when-watched>] [/]<relative_path>/<file>.dyn "
|
37
|
+
|
38
|
+
opts.on( '-u', '--user EMAIL', 'user email' ) do |email|
|
39
|
+
current_email=email
|
40
|
+
end
|
41
|
+
|
42
|
+
opts.on( '-w', '--watch', 'watch file') do
|
43
|
+
options[:watching]=true
|
44
|
+
end
|
45
|
+
|
46
|
+
opts.on( '-r', '--refresh HTML', 'refresh page' ) do |html|
|
47
|
+
options[:refresh]=html
|
48
|
+
end
|
49
|
+
|
50
|
+
end.parse!(args)
|
51
|
+
|
52
|
+
|
53
|
+
## THIS IS A COPY FROM edit.rb
|
54
|
+
## TODO: TO PLACE IN SOME COMMON LIBRARY!
|
55
|
+
|
56
|
+
## Mandatory input
|
57
|
+
p args
|
58
|
+
dyn_file,doc_tag=args[0].split(":")
|
59
|
+
doc_tag="" unless doc_tag
|
60
|
+
doc_tag="__ALL_DOC_TAG__" if doc_tag.downcase == "all"
|
61
|
+
|
62
|
+
## Detect docs_tags_info
|
63
|
+
dyn_file=File.join(["","users",current_email],dyn_file) unless dyn_file[0,1]=="/"
|
64
|
+
filename=File.join(edit_root,dyn_file)
|
65
|
+
doc_tags_info=Dyndoc::Edit.get_doc_tags_info(File.read(filename))
|
66
|
+
|
67
|
+
if dyn_file and (dyn_file=~/(.*)(?:\.dyn|_html.dyn)$/)
|
68
|
+
#p [:dyn_file,dyn_file,$1]
|
69
|
+
html_files=Dyndoc::Edit.html_files({doc_tags_info: doc_tags_info , dyn_file: dyn_file },current_email)
|
70
|
+
##p [:html_files,html_files]
|
71
|
+
html_file=html_files[doc_tag] || html_files[""]
|
72
|
+
|
73
|
+
# Ex for opts:
|
74
|
+
# rdrouilh : [:dyn_opts, {:dyn_root=>"/Users/remy/RCqls/RodaServer/edit", :html_root=>"/Users/remy/RCqls/RodaServer/public/pages", :user=>"rdrouilh@gmail.com", :doc_tag=>"bio", :html_files=>{""=>"/dev/R/test.html", "ssd"=>"/dev/R/ssd.html", "bio"=>"/dev/R/bio.html", "tmp"=>"/dev/R/tmp.html", "cours"=>"/dev/R/cours.html"}}]
|
75
|
+
# remy.drouilhet : [:dyn_opts, {:dyn_root=>"/Users/remy/RCqls/RodaServer/edit", :html_root=>"/Users/remy/RCqls/RodaServer/public/pages", :user=>"remy.drouilhet@upmf-grenoble.fr", :doc_tag=>"index", :html_files=>{""=>"/users/remy.drouilhet@upmf-grenoble.fr/cfies2017/index.html", "index"=>"/users/remy.drouilhet@upmf-grenoble.fr/cfies2017/index.html", "dates"=>"/users/remy.drouilhet@upmf-grenoble.fr/cfies2017/dates.html", "sc"=>"/users/remy.drouilhet@upmf-grenoble.fr/cfies2017/sc.html", "orga"=>"/users/remy.drouilhet@upmf-grenoble.fr/cfies2017/orga.html"}}]
|
76
|
+
opts = {
|
77
|
+
dyn_root: edit_root,
|
78
|
+
html_root: pages_root,
|
79
|
+
user: current_email,
|
80
|
+
doc_tag: doc_tag,
|
81
|
+
html_files: html_files
|
82
|
+
}
|
83
|
+
##p opts
|
84
|
+
file_to_process=File.join(opts[:dyn_root],dyn_file)
|
85
|
+
cmd_to_open=nil
|
86
|
+
if options[:refresh]
|
87
|
+
cmd_to_open='tell application "Safari" to set URL of current tab of front window to "'+options[:refresh]+'"'
|
88
|
+
cmd_to_refresh='tell application "System Events"' + "\n" + 'tell process "Safari"' + "\n" + 'keystroke "r" using {command down}' + "\n" + 'delay 60' + "\n" + 'end tell' + "\n" + 'end tell'
|
89
|
+
end
|
90
|
+
unless options[:watching]
|
91
|
+
## dyn_file[1..-1] to have a relative path...
|
92
|
+
if Dyndoc::Linter.check_file(file_to_process).empty?
|
93
|
+
Dyndoc.cli_convert_from_file(dyn_file[1..-1],html_file, opts)
|
94
|
+
else
|
95
|
+
puts dyn_file[1..-1]+" not well-formed!"
|
96
|
+
end
|
97
|
+
else
|
98
|
+
require 'filewatcher'
|
99
|
+
require 'dyndoc-linter'
|
100
|
+
FileWatcher.new([file_to_process]).watch() do |filename, event|
|
101
|
+
if event == :changed
|
102
|
+
if Dyndoc::Linter.check_file(file_to_process).empty?
|
103
|
+
Dyndoc.cli_convert_from_file(dyn_file[1..-1],html_file, opts)
|
104
|
+
puts dyn_file[1..-1]+" processed!"
|
105
|
+
if options[:first]
|
106
|
+
`osascript -e '#{cmd_to_open}'`
|
107
|
+
options[:first]=nil
|
108
|
+
else
|
109
|
+
%x{osascript<<-ENDREFRESH
|
110
|
+
tell app "Safari" to activate
|
111
|
+
tell application "System Events"
|
112
|
+
keystroke "r" using {command down}
|
113
|
+
end tell
|
114
|
+
ENDREFRESH
|
115
|
+
}
|
116
|
+
end
|
117
|
+
else
|
118
|
+
puts dyn_file[1..-1]+" not well-formed!"
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
data/bin/dyn-lint
ADDED
data/bin/dyn-scan
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
args=ARGV
|
4
|
+
args=["-h"] if args.empty?
|
5
|
+
|
6
|
+
input,mode,master=false,:process,true
|
7
|
+
|
8
|
+
require 'optparse'
|
9
|
+
|
10
|
+
$VERBOSE = nil
|
11
|
+
|
12
|
+
OptionParser.new do |opts|
|
13
|
+
opts.banner = "Usage: dyn-scan [options]"
|
14
|
+
|
15
|
+
opts.on( '-p', '--pretty', 'pretty method' ) do
|
16
|
+
mode=:pretty
|
17
|
+
end
|
18
|
+
|
19
|
+
opts.on( '-i', '--input', 'input line' ) do
|
20
|
+
input=true
|
21
|
+
end
|
22
|
+
|
23
|
+
opts.on( '-x', '--extract', 'extract method' ) do
|
24
|
+
mode=:extract
|
25
|
+
end
|
26
|
+
|
27
|
+
end.parse!(args)
|
28
|
+
|
29
|
+
|
30
|
+
require 'dyndoc/base/scanner'
|
31
|
+
scan=Dyndoc::DevTagScanner.new(:dtag)
|
32
|
+
b=(input ? args[0] : File.read(args[0]) )
|
33
|
+
b="{#document][#main]"+b+"[#}" if master
|
34
|
+
scan.tokenize(b)
|
35
|
+
case mode
|
36
|
+
when :extract
|
37
|
+
p scan.extract
|
38
|
+
when :pretty
|
39
|
+
scan.pretty_print(scan.parse_text(scan.extract))
|
40
|
+
when :process
|
41
|
+
p scan.process(b)
|
42
|
+
end
|
data/lib/dyndoc-edit.rb
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
module Dyndoc
|
2
|
+
module Edit
|
3
|
+
|
4
|
+
def Edit.docs_from_doc_tags_info(doc_tags_info)
|
5
|
+
docs={}
|
6
|
+
unless doc_tags_info.empty?
|
7
|
+
doc_tags_info.split(",").each{|e|
|
8
|
+
if e.strip =~ /^([^\(]*)(\([^\(\)]*\))?$/
|
9
|
+
docs[$1.strip]=($2 || "("+$1.strip+")")[1..-2].strip
|
10
|
+
end
|
11
|
+
}
|
12
|
+
end
|
13
|
+
return docs
|
14
|
+
end
|
15
|
+
|
16
|
+
def Edit.get_doc_tags_info(content)
|
17
|
+
doc_tags_info=""
|
18
|
+
if content =~ /^\-{3}/
|
19
|
+
b=content.split(/^(\-{3,})/,-1)
|
20
|
+
if b[0].empty? and b.length>4
|
21
|
+
tmp=b[2].strip.split("\n").select{|e2| e2.strip =~/^docs\:/}
|
22
|
+
doc_tags_info=tmp[0] || ""
|
23
|
+
doc_tags_info=$1.strip if doc_tags_info =~ /^docs\:(.*)/
|
24
|
+
end
|
25
|
+
end
|
26
|
+
return doc_tags_info
|
27
|
+
end
|
28
|
+
|
29
|
+
def Edit.get_docs(doc_tags_info)
|
30
|
+
Edit.docs_from_doc_tags_info(doc_tags_info)
|
31
|
+
end
|
32
|
+
|
33
|
+
def Edit.get_doc_tags(doc_tags_info)
|
34
|
+
Edit.get_docs(doc_tags_info).keys
|
35
|
+
end
|
36
|
+
|
37
|
+
def Edit.get_doc_tags_menu(doc_tags_info)
|
38
|
+
doc_tags=Edit.get_doc_tags(doc_tags_info)
|
39
|
+
return "" if doc_tags.empty?
|
40
|
+
doc_tags="<div class=\"item\" data-value=\"\">default</div>"+doc_tags.map{|e| "<div class=\"item\">"+e+"</div>"}.join("")
|
41
|
+
##p [:dropdown,doc_tags]
|
42
|
+
doc_tags
|
43
|
+
end
|
44
|
+
|
45
|
+
def Edit.html_file(doc,user=nil) #doc={tag: ..., dyn_file: ..., doc_tags_info: ...}
|
46
|
+
html_file=File.join(File.dirname(doc[:dyn_file]),File.basename(doc[:dyn_file],".*")+".html")
|
47
|
+
docs=Edit.get_docs(doc[:doc_tags_info])
|
48
|
+
if !docs.empty? and docs.keys.include? doc[:tag]
|
49
|
+
doc_extra=docs[doc[:tag]]
|
50
|
+
if doc_extra[0,1]=="_"
|
51
|
+
doc_extra +=doc[:tag] if doc_extra.length==1
|
52
|
+
html_file=File.join(File.dirname(doc[:dyn_file]),File.basename(doc[:dyn_file],".*")+doc_extra+".html")
|
53
|
+
elsif doc_extra[0,1]=="~"
|
54
|
+
# from user root
|
55
|
+
if user
|
56
|
+
html_file=File.join("/users",user,doc_extra[1..-1]+".html")
|
57
|
+
end
|
58
|
+
elsif doc_extra[0,1]=="/"
|
59
|
+
# from global root
|
60
|
+
html_file=File.join(doc_extra[1..-1]+".html")
|
61
|
+
elsif !doc_extra.empty?
|
62
|
+
html_file=File.join(File.dirname(doc[:dyn_file]),doc_extra+".html")
|
63
|
+
end
|
64
|
+
end
|
65
|
+
return html_file
|
66
|
+
end
|
67
|
+
|
68
|
+
def Edit.html_files(doc,user=nil) #doc={dyn_file: ..., doc_tags_info: ...}
|
69
|
+
html_files={}
|
70
|
+
doc_tags=[""]+Edit.get_doc_tags(doc[:doc_tags_info])
|
71
|
+
doc2=doc.dup
|
72
|
+
doc_tags.each do |tag|
|
73
|
+
doc2[:tag]=tag
|
74
|
+
html_file=Edit.html_file(doc2,user)
|
75
|
+
html_files[tag]=html_file
|
76
|
+
end
|
77
|
+
return html_files
|
78
|
+
end
|
79
|
+
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Pour simplifier chercher les tags voisins qui sont ouvrant et fermant et les virer
|
2
|
+
|
3
|
+
## First version of dyn-lint
|
4
|
+
## TODO:
|
5
|
+
## * detect the position of the error
|
6
|
+
## * warning when suspecting block ending by ] by accident
|
7
|
+
|
8
|
+
module Dyndoc
|
9
|
+
module Linter
|
10
|
+
def Linter.selected_tags(txt)
|
11
|
+
selected_tags=txt.scan(/(?:\{[\#\@](?:[\w\:\|-]*[<>]?[=?!><]?(?:\.\w*)?)\]|\[[\#\@](?:[\w\:\|-]*[<>]?[=?!><]?)\})/).each_with_index.map{|e,i| [i+1,e] }
|
12
|
+
## p selected_tags
|
13
|
+
selected_tags
|
14
|
+
end
|
15
|
+
|
16
|
+
def Linter.simplify_dyndoc_tags(tags)
|
17
|
+
(0..(tags.length-2)).each do |i|
|
18
|
+
if (tags[i][1] == "{#"+tags[i+1][1][2..-2]+"]" and tags[i+1][1] == "[#"+tags[i][1][2..-2]+"}") or (tags[i][1][0]=="{" and tags[i+1][1]=="[#}")
|
19
|
+
tags.delete_at i+1;tags.delete_at i
|
20
|
+
Dyndoc::Linter.simplify_dyndoc_tags(tags)
|
21
|
+
break
|
22
|
+
end
|
23
|
+
end
|
24
|
+
return tags
|
25
|
+
end
|
26
|
+
|
27
|
+
def Linter.guess_bad_tags(tags)
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
def Linter.check_content(txt)
|
32
|
+
Dyndoc::Linter.simplify_dyndoc_tags(Dyndoc::Linter.selected_tags(txt))
|
33
|
+
end
|
34
|
+
|
35
|
+
def Linter.check_file(file_to_lint)
|
36
|
+
txt=File.read(file_to_lint)
|
37
|
+
Dyndoc::Linter.check_content(txt)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,304 @@
|
|
1
|
+
---
|
2
|
+
fileTypes:
|
3
|
+
- r
|
4
|
+
- reb
|
5
|
+
- red
|
6
|
+
- reds
|
7
|
+
- topaz
|
8
|
+
firstLineMatch: ^#!/.*\brebol\b
|
9
|
+
foldingStartMarker: ^[^;]*[\[\{\(]\s*(;.*)?$
|
10
|
+
foldingStopMarker: ^\s*[\]\}\)].*$
|
11
|
+
keyEquivalent: ^R
|
12
|
+
name: Rebol
|
13
|
+
patterns:
|
14
|
+
- include: '#comments'
|
15
|
+
- include: '#type-literal'
|
16
|
+
- include: '#logic'
|
17
|
+
- include: '#strings'
|
18
|
+
- include: '#values'
|
19
|
+
- include: '#words'
|
20
|
+
- include: '#errors'
|
21
|
+
repository:
|
22
|
+
binary-base-sixteen:
|
23
|
+
begin: (16)?#\{
|
24
|
+
end: \}
|
25
|
+
name: string.other.base16.rebol
|
26
|
+
patterns:
|
27
|
+
- match: '[0-9a-fA-F]*'
|
28
|
+
name: constant.character.binary.rebol
|
29
|
+
binary-base-sixtyfour:
|
30
|
+
begin: 64#\{
|
31
|
+
end: \}
|
32
|
+
name: string.other.base64.rebol
|
33
|
+
binary-base-two:
|
34
|
+
begin: 2#\{
|
35
|
+
end: \}
|
36
|
+
name: string.other.base2.rebol
|
37
|
+
patterns:
|
38
|
+
- match: '[01]*'
|
39
|
+
name: constant.character.binary.rebol
|
40
|
+
block-blocks:
|
41
|
+
begin: (\[)
|
42
|
+
beginCaptures:
|
43
|
+
'0':
|
44
|
+
name: punctuation.section.embedded.begin.rebol
|
45
|
+
end: (\])
|
46
|
+
endCaptures:
|
47
|
+
'0':
|
48
|
+
name: punctuation.section.embedded.end.rebol
|
49
|
+
name: meta.group.block.rebol
|
50
|
+
patterns:
|
51
|
+
- include: $self
|
52
|
+
block-parens:
|
53
|
+
begin: \(
|
54
|
+
end: \)
|
55
|
+
name: meta.group.paren.rebol
|
56
|
+
patterns:
|
57
|
+
- include: $self
|
58
|
+
blocks:
|
59
|
+
patterns:
|
60
|
+
- include: '#block-blocks'
|
61
|
+
- include: '#block-parens'
|
62
|
+
character:
|
63
|
+
match: '#"(\^(\(([0-9a-fA-F]{2,4}|[a-zA-Z]{3,6})\)|.)|[^\^\"])"'
|
64
|
+
name: constant.other.character.rebol
|
65
|
+
character-html:
|
66
|
+
captures:
|
67
|
+
'1':
|
68
|
+
name: punctuation.definition.entity.html
|
69
|
+
'3':
|
70
|
+
name: punctuation.definition.entity.html
|
71
|
+
match: (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)
|
72
|
+
name: constant.character.entity.html
|
73
|
+
character-inline:
|
74
|
+
match: \^(\([0-9a-fA-F]{2,4}\)|.)
|
75
|
+
name: constant.character.rebol
|
76
|
+
comment-line:
|
77
|
+
match: ;([^%\n]|%(?!>))*
|
78
|
+
name: comment.line.semicolon.rebol
|
79
|
+
comment-multiline-block:
|
80
|
+
begin: comment\s*\[
|
81
|
+
end: \]
|
82
|
+
name: comment.block.rebol
|
83
|
+
patterns:
|
84
|
+
- include: '#comment-multiline-block-nested'
|
85
|
+
comment-multiline-block-nested:
|
86
|
+
begin: \[
|
87
|
+
end: \]
|
88
|
+
name: comment.block.rebol
|
89
|
+
patterns:
|
90
|
+
- include: '#comment-multiline-block-nested'
|
91
|
+
comment-multiline-string:
|
92
|
+
begin: comment\s*\{
|
93
|
+
end: \}
|
94
|
+
name: comment.block.rebol
|
95
|
+
patterns:
|
96
|
+
- include: '#comment-multiline-string-nested'
|
97
|
+
comment-multiline-string-nested:
|
98
|
+
begin: \{
|
99
|
+
end: \}
|
100
|
+
name: comment.block.rebol
|
101
|
+
patterns:
|
102
|
+
- include: '#comment-multiline-string-nested'
|
103
|
+
comment-tag:
|
104
|
+
begin: (?<=^|[\s\[\]()}"])<!--
|
105
|
+
end: -->
|
106
|
+
name: comment.block.tag.rebol
|
107
|
+
comments:
|
108
|
+
patterns:
|
109
|
+
- include: '#comment-shebang'
|
110
|
+
- include: '#comment-line'
|
111
|
+
- include: '#comment-multiline-string'
|
112
|
+
- include: '#comment-multiline-block'
|
113
|
+
- include: '#comment-tag'
|
114
|
+
comments-shebang:
|
115
|
+
match: ^#!/.*rebol.*
|
116
|
+
name: comment.line.shebang.rebol
|
117
|
+
error-chars:
|
118
|
+
match: '[,}]'
|
119
|
+
name: invalid.illegal.char.rebol
|
120
|
+
errors:
|
121
|
+
patterns:
|
122
|
+
- include: '#error-chars'
|
123
|
+
logic:
|
124
|
+
match: '#\[(true|false|none)]'
|
125
|
+
name: constant.language.logic.rebol
|
126
|
+
string-email:
|
127
|
+
match: '[^\s\n:/\[\]\(\)]+@[^\s\n:/\[\]\(\)]+'
|
128
|
+
name: string.email.rebol
|
129
|
+
string-file:
|
130
|
+
match: '%[^\s\n\[\]\(\)]*'
|
131
|
+
name: string.other.file.rebol
|
132
|
+
string-file-quoted:
|
133
|
+
begin: '%"'
|
134
|
+
end: '"'
|
135
|
+
name: string.other.file.rebol
|
136
|
+
patterns:
|
137
|
+
- match: '%[A-Fa-f0-9]{2}'
|
138
|
+
name: constant.character.hex.rebol
|
139
|
+
string-issue:
|
140
|
+
match: '#[^\s\n\[\]\(\)]*'
|
141
|
+
name: string.other.issue.rebol
|
142
|
+
string-multiline:
|
143
|
+
begin: \{
|
144
|
+
end: \}
|
145
|
+
name: string.other.rebol
|
146
|
+
patterns:
|
147
|
+
- include: '#string-rsp-tag'
|
148
|
+
- include: '#character-inline'
|
149
|
+
- include: '#character-html'
|
150
|
+
- include: '#string-nested-multiline'
|
151
|
+
string-nested-multiline:
|
152
|
+
begin: \{
|
153
|
+
end: \}
|
154
|
+
name: string.other.rebol
|
155
|
+
patterns:
|
156
|
+
- include: '#string-nested-multiline'
|
157
|
+
string-quoted:
|
158
|
+
begin: '"'
|
159
|
+
end: '"'
|
160
|
+
name: string.quoted.rebol
|
161
|
+
patterns:
|
162
|
+
- include: '#string-rsp-tag'
|
163
|
+
- include: '#character-inline'
|
164
|
+
- include: '#character-html'
|
165
|
+
string-rsp-tag:
|
166
|
+
begin: '<%(==?|:|!)? '
|
167
|
+
end: ' %>'
|
168
|
+
name: source.rebol.embedded.block.html
|
169
|
+
patterns:
|
170
|
+
- include: source.rebol
|
171
|
+
string-tag:
|
172
|
+
begin: <(?:\/|%={0,2}\ |\!)?(?:([-_a-zA-Z0-9]+):)?([-_a-zA-Z0-9:]+)
|
173
|
+
captures:
|
174
|
+
'1':
|
175
|
+
name: entity.other.namespace.xml
|
176
|
+
'2':
|
177
|
+
name: entity.name.tag.xml
|
178
|
+
end: (?:\s/|\ %)?>
|
179
|
+
name: meta.tag.rebol
|
180
|
+
patterns:
|
181
|
+
- captures:
|
182
|
+
'1':
|
183
|
+
name: entity.other.namespace.xml
|
184
|
+
'2':
|
185
|
+
name: entity.other.attribute-name.xml
|
186
|
+
match: ' (?:([-_a-zA-Z0-9]+):)?([_a-zA-Z-]+)'
|
187
|
+
- include: '#string-tag-double-quoted'
|
188
|
+
- include: '#string-tag-single-quoted'
|
189
|
+
string-tag-double-quoted:
|
190
|
+
begin: '"'
|
191
|
+
end: '"'
|
192
|
+
name: string.quoted.double.xml
|
193
|
+
string-tag-single-quoted:
|
194
|
+
begin: ''''
|
195
|
+
end: ''''
|
196
|
+
name: string.quoted.single.xml
|
197
|
+
string-url:
|
198
|
+
match: '[A-Za-z][\w-]{0,15}:(/{0,3}[^\s\n\[\]\(\)]+|//)'
|
199
|
+
name: string.other.url.rebol
|
200
|
+
strings:
|
201
|
+
patterns:
|
202
|
+
- include: '#character'
|
203
|
+
- include: '#string-quoted'
|
204
|
+
- include: '#string-multiline'
|
205
|
+
- include: '#string-tag'
|
206
|
+
- include: '#string-file-quoted'
|
207
|
+
- include: '#string-file'
|
208
|
+
- include: '#string-url'
|
209
|
+
- include: '#string-email'
|
210
|
+
- include: '#binary-base-two'
|
211
|
+
- include: '#binary-base-sixty-four'
|
212
|
+
- include: '#binary-base-sixteen'
|
213
|
+
- include: '#string-issue'
|
214
|
+
type-literal:
|
215
|
+
begin: '#\[(?:(\w+!))'
|
216
|
+
captures:
|
217
|
+
'1':
|
218
|
+
name: keyword.control.datatype.rebol
|
219
|
+
end: ']'
|
220
|
+
name: meta.literal.rebol
|
221
|
+
patterns:
|
222
|
+
- include: $self
|
223
|
+
value-date:
|
224
|
+
match: \d{1,4}\-(Jan(u(a(ry?)?)?)?|Feb(u(a(ry?)?)?)?|Mar(ch?)?|Apr(il?)?|May|June?|July?|Aug(u(st?)?)?|Sep(t(e(m(b(er?)?)?)?)?)?|Oct(o(b(er?)?)?)?|Nov(e(m(b(er?)?)?)?)?|Dec(e(m(b(er?)?)?)?)?|[1-9]|1[012])\-\d{1,4}(/\d{1,2}[:]\d{1,2}([:]\d{1,2}(\.\d{1,5})?)?([+-]\d{1,2}[:]\d{1,2})?)?
|
225
|
+
name: constant.other.date.rebol
|
226
|
+
value-money:
|
227
|
+
match: (?<!\w)-?[a-zA-Z]*\$[0-9]+(\.[0-9]{2})?
|
228
|
+
name: constant.numeric.money.rebol
|
229
|
+
value-number:
|
230
|
+
match: (?<![\w.,])([-+]?((\d+[\d']*[.,]?[\d']*)|([.,]\d+[\d']*))((e|E)(\+|-)?\d+)?)(?=\W)
|
231
|
+
name: constant.numeric.rebol
|
232
|
+
value-pair:
|
233
|
+
match: (?<!\w)[-+]?[[:digit:]]+[x][-+]?[[:digit:]]+
|
234
|
+
name: constant.other.pair.rebol
|
235
|
+
value-time:
|
236
|
+
match: ([-+]?[:]\d{1,2}([aApP][mM])?)|([-+]?[:]\d{1,2}[.]\d{0,9})|([-+]?\d{1,2}[:]\d{1,2}([aApP][mM])?)|([-+]?\d{1,2}[:]\d{1,2}[.]\d{0,9})|([-+]?\d{1,2}[:]\d{1,2}[:]\d{1,2}([.]\d{0,9})?([aApP][mM])?)(?!\w)
|
237
|
+
name: constant.other.time.rebol
|
238
|
+
value-tuple:
|
239
|
+
match: (?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){2,9}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.?
|
240
|
+
name: constant.other.tuple.rebol
|
241
|
+
values:
|
242
|
+
patterns:
|
243
|
+
- include: '#value-date'
|
244
|
+
- include: '#value-time'
|
245
|
+
- include: '#value-tuple'
|
246
|
+
- include: '#value-number'
|
247
|
+
- include: '#value-pair'
|
248
|
+
- include: '#value-money'
|
249
|
+
word:
|
250
|
+
match: (?<=^|[\s\[\]()}"/])[A-Za-z=\-\?\!\_\*\+\.`~\&][A-Za-z0-9=\-\!\?\_\*\+\.`~&]*(/\d+)*(/(?=[A-Za-z=\-\?\!\_\*\+\.`~\&\(:'%])|(?=[\s\[\]\(\)\{"]|$))
|
251
|
+
name: constant.other.word.rebol
|
252
|
+
word-datatype:
|
253
|
+
match: (?<=^|[\s\[\]()}"])(end\!|unset\!|error\!|datatype\!|context\!|native\!|action\!|routine\!|op\!|function\!|object\!|struct\!|library\!|port\!|any-type\!|any-word\!|any-function\!|number\!|series\!|any-string\!|any-block\!|symbol\!|word\!|set-word\!|get-word\!|lit-word\!|refinement\!|none\!|logic\!|integer\!|decimal\!|money\!|time\!|date\!|char\!|pair\!|event\!|tuple\!|bitset\!|string\!|issue\!|binary\!|file\!|email\!|url\!|image\!|tag\!|block\!|paren\!|path\!|set-path\!|lit-path\!|hash\!|list\!)(?=[\s\[\](){"]|$)
|
254
|
+
name: keyword.control.datatype.rebol
|
255
|
+
word-get:
|
256
|
+
match: ':[A-Za-z=\-\?\!\_\*\+\.`~\&][A-Za-z0-9=\-\!\?\_\*\+\.`~&]*(/([A-Za-z=\-\?\!\_\*\+\.`~\&][A-Za-z0-9=\-\!\?\_\*\+\.`~&]*|\d+)*)*'
|
257
|
+
name: variable.other.getword.rebol
|
258
|
+
word-header:
|
259
|
+
match: (?<=^\[|^)(Boron|REBOL|Rebol|Red(/System)?|Topaz|World)(?=\s*\[)
|
260
|
+
name: keyword.control.header.rebol
|
261
|
+
word-infix:
|
262
|
+
match: (?<=^|[\s\[\]()}"/])(\+\+?|--?|\*\*?|//?|=|>=?|<(=|>)?)(?=[\s\[\](){"])
|
263
|
+
name: keyword.control.native.rebol
|
264
|
+
word-lit:
|
265
|
+
match: (?<=^|[\s\[\]()}"/])'[A-Za-z=\-\?\!\_\*\+\.`~\&][A-Za-z0-9=\-\!\?\_\*\+\.`~\&]*(/([A-Za-z=\-\?\!\_\*\+\.`~][A-Za-z0-9=\-\!\?\_\*\+\.`~]*|\d+))*
|
266
|
+
name: constant.other.litword.rebol
|
267
|
+
word-logic:
|
268
|
+
match: (?<=^|[\s\[\]()}"])(true|yes|false|off|none|no)(?=[\s\[\](){"])
|
269
|
+
name: constant.other.logic.rebol
|
270
|
+
word-native:
|
271
|
+
match: (?<=^|[\s\[\]()}"])(about|abs|absolute|action\?|add|alert|alias|all|alter|and~|and|any|any-block\?|any-function\?|any-string\?|any-type\?|any-word\?|append|arccosine|arcsine|arctangent|array|ask|at|back|binary\?|bind|bitset\?|block\?|body-of|boot-prefs|break|browse|build-tag|call|caret-to-offset|case|catch|center-face|change|change-dir|char\?|charset|checksum|choose|clean-path|clear|clear-fields|close|closure|collect|comment|complement|compose|compress|confine|confirm|connected\?|context|continue-post|copy|cosine|cp|crypt-strength\?|cvs-date|cvs-version|datatype\?|date\?|debase|decimal\?|decode-cgi|decode-url|decompress|deflag-face|dehex|delete|demo|desktop|detab|dh-compute-key|dh-generate-key|dh-make-key|difference|dir\?|dirize|disarm|dispatch|divide|do|do-boot|do-events|do-face|do-face-alt|does|dsa-generate-key|dsa-make-key|dsa-make-signature|dsa-verify-signature|dump-face|dump-pane|echo|editor|either|else|email\?|emailer|empty\?|enbase|entab|equal\?|error\?|even\?|event\?|exclude|exists-thru\?|exists\?|exit|exp|extract|fifth|file\?|find|find-key-face|find-window|first|flag-face|flag-face\?|flash|focus|for|forall|foreach|forever|form|forskip|found\?|fourth|free|func|function\??|get|get-env|get-modes|get-net-info|get-style|get-word\?|greater-or-equal\?|greater\?|halt|has|hash\?|head\??|help|hide|hide-popup|if|image\?|import-email|in|in-window\?|index\?|info\?|inform|input|input\?|insert|insert-event-func|inside\?|integer\?|intersect|issue\?|join|keep|last|launch|launch-thru|layout|length\?|lesser-or-equal\?|lesser\?|library\?|link-app\?|link\?|list-dir|list\?|lit-path\?|lit-word\?|load|load-image|load-prefs|load-thru|log-10|log-2|log-e|logic\?|loop|lowercase|make|make-dir|make-face|max|maximum|maximum-of|min|minimum|minimum-of|modified\?|mold|money\?|multiply|native\?|negate|negative\?|net-error|next|none\?|not|not-equal\?|now|number\?|object\?|odd\?|offset-to-caret|offset\?|op\?|open|open-events|or|or~|outside\?|pair\?|paren\?|parse|parse-email-addrs|parse-header|parse-header-date|parse-xml|path-thru|path\?|pick|poke|port\?|positive\?|power|prin|print|probe|protect|protect-system|q|query|quit|random|read|read-io|read-net|read-thru|reboot|recycle|reduce|refinement\?|reform|rejoin|remainder|remold|remove|remove-event-func|rename|repeat|repend|replace|request|request-color|request-date|request-download|request-file|request-list|request-pass|request-text|resend|return|reverse|routine\?|rsa-encrypt|rsa-generate-key|rsa-make-key|same\?|save|save-prefs|save-user|screen-offset\?|script\?|scroll-para|second|secure|select|send|series\?|set|set-env|set-font|set-modes|set-net|set-para|set-path\?|set-style|set-user|set-user-name|set-word\?|show|show-popup|sine|size-text|size\?|skip|sort|source|span\?|spec-of|split-path|square-root|strict-equal\?|strict-not-equal\?|string\?|struct\?|stylize|subtract|switch|tag\?|tail\??|take|tangent|textinfo|third|throw|throw-on-error|time\?|title-of|to|to-local-file|to-rebol-file|trace|trim|try|tuple\?|types-of|type\?|unfocus|uninstall|union|unique|unless|unprotect|unset|unset\?|until|unview|update|upgrade|uppercase|url\?|usage|use|values-of|value\?|vbug|view|view-install|view-prefs|view\?|viewed\?|wait|what|what-dir|while|win-offset\?|within\?|words-of|word\?|write|write-io|write-user|xor|xor~|zero\?|/local|thru|end)(/(?=[A-Za-z=\-\?\!\_\*\+\.`~\&])|(?=[\s\[\](){"]|$))
|
272
|
+
name: keyword.control.native.rebol
|
273
|
+
word-native-to-type:
|
274
|
+
match: (?<=^|[\s\[\]()}"])(to-binary|to-bitset|to-block|to-char|to-date|to-decimal|to-email|to-event|to-file|to-get-word|to-hash|to-hex|to-idate|to-image|to-integer|to-issue|to-list|to-lit-path|to-lit-word|to-logic|to-money|to-none|to-pair|to-paren|to-path|to-refinement|to-set-path|to-set-word|to-string|to-tag|to-time|to-tuple|to-url|to-word)(?=[\s\[\](){"]|$)
|
275
|
+
name: constant.other.word.to-type.rebol
|
276
|
+
word-parse:
|
277
|
+
match: (?<=^|[\s\[\]()}"])(thru|some|opt|end)(?=[\s\[\](){"]|$)
|
278
|
+
name: keyword.control.parse.rebol
|
279
|
+
word-qm:
|
280
|
+
match: (?<=^|[\s\[\]()}"])(qm|route|render|redirect-to|publish|response|as|validate|verify|get-param|get-cookie|set-cookie|require)(/(?=[A-Za-z=\-\?\!\_\*\+\.`~\&])|(?=[\s\[\](){"]))
|
281
|
+
name: keyword.control.qm.rebol
|
282
|
+
word-refine:
|
283
|
+
match: /[A-Za-z=`~][A-Za-z0-9=\-\!\?\_\*\.`~]*
|
284
|
+
name: constant.other.word.refinement.rebol
|
285
|
+
word-set:
|
286
|
+
match: '[A-Za-z=\-\?\!\_\*\+\.`~\&][A-Za-z0-9=\-\!\?\_\*\+\.`~&]*(/([A-Za-z=\-\?\!\_\*\+\.`~\&][A-Za-z0-9=\-\!\?\_\*\+\.`~&]*|\d+))*:'
|
287
|
+
name: variable.other.setword.rebol
|
288
|
+
words:
|
289
|
+
name: meta.word.rebol
|
290
|
+
patterns:
|
291
|
+
- include: '#word-datatype'
|
292
|
+
- include: '#word-set'
|
293
|
+
- include: '#word-get'
|
294
|
+
- include: '#word-lit'
|
295
|
+
- include: '#word-header'
|
296
|
+
- include: '#word-native'
|
297
|
+
- include: '#word-native-to-type'
|
298
|
+
- include: '#word-infix'
|
299
|
+
- include: '#word-logic'
|
300
|
+
- include: '#word-refine'
|
301
|
+
- include: '#word-qm'
|
302
|
+
- include: '#word'
|
303
|
+
scopeName: source.rebol
|
304
|
+
uuid: 6BE0E13B-C4DD-478F-953A-2D84DBBCA2BA
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dyndoc-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CQLS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: R4rb
|
@@ -102,7 +102,10 @@ executables:
|
|
102
102
|
- dyn-cli
|
103
103
|
- dyn-srv
|
104
104
|
- dpm
|
105
|
+
- dyn-html
|
105
106
|
- dyn-init
|
107
|
+
- dyn-scan
|
108
|
+
- dyn-lint
|
106
109
|
extensions: []
|
107
110
|
extra_rdoc_files: []
|
108
111
|
files:
|
@@ -111,9 +114,14 @@ files:
|
|
111
114
|
- bin/dyn-cli
|
112
115
|
- bin/dyn-env
|
113
116
|
- bin/dyn-forever
|
117
|
+
- bin/dyn-html
|
114
118
|
- bin/dyn-init
|
119
|
+
- bin/dyn-lint
|
120
|
+
- bin/dyn-scan
|
115
121
|
- bin/dyn-srv
|
116
122
|
- lib/dyndoc-convert.rb
|
123
|
+
- lib/dyndoc-edit.rb
|
124
|
+
- lib/dyndoc-linter.rb
|
117
125
|
- lib/dyndoc/cli/interactive-client.rb
|
118
126
|
- lib/dyndoc/srv/interactive-server.rb
|
119
127
|
- lib/dyndoc/srv/tilt.rb
|
@@ -294,6 +302,7 @@ files:
|
|
294
302
|
- share/etc/uv/syntax/source.quake-config.syntax
|
295
303
|
- share/etc/uv/syntax/source.r-console.syntax
|
296
304
|
- share/etc/uv/syntax/source.r.syntax
|
305
|
+
- share/etc/uv/syntax/source.rebol.syntax
|
297
306
|
- share/etc/uv/syntax/source.regexp.oniguruma.syntax
|
298
307
|
- share/etc/uv/syntax/source.regexp.python.syntax
|
299
308
|
- share/etc/uv/syntax/source.regexp.syntax
|