From 6bbf267b6ec25dda8e3d2fc306d1075f30e91f1b Mon Sep 17 00:00:00 2001 From: Thibaut Date: Mon, 4 Aug 2014 12:57:40 -0400 Subject: [PATCH] Add Django documentation --- assets/images/icons.png | Bin 21824 -> 22070 bytes assets/images/icons@2x.png | Bin 56027 -> 56538 bytes .../templates/pages/about_tmpl.coffee | 5 ++ .../templates/pages/news_tmpl.coffee | 5 +- assets/javascripts/views/pages/sphinx.coffee | 1 + assets/stylesheets/global/_icons.scss | 1 + lib/docs/filters/django/clean_html.rb | 42 ++++++++++++++++ lib/docs/filters/django/entries.rb | 46 ++++++++++++++++++ lib/docs/filters/django/fix_urls.rb | 10 ++++ lib/docs/scrapers/django.rb | 36 ++++++++++++++ public/icons/docs/django/16.png | Bin 0 -> 334 bytes public/icons/docs/django/16@2x.png | Bin 0 -> 593 bytes public/icons/docs/django/SOURCE | 1 + 13 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 lib/docs/filters/django/clean_html.rb create mode 100644 lib/docs/filters/django/entries.rb create mode 100644 lib/docs/filters/django/fix_urls.rb create mode 100644 lib/docs/scrapers/django.rb create mode 100644 public/icons/docs/django/16.png create mode 100644 public/icons/docs/django/16@2x.png create mode 100644 public/icons/docs/django/SOURCE diff --git a/assets/images/icons.png b/assets/images/icons.png index 6dc96fadf0c00244a89400f5d094f33f1acc6456..50c244650f4390f63f6f793f2bfb8766f9245320 100644 GIT binary patch delta 3198 zcmV-^41x2&ssXmF0gxmC{jnvwNq^m)3sh9q8ppThy(;*iGP{^JHLX>d6`4t9*Gfw? z6+tW??cRvNd9cdzwdXYX@nFI>O%|MvIo%^4BX(_me{48qtUppb?z^|SoQ_J7PRssj^` zbYci=$L7GFEyrvIOlMk5QFa?Vtic-D%XUvbjt?zeZ4YSrj|qtPo{fC3VO+e=@7)WL zLb|4ep>SQ@`ML0<_3Nz0iZWOv0fN;8eOW0owBDwG+IkM^Rxv*b|uA8#Xfoo&nHdGFL zzfRFJdx+M)A=;O@^EP(xe)P_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q~Zc7&ZHR8I5=zr@5xUNM2q)HoaF`IE#cMdcC=HcI| z=?FiShbhx%WAvzrn6PFuRvgxXwY?wPf82pfCB;ZjPd};EYTtDO_$A3ssv_w~)uO+I z)Q;3s^uG}5sRAXfBLPK?e^n z#O&IGytBFd(X*)3)KqUbfd3M0A8{N*vI&4*q!Qskg%l{DT3Q4^TAED1R$h+M(o(!J z*ar{3I1mr@AA(*_yo_#rpNHooFQEOy-ss-f8~gSpL4SKZoj*yxG$|?R9yfq%Nf1Tk zNpS?}JJ(Hy_-rhxl_(_U76Fio!K+0@MFg+}3xdDK@Ub6Y?0eHOZu%^YrA^LplV)JV znD?nV&sQIKOi51WI}#Hag@DjT6pLWDR~TB0{_7-Hc#||Ou80&A6nN=$I^^W!;Npb> z6kaG$@_)~tgYN7ZBo?mn25NzIQ|gi3u3s9)I&gIqJVgcqx&+Z zi>Sn%+?Fvm)u}+wg3PC07*qoM6N<$f-**y!vFvP diff --git a/assets/images/icons@2x.png b/assets/images/icons@2x.png index b6a7e35698d16e520cfeba81082485239e4eaa3e..29e3460d227eddc6f3696f990377486d4ae4869f 100644 GIT binary patch delta 5312 zcmV;x6hG_RwFBC@1CS#E+@Y~0F35kMlxxgAIq{yGnBw{r z8WS~QL8DPD!7ge98x~LyksKAo4t7yIR6&rUA}UyjqIBsq^WL>KvpxIHGgQG~?yTo| zpFQk7dvE{vxz@MVx4v)8$ivN4j5PBjU}NYRxg=DDaTB30P%Oo$=75#bsXBkEH~t25 z^XfbmPtUoq_tQ8AoGu$IjsdGtw2&1?z5NYASlnny$ik*bLKwi-Dge_Y06qc~1&G@3 zBg}C8_U0S#9oP?r*(sk}nA!aK3JrKFtI`(_n7Lr_ehXb`~A* zRlmPVL0|~6WPD3}V_}Xl1809y31u&NxFjWYxxoJ49!}1{F=#3=eAU(mZ49{xtsu|p z+-O;_x}0Rca#qY9uqFVTLm9@U?Z?BGGJu&kgiMudb|rZk3=HnXgbH=Neeb_3bhf0& zo`RwzlR|E)Cd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B;A1yJkCQGnqyt0`YRrl?a-;fD1E_%llJRIs zW}lJoyiavAJgYhNCRJNtR{>PbJPQ^eUN9|qr& result app.news = [ - [ 1406419200000, # July 27, 2014 + [ 1407110400000, # August 4, 2014 + """ New Django documentation """, + ], [ + 1406419200000, # July 27, 2014 """ New Markdown documentation """, ], [ 1404518400000, # July 5, 2014 diff --git a/assets/javascripts/views/pages/sphinx.coffee b/assets/javascripts/views/pages/sphinx.coffee index cecc751c..1427c418 100644 --- a/assets/javascripts/views/pages/sphinx.coffee +++ b/assets/javascripts/views/pages/sphinx.coffee @@ -3,4 +3,5 @@ class app.views.SphinxPage extends app.views.BasePage afterRender: -> @highlightCode @findAll('pre.python'), 'python' + @highlightCode @findAll('pre.markup'), 'markup' return diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss index 775e1e47..69167033 100644 --- a/assets/stylesheets/global/_icons.scss +++ b/assets/stylesheets/global/_icons.scss @@ -63,3 +63,4 @@ ._icon-sinon:before { background-position: -4rem -9rem; } ._icon-cordova:before { background-position: 0 -10rem; } ._icon-markdown:before { background-position: -1rem -10rem; } +._icon-django:before { background-position: -2rem -10rem; } diff --git a/lib/docs/filters/django/clean_html.rb b/lib/docs/filters/django/clean_html.rb new file mode 100644 index 00000000..dfb26a14 --- /dev/null +++ b/lib/docs/filters/django/clean_html.rb @@ -0,0 +1,42 @@ +module Docs + class Django + class CleanHtmlFilter < Filter + def call + @doc = at_css('.yui-g') + + css('.section', 'a > em').each do |node| + node.before(node.children).remove + end + + css('tt', 'span.pre').each do |node| + node.name = 'code' + node.content = node.content + node.remove_attribute 'class' + end + + css('.headerlink').each do |node| + id = node['href'][1..-1] + node.parent['id'] ||= id + doc.at_css("span##{id}").try(:remove) + node.remove + end + + css('h1', 'h2', 'h3', 'dt').each do |node| + node.content = node.content + end + + css('div[class^="highlight-"]').each do |node| + node.name = 'pre' + node['class'] = case node['class'] + when 'highlight-python' then 'python' + when 'highlight-html+django' then 'markup' + else '' + end + node.content = node.at_css('pre').content + end + + doc + end + end + end +end diff --git a/lib/docs/filters/django/entries.rb b/lib/docs/filters/django/entries.rb new file mode 100644 index 00000000..4cbbc971 --- /dev/null +++ b/lib/docs/filters/django/entries.rb @@ -0,0 +1,46 @@ +module Docs + class Django + class EntriesFilter < Docs::EntriesFilter + def get_name + at_css('h1').content.remove("\u{00b6}") + end + + def get_type + case subpath + when /\Atopics/ + 'Guides' + when /\Aintro/ + 'Guides: Intro' + when /\Ahowto/ + 'Guides: How-tos' + when /\Aref/ + 'API' + end + end + + def additional_entries + entries = [] + + css('dl.function', 'dl.class', 'dl.method', 'dl.attribute').each do |node| + next unless id = node.at_css('dt')['id'] + next unless name = id.dup.sub!('django.', '') + + path = name.split('.') + type = "django.#{path.first}" + type << ".#{path.second}" if %w(contrib db).include?(path.first) + + name.remove! 'contrib.' + name << '()' if node['class'].include?('method') || node['class'].include?('function') + + entries << [name, id, type] + end + + entries + end + + def include_default_entry? + at_css('#sidebar a[href="index"]') + end + end + end +end diff --git a/lib/docs/filters/django/fix_urls.rb b/lib/docs/filters/django/fix_urls.rb new file mode 100644 index 00000000..b3dc1453 --- /dev/null +++ b/lib/docs/filters/django/fix_urls.rb @@ -0,0 +1,10 @@ +module Docs + class Django + class FixUrlsFilter < Filter + def call + html.gsub! %r{#{Regexp.escape(Django.base_url)}([^"']+?)\.html}, "#{Django.base_url}\\1/" + html + end + end + end +end diff --git a/lib/docs/scrapers/django.rb b/lib/docs/scrapers/django.rb new file mode 100644 index 00000000..60526342 --- /dev/null +++ b/lib/docs/scrapers/django.rb @@ -0,0 +1,36 @@ +module Docs + class Django < FileScraper + self.name = 'Django' + self.type = 'sphinx' + self.version = '1.6.6' + self.dir = '/Users/Thibaut/DevDocs/Docs/Django' + self.base_url = 'https://docs.djangoproject.com/en/1.6/' + self.root_path = 'index.html' + + html_filters.push 'django/entries', 'django/clean_html' + text_filters.push 'django/fix_urls' + + options[:container] = '#bd' + + options[:skip] = %w( + contents.html + genindex.html + py-modindex.html + glossary.html + search.html + intro/whatsnext.html) + + options[:skip_patterns] = [ + /\Afaq\//, + /\Ainternals\//, + /\Amisc\//, + /\Areleases\//, + /\A_/, + /flattened\-index\.html/] + + options[:attribution] = <<-HTML + © Django Software Foundation and individual contributors
+ Licensed under the BSD License. + HTML + end +end diff --git a/public/icons/docs/django/16.png b/public/icons/docs/django/16.png new file mode 100644 index 0000000000000000000000000000000000000000..c427ef42feddee43eba6e5e40b993f22b4f51c04 GIT binary patch literal 334 zcmV-U0kQsxP)2^fG`14i(Agji(n}iyEYscp zdlZNMcg*$2(1eUJ46w@Z_&;;Qg8%P7fB26Mh;qTKO$)&ae*F6Jf7|ih|JNVdN}2&L z-o6AY$mlL2FARSF`3+WJlj%jC0e7C<11o5p*M(sK$WVd?RLyAq|L@;Fu%bsVpZve^ z@HSkNOFk!F z001gdH!f8>Em1fvPc|@9H!V^%EmJuyQaJzr|2Sqw>F(=5Y)!z<#8iA>_xboSSv@yo zMbFyPS$|}nwWVZ;Z*r1+Npn^?XGdRzYJHoAJZVZ&dR|t2Vqk@9L~l{M%fRjN?sSxX z*5BDha8lRc+JBvho3f(y_x8!w%{ypGN_1B}YD@n9{?y*rvBS2gysovzy2sSZc9nlU zYD#O3b?WcyZI5^E^6x)uO@yF~=IrSE{QL6t^Zot(*5KK?%D?mW^x5LutG=;1Xh^uo zy<>-NL~v5V(8k2k$eOaD{r>*^{rqo{dhqn|mad&ocwCdLn(y-PVTEjQoafpA000Se zQchE?0PiR9^Cj{qMeuR}0002^NklL0d*=t(#o7A>bpN1mcqGTU z)3dtP0WKmCE1v_nw87Q2pc@m^s)Fv-1P_k@PqiLM7|!#H$ZKyniPL+lzDLu`y2qO( f&!>z9GUR(-O@=duYR}U(00000NkvXXu0mjfbA2Rd literal 0 HcmV?d00001 diff --git a/public/icons/docs/django/SOURCE b/public/icons/docs/django/SOURCE new file mode 100644 index 00000000..2eaa39c2 --- /dev/null +++ b/public/icons/docs/django/SOURCE @@ -0,0 +1 @@ +https://github.com/django/djangoproject.com/raw/master/static/favicon.ico