History

Add Julia documentation

Thibaut Courouble committed 10 years ago

Commit 8e35fa31 parent 70440a111 files · +69 −-3Browse files

Unified · Split

11 files
  1. assets/images/docs.png +0 −0
  2. assets/images/docs@2x.png +0 −0
  3. assets/javascripts/news.json +1 −1
  4. assets/javascripts/templates/pages/about_tmpl.coffee +5 −0
  5. assets/stylesheets/global/_icons.scss +1 −0
  6. lib/docs/filters/julia/clean_html.rb +11 −0
  7. lib/docs/filters/julia/entries.rb +34 −0
  8. lib/docs/scrapers/julia.rb +20 −0
  9. public/icons/docs/julia/16.png +0 −0
  10. public/icons/docs/julia/16@2x.png +0 −0
  11. public/icons/docs/julia/SOURCE +1 −0
assets/images/docs.png+0−0

Binary file not shown.

assets/images/docs@2x.png+0−0

Binary file not shown.

assets/javascripts/news.json+1−1
@@ -1,7 +1,7 @@
1[1[
2 [2 [
3 "2016-07-24",3 "2016-07-24",
4 "New documentation: <a href=\"/crystal/\">Crystal</a>"4 "New documentations: <a href=\"/julia/\">Julia</a> and <a href=\"/crystal/\">Crystal</a>"
5 ], [5 ], [
6 "2016-07-03",6 "2016-07-03",
7 "New documentations: <a href=\"/cmake/\">CMake</a> and <a href=\"/matplotlib/\">Matplotlib</a>"7 "New documentations: <a href=\"/cmake/\">CMake</a> and <a href=\"/matplotlib/\">Matplotlib</a>"
assets/javascripts/templates/pages/about_tmpl.coffee+5−0
@@ -255,6 +255,11 @@ credits = [ · 254 unmodified lines
255 'jQuery Foundation and other contributors',255 'jQuery Foundation and other contributors',
256 'MIT',256 'MIT',
257 'https://raw.githubusercontent.com/jquery/api.jqueryui.com/master/LICENSE.txt'257 'https://raw.githubusercontent.com/jquery/api.jqueryui.com/master/LICENSE.txt'
258 ], [
259 'Julia',
260 '2009-2015 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors',
261 'MIT',
262 'https://raw.githubusercontent.com/JuliaLang/julia/master/LICENSE.md'
258 ], [263 ], [
259 'Knockout.js',264 'Knockout.js',
260 'Steven Sanderson, the Knockout.js team, and other contributors',265 'Steven Sanderson, the Knockout.js team, and other contributors',
assets/stylesheets/global/_icons.scss+1−0
@@ -131,6 +131,7 @@ · 130 unmodified lines
131._icon-opentsdb:before { background-position: -4rem -8rem; }131._icon-opentsdb:before { background-position: -4rem -8rem; }
132._icon-q:before { background-position: -5rem -8rem; }132._icon-q:before { background-position: -5rem -8rem; }
133._icon-crystal:before { background-position: -6rem -8rem; @extend %darkIconFix !optional; }133._icon-crystal:before { background-position: -6rem -8rem; @extend %darkIconFix !optional; }
134._icon-julia:before { background-position: -7rem -8rem; @extend %darkIconFix !optional; }
134._icon-react_native:before { background-position: 0 -9rem; }135._icon-react_native:before { background-position: 0 -9rem; }
135._icon-phalcon:before { background-position: -1rem -9rem; }136._icon-phalcon:before { background-position: -1rem -9rem; }
136._icon-matplotlib:before { background-position: -2rem -9rem; }137._icon-matplotlib:before { background-position: -2rem -9rem; }
lib/docs/filters/julia/clean_html.rb+11−0
@@ -0,0 +1,11 @@
1module Docs
2 class Julia
3 class CleanHtmlFilter < Filter
4 def call
5 @doc = at_css('.document .section')
6
7 doc
8 end
9 end
10 end
11end
lib/docs/filters/julia/entries.rb+34−0
@@ -0,0 +1,34 @@
1module Docs
2 class Julia
3 class EntriesFilter < Docs::EntriesFilter
4 def get_name
5 name = at_css('.document h1').content
6 name.remove! "\u{00B6}"
7 name
8 end
9
10 def get_type
11 if slug.start_with?('manual')
12 'Manual'
13 else
14 name
15 end
16 end
17
18 def additional_entries
19 return [] unless slug.start_with?('stdlib')
20 entries = []
21
22 css('.function dt[id]').each do |node|
23 entries << [node['id'].remove('Base.') + '()', node['id']]
24 end
25
26 css('.data dt[id]').each do |node|
27 entries << [node['id'].remove('Base.'), node['id']]
28 end
29
30 entries
31 end
32 end
33 end
34end
lib/docs/scrapers/julia.rb+20−0
@@ -0,0 +1,20 @@
1module Docs
2 class Julia < UrlScraper
3 self.type = 'sphinx_simple'
4 self.release = '0.4.6'
5 self.base_url = 'http://docs.julialang.org/en/release-0.4/'
6 self.links = {
7 home: 'http://julialang.org/',
8 code: 'https://github.com/JuliaLang/julia'
9 }
10
11 html_filters.push 'julia/entries', 'julia/clean_html', 'sphinx/clean_html'
12
13 options[:only_patterns] = [/\Amanual\//, /\Astdlib\//]
14
15 options[:attribution] = <<-HTML
16 &copy; 2009&ndash;2015 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors<br>
17 Licensed under the MIT License.
18 HTML
19 end
20end
public/icons/docs/julia/16.png+0−0

Binary file not shown.

public/icons/docs/julia/16@2x.png+0−0

Binary file not shown.

public/icons/docs/julia/SOURCE+1−0
@@ -0,0 +1 @@
1http://julialang.org/favicon.ico