Closed pingpongboss closed 7 years ago
To get all repos:
curl -i https://api.github.com/orgs/material-motion/repos | grep full_name | cut -d: -f2
# Generate a markdown table with images
mdm shields table
# Generate a markdown table with text (must hit .json shields.io api)
mdm shields table astext
it is my duty as the resident web guy to post the js equivalent:
fetch(
'https://api.github.com/orgs/material-motion/repos'
).then(
response => response.json()
).then(
repos => repos.map(
repo => repo.full_name
)
).then(
fullNames => {
// do something with fullNames here
console.log(fullNames);
}
)
We're like a little sitcom. We've each got our own roles.
Battery's dying, but here's a sketch:
fetch(
'https://api.github.com/orgs/material-motion/repos?per_page=100'
).then(
response => response.json()
).then(
repos => repos.map(
repo => (
{
orgAndRepoSlug: repo.full_name,
docsURL: repo.homepage,
}
)
)
).then(
repoMetadata => (
{
android: repoMetadata.filter(
({ orgAndRepoSlug }) => orgAndRepoSlug.endsWith('android')
),
js: repoMetadata.filter(
({ orgAndRepoSlug }) => orgAndRepoSlug.endsWith('js')
),
apple: repoMetadata.filter(
({ orgAndRepoSlug }) => orgAndRepoSlug.endsWith('swift') || orgAndRepoSlug.endsWith('objc')
),
}
)
).then(
({ android, js, apple }) => (
{
android: android.map(
({ orgAndRepoSlug, docsURL }) => [
`[${ orgAndRepoSlug }](https://github.com/${ orgAndRepoSlug }/)`,
`[![Build Status](https://travis-ci.org/${ orgAndRepoSlug }.svg?branch=develop)](https://travis-ci.org/${ orgAndRepoSlug }/)`,
`[![codecov](https://codecov.io/gh/${ orgAndRepoSlug }/branch/develop/graph/badge.svg)](https://codecov.io/gh/${ orgAndRepoSlug }/)`,
`[![Release](https://img.shields.io/github/release/${ orgAndRepoSlug }.svg)](https://github.com/${ orgAndRepoSlug }/releases/latest/)`,
`[![Docs](https://img.shields.io/badge/jitpack-docs-green.svg)](${ docsURL })`,
`[![Open issues](https://img.shields.io/github/issues/${ orgAndRepoSlug }.svg)](https://github.com/${ orgAndRepoSlug }/issues/)`,
]
),
js: js.map(
({ orgAndRepoSlug, docsURL }) => {
const packageName = orgAndRepoSlug.split('/').pop().replace('-js', '');
return [
`[${ orgAndRepoSlug }](https://github.com/${ orgAndRepoSlug })`,
`[![Build Status](https://travis-ci.org/${ orgAndRepoSlug }.svg?branch=develop)](https://travis-ci.org/${ orgAndRepoSlug }/)`,
`[![codecov](https://codecov.io/gh/${ orgAndRepoSlug }/branch/develop/graph/badge.svg)](https://codecov.io/gh/${ orgAndRepoSlug }/)`,
`[![Release](https://img.shields.io/npm/v/${ packageName }.svg)](https://www.npmjs.com/package/${ packageName }/)`,
`[![Open issues](https://img.shields.io/github/issues/${ orgAndRepoSlug }.svg)](https://github.com/${ orgAndRepoSlug }/issues/)`,
]
}
),
apple: apple.map(
({ orgAndRepoSlug, docsURL }) => {
const packageName = docsURL
? (/http:\/\/cocoadocs.org\/docsets\/(\w+)/.exec(docsURL) || []).pop()
: console.warn(`${ orgAndRepoSlug } doesn't have homepage set correctly!`) || '';
return [
`[${ orgAndRepoSlug }](https://github.com/${ orgAndRepoSlug })`,
`[![Build Status](https://travis-ci.org/${ orgAndRepoSlug }.svg?branch=develop)](https://travis-ci.org/${ orgAndRepoSlug }/)`,
`[![codecov](https://codecov.io/gh/${ orgAndRepoSlug }/branch/develop/graph/badge.svg)](https://codecov.io/gh/${ orgAndRepoSlug }/)`,
`[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/${ packageName }.svg)](https://cocoapods.org/pods/${ packageName }/)`,
`[![Platform](https://img.shields.io/cocoapods/p/${ packageName }.svg)](http://cocoadocs.org/docsets/${ packageName })`,
`[![Docs](https://img.shields.io/cocoapods/metrics/doc-percent/${ packageName }.svg)](${ docsURL })`,
`[![Open issues](https://img.shields.io/github/issues/${ orgAndRepoSlug }.svg)](https://github.com/${ orgAndRepoSlug }/issues/)`,
]
}
),
}
)
).then(
({ apple, android, js }) => `
## Apple platform support
| Library | Build status | Coverage | Version | Platforms | Docs | Issues |
|---------|:------------:|:--------:|:-------:|:---------:|:----:|:------:|
${ apple.map(repo => `| ${ repo.join(' | ') } |`).join('\n') }
## Android platform support
| Library | Build status | Coverage | Version | Docs | Issues |
|---------|:------------:|:--------:|:-------:|:----:|:------:|
${ android.map(repo => `| ${ repo.join(' | ') } |`).join('\n') }
## Web platform support
| Library | Build status | Coverage | Version | Issues |
|---------|:------------:|:--------:|:-------:|:------:|
${ js.map(repo => `| ${ repo.join(' | ') } |`).join('\n') }
`
).then(console.log)
Library | Build status | Coverage | Version | Docs | Issues |
---|---|---|---|---|---|
material-motion/experiments-android | []() | ||||
material-motion/conventions-android | |||||
material-motion/expression-android | |||||
material-motion/family-tween-android | []() | ||||
material-motion/runtime-android | |||||
material-motion/transitions-android | []() | ||||
material-motion/family-rebound-android | []() | ||||
material-motion/family-direct-manipulation-android | []() | ||||
material-motion/gestures-android | []() | ||||
material-motion/catalog-android | []() |
Library | Build status | Coverage | Version | Issues |
---|---|---|---|---|
material-motion/material-motion-js | ||||
material-motion/streams-experiment-js | ||||
material-motion/indefinite-observable-js |
Hmm... I don't see indefinite-observable in either chart
I tested the regex on a real URL and forgot to replace with docsURL. fixed that bit
TODO: move checkboxes to issues
Create a tool to generate the contents of https://material-motion.github.io/material-motion/ automatically.
This tool should also generate a text version of the table for weekly updates.