Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -1,5 +1,8 @@ | ||
| 1 | 1 | [ |
| 2 | 2 | [ |
| 3 | + "2016-07-02", | |
| 4 | + "New documentation: <a href=\"/cmake/\">CMake</a>" | |
| 5 | + ], [ | |
| 3 | 6 | "2016-06-19", |
| 4 | 7 | "New documentation: <a href=\"/love/\">LÖVE</a>" |
| 5 | 8 | ], [ |
| @@ -135,6 +135,11 @@ credits = [ · 134 unmodified lines | ||
| 135 | 135 | 'Rich Hickey', |
| 136 | 136 | 'EPL', |
| 137 | 137 | 'https://github.com/clojure/clojure/blob/master/epl-v10.html' |
| 138 | + ], [ | |
| 139 | + 'CMake', | |
| 140 | + '2000-2016 Kitware, Inc.<br>© 2000-2011 Insight Software Consortium', | |
| 141 | + 'BSD', | |
| 142 | + 'https://cmake.org/licensing/' | |
| 138 | 143 | ], [ |
| 139 | 144 | 'CodeIgniter', |
| 140 | 145 | '2014-2016 British Columbia Institute of Technology', |
| @@ -132,6 +132,7 @@ · 131 unmodified lines | ||
| 132 | 132 | ._icon-q:before { background-position: -5rem -8rem; } |
| 133 | 133 | ._icon-react_native:before { background-position: 0 -9rem; } |
| 134 | 134 | ._icon-phalcon:before { background-position: -1rem -9rem; } |
| 135 | +._icon-cmake:before { background-position: -3rem -9rem; } | |
| 135 | 136 | ._icon-elixir:before { background-position: -4rem -9rem; @extend %darkIconFix !optional; } |
| 136 | 137 | ._icon-vagrant:before { background-position: -5rem -9rem; } |
| 137 | 138 | ._icon-dojo:before { background-position: -6rem -9rem; } |
| @@ -1,39 +1,47 @@ | ||
| 1 | 1 | module Docs |
| 2 | 2 | class Cmake |
| 3 | 3 | class CleanHtmlFilter < Filter |
| 4 | − # since each property category has its own entry redirect to that one instead | |
| 5 | − URL_MAPPING = { | |
| 6 | − '/manual/cmake-properties.7#properties-of-global-scope' => '/../cmake-properties-of-global-scope/', | |
| 7 | − '/manual/cmake-properties.7#properties-on-directories' => '/../cmake-properties-on-directories/', | |
| 8 | − '/manual/cmake-properties.7#target-properties' => '/../cmake-properties-on-targets/', | |
| 9 | − '/manual/cmake-properties.7.html#properties-on-tests' => '/../cmake-properties-on-tests/', | |
| 10 | − '/manual/cmake-properties.7.html#properties-on-source-files' => '/../cmake-properties-on-source-files/', | |
| 11 | − '/manual/cmake-properties.7.html#properties-on-cache-entries' => '/../cmake-properties-on-cache-entries/', | |
| 12 | − '/manual/cmake-properties.7.html#properties-on-installed-files' => '/../cmake-properties-on-installed-files/', | |
| 13 | − '/manual/cmake-properties.7.html#deprecated-properties-on-directories' => '/../cmake-deprecated-properties-on-directories/', | |
| 14 | − '/manual/cmake-properties.7.html#deprecated-properties-on-targets' => '/../cmake-deprecated-properties-on-targets/', | |
| 15 | − '/manual/cmake-properties.7.html#deprecated-properties-on-source-files' => '/../cmake-deprecated-properties-on-source-files/' | |
| 16 | − } | |
| 17 | − | |
| 18 | 4 | def call |
| 19 | − css('.headerlink').remove | |
| 5 | + css('.headerlink', '#contents .topic-title').remove | |
| 6 | + | |
| 20 | 7 | if root_page? |
| 21 | − css('#release-notes').remove | |
| 22 | − css('#index-and-search').remove | |
| 23 | − return doc | |
| 8 | + css('#release-notes', '#index-and-search').remove | |
| 9 | + | |
| 10 | + css('h1').each do |node| | |
| 11 | + node.name = 'h2' | |
| 12 | + end | |
| 13 | + end | |
| 14 | + | |
| 15 | + css('.contents > ul.simple > li:first-child:last-child').each do |node| | |
| 16 | + node.parent.before(node.at_css('> ul')) | |
| 17 | + node.remove | |
| 24 | 18 | end |
| 25 | − css('.toc-backref').each do |link| | |
| 26 | − link.replace(link.text) | |
| 19 | + | |
| 20 | + css('.toc-backref', '.toctree-wrapper', '.contents', 'span.pre', 'pre a > code').each do |node| | |
| 21 | + node.before(node.children).remove | |
| 22 | + end | |
| 23 | + | |
| 24 | + css('div[class*="highlight-"]').each do |node| | |
| 25 | + pre = node.at_css('pre') | |
| 26 | + pre.content = pre.content | |
| 27 | + node.replace(pre) | |
| 27 | 28 | end |
| 28 | − css('#contents').remove | |
| 29 | 29 | |
| 30 | − # change urls pointing to entries which don't have a default entry | |
| 31 | − css('a').each do |link| | |
| 32 | − URL_MAPPING.each do |key, value| | |
| 33 | − if link['href'].end_with? key | |
| 34 | − link['href'] = link['href'][0..-(key.length + 1)] + value | |
| 30 | + css('span[id]:empty').each do |node| | |
| 31 | + node.next_element['id'] = node['id'] | |
| 32 | + node.remove | |
| 33 | + end | |
| 34 | + | |
| 35 | + css('.section').each do |node| | |
| 36 | + if node['id'] | |
| 37 | + if node.first_element_child['id'] | |
| 38 | + node.element_children[1]['id'] = node['id'] | |
| 39 | + else | |
| 40 | + node.first_element_child['id'] = node['id'] | |
| 35 | 41 | end |
| 36 | 42 | end |
| 43 | + | |
| 44 | + node.before(node.children).remove | |
| 37 | 45 | end |
| 38 | 46 | |
| 39 | 47 | doc |
| @@ -1,63 +1,41 @@ | ||
| 1 | 1 | module Docs |
| 2 | 2 | class Cmake |
| 3 | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | − MISCELLANEOUS = { | |
| 4 | + NAME_BY_SLUG = { | |
| 5 | 5 | 'manual/cmake.1' => 'CMake', |
| 6 | 6 | 'manual/ctest.1' => 'CTest', |
| 7 | 7 | 'manual/cpack.1' => 'CPack', |
| 8 | 8 | 'manual/cmake-gui.1' => 'CMake GUI', |
| 9 | − 'manual/ccmake.1' => 'CCMake', | |
| 10 | − 'manual/cmake-buildsystem.7' => 'Buildsystem', | |
| 11 | − 'manual/cmake-commands.7' => 'Commands', | |
| 12 | − 'manual/cmake-compile-features.7' => 'Compile Features', | |
| 13 | − 'manual/cmake-developer.7' => 'Developer', | |
| 14 | − 'manual/cmake-generator-expressions.7' => 'Generator Expressions', | |
| 15 | − 'manual/cmake-generators.7' => 'Generators', | |
| 16 | − 'manual/cmake-language.7' => 'Language', | |
| 17 | − 'manual/cmake-modules.7' => 'Modules', | |
| 18 | − 'manual/cmake-packages.7' => 'Packages', | |
| 19 | − 'manual/cmake-policies.7' => 'Policies', | |
| 20 | − 'manual/cmake-properties.7' => 'Properties', | |
| 21 | − 'manual/cmake-qt.7' => 'Qt', | |
| 22 | − 'manual/cmake-toolchains.7' => 'Toolchains', | |
| 23 | − 'manual/cmake-variables.7' => 'Variables' } | |
| 9 | + 'manual/ccmake.1' => 'CCMake' } | |
| 24 | 10 | |
| 25 | − GROUPS = { | |
| 11 | + TYPE_BY_DIR = { | |
| 26 | 12 | 'command' => 'Commands', |
| 13 | + 'manual' => 'Manual', | |
| 14 | + 'module' => 'Modules', | |
| 27 | 15 | 'policy' => 'Policies', |
| 16 | + 'prop_cache' => 'Properties: Cache Entries', | |
| 17 | + 'prop_dir' => 'Properties: Directories', | |
| 28 | 18 | 'prop_gbl' => 'Properties of Global Scope', |
| 29 | − 'prop_dir' => 'Properties on Directories', | |
| 30 | − 'prop_tgt' => 'Properties on Targets', | |
| 31 | − 'prop_test' => 'Properties on Tests', | |
| 32 | − 'prop_sf' => 'Properties on Source Files', | |
| 33 | − 'prop_cache' => 'Properties on Cache Entries', | |
| 34 | − 'prop_inst' => 'Properties on Installed Files', | |
| 19 | + 'prop_inst' => 'Properties: Installed Files', | |
| 20 | + 'prop_sf' => 'Properties: Source Files', | |
| 21 | + 'prop_test' => 'Properties: Tests', | |
| 22 | + 'prop_tgt' => 'Properties: Targets', | |
| 35 | 23 | 'variable' => 'Variables' } |
| 36 | 24 | |
| 37 | 25 | def get_name |
| 38 | − if MISCELLANEOUS.key?(slug) | |
| 39 | − return MISCELLANEOUS[slug] | |
| 26 | + if NAME_BY_SLUG.key?(slug) | |
| 27 | + NAME_BY_SLUG[slug] | |
| 28 | + elsif slug =~ /\Amanual\/cmake-([\w\-]+)\.7\z/ | |
| 29 | + $1.titleize | |
| 30 | + else | |
| 31 | + dir, name = slug.split('/') | |
| 32 | + name << '()' if dir == 'command' | |
| 33 | + name | |
| 40 | 34 | end |
| 41 | − parts = slug.split('/') | |
| 42 | − name = parts.drop(1).first | |
| 43 | − if name == '' | |
| 44 | − return slug | |
| 45 | − end | |
| 46 | − if parts.first == 'command' | |
| 47 | − name += '()' | |
| 48 | − end | |
| 49 | − name | |
| 50 | 35 | end |
| 51 | 36 | |
| 52 | 37 | def get_type |
| 53 | − if MISCELLANEOUS.key?(slug) | |
| 54 | − return 'Miscellaneous' | |
| 55 | − end | |
| 56 | − parts = slug.split('/') | |
| 57 | − if GROUPS.key?(parts.first) | |
| 58 | − return GROUPS[parts.first] | |
| 59 | − end | |
| 60 | − slug | |
| 38 | + TYPE_BY_DIR[slug.split('/').first] | |
| 61 | 39 | end |
| 62 | 40 | end |
| 63 | 41 | end |
| @@ -1,32 +1,29 @@ | ||
| 1 | 1 | module Docs |
| 2 | 2 | class Cmake < UrlScraper |
| 3 | 3 | self.name = 'CMake' |
| 4 | − self.slug = 'cmake' | |
| 5 | − self.type = 'cmake' | |
| 6 | − self.release = '3.5' | |
| 7 | − self.base_url = 'https://cmake.org/cmake/help/v3.5/' | |
| 4 | + self.type = 'sphinx_simple' | |
| 5 | + self.links = { | |
| 6 | + home: 'https://cmake.org/', | |
| 7 | + code: 'https://cmake.org/gitweb?p=cmake.git;a=summary' | |
| 8 | + } | |
| 8 | 9 | |
| 9 | − options[:skip] = %w( | |
| 10 | − release/index.html | |
| 11 | − genindex.html | |
| 12 | − search.html | |
| 13 | − ) | |
| 14 | − | |
| 15 | − options[:only_patterns] = [ | |
| 16 | − /manual/, | |
| 17 | − /command/, | |
| 18 | − /policy/, | |
| 19 | − /prop_/, | |
| 20 | − /variable/ | |
| 21 | − ] | |
| 10 | + html_filters.push 'cmake/clean_html', 'cmake/entries', 'title' | |
| 22 | 11 | |
| 23 | 12 | options[:container] = '.body' |
| 24 | − | |
| 25 | − html_filters.push 'cmake/clean_html', 'cmake/entries' | |
| 13 | + options[:title] = false | |
| 14 | + options[:root_title] = 'CMake Reference Documentation' | |
| 15 | + options[:skip] = %w(release/index.html genindex.html search.html) | |
| 16 | + options[:skip_patterns] = [/\Agenerator/, /\Ainclude/, /\Arelease/] | |
| 26 | 17 | |
| 27 | 18 | options[:attribution] = <<-HTML |
| 28 | 19 | © 2000–2016 Kitware, Inc.<br> |
| 20 | + © 2000–2011 Insight Software Consortium<br> | |
| 29 | 21 | Licensed under the BSD 3-clause License. |
| 30 | 22 | HTML |
| 23 | + | |
| 24 | + version '3.5' do | |
| 25 | + self.release = '3.5.2' | |
| 26 | + self.base_url = 'https://cmake.org/cmake/help/v3.5/' | |
| 27 | + end | |
| 31 | 28 | end |
| 32 | 29 | end |
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | ||
| 1 | +https://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Source/QtDialog/CMakeSetup.ico;hb=refs/heads/master | |