Skip to content

Commit

Permalink
print update
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingmachine committed Dec 17, 2015
1 parent 6e8245c commit 7fcc2bb
Show file tree
Hide file tree
Showing 251 changed files with 9,178 additions and 17,543 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ org/*.md
quotes.txt
.nrepl-port
code/**/*.class
code/**/*.jar
code/**/*.jar
*.zip
23 changes: 13 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
source "https://rubygems.org"
source 'http://rubygems.org'

gem "compass"
gem "susy"
gem "susy", "2.2.1"
gem "compass-core"
gem "breakpoint"
gem "haml"
gem "sass"
gem "nanoc"
gem "sass", "3.4.9"
gem "nanoc", "3.7.4"
gem "RedCloth"
gem "kramdown"
gem "redcarpet"
gem "builder"
gem "adsf"
gem "redcarpet"
gem "pygments.rb"
gem "oj"
gem "nokogiri"
gem "pygments.rb", "0.6.0"
gem "guard"
gem "guard-livereload"
gem "guard-nanoc"
gem "breakpoint"
gem "asciidoctor"
gem "nanoc-asciidoctor"
gem "nokogiri"
93 changes: 52 additions & 41 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,78 +1,87 @@
GEM
remote: https://rubygems.org/
remote: http://rubygems.org/
specs:
RedCloth (4.2.9)
adsf (1.2.0)
rack (>= 1.0.0)
asciidoctor (1.5.2)
breakpoint (2.5.0)
sass (~> 3.3)
sassy-maps (< 1.0.0)
builder (3.2.2)
celluloid (0.16.0)
timers (~> 4.0.0)
chunky_png (1.3.2)
coderay (1.1.0)
colored (1.2)
compass (1.0.1)
chunky_png (~> 1.2)
compass-core (~> 1.0.1)
compass-import-once (~> 1.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
sass (>= 3.3.13, < 3.5)
compass-core (1.0.1)
compass-core (1.0.3)
multi_json (~> 1.0)
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
cri (2.6.1)
cri (2.7.0)
colored (~> 1.2)
ffi (1.9.6)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.0.7)
ffi (1.9.8)
formatador (0.2.5)
guard (2.6.1)
guard (2.12.6)
formatador (>= 0.2.4)
listen (~> 2.7)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-nanoc (1.0.2)
guard (>= 1.8.0)
nanoc (>= 3.6.3)
haml (4.0.5)
guard-livereload (2.4.0)
em-websocket (~> 0.5)
guard (~> 2.8)
multi_json (~> 1.8)
guard-nanoc (1.0.3)
guard (~> 2.8)
nanoc (~> 3.6)
haml (4.0.6)
tilt
hitimes (1.2.2)
kramdown (1.4.2)
listen (2.7.11)
celluloid (>= 0.15.2)
http_parser.rb (0.6.0)
listen (2.10.0)
celluloid (~> 0.16.0)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.9)
method_source (0.8.2)
mini_portile (0.6.0)
multi_json (1.10.1)
nanoc (3.7.3)
mini_portile (0.6.2)
multi_json (1.11.0)
nanoc (3.7.4)
cri (~> 2.3)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
oj (2.10.3)
posix-spawn (0.3.9)
nanoc-asciidoctor (1.0.1)
asciidoctor (> 0.1, < 2.0)
nanoc (>= 3.6.7, < 4.0.0)
nenv (0.2.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
notiffany (0.0.6)
nenv (~> 0.1)
shellany (~> 0.0)
posix-spawn (0.3.11)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pygments.rb (0.6.0)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rack (1.5.2)
rb-fsevent (0.9.4)
rack (1.6.1)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
redcarpet (3.2.0)
sass (3.4.6)
redcarpet (3.3.1)
sass (3.4.9)
sassy-maps (0.4.0)
sass (~> 3.3)
shellany (0.0.1)
slop (3.6.0)
susy (2.1.3)
susy (2.2.1)
sass (>= 3.3.0, < 3.5)
thor (0.19.1)
tilt (2.0.1)
Expand All @@ -86,19 +95,21 @@ PLATFORMS
DEPENDENCIES
RedCloth
adsf
asciidoctor
breakpoint
builder
compass
compass-core
guard
guard-livereload
guard-nanoc
haml
kramdown
nanoc
nanoc (= 3.7.4)
nanoc-asciidoctor
nokogiri
oj
pygments.rb
pygments.rb (= 0.6.0)
redcarpet
sass
susy
sass (= 3.4.9)
susy (= 2.2.1)

BUNDLED WITH
1.10.2
17 changes: 0 additions & 17 deletions README.md

This file was deleted.

114 changes: 53 additions & 61 deletions Rules
Original file line number Diff line number Diff line change
Expand Up @@ -13,91 +13,83 @@
# “content/about.html”). To select all children, grandchildren, … of an
# item, use the pattern “/about/*/”; “/about/*” will also select the parent,
# because “*” matches zero or more characters.
require "rubygems"
require "bundler/setup"
Bundler.require(:default)

require "susy"
require "nokogiri"
require "compass-core"
require "breakpoint"
require "./lib/rule_helper"
require "./lib/filters/toc_filter"

Compass.add_project_configuration 'compass/config.rb'
#static
compile '/static/*/' do
end

compile '/assets/javascripts/tipuesearch-data/' do
filter :erb
route '/static/*/' do
item.identifier.to_s.gsub(/^\/static(\/.*)\/$/, "\\1")
end

sass_options = {
syntax: :scss,
load_paths: Compass.configuration.to_sass_engine_options[:load_paths],
}

# sass
compile '/assets/stylesheets/*' do
unless item.identifier =~ /stylesheets\/_/ || item.identifier =~ /documentation/
filter(:sass, Compass.sass_engine_options)
unless sass_partial?(item)
filter(:sass, sass_options)
end
end

compile '*' do
unless item.identifier.include?("#")
if item.binary?
# don’t filter binary items
else
item_layout = "default"

case item.attributes[:filename]
when /home/ then
filter :redcarpet, :options => {fenced_code_blocks: true, tables: true}, :renderer => RedcarpetSyntaxHighlighter
layout "home"
when /haml$/ then
filter :haml
layout item_layout
when /textile$/ then
filter :redcloth
layout item_layout
when /(markdown|md)$/ then
filter :redcarpet, :options => {fenced_code_blocks: true, tables: true}, :renderer => RedcarpetSyntaxHighlighter
layout item_layout
when /coffee$/ then filter :coffeescript
end
if item.attributes[:kind] == "documentation" && !item.attributes[:notoc]
filter :toc
end
end
route '/assets/stylesheets/*' do
unless sass_partial?(item)
"/assets/stylesheets/#{basename(item.attributes[:filename])}.css"
end
end

route '/assets/javascripts/*' do
# js
route '/assets/scripts/*' do
unless item.identifier.include?("#") # emacs tmp file
"/javascripts/#{basename(item.attributes[:filename])}.js"
"/assets/scripts/#{basename(item.attributes[:filename])}.js"
end
end

route '/assets/stylesheets/*' do
unless item.identifier.include?("#") || item.identifier =~ /stylesheets\/_/ # emacs tmp file
"/stylesheets/#{basename(item.attributes[:filename])}.css"
end
end

route '/*home*' do
"/index.html"
compile '*' do
if item.binary?
elsif item.attributes[:filename] =~ /index.html/
filter :erb
elsif item.attributes[:filename] =~ /md$/
filter :redcarpet, {
options: {
fenced_code_blocks: true,
tables: true
},
renderer: RedcarpetSyntaxHighlighter
}
layout 'default'
elsif item.attributes[:filename] =~ /html$/
layout 'default'
filter :toc
elsif item.attributes[:filename] =~ /asc$/
filter :asciidoctor, notitle: false
layout 'default'
filter :toc
end
end

route '*' do
if item.binary?
if item[:extension] == 'css'
# Write item with identifier /foo/ to /foo.css
item.identifier.chop.to_s + '.css'
elsif item.binary?
# Write item with identifier /foo/ to /foo.ext
begin
item.identifier.chop + '.' + item[:extension]
rescue
puts "ERROR: #{item.identifier}"
end
item.identifier.chop.to_s + '.' + item[:extension].to_s
elsif item.identifier =~ /cftbat/
item.identifier.gsub(/\/cftbat/, "") + 'index.html'
else
# Write item with identifier /foo/ to /foo/index.html

# Source file handling is experimental
if item.identifier.include? "/source/"
# TODO use the actual item extension
item.identifier.chop + ".rb"
else
item.identifier + 'index.html'
end

item.identifier + 'index.html'
end
end


layout '*', :haml
layout '*', :erb
14 changes: 0 additions & 14 deletions code/5/examples.clj

This file was deleted.

Loading

0 comments on commit 7fcc2bb

Please sign in to comment.