You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by lx...@apache.org on 2017/08/10 20:58:22 UTC
[incubator-mxnet] branch master updated: Add disclaimer and
download link (#7402)
This is an automated email from the ASF dual-hosted git repository.
lxn2 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new aed297a Add disclaimer and download link (#7402)
aed297a is described below
commit aed297aed61dc96afc93565fda2dda85f1a2749b
Author: Yao Wang <ke...@gmail.com>
AuthorDate: Thu Aug 10 13:58:20 2017 -0700
Add disclaimer and download link (#7402)
* Add disclaimer and download link
* Fix
---
docs/_static/mxnet-theme/index.html | 7 ++++
docs/_static/mxnet.css | 14 ++++++++
docs/build_version_doc/AddPackageLink.py | 58 ++++++++++++++++++++++++++++++++
docs/build_version_doc/build_doc.sh | 2 ++
docs/get_started/install.md | 2 ++
5 files changed, 83 insertions(+)
diff --git a/docs/_static/mxnet-theme/index.html b/docs/_static/mxnet-theme/index.html
index c4f3c48..b39e710 100644
--- a/docs/_static/mxnet-theme/index.html
+++ b/docs/_static/mxnet-theme/index.html
@@ -127,3 +127,10 @@
</div>
</div>
</div>
+
+<div class="section-disclaimer">
+ <img src="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/apache_incubator_logo.png" height=60>
+ <p>
+ Apache MXNet is an effort undergoing incubation at The Apache Software Foundation (ASF), <strong>sponsored by the <i>Apache Incubator</i></strong>. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it [...]
+ </p>
+</div>
\ No newline at end of file
diff --git a/docs/_static/mxnet.css b/docs/_static/mxnet.css
index 6f6d8cd..db2c5a2 100644
--- a/docs/_static/mxnet.css
+++ b/docs/_static/mxnet.css
@@ -717,6 +717,14 @@ li.dropdown-submenu ul.dropdown-menu a {
filter: grayscale(0%);
}
+.section-disclaimer {
+ padding: 3em 3em 3em;
+}
+
+.section-disclaimer p {
+ padding-top: 2em;
+}
+
.footer{
padding-top: 40px;
}
@@ -1244,3 +1252,9 @@ div.download_btn a:hover {
padding-bottom: 3px;
font-style: italic;
}
+
+/*------------Download source-----------------*/
+#download-source-package {
+ display: none;
+ padding-top: 40px;
+}
diff --git a/docs/build_version_doc/AddPackageLink.py b/docs/build_version_doc/AddPackageLink.py
new file mode 100644
index 0000000..8fe04b5
--- /dev/null
+++ b/docs/build_version_doc/AddPackageLink.py
@@ -0,0 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import os
+import argparse
+from bs4 import BeautifulSoup as bs
+
+parser = argparse.ArgumentParser(description="Add download package link.",
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+parser.add_argument('--file_path', type=str, default='docs/_build/html/get_started/install.html',
+ help='file to be modified')
+parser.add_argument('--current_version', type=str, default='master',
+ help='Current version')
+
+if __name__ == '__main__':
+ args = parser.parse_args()
+ tag = args.current_version
+
+ src_url = "http://www.apache.org/dyn/closer.cgi/incubator/" \
+ "mxnet/%s-incubating/apache-mxnet-src-%s-incubating.tar.gz" % (tag, tag)
+ pgp_url = "http://www.apache.org/dyn/closer.cgi/incubator/" \
+ "mxnet/%s-incubating/apache-mxnet-src-%s-incubating.tar.gz.asc" % (tag, tag)
+ sha_url = "http://www.apache.org/dyn/closer.cgi/incubator/" \
+ "mxnet/%s-incubating/apache-mxnet-src-%s-incubating.tar.gz.sha" % (tag, tag)
+ md5_url = "http://www.apache.org/dyn/closer.cgi/incubator/" \
+ "mxnet/%s-incubating/apache-mxnet-src-%s-incubating.tar.gz.md5" % (tag, tag)
+
+ download_str = "<div class='btn-group' role='group'>"
+ download_str += "<div class='download_btn'><a href=%s>" \
+ "<span class='glyphicon glyphicon-download-alt'></span>" \
+ " Source for %s</a></div>" % (src_url, tag)
+ download_str += "<div class='download_btn'><a href=%s>PGP</a></div>" % (pgp_url)
+ download_str += "<div class='download_btn'><a href=%s>SHA-256</a></div>" % (sha_url)
+ download_str += "<div class='download_btn'><a href=%s>MD5</a></div>" % (md5_url)
+ download_str += "</div>"
+
+ with open(args.file_path, 'r') as html_file:
+ content = bs(html_file, 'html.parser')
+ download_div = content.find(id="download-source-package")
+ download_div['style'] = "display:block"
+ download_div.append(download_str)
+ outstr = str(content).replace('<', '<').replace('>', '>')
+ with open(args.file_path, 'w') as outf:
+ outf.write(outstr)
\ No newline at end of file
diff --git a/docs/build_version_doc/build_doc.sh b/docs/build_version_doc/build_doc.sh
index c5b59ba..5a4f15d 100755
--- a/docs/build_version_doc/build_doc.sh
+++ b/docs/build_version_doc/build_doc.sh
@@ -57,6 +57,8 @@ then
cat $tag_list_file
tests/ci_build/ci_build.sh doc python docs/build_version_doc/AddVersion.py --file_path "docs/_build/html/" \
--current_version "$latest_tag" --root_url "http://mxnet.incubator.apache.org/"
+ tests/ci_build/ci_build.sh doc python docs/build_version_doc/AddPackageLink.py \
+ --file_path "docs/_build/html/get_started/install.html" --current_version "$latest_tag"
cp -a "docs/_build/html/." "$local_build"
cp $tag_list_file "$local_build/tag.txt"
rm -rf "$web_folder/.git"
diff --git a/docs/get_started/install.md b/docs/get_started/install.md
index 063d419..0e88a0d 100644
--- a/docs/get_started/install.md
+++ b/docs/get_started/install.md
@@ -1462,3 +1462,5 @@ Will be available soon.
</div>
</div>
+
+# Download Source Package
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <co...@mxnet.apache.org>'].