Skip to content

Commit

Permalink
* First public release 0.9.0.
Browse files Browse the repository at this point in the history
git-svn-id: http://ultraviolet.rubyforge.org/svn@7 8dcbe89a-5409-4d9f-a3d6-4ba0a7c8629b
  • Loading branch information
dix_ans committed May 12, 2007
1 parent 2772d09 commit 9c8bf0a
Show file tree
Hide file tree
Showing 47 changed files with 3,221 additions and 2,920 deletions.
3 changes: 2 additions & 1 deletion Manifest.txt
Expand Up @@ -13,6 +13,7 @@ render/xhtml/iplastic.render
render/xhtml/lazy.render
render/xhtml/mac_classic.render
render/xhtml/magicwb_amiga.render
render/xhtml/pastels_on_dark.render
render/xhtml/slush_poppies.render
render/xhtml/spacecadet.render
render/xhtml/sunburst.render
Expand All @@ -37,6 +38,7 @@ render/xhtml/files/css/iplastic.css
render/xhtml/files/css/lazy.css
render/xhtml/files/css/mac_classic.css
render/xhtml/files/css/magicwb_amiga.css
render/xhtml/files/css/pastels_on_dark.css
render/xhtml/files/css/slush_poppies.css
render/xhtml/files/css/spacecadet.css
render/xhtml/files/css/sunburst.css
Expand Down Expand Up @@ -207,7 +209,6 @@ syntax/languagedefinition.syntax
syntax/regular_expressions_oniguruma.syntax
syntax/subversion_commit_message.syntax
bin/theme2render
bin/yaml2render
bin/uv
History.txt
Rakefile
Expand Down
1 change: 0 additions & 1 deletion Rakefile
Expand Up @@ -40,7 +40,6 @@ begin
host = "#{config["username"]}@rubyforge.org"
remote_dir = "/var/www/gforge-projects/#{h.rubyforge_name}"
local_dir = 'manual'
FileUtils.copy( File.join( local_dir, "index.xhtml" ), File.join( local_dir, "index.html" ) )
system "rsync -av --delete #{local_dir}/ #{host}:#{remote_dir}"
end

Expand Down
17 changes: 5 additions & 12 deletions bin/theme2render
Expand Up @@ -11,30 +11,24 @@ end
def settings
unless @settings
@settings = @theme["settings"].find { |s| ! s["name"] }["settings"]
puts "settings = #{@settings}"
end
@settings
end

def normalize_color color
if color =~ /^#/ && color.size == 9
puts settings.class
puts settings["background"]
div0 = (settings["background"] ? settings["background"][1..-1].hex : 0xFFFFFF )
div1, alpha = color[1..-1].hex.divmod( 0x100 )
puts "alpha = ##{alpha.to_s(16).upcase}"
result = ""
3.times {
div0, mod0 = div0.divmod( 0x100 )
div1, mod1 = div1.divmod( 0x100 )
puts "chunk = ##{mod1.to_s(16).upcase}"
result = ((mod1 * alpha + mod0 * ( 0x100 - alpha ) ) / 0x100).to_s(16).upcase + result
result = ((mod1 * alpha + mod0 * ( 0x100 - alpha ) ) / 0x100).to_s(16).upcase.rjust(2, '0') + result
}
result = "#" + result
#result = "##{ big, small = ; ((big * (0xFF - small)) / 0xFF).to_s(16).upcase}"
#result = "##{ big, small = "0xFFFFFF10".hex.divmod( "0x100".hex); ((big * small) / 0xFF).to_s(16).upcase}"
#result = color[0...-2]
puts "#{color} => #{result}"
result
else
color
Expand All @@ -53,7 +47,10 @@ render["tags"] = []
if t["scope"]
tag = {}
tag["selector"] = t["scope"]
class_name = t["name"].downcase.gsub(/\s+/, '_').gsub('.tmtheme', '').gsub(/\W/, '').gsub(/_+/, '_')
class_name = t["name"].downcase.gsub(/\W/, ' ').gsub('.tmtheme', '').split(' ').collect{|s| s.capitalize}.join
if class_name == ""
class_name = "x" * t["name"].size
end
tag["begin"] = "<span class=\"#{class_name}\">"
tag["end"] = "</span>"
render["tags"] << tag
Expand All @@ -67,8 +64,6 @@ render["tags"] = []
when /bold/ then style["font-weight"] = "bold"
when /italic/ then style["font-style"] = "italic"
when /underline/ then style["text-decoration"] = "underline"
else
puts s["fontStyle"]
end
css[".#{class_name}"] = style
end
Expand All @@ -79,8 +74,6 @@ render["tags"] = []
style["background-color"] = normalize_color(s["background"])
css[code_name] = style
@style = style
puts @style

style = {}
style["color"] = normalize_color(s["foreground"])
style["background-color"] = normalize_color(s["selection"])
Expand Down
62 changes: 0 additions & 62 deletions bin/yaml2render

This file was deleted.

