From 7d2b35bfe80a9d3c099ebf566f1637f0d184f488 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Sun, 30 Mar 2014 15:09:49 -0400 Subject: [PATCH] Add C++ documentation --- assets/images/icons.png | Bin 16326 -> 16899 bytes assets/images/icons@2x.png | Bin 43277 -> 43531 bytes .../templates/pages/about_tmpl.coffee | 4 +- .../templates/pages/news_tmpl.coffee | 5 +- assets/javascripts/views/pages/c.coffee | 1 + assets/stylesheets/global/_icons.scss | 3 +- assets/stylesheets/pages/_c.scss | 14 +++++ lib/docs/filters/c/clean_html.rb | 8 +++ lib/docs/filters/cpp/entries.rb | 50 ++++++++++++++++++ lib/docs/filters/cpp/fix_urls.rb | 12 +++++ lib/docs/scrapers/cpp.rb | 30 +++++++++++ public/icons/docs/cpp/16.png | Bin 0 -> 663 bytes public/icons/docs/cpp/16@2x.png | Bin 0 -> 1299 bytes public/icons/docs/cpp/SOURCE | 2 + 14 files changed, 125 insertions(+), 4 deletions(-) create mode 100644 lib/docs/filters/cpp/entries.rb create mode 100644 lib/docs/filters/cpp/fix_urls.rb create mode 100644 lib/docs/scrapers/cpp.rb create mode 100644 public/icons/docs/cpp/16.png create mode 100644 public/icons/docs/cpp/16@2x.png create mode 100644 public/icons/docs/cpp/SOURCE diff --git a/assets/images/icons.png b/assets/images/icons.png index 18d8741b6b9f8ae8878f60659868adddd6d51ed8..2151678c5466af2b37d58149c1702d43ea2f67f4 100644 GIT binary patch delta 7198 zcmV+(9O2`}e}jYpkQWY+2nGNE0H68n82|u5%CRLACVzWp9+qSF|M7dqSjSRn(PmAI zp%rDRsH8F@MC@^Ra= zUr`#aoqrgizw~#AkSEgy65CT2IZNiEboC4rS?dd9l_Ugy1kk_Rci2q;LproU6vOy$ zrxcDHNOfuYd7N9Z3cR{Hpc%mYLvcu%WsT4u)e$^kFoINnM5@hHC$`p+huqJ9INbjmEGMm{2bUxHV%A2k?4H7+5v(Ut;6U=N|`n zqkp!9A^mRyY&w&CseJtsoa`$p^zYqE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Mzt<=mZy%q*8zHNdqF|BzIrwOY%^7rW|*Fekh`XiaQ(^oG!=Y#ktUNNQN{Z>e=}=Gg+=lcpwc_G9y&J z*KqAv4X=+wG8NsY?&9vx4p_!~4eQx^@b{Dha7;S_*TseKNsHV-A;c*XC8cI5giJd{MC3C-h1)0~!u z%o2s>TH$|`h%jvxT?NNHSIc;u!@1%f;$EtIz5{AECd0r`w&u2xd_6h@Z-8l77J4vY zGmqQ}tC{;?lf3`xh}1*IlD3+`en7!=GOZ)wF@j7XlSnuTBjYs)Q!}v>=b7?48Yv?@ z4E51GyAhcBkx6|X%giT^r0GlQe75A^>pzxB4N-r#qLE^0qDq=c7)vYE#;X)_Rrh#@ z)K0!`fMLLT82YbO(LQiJI)!e=rx80~7POgX1Ba*`8q{mdEMzkLfo-?>97Yw&>QZnE$2n=cn2ip{CfT}@x* z!SsKJB#)%mdN4h=fgVh!5o5d1P@9Mdr!O>~I@Ag_sphxS&A}DTmgYLHUg4e^k7M<@@Bc!Beug-6&gZrK>_+x-BFZMYsbqf> zH;HDe5Sgu@YRq%uckj3iTvL3F{MX(#^jT7D """

Questions & Answsers

@@ -86,7 +86,7 @@ credits = [ 'MIT', 'https://raw.github.com/jashkenas/backbone/master/LICENSE' ], [ - 'C', + 'C
C++', 'cppreference.com', 'CC BY-SA', 'http://en.cppreference.com/w/Cppreference:Copyright/CC-BY-SA' diff --git a/assets/javascripts/templates/pages/news_tmpl.coffee b/assets/javascripts/templates/pages/news_tmpl.coffee index d2efaf0e..5580f168 100644 --- a/assets/javascripts/templates/pages/news_tmpl.coffee +++ b/assets/javascripts/templates/pages/news_tmpl.coffee @@ -24,7 +24,10 @@ newsItem = (date, news) -> result app.news = [ - [ 1394928000000, # March 16, 2013 + [ 1396137600000, # March 30, 2014 + """ New C++ documentation """, + ], [ + 1394928000000, # March 16, 2014 """ New Yii documentation """, ], [ 1394236800000, # March 8, 2014 diff --git a/assets/javascripts/views/pages/c.coffee b/assets/javascripts/views/pages/c.coffee index aa6daf83..e079fe6d 100644 --- a/assets/javascripts/views/pages/c.coffee +++ b/assets/javascripts/views/pages/c.coffee @@ -3,4 +3,5 @@ class app.views.CPage extends app.views.BasePage afterRender: -> @highlightCode @findAll('pre.source-c, .source-c > pre'), 'c' + @highlightCode @findAll('pre.source-cpp, .source-cpp > pre'), 'cpp' return diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss index 898d99ce..29902127 100644 --- a/assets/stylesheets/global/_icons.scss +++ b/assets/stylesheets/global/_icons.scss @@ -4,7 +4,7 @@ width: 1rem; height: 1rem; background-image: image-url('icons.png'); - background-size: 5rem 8rem; + background-size: 5rem 9rem; } @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { @@ -51,3 +51,4 @@ ._icon-c:before { background-position: -2rem -7rem; } %icon-path { background-position: -3rem -7rem; } ._icon-yii:before { background-position: -4rem -7rem; } +._icon-cpp:before { background-position: 0 -8rem; } diff --git a/assets/stylesheets/pages/_c.scss b/assets/stylesheets/pages/_c.scss index 9bc384e3..acb505fd 100644 --- a/assets/stylesheets/pages/_c.scss +++ b/assets/stylesheets/pages/_c.scss @@ -19,4 +19,18 @@ color: $textColorLight; } .t-sdsc-nopad dl, .t-sdsc-nopad dd { margin: 0; } + + td > h5 { + margin: 0; + line-height: inherit; + } + + .t-inheritance-diagram { + display: table; + margin: 1rem 0; + padding: .375rem; + font-size: .75rem; + border: 1px solid #ccc; + border-radius: 2px; + } } diff --git a/lib/docs/filters/c/clean_html.rb b/lib/docs/filters/c/clean_html.rb index ed7d5995..70c89f77 100644 --- a/lib/docs/filters/c/clean_html.rb +++ b/lib/docs/filters/c/clean_html.rb @@ -30,6 +30,14 @@ module Docs node.name = 'code' end + css('div > a > img[alt="About this image"]').each do |node| + node.parent.parent.remove + end + + css('area[href]').each do |node| + node['href'] = node['href'].sub('.html', '') + end + doc end end diff --git a/lib/docs/filters/cpp/entries.rb b/lib/docs/filters/cpp/entries.rb new file mode 100644 index 00000000..95e4fb58 --- /dev/null +++ b/lib/docs/filters/cpp/entries.rb @@ -0,0 +1,50 @@ +module Docs + class Cpp + class EntriesFilter < Docs::EntriesFilter + REPLACE_NAMES = { + 'Error directive' => '#error directive', + 'Filename and line information' => '#line directive', + 'Implementation defined behavior control' => '#pragma directive', + 'Replacing text macros' => '#define directive', + 'Source file inclusion' => '#include directive' } + + def get_name + name = at_css('#firstHeading').content.strip + name.sub! 'C++ concepts: ', '' + name.sub! 'C++ keywords: ', '' + name.sub! 'C++ ', '' + name.sub! %r{\s\(.+\)}, '' + name.sub! %r{\AStandard library header <(.+)>\z}, '\1' + name = name.split(',').first + REPLACE_NAMES[name] || name + end + + def get_type + if at_css('#firstHeading').content.include?('C++ keyword') + 'Keywords' + elsif type = at_css('.t-navbar > div:nth-child(4) > :first-child').try(:content) + type.strip! + type.sub! ' library', '' + type.sub! ' utilities', '' + type.sub! 'C++ ', '' + type.capitalize! + type + end + end + + def additional_entries + return [] unless include_default_entry? + names = at_css('#firstHeading').content.gsub(%r{\(.+?\)}, '').split(',')[1..-1] + names.each(&:strip!).reject! do |name| + name.size <= 2 || name == '...' || name =~ /\A[<>]/ || name.start_with?('operator') + end + names.map { |name| [name] } + end + + def include_default_entry? + return @include_default_entry if defined? @include_default_entry + @include_default_entry = at_css('.t-navbar > div:nth-child(4) > a') && at_css('#firstHeading').content !~ /\A\s*operator./ + end + end + end +end diff --git a/lib/docs/filters/cpp/fix_urls.rb b/lib/docs/filters/cpp/fix_urls.rb new file mode 100644 index 00000000..d9936f6d --- /dev/null +++ b/lib/docs/filters/cpp/fix_urls.rb @@ -0,0 +1,12 @@ +module Docs + class Cpp + class FixUrlsFilter < Filter + def call + html.gsub! File.join(Cpp.base_url, Cpp.root_path), Cpp.base_url[0..-2] + html.gsub! %r{#{Cpp.base_url}([^"']+?)\.html}, "#{Cpp.base_url}\\1" + html.gsub! %r{http://en.cppreference.com/common/([^"']+?)\.svg}, 'http://upload.cppreference.com/mwiki/\1.svg' + html + end + end + end +end diff --git a/lib/docs/scrapers/cpp.rb b/lib/docs/scrapers/cpp.rb new file mode 100644 index 00000000..55992808 --- /dev/null +++ b/lib/docs/scrapers/cpp.rb @@ -0,0 +1,30 @@ +module Docs + class Cpp < FileScraper + self.name = 'C++' + self.slug = 'cpp' + self.type = 'c' + self.dir = '/Users/Thibaut/DevDocs/Docs/C/en/cpp' + self.base_url = 'http://en.cppreference.com/w/cpp/' + self.root_path = 'header.html' + + html_filters.insert_before 'clean_html', 'c/fix_code' + html_filters.push 'cpp/entries', 'c/clean_html', 'title' + text_filters.push 'cpp/fix_urls' + + options[:container] = '#content' + options[:title] = false + options[:root_title] = 'C++ Programming Language' + options[:skip] = %w( + language/extending_std.html + language/history.html + regex/ecmascript.html + regex/regex_token_iterator/operator_cmp.html + ) + options[:only_patterns] = [/\.html\z/] + + options[:attribution] = <<-HTML + © cppreference.com
+ Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0. + HTML + end +end diff --git a/public/icons/docs/cpp/16.png b/public/icons/docs/cpp/16.png new file mode 100644 index 0000000000000000000000000000000000000000..e0e7c218277abda4f00c16d10942fec863533154 GIT binary patch literal 663 zcmV;I0%-k-P)3Jv_FnwDVc$aTs{vK=}aE>@hJA$rm?l*9_XZ3R?kllo;Sm%}Un!0HVq>U%$6XVVDETO<*dp(2~hLB*n+#NIO^ zc;to%D?<{*(6v7^Y&&*4O;rw%whiUY9=!OtAbx0;bAmIh6`v~FK)Mdl;m$PG_86!D z?PV?LoG(d#4Rp|s4b@k%+uVoB)?w@tTqHF6Tvz%IwQFe=$}GjCcbLV7dD36!0B=;7 xHTzsw`qo8NM+sFsyTqmh)rcT7Yxe&){sDLh1Go&wf`I@4002ovPDHLkV1npGHr@aL literal 0 HcmV?d00001 diff --git a/public/icons/docs/cpp/16@2x.png b/public/icons/docs/cpp/16@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..677d8960960e3231bab275c562c4bc208db72435 GIT binary patch literal 1299 zcmV+u1?>8XP)j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LkV1jLmfqDP{ literal 0 HcmV?d00001 diff --git a/public/icons/docs/cpp/SOURCE b/public/icons/docs/cpp/SOURCE new file mode 100644 index 00000000..bf9dedaa --- /dev/null +++ b/public/icons/docs/cpp/SOURCE @@ -0,0 +1,2 @@ +http://dribbble.com/shots/799814-Standard-C-Logo +with authorization from Jeremy Kratz