From 383595c44e9b2aafbece20eb60a3ff36c1f88d81 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 10 May 2015 19:40:25 +0200 Subject: [PATCH] docs(CLI): added Download information That way, it's easy to obtain the respective precompiled binary, as well as seeing the source-code. Overall, it makes promoting the tools easier as the CLI docs can be linked directly. Closes #108 [skip ci] --- etc/api/shared.yaml | 6 +++++- gen/discovery1-cli/README.md | 9 +++++++++ src/mako/cli/README.md.mako | 12 +++++++++++- src/mako/index.html.mako | 6 +++--- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/etc/api/shared.yaml b/etc/api/shared.yaml index 4918c099ff..8798074957 100644 --- a/etc/api/shared.yaml +++ b/etc/api/shared.yaml @@ -17,7 +17,11 @@ make: types: - api - cli -html_index: + # All known platforms we build for, using prettyfied, custom names + platforms: + - ubuntu + - osx +url_info: download_base_url: http://dl.byronimo.de asset_urls: crates_img: https://raw.githubusercontent.com/rust-lang/crates.io/master/public/favicon.ico diff --git a/gen/discovery1-cli/README.md b/gen/discovery1-cli/README.md index 1dba9d527a..7f5f067971 100644 --- a/gen/discovery1-cli/README.md +++ b/gen/discovery1-cli/README.md @@ -13,6 +13,15 @@ If data-structures are requested, these will be returned as pretty-printed JSON, Everything else about the *discovery* API can be found at the [official documentation site](https://developers.google.com/discovery/). +# Downloads + +You can download the pre-compiled 64bit binaries for the following platforms: + +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.2.0/ubuntu/discovery1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.2.0/osx/discovery1.tar.gz) + +Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/discovery1-cli). + # Usage This documentation was generated from the *discovery* API at revision *00000000*. The CLI is at version *0.2.0*. diff --git a/src/mako/cli/README.md.mako b/src/mako/cli/README.md.mako index e1216af898..38935ea48e 100644 --- a/src/mako/cli/README.md.mako +++ b/src/mako/cli/README.md.mako @@ -1,5 +1,5 @@ <% - from util import (markdown_comment, new_context) + from util import (markdown_comment, new_context, program_download_url) from cli import (CONFIG_DIR, CONFIG_DIR_FLAG, SCOPE_FLAG, application_secret_path, DEBUG_FLAG, DEBUG_AUTH_FLAG) c = new_context(schemas, resources, context.get('methods')) @@ -21,6 +21,16 @@ Everything else about the *${util.canonical_name()}* API can be found at the [official documentation site](${documentationLink}). % endif +# Downloads + +You can download the pre-compiled 64bit binaries for the following platforms: + +% for os_name in make.platforms: +* ![icon](${url_info.asset_urls.get('%s_img' % os_name)}) [${os_name}](${program_download_url(url_info.download_base_url, 'cli', cargo.build_version, os_name, name, version)}) +% endfor + +Find the source code [on github](${util.github_source_root_url()}). + # Usage This documentation was generated from the *${util.canonical_name()}* API at revision *${revision is UNDEFINED and '00000000' or revision}*. The CLI is at version *${cargo.build_version}*. diff --git a/src/mako/index.html.mako b/src/mako/index.html.mako index 9e74999b58..cf681fec44 100644 --- a/src/mako/index.html.mako +++ b/src/mako/index.html.mako @@ -69,10 +69,10 @@ DO NOT EDIT ! <% ad = tc[program_type] %> ${ad.make.id.upper()} % if program_type == 'api': - + % else: - % for os_name in ('ubuntu', 'osx'): - + % for os_name in make.platforms: + % endfor ## each os % endif % if not loop.last: