Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document the database in the frontend.
Browse files Browse the repository at this point in the history
smarnach committed Sep 17, 2019
1 parent 620bb51 commit f776f9b
Showing 3 changed files with 37 additions and 9 deletions.
1 change: 1 addition & 0 deletions app/router.js
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ Router.map(function() {
this.route('category-slugs', { path: 'category_slugs' });
this.route('team', { path: '/teams/:team_id' });
this.route('policies');
this.route('data-access');
this.route('confirm', { path: '/confirm/:email_token' });

this.route('catch-all', { path: '*path' });
34 changes: 34 additions & 0 deletions app/templates/data-access.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<div id='crates-heading'>
{{svg-jar 'circle-with-i'}}
<h1>Accessing the Crates.io Data</h1>
</div>

<p>
There are several ways of accessing the Crates.io data. You should try the
options in the order listed.
</p>

<ol>
<li>
<b>
The <a href='https://github.com/rust-lang/crates.io-index'>crates.ioindex</a>.
</b>
This git repository is always kept up to date by crates.io, and it is used
by Cargo to speed up local dependency resolution. It contains the majority
of the data exposed by crates.io and is cheap to clone and to update.
</li>
<li>
<b>The database dumps (experimental).</b> The dumps contain all information
exposed by the API in a single download. They are updated every six hours.
The latest dump is available at the address
<a href='https://static.crates.io/db-dump.tar.gz'>https://static.crates.io/db-dump.tar.gz</a>.
Information on using the dump is contained in the tarball.
</li>
<li>
<b>Crawl the crates.io API.</b> This should be used as a last resort, and
doing so is subject to our {{#link-to 'policies'}}crawling policy{{/link-to}}.
If the index and the database dumps do not satisfy your needs, we're happy to
discuss solutions to your needs that don't require you to crawl the registry.
You can email us at <a href="mailto:help@crates.io">help@crates.io</a>.
</li>
</ol>
11 changes: 2 additions & 9 deletions app/templates/policies.hbs
Original file line number Diff line number Diff line change
@@ -112,15 +112,8 @@
<h2 id='crawlers'><a href='#crawlers'>Crawlers</a></h2>

<p>
Before resorting to crawling crates.io, you should first see if you are able to
gather the information you need from the
<a href='https://github.com/rust-lang/crates.io-index'>crates.io index</a>,
which is a public git repository containing the majority
of the information availble through our API.

If the index does not have the information you need, we're also happy to
discuss solutions to your needs that don't require you to crawl the registry.
You can email us at <a href="mailto:help@crates.io">help@crates.io</a>.
Before resorting to crawling crates.io, please read
{{#link-to 'data-access'}}Accessing the Crates.io Data{{/link-to}}.
</p>

<p>

0 comments on commit f776f9b

Please sign in to comment.