mirror of https://github.com/freeCodeCamp/devdocs
parent
70440a1c16
commit
8e35fa3a2a
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 119 KiB |
@ -0,0 +1,11 @@
|
||||
module Docs
|
||||
class Julia
|
||||
class CleanHtmlFilter < Filter
|
||||
def call
|
||||
@doc = at_css('.document .section')
|
||||
|
||||
doc
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,34 @@
|
||||
module Docs
|
||||
class Julia
|
||||
class EntriesFilter < Docs::EntriesFilter
|
||||
def get_name
|
||||
name = at_css('.document h1').content
|
||||
name.remove! "\u{00B6}"
|
||||
name
|
||||
end
|
||||
|
||||
def get_type
|
||||
if slug.start_with?('manual')
|
||||
'Manual'
|
||||
else
|
||||
name
|
||||
end
|
||||
end
|
||||
|
||||
def additional_entries
|
||||
return [] unless slug.start_with?('stdlib')
|
||||
entries = []
|
||||
|
||||
css('.function dt[id]').each do |node|
|
||||
entries << [node['id'].remove('Base.') + '()', node['id']]
|
||||
end
|
||||
|
||||
css('.data dt[id]').each do |node|
|
||||
entries << [node['id'].remove('Base.'), node['id']]
|
||||
end
|
||||
|
||||
entries
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,20 @@
|
||||
module Docs
|
||||
class Julia < UrlScraper
|
||||
self.type = 'sphinx_simple'
|
||||
self.release = '0.4.6'
|
||||
self.base_url = 'http://docs.julialang.org/en/release-0.4/'
|
||||
self.links = {
|
||||
home: 'http://julialang.org/',
|
||||
code: 'https://github.com/JuliaLang/julia'
|
||||
}
|
||||
|
||||
html_filters.push 'julia/entries', 'julia/clean_html', 'sphinx/clean_html'
|
||||
|
||||
options[:only_patterns] = [/\Amanual\//, /\Astdlib\//]
|
||||
|
||||
options[:attribution] = <<-HTML
|
||||
© 2009–2015 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors<br>
|
||||
Licensed under the MIT License.
|
||||
HTML
|
||||
end
|
||||
end
|
After Width: | Height: | Size: 414 B |
After Width: | Height: | Size: 933 B |
@ -0,0 +1 @@
|
||||
http://julialang.org/favicon.ico
|
Loading…
Reference in new issue