20 changes: 20 additions & 0 deletions mm/manual.mm
Expand Up @@ -651,6 +651,26 @@ int getNeighborCount() {
end
---------------------------------

= pastels_on_dark =

----------hl ruby,pastels_on_dark-------
module Uv
def Uv.parse text, output = "xhtml", syntax_name = nil, line_numbers = false, render_style = "classic"
init_syntaxes unless @syntaxes
renderer = File.join( File.dirname(__FILE__), '..',"render", output,"#{render_style}.render")
css_class = render_style
render_options = YAML.load( File.open( renderer ) )
if output == "xhtml"
render_processor = HtmlProcessor.new( render_options, line_numbers )
@syntaxes[syntax_name].parse( text, render_processor )
"<pre class =\"#{css_class}\">#{render_processor.string}</pre>"
else
raise( ArgumentError, "Output for #{output} is not yet implemented" )
end
end
end
---------------------------------

= slush_poppies =

----------hl ruby,slush_poppies-------
Expand Down
66 changes: 33 additions & 33 deletions render/xhtml/active4d.render
@@ -1,103 +1,103 @@
---
name: Active4D
tags:
- begin: <span class="embedded_source">
- begin: <span class="EmbeddedSource">
end: </span>
selector: text.html source.active4d
- begin: <span class="plain_xml_text">
- begin: <span class="PlainXmlText">
end: </span>
selector: text.xml
- begin: <span class="line_comment">
- begin: <span class="LineComment">
end: </span>
selector: comment.line
- begin: <span class="block_comment">
- begin: <span class="BlockComment">
end: </span>
selector: comment.block
- begin: <span class="string">
- begin: <span class="String">
end: </span>
selector: string
- begin: <span class="interpolated_entity">
- begin: <span class="InterpolatedEntity">
end: </span>
selector: string.interpolated variable
- begin: <span class="number">
- begin: <span class="Number">
end: </span>
selector: constant.numeric
- begin: <span class="userdefined_constant">
- begin: <span class="UserDefinedConstant">
end: </span>
selector: constant.character, constant.other
- begin: <span class="datetime_literal">
- begin: <span class="DateTimeLiteral">
end: </span>
selector: constant.other.date, constant.other.time
- begin: <span class="builtin_constant">
- begin: <span class="BuiltInConstant">
end: </span>
selector: constant.language
- begin: <span class="local_variable">
- begin: <span class="LocalVariable">
end: </span>
selector: variable.other.local
- begin: <span class="variable">
- begin: <span class="Variable">
end: </span>
selector: variable
- begin: <span class="tablefield">
- begin: <span class="TableField">
end: </span>
selector: variable.other.table-field
- begin: <span class="keyword">
- begin: <span class="Keyword">
end: </span>
selector: keyword
- begin: <span class="operator">
- begin: <span class="Operator">
end: </span>
selector: keyword.operator
- begin: <span class="storage">
- begin: <span class="Storage">
end: </span>
selector: storage
- begin: <span class="type_name">
- begin: <span class="TypeName">
end: </span>
selector: entity.name.type
- begin: <span class="inherited_class">
- begin: <span class="InheritedClass">
end: </span>
selector: entity.other.inherited-class
- begin: <span class="function_name">
- begin: <span class="FunctionName">
end: </span>
selector: entity.name.function
- begin: <span class="function_argument">
- begin: <span class="FunctionArgument">
end: </span>
selector: variable.parameter
- begin: <span class="tag_container">
- begin: <span class="TagContainer">
end: </span>
selector: meta.tag
- begin: <span class="tag_name">
- begin: <span class="TagName">
end: </span>
selector: entity.name.tag
- begin: <span class="tag_attribute">
- begin: <span class="TagAttribute">
end: </span>
selector: entity.other.attribute-name
- begin: <span class="commandmethod">
- begin: <span class="CommandMethod">
end: </span>
selector: support.function
- begin: <span class="named_constant">
- begin: <span class="NamedConstant">
end: </span>
selector: support.constant
- begin: <span class="library_classtype">
- begin: <span class="LibraryClassType">
end: </span>
selector: support.type, support.class
- begin: <span class="library_variable">
- begin: <span class="LibraryVariable">
end: </span>
selector: support.variable
- begin: <span class="invalid">
- begin: <span class="Invalid">
end: </span>
selector: invalid
- begin: <span class="diff_header">
- begin: <span class="DiffHeader">
end: </span>
selector: meta.diff
- begin: <span class="diff_line_range">
- begin: <span class="DiffLineRange">
end: </span>
selector: meta.diff.range
- begin: <span class="diff_deleted_line">
- begin: <span class="DiffDeletedLine">
end: </span>
selector: markup.deleted.diff
- begin: <span class="diff_inserted_line">
- begin: <span class="DiffInsertedLine">
end: </span>
selector: markup.inserted.diff
- begin: <span class="diff_unchanged_line">
- begin: <span class="DiffUnchangedLine">
end: </span>
selector: source.diff
line-numbers:
Expand Down

0 comments on commit 9c8bf0a

Please sign in to comment.