mirror of https://github.com/freeCodeCamp/devdocs
parent
6a77e253f5
commit
f54d2b428c
@ -0,0 +1,7 @@
|
||||
._julia {
|
||||
@extend %simple;
|
||||
|
||||
.footnote { @extend %note; }
|
||||
.note { @extend %note; }
|
||||
.docstring-category { float: right; }
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
module Docs
|
||||
class Julia
|
||||
class CleanHtmlSphinxFilter < Filter
|
||||
def call
|
||||
@doc = at_css('.document .section')
|
||||
|
||||
doc
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,34 @@
|
||||
module Docs
|
||||
class Julia
|
||||
class EntriesSphinxFilter < 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
|
@ -1,20 +1,33 @@
|
||||
module Docs
|
||||
class Julia < UrlScraper
|
||||
self.type = 'sphinx_simple'
|
||||
self.release = '0.5.2'
|
||||
self.base_url = 'https://docs.julialang.org/en/stable/'
|
||||
self.links = {
|
||||
home: 'https://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–2016 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors<br>
|
||||
Licensed under the MIT License.
|
||||
HTML
|
||||
|
||||
version '0.6' do
|
||||
self.release = '0.6.0'
|
||||
self.base_url = 'https://docs.julialang.org/en/release-0.6/'
|
||||
self.type = 'julia'
|
||||
|
||||
html_filters.push 'julia/entries', 'julia/clean_html'
|
||||
|
||||
options[:container] = '#docs'
|
||||
end
|
||||
|
||||
version '0.5' do
|
||||
self.release = '0.5.2'
|
||||
self.base_url = 'https://docs.julialang.org/en/release-0.5/'
|
||||
self.type = 'sphinx_simple'
|
||||
|
||||
html_filters.push 'julia/entries_sphinx', 'julia/clean_html_sphinx', 'sphinx/clean_html'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in new issue