Skip to content

Commit ba3709b

Browse files
committed
Document the database dumps in the frontend.
1 parent 620bb51 commit ba3709b

File tree

3 files changed

+37
-9
lines changed

3 files changed

+37
-9
lines changed

app/router.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Router.map(function() {
4646
this.route('category-slugs', { path: 'category_slugs' });
4747
this.route('team', { path: '/teams/:team_id' });
4848
this.route('policies');
49+
this.route('data-access');
4950
this.route('confirm', { path: '/confirm/:email_token' });
5051

5152
this.route('catch-all', { path: '*path' });

app/templates/data-access.hbs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<div id='crates-heading'>
2+
{{svg-jar 'circle-with-i'}}
3+
<h1>Accessing the Crates.io Data</h1>
4+
</div>
5+
6+
<p>
7+
There are several ways of accessing the Crates.io data. You should try the
8+
options in the order listed.
9+
</p>
10+
11+
<ol>
12+
<li>
13+
<b>
14+
The <a href='https://github.com/rust-lang/crates.io-index'>crates.ioindex</a>.
15+
</b>
16+
This git repository is always kept up to date by crates.io, and it is used
17+
by Cargo to speed up local dependency resolution. It contains the majority
18+
of the data exposed by crates.io and is cheap to clone and to update.
19+
</li>
20+
<li>
21+
<b>The database dumps (experimental).</b> The dumps contain all information
22+
exposed by the API in a single download. They are updated every six hours.
23+
The latest dump is available at the address
24+
<a href='https://static.crates.io/db-dump.tar.gz'>https://static.crates.io/db-dump.tar.gz</a>.
25+
Information on using the dump is contained in the tarball.
26+
</li>
27+
<li>
28+
<b>Crawl the crates.io API.</b> This should be used as a last resort, and
29+
doing so is subject to our {{#link-to 'policies'}}crawling policy{{/link-to}}.
30+
If the index and the database dumps do not satisfy your needs, we're happy to
31+
discuss solutions to your needs that don't require you to crawl the registry.
32+
You can email us at <a href="mailto:[email protected]">[email protected]</a>.
33+
</li>
34+
</ol>

app/templates/policies.hbs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,8 @@
112112
<h2 id='crawlers'><a href='#crawlers'>Crawlers</a></h2>
113113

114114
<p>
115-
Before resorting to crawling crates.io, you should first see if you are able to
116-
gather the information you need from the
117-
<a href='https://github.com/rust-lang/crates.io-index'>crates.io index</a>,
118-
which is a public git repository containing the majority
119-
of the information availble through our API.
120-
121-
If the index does not have the information you need, we're also happy to
122-
discuss solutions to your needs that don't require you to crawl the registry.
123-
You can email us at <a href="mailto:[email protected]">[email protected]</a>.
115+
Before resorting to crawling crates.io, please read
116+
{{#link-to 'data-access'}}Accessing the Crates.io Data{{/link-to}}.
124117
</p>
125118

126119
<p>

0 commit comments

Comments
 (0)