code_rippa 0.0.7 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile.lock +36 -0
- data/LICENSE +2 -2
- data/README.md +18 -1
- data/bin/code_rippa +15 -16
- data/code_rippa.gemspec +12 -10
- data/lib/code_rippa.rb +69 -51
- data/lib/code_rippa/syntax/actionscript.syntax +52 -52
- data/lib/code_rippa/syntax/active4d.syntax +226 -180
- data/lib/code_rippa/syntax/active4d_html.syntax +163 -173
- data/lib/code_rippa/syntax/active4d_ini.syntax +34 -27
- data/lib/code_rippa/syntax/active4d_library.syntax +8 -15
- data/lib/code_rippa/syntax/ada.syntax +19 -18
- data/lib/code_rippa/syntax/antlr.syntax +85 -85
- data/lib/code_rippa/syntax/apache.syntax +103 -109
- data/lib/code_rippa/syntax/applescript.syntax +244 -229
- data/lib/code_rippa/syntax/asp.syntax +41 -36
- data/lib/code_rippa/syntax/asp_vb.net.syntax +77 -72
- data/lib/code_rippa/syntax/bibtex.syntax +88 -90
- data/lib/code_rippa/syntax/blog_html.syntax +17 -29
- data/lib/code_rippa/syntax/blog_markdown.syntax +17 -27
- data/lib/code_rippa/syntax/blog_text.syntax +15 -15
- data/lib/code_rippa/syntax/blog_textile.syntax +15 -15
- data/lib/code_rippa/syntax/build.syntax +27 -27
- data/lib/code_rippa/syntax/bulletin_board.syntax +159 -172
- data/lib/code_rippa/syntax/c.syntax +31 -34
- data/lib/code_rippa/syntax/cake.syntax +27 -27
- data/lib/code_rippa/syntax/camlp4.syntax +23 -23
- data/lib/code_rippa/syntax/cm.syntax +19 -18
- data/lib/code_rippa/syntax/coffeescript.syntax +134 -181
- data/lib/code_rippa/syntax/coldfusion.syntax +51 -60
- data/lib/code_rippa/syntax/context_free.syntax +106 -106
- data/lib/code_rippa/syntax/cs.syntax +31 -34
- data/lib/code_rippa/syntax/css.syntax +112 -112
- data/lib/code_rippa/syntax/css_experimental.syntax +1006 -1004
- data/lib/code_rippa/syntax/csv.syntax +40 -44
- data/lib/code_rippa/syntax/d.syntax +80 -84
- data/lib/code_rippa/syntax/diff.syntax +46 -45
- data/lib/code_rippa/syntax/dokuwiki.syntax +118 -119
- data/lib/code_rippa/syntax/dot.syntax +26 -26
- data/lib/code_rippa/syntax/doxygen.syntax +26 -26
- data/lib/code_rippa/syntax/dylan.syntax +35 -35
- data/lib/code_rippa/syntax/eiffel.syntax +39 -42
- data/lib/code_rippa/syntax/erlang.syntax +514 -511
- data/lib/code_rippa/syntax/f-script.syntax +44 -44
- data/lib/code_rippa/syntax/fortran.syntax +80 -76
- data/lib/code_rippa/syntax/fxscript.syntax +78 -77
- data/lib/code_rippa/syntax/greasemonkey.syntax +20 -20
- data/lib/code_rippa/syntax/gri.syntax +47 -47
- data/lib/code_rippa/syntax/groovy.syntax +105 -114
- data/lib/code_rippa/syntax/gtd.syntax +10 -10
- data/lib/code_rippa/syntax/gtdalt.syntax +83 -83
- data/lib/code_rippa/syntax/haml.syntax +50 -50
- data/lib/code_rippa/syntax/haskell.syntax +47 -47
- data/lib/code_rippa/syntax/html-asp.syntax +15 -15
- data/lib/code_rippa/syntax/html_django.syntax +15 -14
- data/lib/code_rippa/syntax/html_for_asp.net.syntax +232 -245
- data/lib/code_rippa/syntax/html_mason.syntax +75 -74
- data/lib/code_rippa/syntax/html_rails.syntax +17 -27
- data/lib/code_rippa/syntax/html_tcl.syntax +13 -13
- data/lib/code_rippa/syntax/icalendar.syntax +15 -15
- data/lib/code_rippa/syntax/inform.syntax +26 -26
- data/lib/code_rippa/syntax/ini.syntax +30 -30
- data/lib/code_rippa/syntax/installer_distribution_script.syntax +49 -49
- data/lib/code_rippa/syntax/io.syntax +49 -46
- data/lib/code_rippa/syntax/java.syntax +117 -126
- data/lib/code_rippa/syntax/javaproperties.syntax +13 -12
- data/lib/code_rippa/syntax/javascript.syntax +141 -141
- data/lib/code_rippa/syntax/javascript_+_prototype.syntax +42 -41
- data/lib/code_rippa/syntax/javascript_+_prototype_bracketed.syntax +92 -91
- data/lib/code_rippa/syntax/jquery_javascript.syntax +64 -64
- data/lib/code_rippa/syntax/json.syntax +39 -39
- data/lib/code_rippa/syntax/languagedefinition.syntax +373 -453
- data/lib/code_rippa/syntax/lexflex.syntax +136 -136
- data/lib/code_rippa/syntax/lighttpd.syntax +31 -31
- data/lib/code_rippa/syntax/lilypond.syntax +246 -337
- data/lib/code_rippa/syntax/lisp.syntax +32 -32
- data/lib/code_rippa/syntax/literate_haskell.syntax +12 -12
- data/lib/code_rippa/syntax/logo.syntax +13 -14
- data/lib/code_rippa/syntax/logtalk.syntax +81 -81
- data/lib/code_rippa/syntax/lua.syntax +50 -48
- data/lib/code_rippa/syntax/m.syntax +78 -78
- data/lib/code_rippa/syntax/macports_portfile.syntax +98 -97
- data/lib/code_rippa/syntax/makefile.syntax +19 -19
- data/lib/code_rippa/syntax/man.syntax +9 -9
- data/lib/code_rippa/syntax/mediawiki.syntax +311 -401
- data/lib/code_rippa/syntax/mips.syntax +34 -34
- data/lib/code_rippa/syntax/mod_perl.syntax +25 -31
- data/lib/code_rippa/syntax/modula-3.syntax +24 -24
- data/lib/code_rippa/syntax/moinmoin.syntax +102 -102
- data/lib/code_rippa/syntax/mootools.syntax +283 -300
- data/lib/code_rippa/syntax/movable_type.syntax +91 -90
- data/lib/code_rippa/syntax/multimarkdown.syntax +19 -30
- data/lib/code_rippa/syntax/objective-c++.syntax +6 -10
- data/lib/code_rippa/syntax/objective-c.syntax +134 -138
- data/lib/code_rippa/syntax/ocaml.syntax +455 -453
- data/lib/code_rippa/syntax/ocamllex.syntax +94 -93
- data/lib/code_rippa/syntax/ocamlyacc.syntax +98 -98
- data/lib/code_rippa/syntax/opengl.syntax +6 -6
- data/lib/code_rippa/syntax/pascal.syntax +43 -42
- data/lib/code_rippa/syntax/perl.syntax +612 -615
- data/lib/code_rippa/syntax/plain_text.syntax +17 -20
- data/lib/code_rippa/syntax/postscript.syntax +71 -69
- data/lib/code_rippa/syntax/processing.syntax +60 -60
- data/lib/code_rippa/syntax/prolog.syntax +17 -20
- data/lib/code_rippa/syntax/property_list.syntax +338 -359
- data/lib/code_rippa/syntax/python.syntax +487 -509
- data/lib/code_rippa/syntax/python_django.syntax +9 -10
- data/lib/code_rippa/syntax/qmake_project.syntax +67 -67
- data/lib/code_rippa/syntax/qt_c++.syntax +12 -15
- data/lib/code_rippa/syntax/quake3_config.syntax +18 -17
- data/lib/code_rippa/syntax/r.syntax +42 -42
- data/lib/code_rippa/syntax/r_console.syntax +7 -8
- data/lib/code_rippa/syntax/ragel.syntax +109 -115
- data/lib/code_rippa/syntax/rd_r_documentation.syntax +53 -53
- data/lib/code_rippa/syntax/regexp.syntax +26 -26
- data/lib/code_rippa/syntax/release_notes.syntax +46 -26
- data/lib/code_rippa/syntax/remind.syntax +146 -146
- data/lib/code_rippa/syntax/restructuredtext.syntax +132 -131
- data/lib/code_rippa/syntax/rez.syntax +46 -45
- data/lib/code_rippa/syntax/ruby.syntax +533 -601
- data/lib/code_rippa/syntax/ruby_experimental.syntax +82 -100
- data/lib/code_rippa/syntax/ruby_on_rails.syntax +56 -68
- data/lib/code_rippa/syntax/s5.syntax +35 -51
- data/lib/code_rippa/syntax/scheme.syntax +162 -260
- data/lib/code_rippa/syntax/scilab.syntax +18 -18
- data/lib/code_rippa/syntax/setext.syntax +82 -82
- data/lib/code_rippa/syntax/shell-unix-generic.syntax +227 -226
- data/lib/code_rippa/syntax/slate.syntax +91 -91
- data/lib/code_rippa/syntax/sql.syntax +137 -139
- data/lib/code_rippa/syntax/sql_rails.syntax +8 -8
- data/lib/code_rippa/syntax/ssh-config.syntax +17 -17
- data/lib/code_rippa/syntax/standard_ml.syntax +67 -69
- data/lib/code_rippa/syntax/strings_file.syntax +20 -23
- data/lib/code_rippa/syntax/subversion_commit_message.syntax +20 -20
- data/lib/code_rippa/syntax/sweave.syntax +45 -45
- data/lib/code_rippa/syntax/swig.syntax +34 -33
- data/lib/code_rippa/syntax/tcl.syntax +87 -86
- data/lib/code_rippa/syntax/template_toolkit.syntax +67 -65
- data/lib/code_rippa/syntax/textile.syntax +111 -145
- data/lib/code_rippa/syntax/tsv.syntax +31 -33
- data/lib/code_rippa/syntax/twiki.syntax +141 -141
- data/lib/code_rippa/syntax/txt2tags.syntax +39 -38
- data/lib/code_rippa/syntax/vectorscript.syntax +31 -31
- data/lib/code_rippa/syntax/xhtml_1.0.syntax +2297 -2296
- data/lib/code_rippa/syntax/xml.syntax +95 -95
- data/lib/code_rippa/syntax/xml_strict.syntax +49 -50
- data/lib/code_rippa/syntax/xsl.syntax +31 -31
- data/lib/code_rippa/syntax/yaml.syntax +86 -86
- data/lib/code_rippa/syntax/yaml_converter.rb +37 -0
- data/lib/code_rippa/syntax/yui_javascript.syntax +88 -88
- data/lib/code_rippa/version.rb +2 -2
- data/test/fixtures/hello.rb +5 -3
- data/test/test_private_methods.rb +40 -40
- data/test/test_public_methods.rb +9 -18
- metadata +61 -63
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3f99af1407065c13219ec928760cc3d289c803f4
|
4
|
+
data.tar.gz: 5ce38341f025d3d1fa639849056acc4ce59e1494
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b3ff635977fad974ac2abd02cdd0900fb89d299cef0f55d9d15352d13c2b33e8fa7273913fa33efdc52d99b3f3249185d85bd38598f6fd30260e95d7f17efa36
|
7
|
+
data.tar.gz: 9a89f9e084c5cfb10fdd4b4399e61600e6ba10bd7864e0b267b42ced6b364812ccd8b6e54b2735172cc401fcba15c84d65dace1baca1c9f4d3df46555fb65836
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
code_rippa (0.0.9)
|
5
|
+
ansi (~> 1.4)
|
6
|
+
color (~> 1.5)
|
7
|
+
language_sniffer (~> 1.0)
|
8
|
+
psych (~> 2.0)
|
9
|
+
ptools (~> 1.2)
|
10
|
+
rainbow (~> 2.0)
|
11
|
+
spox-ultraviolet (~> 0.10)
|
12
|
+
|
13
|
+
GEM
|
14
|
+
remote: https://rubygems.org/
|
15
|
+
specs:
|
16
|
+
ansi (1.4.3)
|
17
|
+
color (1.5.1)
|
18
|
+
language_sniffer (1.0.2)
|
19
|
+
minitest (5.2.2)
|
20
|
+
psych (2.0.2)
|
21
|
+
ptools (1.2.2)
|
22
|
+
rainbow (2.0.0)
|
23
|
+
rake (10.1.1)
|
24
|
+
spox-plist (3.0.1)
|
25
|
+
spox-textpow (0.10.3)
|
26
|
+
spox-plist
|
27
|
+
spox-ultraviolet (0.10.5)
|
28
|
+
spox-textpow
|
29
|
+
|
30
|
+
PLATFORMS
|
31
|
+
ruby
|
32
|
+
|
33
|
+
DEPENDENCIES
|
34
|
+
code_rippa!
|
35
|
+
minitest (~> 5.2)
|
36
|
+
rake (~> 10.1)
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2014 Benjamin Tan Wei Hao
|
2
2
|
|
3
3
|
MIT License
|
4
4
|
|
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
-
# CodeRippa
|
1
|
+
# CodeRippa!
|
2
|
+
|
3
|
+
![Code Rippa!](http://code-rippa.heroku.com/assets/ripit-fbef5b91ff0416d7cfb736d4fcff2b04.png)
|
2
4
|
|
3
5
|
[![Build Status](https://secure.travis-ci.org/benjamintanweihao/code_rippa.png)](http://travis-ci.org/benjamintanweihao/code_rippa)
|
4
6
|
|
7
|
+
[![endorse](http://api.coderwall.com/benjamintanweihao/endorsecount.png)](http://coderwall.com/benjamintanweihao)
|
8
|
+
|
5
9
|
_CodeRippa_ takes your source code and turns it into a beautiful PDF file. Currently, it supports 150 languages and 84 themes, all of which are available in TextMate.
|
6
10
|
|
7
11
|
## Prerequisites
|
@@ -75,6 +79,19 @@ Currently this gem is in its infancy. Any bug reports and feature requests are v
|
|
75
79
|
|
76
80
|
## Changelog
|
77
81
|
|
82
|
+
### 1.0.0
|
83
|
+
|
84
|
+
- Compile pdf by default.
|
85
|
+
- Choose a more sane theme (Code) by default.
|
86
|
+
- Include LICENCE.
|
87
|
+
|
88
|
+
### 0.0.8 - 0.0.9
|
89
|
+
|
90
|
+
- Syntax files are finally compatible for `psych`
|
91
|
+
- Abandoned `syck` completely for `psych`
|
92
|
+
- Ruby 2.x compatibility! \o/
|
93
|
+
- Thanks @jasonyeo for the initial push towards Ruby 2.x compatibility.
|
94
|
+
|
78
95
|
### 0.0.7
|
79
96
|
|
80
97
|
- Using [language_sniffer](https://github.com/grosser/language_sniffer) in place of Linguist for automated source code language detection
|
data/bin/code_rippa
CHANGED
@@ -14,7 +14,7 @@ option_parser = OptionParser.new do |opts|
|
|
14
14
|
Usage: code_rippa [options] input_file_or_directory
|
15
15
|
|
16
16
|
Parses input_file or directory and outputs a file named out.tex.
|
17
|
-
Unless specified, '
|
17
|
+
Unless specified, 'Coda' is used as the default theme.
|
18
18
|
|
19
19
|
To see all themes, type:
|
20
20
|
code_rippa -l
|
@@ -58,28 +58,27 @@ END
|
|
58
58
|
opts.on('-h', '--help', 'Display this screen') do
|
59
59
|
puts opts
|
60
60
|
exit 0
|
61
|
-
end
|
61
|
+
end
|
62
|
+
|
63
|
+
opts.on('-c', '--compile-pdf', 'Compile output into pdf') do
|
64
|
+
options[:compile] = true
|
65
|
+
end
|
62
66
|
end
|
63
67
|
|
64
68
|
begin
|
65
69
|
option_parser.parse!
|
66
70
|
# Set default theme. TODO: Allow user to change this
|
67
|
-
options[:theme] ||= "
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
CodeRippa.parse(ARGV[0], options[:theme])
|
72
|
-
elsif File.directory?(ARGV[0])
|
73
|
-
Dir.chdir(ARGV[0])
|
74
|
-
CodeRippa.parse(Dir.pwd, options[:theme])
|
75
|
-
else
|
76
|
-
raise ArgumentError, "Invalid path. Aborting.\n"
|
77
|
-
end
|
78
|
-
exit 0
|
79
|
-
else
|
71
|
+
options[:theme] ||= "coda"
|
72
|
+
options[:compile] ||= true
|
73
|
+
|
74
|
+
if ARGV.size < 1
|
80
75
|
raise ArgumentError, "Missing arguments. Aborting.\n"
|
76
|
+
else
|
77
|
+
output = CodeRippa.handle_parsing(ARGV, options[:theme])
|
78
|
+
CodeRippa.write_file(output, options[:theme], options[:compile])
|
81
79
|
end
|
80
|
+
exit 0
|
82
81
|
rescue ArgumentError => e
|
83
82
|
puts e
|
84
83
|
exit 1
|
85
|
-
end
|
84
|
+
end
|
data/code_rippa.gemspec
CHANGED
@@ -3,7 +3,7 @@ require File.expand_path('../lib/code_rippa/version', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["Benjamin Tan Wei Hao"]
|
6
|
-
gem.email = ["
|
6
|
+
gem.email = ["benjamintanweihao@gmail.com"]
|
7
7
|
gem.platform = Gem::Platform::RUBY
|
8
8
|
gem.description = %q{Converts source code into a (bookmarked, themed, and syntax highlighted!) PDF.}
|
9
9
|
gem.summary = %q{CodeRippa takes your source code and turns it into a beautiful PDF file. Currently, it supports 150 languages and 15 themes, all of which are available in TextMate. More syntaxes and themes will be available soon.}
|
@@ -15,13 +15,15 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.name = "code_rippa"
|
16
16
|
gem.require_paths = ["lib", "lib/syntax", "lib/render"]
|
17
17
|
gem.version = CodeRippa::VERSION
|
18
|
-
gem.required_ruby_version =
|
19
|
-
gem.add_dependency "
|
20
|
-
gem.add_dependency "ansi"
|
21
|
-
gem.add_dependency "
|
22
|
-
gem.add_dependency "
|
23
|
-
gem.add_dependency "
|
24
|
-
gem.add_dependency "
|
25
|
-
gem.
|
26
|
-
gem.add_development_dependency "
|
18
|
+
gem.required_ruby_version = ">= 1.9.0"
|
19
|
+
gem.add_dependency "psych", "~> 2.0"
|
20
|
+
gem.add_dependency "ansi", "~> 1.4"
|
21
|
+
gem.add_dependency "color", "~> 1.5"
|
22
|
+
gem.add_dependency "language_sniffer", "~> 1.0"
|
23
|
+
gem.add_dependency "ptools", "~> 1.2"
|
24
|
+
gem.add_dependency "rainbow", "~> 2.0"
|
25
|
+
gem.add_dependency "spox-ultraviolet", "~> 0.10"
|
26
|
+
gem.add_development_dependency "rake", "~> 10.1"
|
27
|
+
gem.add_development_dependency "minitest", "~> 5.2"
|
28
|
+
gem.licenses = ['MIT']
|
27
29
|
end
|
data/lib/code_rippa.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'find'
|
2
2
|
require 'code_rippa/uv_overrides'
|
3
3
|
require 'code_rippa/version'
|
4
|
+
require 'ansi'
|
4
5
|
require 'ansi/progressbar'
|
5
6
|
require 'language_sniffer'
|
6
7
|
require 'rainbow'
|
@@ -9,66 +10,90 @@ require 'ptools'
|
|
9
10
|
|
10
11
|
include ANSI
|
11
12
|
|
12
|
-
YAML::ENGINE.yamler = '
|
13
|
+
YAML::ENGINE.yamler = 'psych'
|
13
14
|
|
14
15
|
module CodeRippa
|
15
16
|
|
16
17
|
MAX_WIDTH = 120
|
17
18
|
@@supported_syntax = nil
|
18
19
|
@@supported_ext = nil
|
19
|
-
|
20
|
-
# main entry point
|
21
|
-
# Parses the given directory/file, and writes the output file (out.tex)
|
22
|
-
# into the current directory.
|
23
|
-
#
|
24
|
-
# path - The directory path
|
25
|
-
# theme - The selected theme
|
26
|
-
#
|
27
|
-
# Examples
|
20
|
+
|
21
|
+
# main entry point for parsing using the module
|
28
22
|
#
|
29
|
-
#
|
23
|
+
# takes in an array of the arguments (a list of valid file/dir paths), and a theme
|
30
24
|
#
|
31
|
-
#
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
else
|
39
|
-
pbar = Progressbar.new("Rippin'", Dir["**/*"].length)
|
40
|
-
counter = 0
|
41
|
-
|
42
|
-
Find.find path do |p|
|
43
|
-
# logfile << "Parsing: #{p}\n"
|
44
|
-
depth = p.to_s.count('/')
|
25
|
+
# returns latex output as a string
|
26
|
+
# note that this output doesn't contain the preamble, or the closing tags. (ref:self.write_file)
|
27
|
+
def self.handle_parsing(arguments, theme)
|
28
|
+
paths = parse_paths(arguments)
|
29
|
+
output = parse(paths, theme)
|
30
|
+
return output
|
31
|
+
end
|
45
32
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
33
|
+
# Takes in an array of file/dir paths, and returns an array of file paths,
|
34
|
+
# having expanded the directories into their contents.
|
35
|
+
def self.parse_paths(args)
|
36
|
+
paths = []
|
37
|
+
args.each do |path|
|
38
|
+
if FileTest.file? path
|
39
|
+
paths << path
|
40
|
+
elsif File.directory?(path)
|
41
|
+
Find.find path do |file_path|
|
42
|
+
if File.basename(file_path)[0] == ?.
|
43
|
+
Find.prune
|
44
|
+
else
|
45
|
+
paths << file_path
|
54
46
|
end
|
55
47
|
end
|
56
|
-
|
57
|
-
|
48
|
+
else
|
49
|
+
raise ArgumentError, "Invalid path: #{path}. Aborting.\n"
|
58
50
|
end
|
59
|
-
pbar.finish
|
60
51
|
end
|
61
|
-
|
52
|
+
return paths
|
53
|
+
end
|
54
|
+
|
55
|
+
# the main workhorse for parsing.
|
56
|
+
# takes in a list of file paths, and returns latex
|
57
|
+
def self.parse(files, theme)
|
58
|
+
output = ""
|
59
|
+
pbar = Progressbar.new("Rippin'", files.length)
|
60
|
+
counter = 0
|
61
|
+
|
62
|
+
files.each do | p |
|
63
|
+
depth = p.to_s.count('/')
|
64
|
+
output << bookmark(p, depth, counter) if bookmarkable?(p, source_syntax(p))
|
65
|
+
begin
|
66
|
+
output << parse_file(p, theme)
|
67
|
+
rescue Exception => e
|
68
|
+
# logfile << "* Failed: #{p}\n"
|
69
|
+
end
|
70
|
+
counter += 1
|
71
|
+
pbar.inc
|
72
|
+
end
|
73
|
+
pbar.finish
|
74
|
+
return output
|
75
|
+
end
|
76
|
+
|
77
|
+
# writes to the out.tex file.
|
78
|
+
# if passed true for the "compile" parameter, also compiles the tex file into pdf.
|
79
|
+
# therefore, if one were to desire ps output/*, they could generate it themselves
|
80
|
+
def self.write_file(output, theme, compile = false)
|
62
81
|
outfile = File.open('out.tex', 'w')
|
63
82
|
output = preamble(theme) << output << postscript
|
64
83
|
outfile.write output
|
65
|
-
|
66
84
|
outfile.close
|
67
|
-
|
85
|
+
if compile
|
86
|
+
compile_pdf(outfile)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
|
91
|
+
def self.compile_pdf(outfile)
|
92
|
+
path = ""
|
68
93
|
# Run the 'pdflatex' command
|
69
94
|
puts "=================================================="
|
70
95
|
if pdflatex_installed?
|
71
|
-
puts "pdflatex found!. Converting TeX -> PDF"
|
96
|
+
puts "pdflatex found!. Converting TeX -> PDF"
|
72
97
|
puts "Compiling [1/2]"
|
73
98
|
`pdflatex -interaction=batchmode #{File.expand_path(outfile)}`
|
74
99
|
puts "Compiling [2/2]"
|
@@ -84,7 +109,6 @@ module CodeRippa
|
|
84
109
|
puts install_pdflatex_message "#{File.expand_path(outfile)}"
|
85
110
|
end
|
86
111
|
puts "=================================================="
|
87
|
-
|
88
112
|
end
|
89
113
|
|
90
114
|
|
@@ -302,17 +326,15 @@ private
|
|
302
326
|
end
|
303
327
|
|
304
328
|
def self.completed_message(in_path, out_path)
|
305
|
-
|
306
|
-
msg << "Output file written to: "
|
307
|
-
msg << "#{out_path.gsub!('tex', 'pdf')}".color(:green)
|
329
|
+
"Success! Output file written to: #{out_path.gsub!('tex', 'pdf')}"
|
308
330
|
end
|
309
331
|
|
310
332
|
def self.install_pdflatex_message(out_path)
|
311
|
-
msg = "You do not have 'pdflatex' installed!\n"
|
333
|
+
msg = "You do not have 'pdflatex' installed!\n"
|
312
334
|
msg << "Please install it at "
|
313
|
-
msg << "http://www.tug.org/texlive'\n"
|
335
|
+
msg << "http://www.tug.org/texlive'\n"
|
314
336
|
msg << "Output TEX file written to: "
|
315
|
-
msg << "#{out_path}\n"
|
337
|
+
msg << "#{out_path}\n"
|
316
338
|
end
|
317
339
|
|
318
340
|
def self.pdflatex_installed?
|
@@ -329,7 +351,3 @@ private
|
|
329
351
|
end
|
330
352
|
|
331
353
|
end
|
332
|
-
|
333
|
-
# Sanity check
|
334
|
-
# CodeRippa.parse("/Users/rambo/code/ruby/code_rippa", "succulent")
|
335
|
-
# CodeRippa.parse("/Users/rambo/code/ruby/code_rippa/lib/code_rippa.rb", "amy")
|
@@ -1,97 +1,97 @@
|
|
1
|
-
---
|
1
|
+
---
|
2
2
|
name: ActionScript
|
3
|
-
fileTypes:
|
3
|
+
fileTypes:
|
4
4
|
- as
|
5
5
|
scopeName: source.actionscript
|
6
6
|
uuid: E5A6EC91-6EE4-11D9-BAB4-000D93589AF6
|
7
|
-
foldingStartMarker: (
|
8
|
-
patterns:
|
7
|
+
foldingStartMarker: "(/\\*\\*|\\{\\s*$)"
|
8
|
+
patterns:
|
9
9
|
- name: support.class.actionscript
|
10
|
-
match:
|
10
|
+
match: "\\b(R(ecordset|DBMSResolver|adioButton(Group)?)|X(ML(Socket|Node|Connector)?|UpdateResolverDataHolder)|M(M(Save|Execute)|icrophoneMicrophone|o(use|vieClip(Loader)?)|e(nu(Bar)?|dia(Controller|Display|Playback))|ath)|B(yName|inding|utton)|S(haredObject|ystem|crollPane|t(yleSheet|age|ream)|ound|e(ndEvent|rviceObject)|OAPCall|lide)|N(umericStepper|et(stream|S(tream|ervices)|Connection|Debug(Config)?))|C(heckBox|o(ntextMenu(Item)?|okie|lor|m(ponentMixins|boBox))|ustomActions|lient|amera)|T(ypedValue|ext(Snapshot|Input|F(ield|ormat)|Area)|ree|AB)|Object|D(ownload|elta(Item|Packet)?|at(e(Chooser|Field)?|a(G(lue|rid)|Set|Type)))|U(RL|TC|IScrollBar)|P(opUpManager|endingCall|r(intJob|o(duct|gressBar)))|E(ndPoint|rror)|Video|Key|F(RadioButton|GridColumn|MessageBox|BarChart|S(croll(Bar|Pane)|tyleFormat|plitView)|orm|C(heckbox|omboBox|alendar)|unction|T(icker|ooltip(Lite)?|ree(Node)?)|IconButton|D(ataGrid|raggablePane)|P(ieChart|ushButton|ro(gressBar|mptBox))|L(i(stBox|neChart)|oadingBox)|AdvancedMessageBox)|W(indow|SDLURL|ebService(Connector)?)|L(ist|o(calConnection|ad(er|Vars)|g)|a(unch|bel))|A(sBroadcaster|cc(ordion|essibility)|S(Set(Native|PropFlags)|N(ew|ative)|C(onstructor|lamp(2)?)|InstanceOf)|pplication|lert|rray))\\b"
|
11
11
|
- name: support.function.actionscript
|
12
|
-
match: \b(s(h(ift|ow(GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(ow|ePane))|c(hema|ale(X|Mode|Y|Content)|r(oll(Track|Drag)?|een(Resolution|Color|DPI)))|t(yleSheet|op(Drag|A(nimation|llSounds|gent))?|epSize|a(tus|rt(Drag|A(nimation|gent))?))|i(n|ze|lence(TimeOut|Level))|o(ngname|urce|rt(Items(By)?|On(HeaderRelease)?|able(Columns)?)?)|u(ppressInvalidCalls|bstr(ing)?)|p(li(ce|t)|aceCol(umnsEqually|lumnsEqually))|e(nd(DefaultPushButtonEvent|AndLoad)?|curity|t(R(GB|o(otNode|w(Height|Count))|esizable(Columns)?|a(nge|te))|G(ain|roupName)|X(AxisTitle)?|M(i(n(imum|utes)|lliseconds)|o(nth(Names)?|tionLevel|de)|ultilineMode|e(ssage|nu(ItemEnabled(At)?|EnabledAt)|dia)|a(sk|ximum))|B(u(tton(s|Width)|fferTime)|a(seTabIndex|ndwidthLimit|ckground))|S(howAsDisabled|croll(ing|Speed|Content|Target|P(osition|roperties)|barState|Location)|t(yle(Property)?|opOnFocus|at(us|e))|i(ze|lenceLevel)|ort(able(Columns)?|Function)|p(litterBarPosition|acing)|e(conds|lect(Multiple|ion(Required|Type)?|Style|Color|ed(Node(s)?|Cell|I(nd(ices|ex)|tem(s)?))?|able))|kin|m(oothness|allScroll))|H(ighlight(s|Color)|Scroll|o(urs|rizontal)|eader(Symbol|Height|Text|Property|Format|Width|Location)?|as(Shader|CloseBox))|Y(ear|AxisTitle)?|N(ode(Properties|ExpansionHandler)|ewTextFormat)|C(h(ildNodes|a(ngeHandler|rt(Title|EventHandler)))|o(ntent(Size)?|okie|lumns)|ell(Symbol|Data)|l(i(ckHandler|pboard)|oseHandler)|redentials)|T(ype(dVaule)?|i(tle(barHeight)?|p(Target|Offset)?|me(out(Handler)?)?)|oggle|extFormat|ransform)|I(s(Branch|Open)|n(terval|putProperty)|con(SymbolName)?|te(rator|m(ByKey|Symbol)))|Orientation|D(i(splay(Range|Graphics|Mode|Clip|Text|edMonth)|rection)|uration|e(pth(Below|To|Above)|fault(GatewayURL|Mappings|NodeIconSymbolName)|l(iveryMode|ay)|bug(ID)?)|a(yOfWeekNames|t(e(Filter)?|a(Mapping(s)?|Item(Text|Property|Format)|Provider|All(Height|Property|Format|Width))?))|ra(wConnectors|gContent))|U(se(Shadow|HandCursor|EchoSuppression|rInput|Fade)|TC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear))|P(osition|ercentComplete|an(e(M(inimumSize|aximumSize)|Size|Title))?|ro(pert(y(Data)?|iesAt)|gress))|E(nabled|dit(Handler|able)|xpand(NodeTrigger|erSymbolName))|V(Scroll|olume|alue(Source)?)|KeyFrameInterval|Quality|F(i(eld|rst(DayOfWeek|VisibleNode))|ocus|ullYear|ps|ade(InLength|OutLength)|rame(Color|Width))|Width|L(ine(Color|Weight)|o(opback|adTarget)|a(rgeScroll|bel(Source|Placement)?))|A(s(Boolean|String|Number)|n(yTypedValue|imation)|ctiv(e(State(Handler)?|Handler)|ateHandler)|utoH(ideScrollBar|eight)))?|paratorBefore|ek|lect(ion(Disabled|Unfocused)?|ed(Node(s)?|Child|I(nd(ices|ex)|tem(s)?)|Dat(e|a))?|able(Ranges)?)|rver(String)?)|kip|qrt|wapDepths|lice|aveToSharedObj|moothing)|h(scroll(Policy)?|tml(Text)?|i(t(Test(TextNearPos)?|Area)|de(BuiltInItems|Child)?|ghlight(2D|3D)?)|orizontal|e(ight|ader(Re(nderer|lease)|Height|Text))|P(osition|ageScrollSize)|a(s(childNodes|MP3|S(creen(Broadcast|Playback)|treaming(Video|Audio)|ort)|Next|OwnProperty|Pr(inting|evious)|EmbeddedVideo|VideoEncoder|A(ccesibility|udio(Encoder)?))|ndlerName)|LineScrollSize)|ye(sLabel|ar)|n(o(t|de(Name|Close|Type|Open|Value)|Label)|u(llValue|mChild(S(creens|lides)|ren|Forms))|e(w(Item|line|Value|LocationDialog)|xt(S(cene|ibling|lide)|TabIndex|Value|Frame)?)?|ame(s)?)|c(h(ildNodes|eck|a(nge(sPending)?|r(CodeAt|At))|r)|o(s|n(st(ant|ructor)|nect|c(urrency|at)|t(ent(Type|Path)?|ains|rol(Placement|lerPolicy))|denseWhite|version)|py|l(or|umn(Stretch|Name(s)?|Count))|m(p(onent|lete)|ment))|u(stomItems|ePoint(s)?|r(veTo|Value|rent(Slide|ChildSlide|Item|F(ocused(S(creen|lide)|Form)|ps))))|e(il|ll(Renderer|Press|Edit|Focus(In|Out)))|l(i(ck|ents)|o(se(Button|Pane)?|ne(Node)?)|ear(S(haredObjects|treams)|Timeout|Interval)?)|a(ncelLabel|tch|p(tion|abilities)|l(cFields|l(e(e|r))?))|reate(GatewayConnection|Menu|Se(rver|gment)|C(hild(AtDepth)?|l(ient|ass(ChildAtDepth|Object(AtDepth)?))|all)|Text(Node|Field)|Item|Object(AtDepth)?|PopUp|E(lement|mptyMovieClip)))|t(h(is|row)|ype(of|Name)?|i(tle(StyleDeclaration)?|me(out)?)|o(talTime|String|olTipText|p|UpperCase|ggle(HighQuality)?|Lo(caleString|werCase))|e(st|llTarget|xt(RightMargin|Bold|S(ize|elected)|Height|Color|I(ndent|talic)|Disabled|Underline|F(ield|ont)|Width|LeftMargin|Align)?)|a(n|rget(Path)?|b(Stops|Children|Index|Enabled|leName))|r(y|igger|ac(e|k(AsMenu)?)))|i(s(Running|Branch|NaN|Con(soleOpen|nected)|Toggled|Installed|Open|D(own|ebugger)|P(urchased|ro(totypeOf|pertyEnumerable))|Empty|F(inite|ullyPopulated)|Local|Active)|n(s(tall|ertBefore)|cludeDeltaPacketInfo|t|it(ialize|Component|Pod|A(pplication|gent))?|de(nt|terminate|x(InParent(Slide|Form)?|Of)?)|put|validate|finity|LocalInternetCache)?|con(F(ield|unction))?|t(e(ratorScrolled|m(s|RollO(ut|ver)|ClassName))|alic)|d3|p|fFrameLoaded|gnore(Case|White))|o(s|n(R(ollO(ut|ver)|e(s(ize|ult)|l(ease(Outside)?|aseOutside)))|XML|Mouse(Move|Down|Up|Wheel)|S(ync|croller|tatus|oundComplete|e(tFocus|lect(edItem)?))|N(oticeEvent|etworkChange)|C(hanged|onnect|l(ipEvent|ose))|ID3|D(isconnect|eactivate|ata|ragO(ut|ver))|Un(install|load)|P(aymentResult|ress)|EnterFrame|K(illFocus|ey(Down|Up))|Fault|Lo(ad|g)|A(ctiv(ity|ate)|ppSt(op|art)))?|pe(n|ration)|verLayChildren|kLabel|ldValue|r(d)?)|d(i(s(connect|play(Normal|ed(Month|Year)|Full)|able(Shader|d(Ranges|Days)|CloseBox|Events))|rection)|o(cTypeDecl|tall|Decoding|main|LazyDecoding)|u(plicateMovieClip|ration)|e(stroy(ChildAt|Object)|code|fault(PushButton(Enabled)?|KeydownHandler)?|l(ta(Packet(Changed)?)?|ete(PopUp|All)?)|blocking)|a(shBoardSave|yNames|ta(Provider)?|rkshadow)|r(opdown(Width)?|a(w|gO(ut|ver))))|u(se(Sort|HandCursor|Codepage|EchoSuppression)|n(shift|install|derline|escape|format|watch|lo(ck|ad(Movie(Num)?)?))|pdate(Results|Mode|I(nputProperties|tem(ByIndex)?)|P(acket|roperties)|View|AfterEvent)|rl)|join|p(ixelAspectRatio|o(sition|p|w)|u(sh|rge|blish)|ercen(tComplete|Loaded)|lay(head(Change|Time)|ing|Hidden|erType)?|a(ssword|use|r(se(XML|CSS|Int|Float)|ent(Node|Is(S(creen|lide)|Form))|ams))|r(int(Num|AsBitmap(Num)?)?|o(to(type)?|pert(y|ies)|gress)|e(ss|v(ious(S(ibling|lide)|Value)?|Scene|Frame)|ferred(Height|Width))))|e(scape|n(code(r)?|ter(Frame)?|dFill|able(Shader|d|CloseBox|Events))|dit(able|Field|LocationDialog)|v(ent|al(uate)?)|q|x(tended|p|ec(ute)?|actSettings)|m(phasized(StyleDeclaration)?|bedFonts))|v(i(sible|ewPod)|ScrollPolicy|o(id|lume)|ersion|P(osition|ageScrollSize)|a(l(idat(ionError|e(Property|ActivationKey)?)|ue(Of)?)|riable)|LineScrollSize)|k(ind|ey(Down|Up|Press|FrameInterval))|q(sort|uality)|f(scommand|i(n(d(Text|First|Last)?|ally)|eldInfo|lter(ed|Func)?|rst(Slide|Child|DayOfWeek|VisibleNode)?)|o(nt|cus(In|edCell|Out|Enabled)|r(egroundDisabled|mat(ter)?))|unctionName|ps|l(oor|ush)|ace|romCharCode)|w(i(th|dth)|ordWrap|atch|riteAccess)|l(t|i(st(Owner)?|ne(Style|To))|o(c(k|a(t(ion|eByld)|l(ToGlobal|FileReadDisable)))|opback|ad(Movie(Num)?|S(crollContent|ound)|ed|Variables(Num)?|Application)?|g(Changes)?)|e(ngth|ft(Margin)?|ading)?|a(st(Slide|Child|Index(Of)?)?|nguage|b(el(Placement|F(ield|unction))?|leField)))|a(s(scociate(Controller|Display)|in|pectRatio|function)|nd|c(ceptConnection|tiv(ityLevel|ePlayControl)|os)|t(t(ach(Movie|Sound|Video|Audio)|ributes)|an(2)?)|dd(header|RequestHeader|Menu(Item(At)?|At)?|Sort|Header|No(tice|de(At)?)|C(olumn(At)?|uePoint)|T(oLocalInternetCache|reeNode(At)?)|I(con|tem(s(At)?|At)?)|DeltaItem|P(od|age|roperty)|EventListener|View|FieldInfo|Listener|Animation)?|uto(Size|Play|KeyNav|Load)|pp(endChild|ly(Changes|Updates)?)|vHardwareDisable|fterLoaded|l(ternateRowColors|ign|l(ow(InsecureDomain|Domain)|Transitions(InDone|OutDone))|bum)|r(tist|row|g(uments|List))|gent|bs)|r(ight(Margin)?|o(ot(S(creen|lide)|Form)|und|w(Height|Count)|llO(ut|ver))|e(s(yncDepth|t(orePane|artAnimation|rict)|iz(e|able(Columns)?)|olveDelta|ult(s)?|ponse)|c(o(ncile(Results|Updates)|rd)|eive(Video|Audio))|draw|jectConnection|place(Sel|ItemAt|AllItems)?|ve(al(Child)?|rse)|quest(SizeChange|Payment)?|f(errer|resh(ScrollContent|Destinations|Pane|FromSources)?)|lease(Outside)?|ad(Only|Access)|gister(SkinElement|C(olor(Style|Name)|lass)|InheritingStyle|Proxy)|move(Range|M(ovieClip|enu(Item(At)?|At))|Background|Sort|No(tice|de(sAt|At)?)|C(olum(nAt|At)|uePoints)|T(extField|reeNode(At)?)|Item(At)?|Pod|EventListener|FromLocalInternetCache|Listener|All(C(olumns|uePoints)|Items)?))|a(ndom|te|dioDot))|g(t|oto(Slide|NextSlide|PreviousSlide|FirstSlide|LastSlide|And(Stop|Play))|e(nre|t(R(GB|o(otNode|wCount)|e(sizable|mote))|X(AxisTitle)?|M(i(n(imum(Size)?|utes)|lliseconds)|onth(Names)?|ultilineMode|e(ssage|nu(ItemAt|EnabledAt|At))|aximum(Size)?)|B(ytes(Total|Loaded)|ounds|utton(s|Width)|eginIndex|a(ndwidthLimit|ckground))|S(howAsDisabled|croll(ing|Speed|Content|Position|barState|Location)|t(yle(Names)?|opOnFocus|ate)|ize|o(urce|rtState)|p(litterBarPosition|acing)|e(conds|lect(Multiple|ion(Required|Type)|Style|ed(Node(s)?|Cell|Text|I(nd(ices|ex)|tem(s)?))?)|rvice)|moothness|WFVersion)|H(ighlight(s|Color)|ours|e(ight|ader(Height|Text|Property|Format|Width|Location)?)|as(Shader|CloseBox))|Y(ear|AxisTitle)?|N(o(tices|de(DisplayedAt|At))|um(Children|berAvailable)|e(wTextFormat|xtHighestDepth))|C(h(ild(S(creen|lide)|Nodes|Form|At)|artTitle)|o(n(tent|figInfo)|okie|de|unt|lumn(Names|Count|Index|At))|uePoint|ellIndex|loseHandler|a(ll|retIndex))|T(ypedValue|i(tle(barHeight)?|p(Target|Offset)?|me(stamp|zoneOffset|out(State|Handler)|r)?)|oggle|ext(Extent|Format)?|r(ee(NodeAt|Length)|ans(form|actionId)))|I(s(Branch|Open)|n(stanceAtDepth|d(icesByKey|exByKey))|con(SymbolName)?|te(rator|m(sByKey|By(Name|Key)|id|ID|At))|d)|O(utput(Parameter(s|ByName)?|Value(s)?)|peration|ri(entation|ginalCellData))|D(i(s(play(Range|Mode|Clip|Index|edMonth)|kUsage)|rection)|uration|e(pth|faultNodeIconSymbolName|l(taPacket|ay)|bug(Config|ID)?)|a(y(OfWeekNames)?|t(e|a(Mapping(s)?|Item(Text|Property|Format)|Label|All(Height|Property|Format|Width))?))|rawConnectors)|U(se(Shadow|HandCursor|rInput|Fade)|RL|TC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Da(y|te)|FullYear))|P(o(sition|ds)|ercentComplete|a(n(e(M(inimums|aximums)|Height|Title|Width))?|rentNode)|r(operty(Name|Data)?|efer(ences|red(Height|Width))))|E(n(dIndex|abled)|ditingData|x(panderSymbolName|andNodeTrigger))|V(iewed(Pods|Applications)|olume|ersion|alue(Source)?)|F(i(eld|rst(DayOfWeek|VisibleNode))|o(ntList|cus)|ullYear|ade(InLength|OutLength)|rame(Color|Width))|Width|L(ine(Color|Weight)|o(cal|adTarget)|ength|a(stTabIndex|bel(Source)?))|A(s(cii|Boolean|String|Number)|n(yTypedValue|imation)|ctiv(eState(Handler)?|ateHandler)|utoH(ideScrollBar|eight)|llItems|gent))?)?|lobal(StyleFormat|ToLocal)?|ain|roupName)|x(updatePackety|mlDecl)?|m(y(MethodName|Call)|in(imum)?|o(nthNames|tion(TimeOut|Level)|de(lChanged)?|use(Move|O(ut|ver)|Down(Somewhere|Outside)?|Up(Somewhere)?|WheelEnabled)|ve(To)?)|u(ted|lti(pleS(imultaneousAllowed|elections)|line))|e(ssage|nu(Show|Hide)?|th(od)?|diaType)|a(nufacturer|tch|x(scroll|hscroll|imum|HPosition|Chars|VPosition)?)|b(substring|chr|ord|length))|b(ytes(Total|Loaded)|indFormat(Strings|Function)|o(ttom(Scroll)?|ld|rder(Color)?)|u(tton(Height|Width)|iltInItems|ffer(Time|Length)|llet)|e(foreApplyUpdates|gin(GradientFill|Fill))|lockIndent|a(ndwidth|ckground(Style|Color|Disabled)?)|roadcastMessage)|onHTTPStatus)\b
|
12
|
+
match: "\\b(s(h(ift|ow(GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(ow|ePane))|c(hema|ale(X|Mode|Y|Content)|r(oll(Track|Drag)?|een(Resolution|Color|DPI)))|t(yleSheet|op(Drag|A(nimation|llSounds|gent))?|epSize|a(tus|rt(Drag|A(nimation|gent))?))|i(n|ze|lence(TimeOut|Level))|o(ngname|urce|rt(Items(By)?|On(HeaderRelease)?|able(Columns)?)?)|u(ppressInvalidCalls|bstr(ing)?)|p(li(ce|t)|aceCol(umnsEqually|lumnsEqually))|e(nd(DefaultPushButtonEvent|AndLoad)?|curity|t(R(GB|o(otNode|w(Height|Count))|esizable(Columns)?|a(nge|te))|G(ain|roupName)|X(AxisTitle)?|M(i(n(imum|utes)|lliseconds)|o(nth(Names)?|tionLevel|de)|ultilineMode|e(ssage|nu(ItemEnabled(At)?|EnabledAt)|dia)|a(sk|ximum))|B(u(tton(s|Width)|fferTime)|a(seTabIndex|ndwidthLimit|ckground))|S(howAsDisabled|croll(ing|Speed|Content|Target|P(osition|roperties)|barState|Location)|t(yle(Property)?|opOnFocus|at(us|e))|i(ze|lenceLevel)|ort(able(Columns)?|Function)|p(litterBarPosition|acing)|e(conds|lect(Multiple|ion(Required|Type)?|Style|Color|ed(Node(s)?|Cell|I(nd(ices|ex)|tem(s)?))?|able))|kin|m(oothness|allScroll))|H(ighlight(s|Color)|Scroll|o(urs|rizontal)|eader(Symbol|Height|Text|Property|Format|Width|Location)?|as(Shader|CloseBox))|Y(ear|AxisTitle)?|N(ode(Properties|ExpansionHandler)|ewTextFormat)|C(h(ildNodes|a(ngeHandler|rt(Title|EventHandler)))|o(ntent(Size)?|okie|lumns)|ell(Symbol|Data)|l(i(ckHandler|pboard)|oseHandler)|redentials)|T(ype(dVaule)?|i(tle(barHeight)?|p(Target|Offset)?|me(out(Handler)?)?)|oggle|extFormat|ransform)|I(s(Branch|Open)|n(terval|putProperty)|con(SymbolName)?|te(rator|m(ByKey|Symbol)))|Orientation|D(i(splay(Range|Graphics|Mode|Clip|Text|edMonth)|rection)|uration|e(pth(Below|To|Above)|fault(GatewayURL|Mappings|NodeIconSymbolName)|l(iveryMode|ay)|bug(ID)?)|a(yOfWeekNames|t(e(Filter)?|a(Mapping(s)?|Item(Text|Property|Format)|Provider|All(Height|Property|Format|Width))?))|ra(wConnectors|gContent))|U(se(Shadow|HandCursor|EchoSuppression|rInput|Fade)|TC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear))|P(osition|ercentComplete|an(e(M(inimumSize|aximumSize)|Size|Title))?|ro(pert(y(Data)?|iesAt)|gress))|E(nabled|dit(Handler|able)|xpand(NodeTrigger|erSymbolName))|V(Scroll|olume|alue(Source)?)|KeyFrameInterval|Quality|F(i(eld|rst(DayOfWeek|VisibleNode))|ocus|ullYear|ps|ade(InLength|OutLength)|rame(Color|Width))|Width|L(ine(Color|Weight)|o(opback|adTarget)|a(rgeScroll|bel(Source|Placement)?))|A(s(Boolean|String|Number)|n(yTypedValue|imation)|ctiv(e(State(Handler)?|Handler)|ateHandler)|utoH(ideScrollBar|eight)))?|paratorBefore|ek|lect(ion(Disabled|Unfocused)?|ed(Node(s)?|Child|I(nd(ices|ex)|tem(s)?)|Dat(e|a))?|able(Ranges)?)|rver(String)?)|kip|qrt|wapDepths|lice|aveToSharedObj|moothing)|h(scroll(Policy)?|tml(Text)?|i(t(Test(TextNearPos)?|Area)|de(BuiltInItems|Child)?|ghlight(2D|3D)?)|orizontal|e(ight|ader(Re(nderer|lease)|Height|Text))|P(osition|ageScrollSize)|a(s(childNodes|MP3|S(creen(Broadcast|Playback)|treaming(Video|Audio)|ort)|Next|OwnProperty|Pr(inting|evious)|EmbeddedVideo|VideoEncoder|A(ccesibility|udio(Encoder)?))|ndlerName)|LineScrollSize)|ye(sLabel|ar)|n(o(t|de(Name|Close|Type|Open|Value)|Label)|u(llValue|mChild(S(creens|lides)|ren|Forms))|e(w(Item|line|Value|LocationDialog)|xt(S(cene|ibling|lide)|TabIndex|Value|Frame)?)?|ame(s)?)|c(h(ildNodes|eck|a(nge(sPending)?|r(CodeAt|At))|r)|o(s|n(st(ant|ructor)|nect|c(urrency|at)|t(ent(Type|Path)?|ains|rol(Placement|lerPolicy))|denseWhite|version)|py|l(or|umn(Stretch|Name(s)?|Count))|m(p(onent|lete)|ment))|u(stomItems|ePoint(s)?|r(veTo|Value|rent(Slide|ChildSlide|Item|F(ocused(S(creen|lide)|Form)|ps))))|e(il|ll(Renderer|Press|Edit|Focus(In|Out)))|l(i(ck|ents)|o(se(Button|Pane)?|ne(Node)?)|ear(S(haredObjects|treams)|Timeout|Interval)?)|a(ncelLabel|tch|p(tion|abilities)|l(cFields|l(e(e|r))?))|reate(GatewayConnection|Menu|Se(rver|gment)|C(hild(AtDepth)?|l(ient|ass(ChildAtDepth|Object(AtDepth)?))|all)|Text(Node|Field)|Item|Object(AtDepth)?|PopUp|E(lement|mptyMovieClip)))|t(h(is|row)|ype(of|Name)?|i(tle(StyleDeclaration)?|me(out)?)|o(talTime|String|olTipText|p|UpperCase|ggle(HighQuality)?|Lo(caleString|werCase))|e(st|llTarget|xt(RightMargin|Bold|S(ize|elected)|Height|Color|I(ndent|talic)|Disabled|Underline|F(ield|ont)|Width|LeftMargin|Align)?)|a(n|rget(Path)?|b(Stops|Children|Index|Enabled|leName))|r(y|igger|ac(e|k(AsMenu)?)))|i(s(Running|Branch|NaN|Con(soleOpen|nected)|Toggled|Installed|Open|D(own|ebugger)|P(urchased|ro(totypeOf|pertyEnumerable))|Empty|F(inite|ullyPopulated)|Local|Active)|n(s(tall|ertBefore)|cludeDeltaPacketInfo|t|it(ialize|Component|Pod|A(pplication|gent))?|de(nt|terminate|x(InParent(Slide|Form)?|Of)?)|put|validate|finity|LocalInternetCache)?|con(F(ield|unction))?|t(e(ratorScrolled|m(s|RollO(ut|ver)|ClassName))|alic)|d3|p|fFrameLoaded|gnore(Case|White))|o(s|n(R(ollO(ut|ver)|e(s(ize|ult)|l(ease(Outside)?|aseOutside)))|XML|Mouse(Move|Down|Up|Wheel)|S(ync|croller|tatus|oundComplete|e(tFocus|lect(edItem)?))|N(oticeEvent|etworkChange)|C(hanged|onnect|l(ipEvent|ose))|ID3|D(isconnect|eactivate|ata|ragO(ut|ver))|Un(install|load)|P(aymentResult|ress)|EnterFrame|K(illFocus|ey(Down|Up))|Fault|Lo(ad|g)|A(ctiv(ity|ate)|ppSt(op|art)))?|pe(n|ration)|verLayChildren|kLabel|ldValue|r(d)?)|d(i(s(connect|play(Normal|ed(Month|Year)|Full)|able(Shader|d(Ranges|Days)|CloseBox|Events))|rection)|o(cTypeDecl|tall|Decoding|main|LazyDecoding)|u(plicateMovieClip|ration)|e(stroy(ChildAt|Object)|code|fault(PushButton(Enabled)?|KeydownHandler)?|l(ta(Packet(Changed)?)?|ete(PopUp|All)?)|blocking)|a(shBoardSave|yNames|ta(Provider)?|rkshadow)|r(opdown(Width)?|a(w|gO(ut|ver))))|u(se(Sort|HandCursor|Codepage|EchoSuppression)|n(shift|install|derline|escape|format|watch|lo(ck|ad(Movie(Num)?)?))|pdate(Results|Mode|I(nputProperties|tem(ByIndex)?)|P(acket|roperties)|View|AfterEvent)|rl)|join|p(ixelAspectRatio|o(sition|p|w)|u(sh|rge|blish)|ercen(tComplete|Loaded)|lay(head(Change|Time)|ing|Hidden|erType)?|a(ssword|use|r(se(XML|CSS|Int|Float)|ent(Node|Is(S(creen|lide)|Form))|ams))|r(int(Num|AsBitmap(Num)?)?|o(to(type)?|pert(y|ies)|gress)|e(ss|v(ious(S(ibling|lide)|Value)?|Scene|Frame)|ferred(Height|Width))))|e(scape|n(code(r)?|ter(Frame)?|dFill|able(Shader|d|CloseBox|Events))|dit(able|Field|LocationDialog)|v(ent|al(uate)?)|q|x(tended|p|ec(ute)?|actSettings)|m(phasized(StyleDeclaration)?|bedFonts))|v(i(sible|ewPod)|ScrollPolicy|o(id|lume)|ersion|P(osition|ageScrollSize)|a(l(idat(ionError|e(Property|ActivationKey)?)|ue(Of)?)|riable)|LineScrollSize)|k(ind|ey(Down|Up|Press|FrameInterval))|q(sort|uality)|f(scommand|i(n(d(Text|First|Last)?|ally)|eldInfo|lter(ed|Func)?|rst(Slide|Child|DayOfWeek|VisibleNode)?)|o(nt|cus(In|edCell|Out|Enabled)|r(egroundDisabled|mat(ter)?))|unctionName|ps|l(oor|ush)|ace|romCharCode)|w(i(th|dth)|ordWrap|atch|riteAccess)|l(t|i(st(Owner)?|ne(Style|To))|o(c(k|a(t(ion|eByld)|l(ToGlobal|FileReadDisable)))|opback|ad(Movie(Num)?|S(crollContent|ound)|ed|Variables(Num)?|Application)?|g(Changes)?)|e(ngth|ft(Margin)?|ading)?|a(st(Slide|Child|Index(Of)?)?|nguage|b(el(Placement|F(ield|unction))?|leField)))|a(s(scociate(Controller|Display)|in|pectRatio|function)|nd|c(ceptConnection|tiv(ityLevel|ePlayControl)|os)|t(t(ach(Movie|Sound|Video|Audio)|ributes)|an(2)?)|dd(header|RequestHeader|Menu(Item(At)?|At)?|Sort|Header|No(tice|de(At)?)|C(olumn(At)?|uePoint)|T(oLocalInternetCache|reeNode(At)?)|I(con|tem(s(At)?|At)?)|DeltaItem|P(od|age|roperty)|EventListener|View|FieldInfo|Listener|Animation)?|uto(Size|Play|KeyNav|Load)|pp(endChild|ly(Changes|Updates)?)|vHardwareDisable|fterLoaded|l(ternateRowColors|ign|l(ow(InsecureDomain|Domain)|Transitions(InDone|OutDone))|bum)|r(tist|row|g(uments|List))|gent|bs)|r(ight(Margin)?|o(ot(S(creen|lide)|Form)|und|w(Height|Count)|llO(ut|ver))|e(s(yncDepth|t(orePane|artAnimation|rict)|iz(e|able(Columns)?)|olveDelta|ult(s)?|ponse)|c(o(ncile(Results|Updates)|rd)|eive(Video|Audio))|draw|jectConnection|place(Sel|ItemAt|AllItems)?|ve(al(Child)?|rse)|quest(SizeChange|Payment)?|f(errer|resh(ScrollContent|Destinations|Pane|FromSources)?)|lease(Outside)?|ad(Only|Access)|gister(SkinElement|C(olor(Style|Name)|lass)|InheritingStyle|Proxy)|move(Range|M(ovieClip|enu(Item(At)?|At))|Background|Sort|No(tice|de(sAt|At)?)|C(olum(nAt|At)|uePoints)|T(extField|reeNode(At)?)|Item(At)?|Pod|EventListener|FromLocalInternetCache|Listener|All(C(olumns|uePoints)|Items)?))|a(ndom|te|dioDot))|g(t|oto(Slide|NextSlide|PreviousSlide|FirstSlide|LastSlide|And(Stop|Play))|e(nre|t(R(GB|o(otNode|wCount)|e(sizable|mote))|X(AxisTitle)?|M(i(n(imum(Size)?|utes)|lliseconds)|onth(Names)?|ultilineMode|e(ssage|nu(ItemAt|EnabledAt|At))|aximum(Size)?)|B(ytes(Total|Loaded)|ounds|utton(s|Width)|eginIndex|a(ndwidthLimit|ckground))|S(howAsDisabled|croll(ing|Speed|Content|Position|barState|Location)|t(yle(Names)?|opOnFocus|ate)|ize|o(urce|rtState)|p(litterBarPosition|acing)|e(conds|lect(Multiple|ion(Required|Type)|Style|ed(Node(s)?|Cell|Text|I(nd(ices|ex)|tem(s)?))?)|rvice)|moothness|WFVersion)|H(ighlight(s|Color)|ours|e(ight|ader(Height|Text|Property|Format|Width|Location)?)|as(Shader|CloseBox))|Y(ear|AxisTitle)?|N(o(tices|de(DisplayedAt|At))|um(Children|berAvailable)|e(wTextFormat|xtHighestDepth))|C(h(ild(S(creen|lide)|Nodes|Form|At)|artTitle)|o(n(tent|figInfo)|okie|de|unt|lumn(Names|Count|Index|At))|uePoint|ellIndex|loseHandler|a(ll|retIndex))|T(ypedValue|i(tle(barHeight)?|p(Target|Offset)?|me(stamp|zoneOffset|out(State|Handler)|r)?)|oggle|ext(Extent|Format)?|r(ee(NodeAt|Length)|ans(form|actionId)))|I(s(Branch|Open)|n(stanceAtDepth|d(icesByKey|exByKey))|con(SymbolName)?|te(rator|m(sByKey|By(Name|Key)|id|ID|At))|d)|O(utput(Parameter(s|ByName)?|Value(s)?)|peration|ri(entation|ginalCellData))|D(i(s(play(Range|Mode|Clip|Index|edMonth)|kUsage)|rection)|uration|e(pth|faultNodeIconSymbolName|l(taPacket|ay)|bug(Config|ID)?)|a(y(OfWeekNames)?|t(e|a(Mapping(s)?|Item(Text|Property|Format)|Label|All(Height|Property|Format|Width))?))|rawConnectors)|U(se(Shadow|HandCursor|rInput|Fade)|RL|TC(M(i(nutes|lliseconds)|onth)|Seconds|Hours|Da(y|te)|FullYear))|P(o(sition|ds)|ercentComplete|a(n(e(M(inimums|aximums)|Height|Title|Width))?|rentNode)|r(operty(Name|Data)?|efer(ences|red(Height|Width))))|E(n(dIndex|abled)|ditingData|x(panderSymbolName|andNodeTrigger))|V(iewed(Pods|Applications)|olume|ersion|alue(Source)?)|F(i(eld|rst(DayOfWeek|VisibleNode))|o(ntList|cus)|ullYear|ade(InLength|OutLength)|rame(Color|Width))|Width|L(ine(Color|Weight)|o(cal|adTarget)|ength|a(stTabIndex|bel(Source)?))|A(s(cii|Boolean|String|Number)|n(yTypedValue|imation)|ctiv(eState(Handler)?|ateHandler)|utoH(ideScrollBar|eight)|llItems|gent))?)?|lobal(StyleFormat|ToLocal)?|ain|roupName)|x(updatePackety|mlDecl)?|m(y(MethodName|Call)|in(imum)?|o(nthNames|tion(TimeOut|Level)|de(lChanged)?|use(Move|O(ut|ver)|Down(Somewhere|Outside)?|Up(Somewhere)?|WheelEnabled)|ve(To)?)|u(ted|lti(pleS(imultaneousAllowed|elections)|line))|e(ssage|nu(Show|Hide)?|th(od)?|diaType)|a(nufacturer|tch|x(scroll|hscroll|imum|HPosition|Chars|VPosition)?)|b(substring|chr|ord|length))|b(ytes(Total|Loaded)|indFormat(Strings|Function)|o(ttom(Scroll)?|ld|rder(Color)?)|u(tton(Height|Width)|iltInItems|ffer(Time|Length)|llet)|e(foreApplyUpdates|gin(GradientFill|Fill))|lockIndent|a(ndwidth|ckground(Style|Color|Disabled)?)|roadcastMessage)|onHTTPStatus)\\b"
|
13
13
|
- name: support.constant.actionscript
|
14
|
-
match:
|
14
|
+
match: "\\b(__proto__|__resolve|_accProps|_alpha|_changed|_currentframe|_droptarget|_flash|_focusrect|_framesloaded|_global|_height|_highquality|_level|_listeners|_lockroot|_name|_parent|_quality|_root|_rotation|_soundbuftime|_target|_totalframes|_url|_visible|_width|_x|_xmouse|_xscale|_y|_ymouse|_yscale)\\b"
|
15
15
|
- name: keyword.control.actionscript
|
16
|
-
match:
|
16
|
+
match: "\\b(dynamic|extends|import|implements|interface|public|private|new|static|super|var|for|in|break|continue|while|do|return|if|else|case|switch)\\b"
|
17
17
|
- name: storage.type.actionscript
|
18
|
-
match:
|
18
|
+
match: "\\b(Boolean|Number|String|Void)\\b"
|
19
19
|
- name: constant.language.actionscript
|
20
|
-
match:
|
20
|
+
match: "\\b(null|undefined|true|false)\\b"
|
21
21
|
- name: constant.numeric.actionscript
|
22
|
-
match:
|
22
|
+
match: "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b"
|
23
23
|
- name: string.quoted.double.actionscript
|
24
|
-
endCaptures:
|
25
|
-
|
24
|
+
endCaptures:
|
25
|
+
'0':
|
26
26
|
name: punctuation.definition.string.end.actionscript
|
27
27
|
begin: "\""
|
28
|
-
beginCaptures:
|
29
|
-
|
28
|
+
beginCaptures:
|
29
|
+
'0':
|
30
30
|
name: punctuation.definition.string.begin.actionscript
|
31
31
|
end: "\""
|
32
|
-
patterns:
|
32
|
+
patterns:
|
33
33
|
- name: constant.character.escape.actionscript
|
34
|
-
match:
|
34
|
+
match: "\\\\."
|
35
35
|
- name: string.quoted.single.actionscript
|
36
|
-
endCaptures:
|
37
|
-
|
36
|
+
endCaptures:
|
37
|
+
'0':
|
38
38
|
name: punctuation.definition.string.end.actionscript
|
39
39
|
begin: "'"
|
40
|
-
beginCaptures:
|
41
|
-
|
40
|
+
beginCaptures:
|
41
|
+
'0':
|
42
42
|
name: punctuation.definition.string.begin.actionscript
|
43
43
|
end: "'"
|
44
|
-
patterns:
|
44
|
+
patterns:
|
45
45
|
- name: constant.character.escape.actionscript
|
46
|
-
match:
|
46
|
+
match: "\\\\."
|
47
47
|
- name: support.constant.actionscript
|
48
|
-
match:
|
48
|
+
match: "\\b(BACKSPACE|CAPSLOCK|CONTROL|DELETEKEY|DOWN|END|ENTER|HOME|INSERT|LEFT|LN10|LN2|LOG10E|LOG2E|MAX_VALUE|MIN_VALUE|NEGATIVE_INFINITY|NaN|PGDN|PGUP|PI|POSITIVE_INFINITY|RIGHT|SPACE|SQRT1_2|SQRT2|UP)\\b"
|
49
49
|
- name: comment.block.actionscript
|
50
|
-
captures:
|
51
|
-
|
50
|
+
captures:
|
51
|
+
'0':
|
52
52
|
name: punctuation.definition.comment.actionscript
|
53
|
-
begin:
|
54
|
-
end:
|
53
|
+
begin: "/\\*"
|
54
|
+
end: "\\*/"
|
55
55
|
- name: comment.line.double-slash.actionscript
|
56
|
-
captures:
|
57
|
-
|
56
|
+
captures:
|
57
|
+
'1':
|
58
58
|
name: punctuation.definition.comment.actionscript
|
59
|
-
match: (//)
|
59
|
+
match: "(//).*$\\n?"
|
60
60
|
- name: keyword.operator.actionscript
|
61
|
-
match:
|
61
|
+
match: "\\b(instanceof)\\b"
|
62
62
|
- name: keyword.operator.symbolic.actionscript
|
63
63
|
match: "[-!%&*+=/?:]"
|
64
64
|
- name: meta.preprocessor.actionscript
|
65
|
-
captures:
|
66
|
-
|
65
|
+
captures:
|
66
|
+
'1':
|
67
67
|
name: punctuation.definition.preprocessor.actionscript
|
68
|
-
match: ^[
|
68
|
+
match: "^[ \\t]*(#)[a-zA-Z]+"
|
69
69
|
- name: meta.function.actionscript
|
70
|
-
endCaptures:
|
71
|
-
|
70
|
+
endCaptures:
|
71
|
+
'0':
|
72
72
|
name: punctuation.definition.parameters.end.actionscript
|
73
|
-
captures:
|
74
|
-
|
73
|
+
captures:
|
74
|
+
'1':
|
75
75
|
name: storage.type.function.asp
|
76
|
-
|
76
|
+
'2':
|
77
77
|
name: entity.name.function.asp
|
78
|
-
|
78
|
+
'3':
|
79
79
|
name: punctuation.definition.parameters.begin.actionscript
|
80
|
-
begin:
|
81
|
-
end:
|
82
|
-
patterns:
|
80
|
+
begin: "\\b(function)\\s+([a-zA-Z_]\\w*)\\s*(\\()"
|
81
|
+
end: "\\)"
|
82
|
+
patterns:
|
83
83
|
- name: variable.parameter.function.asp
|
84
84
|
match: "[^,)\\n]+"
|
85
85
|
- name: meta.class.actionscript
|
86
|
-
captures:
|
87
|
-
|
86
|
+
captures:
|
87
|
+
'1':
|
88
88
|
name: storage.type.class.actionscript
|
89
|
-
|
89
|
+
'2':
|
90
90
|
name: entity.name.type.class.actionscript
|
91
|
-
|
91
|
+
'3':
|
92
92
|
name: storage.modifier.extends.actionscript
|
93
|
-
|
93
|
+
'4':
|
94
94
|
name: entity.other.inherited-class.actionscript
|
95
|
-
match:
|
96
|
-
foldingStopMarker: (
|
97
|
-
keyEquivalent: ^~A
|
95
|
+
match: "\\b(class)\\s+([a-zA-Z_](?:\\w|\\.)*)(?:\\s+(extends)\\s+([a-zA-Z_](?:\\w|\\.)*))?"
|
96
|
+
foldingStopMarker: "(\\*\\*/|^\\s*\\})"
|
97
|
+
keyEquivalent: "^~A"
|