Docs Proposal: Move client docs into client table
MODIFY
commands-yml/parse.js
commands-yml/parse.js
@@ -8,6 +8,8 @@ import replaceExt from 'replace-ext';
import _ from 'lodash';
import { asyncify } from 'asyncbox';
import validator from './validator';
+import url from 'url';
+
// What range of platforms do the driver's support
const platformRanges = {
@@ -95,6 +97,11 @@ Handlebars.registerHelper('if_eq', function (a, b, opts) {
}
});
+Handlebars.registerHelper('base_url', function (fullUrl) {
+ const baseUrl = url.parse(fullUrl);
+ return baseUrl.hostname;
+});
+
async function main () {
const commands = path.resolve(__dirname, 'commands/**/*.yml');
console.log('Traversing YML files', commands);

MODIFY
commands-yml/template.md
commands-yml/template.md
{{description}}
{{/if}}
-## Client Docs
-
-{{#if client_docs.java}} * [Java]({{client_docs.java}}) {{/if}}
-{{#if client_docs.python}} * [Python]({{client_docs.python}}) {{/if}}
-{{#if client_docs.javascript_wdio}} * [Javascript (WebdriverIO)]({{client_docs.javascript_wdio}}) {{/if}}
-{{#if client_docs.javascript_wd}} * [Javascript (WD)]({{client_docs.javascript_wd}}) {{/if}}
-{{#if client_docs.ruby}} * [Ruby]({{client_docs.ruby}}) {{/if}}
-{{#if client_docs.php}} * [PHP]({{client_docs.php}}) {{/if}}
-{{#if client_docs.csharp}} * [C#]({{client_docs.csharp}}) {{/if}}
-
## Support
### Appium Server
### Appium Clients
-|Language|Support|
-|--------|-------|
-|[Java](https://github.com/appium/java-client/releases/latest)| {{versions client_support.java}} |
-|[Python](https://github.com/appium/python-client/releases/latest)| {{versions client_support.python}} |
-|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| {{versions client_support.javascript_wdio}} |
-|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| {{versions client_support.javascript_wd}} |
-|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| {{versions client_support.ruby}} |
-|[PHP](https://github.com/appium/php-client/releases/latest)| {{versions client_support.php}} |
-|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| {{versions client_support.csharp}} |
+|Language|Support|Documentation|
+|--------|-------|-------------|
+|[Java](https://github.com/appium/java-client/releases/latest)| {{versions client_support.java}} | {{#if client_docs.java}} [{{base_url client_docs.java}}]({{client_docs.java}}) {{/if}} |
+|[Python](https://github.com/appium/python-client/releases/latest)| {{versions client_support.python}} | {{#if client_docs.python}} [{{base_url client_docs.python}}]({{client_docs.python}}) {{/if}} |
+|[Javascript (WebdriverIO)](http://webdriver.io/index.html)| {{versions client_support.javascript_wdio}} | {{#if client_docs.javascript_wdio}} [{{base_url client_docs.javascript_wdio}}]({{client_docs.javascript_wdio}}) {{/if}} |
+|[Javascript (WD)](https://github.com/admc/wd/releases/latest)| {{versions client_support.javascript_wd}} | {{#if client_docs.javascript_wd}} [{{base_url client_docs.javascript_wd}}]({{client_docs.javascript_wd}}) {{/if}} |
+|[Ruby](https://github.com/appium/ruby_lib/releases/latest)| {{versions client_support.ruby}} | {{#if client_docs.ruby}} [{{base_url client_docs.ruby}}]({{client_docs.ruby}}) {{/if}} |
+|[PHP](https://github.com/appium/php-client/releases/latest)| {{versions client_support.php}} | {{#if client_docs.php}} [{{base_url client_docs.php}}]({{client_docs.php}}) {{/if}} |
+|[C#](https://github.com/appium/appium-dotnet-driver/releases/latest)| {{versions client_support.csharp}} | {{#if client_docs.csharp}} [{{base_url client_docs.csharp}}]({{client_docs.csharp}}) {{/if}} |
## HTTP API Specifications

Docs Proposal: Move client docs into client table (#9371)