https://github.com/hughsk/ecosystem-docs
Aggregate and store a collection of data for GitHub repositories, intended for use with documenting package ecosystems on npm
https://github.com/hughsk/ecosystem-docs
Last synced: 3 months ago
JSON representation
Aggregate and store a collection of data for GitHub repositories, intended for use with documenting package ecosystems on npm
- Host: GitHub
- URL: https://github.com/hughsk/ecosystem-docs
- Owner: hughsk
- License: other
- Created: 2015-06-13T18:36:50.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-27T05:39:34.000Z (about 9 years ago)
- Last Synced: 2025-03-04T21:39:29.163Z (3 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 19
- Watchers: 4
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ecosystem-docs



Aggregate and store a collection of data for GitHub repositories, intended for use with documenting package ecosystems on npm.
This makes it easier to write your own version of
[stackgl/packages](http://stack.gl/packages), with the added
bonus of being more pleasant to work with and using a better
caching strategy.## Usage
[](https://nodei.co/npm/ecosystem-docs/)
```
Usage:
ecosystem-docs {OPTIONS}Available Commands:
sync Syncs the database with GitHub
read Outputs the stored information for the input repositories
dump Dumps all of the currently stored information to stdoutOptions:
-d, --data Location of the leveldb cache. Defaults to ~/.ecosystem-docs
-h, --help Display this message
-t, --token Pass in a custom GitHub token. Otherwise this will be prompted
for when first using the tool.
```When you've first installed the tool, be sure to login with
your GitHub credentials first by running the command once
without any arguments:``` bash
ecosystem-docs
```After that, you can pipe a line-delimited list of user/name
repository paths into the tool to sync with GitHub:``` bash
echo '
hughsk/icosphere
mattdesl/budo
stackgl/glslify
' > repos.txtcat repos.txt | ecosystem-docs sync
```And later, pipe a line-delimited list of user/name repository
paths into the tool to read the update data out as
line-delimited JSON:``` bash
cat repos.txt | ecosystem-docs read
{"user":"hughsk","path":"hughsk/icosphere","name":"icosphere","head":"e7c9bfcefac34b5be57d066a50428b30b15e3ac8","readme":"...","contributors":[{"login":"hughsk"},{"login":"kumavis"}],"page":"http://hughsk.io/icosphere/","package":{}}
{"user":"mattdesl","path":"mattdesl/budo","name":"budo","head":"0951e8594d6df0e6ec630fa8cb1bde5d4615fbdf","readme":"...","contributors":[{"login":"mattdesl"},{"login":"yoshuawuyts"},{"login":"thibauts"}],"page":false,"package":{}}
{"user":"stackgl","path":"stackgl/glslify","name":"glslify","head":"81ca203b6dee320508953e2be256250d44871a70","readme":"...","contributors":[{"login":"hughsk"},{"login":"chrisdickinson"},{"login":"mattdesl"},{"login":"mikolalysenko"},{"login":"rippedspine"}],"page":false,"package":{}}
```Each repository has the following properties:
* `user`: The GitHub user that owns the repository.
* `name`: The name of the GitHub repository.
* `path`: The user/name path of the GitHub repository.
* `head`: The latest recorded commit in that repository.
* `readme`: The contents of the README file, according to GitHub.
* `page`: A resolved link to the GitHub pages URL, or false if it doesn't exist.
* `package`: the latest `package.json` committed to GitHub.
* `contributors`: A list of users who've contributed to the repository on GitHub: all of their associated profile data from the API.Results are cached to minimise requests to the GitHub API, but
every sync will create at least one API request per repository
supplied. The cache is invalidated whenever a new commit is
pushed to that repository.## License
MIT. See [LICENSE.md](http://github.com/hughsk/ecosystem-docs/blob/master/LICENSE.md) for details.