Unified · Split
| @@ -76,6 +76,7 @@ · 75 unmodified lines | |||
| 76 | 'pages/sphinx', | 76 | 'pages/sphinx', |
| 77 | 'pages/sphinx_simple', | 77 | 'pages/sphinx_simple', |
| 78 | 'pages/tcl_tk', | 78 | 'pages/tcl_tk', |
| 79 | 'pages/tensorflow', | ||
| 79 | 'pages/underscore', | 80 | 'pages/underscore', |
| 80 | 'pages/vagrant', | 81 | 'pages/vagrant', |
| 81 | 'pages/vue', | 82 | 'pages/vue', |
| @@ -76,6 +76,7 @@ · 75 unmodified lines | |||
| 76 | 'pages/sphinx', | 76 | 'pages/sphinx', |
| 77 | 'pages/sphinx_simple', | 77 | 'pages/sphinx_simple', |
| 78 | 'pages/tcl_tk', | 78 | 'pages/tcl_tk', |
| 79 | 'pages/tensorflow', | ||
| 79 | 'pages/underscore', | 80 | 'pages/underscore', |
| 80 | 'pages/vagrant', | 81 | 'pages/vagrant', |
| 81 | 'pages/vue', | 82 | 'pages/vue', |
| @@ -0,0 +1,12 @@ | |||
| 1 | ._tensorflow { | ||
| 2 | h2, h3, h4 { @extend %block-heading, %label-blue; } | ||
| 3 | p > code, li > code { @extend %label; } | ||
| 4 | |||
| 5 | // These are used for lists of arguments and return values in the docs. | ||
| 6 | b > code { | ||
| 7 | @extend %label; | ||
| 8 | background-color: initial; | ||
| 9 | font-weight: 500; | ||
| 10 | font-size: 1.1em; | ||
| 11 | } | ||
| 12 | } | ||
| @@ -0,0 +1,10 @@ | |||
| 1 | module Docs | ||
| 2 | class Tensorflow | ||
| 3 | class CleanHtmlFilter < Filter | ||
| 4 | def call | ||
| 5 | css('hr').remove | ||
| 6 | doc | ||
| 7 | end | ||
| 8 | end | ||
| 9 | end | ||
| 10 | end | ||
| @@ -0,0 +1,33 @@ | |||
| 1 | module Docs | ||
| 2 | class Tensorflow | ||
| 3 | class EntriesFilter < Docs::EntriesFilter | ||
| 4 | def get_name | ||
| 5 | at_css('h1').content | ||
| 6 | end | ||
| 7 | |||
| 8 | def get_type | ||
| 9 | at_css('h1').content | ||
| 10 | end | ||
| 11 | |||
| 12 | def include_default_entry? | ||
| 13 | false | ||
| 14 | end | ||
| 15 | |||
| 16 | def additional_entries | ||
| 17 | entries = [] | ||
| 18 | |||
| 19 | # Just get everything that is a code tag inside a header tag. I haven't | ||
| 20 | # checked if all of these are necessary. | ||
| 21 | ents = css('h5 code') + css('h4 code') + css('h3 code') + css('h2 code') | ||
| 22 | |||
| 23 | ents.each do |node| | ||
| 24 | name = node.content.sub(/\(.*\)/, '()') | ||
| 25 | id = node.parent['id'] | ||
| 26 | entries << [name, id, get_name] | ||
| 27 | end | ||
| 28 | |||
| 29 | entries | ||
| 30 | end | ||
| 31 | end | ||
| 32 | end | ||
| 33 | end | ||
| @@ -0,0 +1,18 @@ | |||
| 1 | module Docs | ||
| 2 | class Tensorflow < UrlScraper | ||
| 3 | self.name = 'TensorFlow' | ||
| 4 | self.slug = 'tensorflow' | ||
| 5 | self.type = 'tensorflow' | ||
| 6 | self.release = '0.6.0-py' | ||
| 7 | self.base_url = 'https://www.tensorflow.org/versions/0.6.0/api_docs/python/' | ||
| 8 | |||
| 9 | options[:container] = '#content' | ||
| 10 | |||
| 11 | html_filters.push 'tensorflow/entries', 'tensorflow/clean_html', 'clean_html' | ||
| 12 | |||
| 13 | options[:attribution] = <<-HTML | ||
| 14 | © The TensorFlow Authors. All rights reserved.<br> | ||
| 15 | Licensed under the Apache 2.0 License. | ||
| 16 | HTML | ||
| 17 | end | ||
| 18 | end | ||
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | |||
| 1 | https://www.tensorflow.org/images/favicon.png | ||