Skip to content

Commit db46aa1

Browse files
committed
Tidy README
1 parent cf7f0cf commit db46aa1

File tree

1 file changed

+40
-29
lines changed

1 file changed

+40
-29
lines changed

Diff for: README.md

+40-29
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,28 @@
1-
[![CircleCI](https://circleci.com/gh/metacpan/metacpan-api.svg?style=svg)](https://circleci.com/gh/metacpan/metacpan-api)
1+
# A Web Service for the CPAN
22

3-
A Web Service for the CPAN
4-
==========================
3+
[![CircleCI](https://circleci.com/gh/metacpan/metacpan-api.svg?style=svg)](https://circleci.com/gh/metacpan/metacpan-api)
54

65
MetaCPAN aims to provide a free, open web service which provides metadata for
76
CPAN modules.
87

9-
REST API
10-
--------
8+
## REST API
119

1210
MetaCPAN is based on Elasticsearch, so it provides a RESTful interface as well
13-
as the option to create complex queries. [The
14-
`docs/` directory](https://github.com/metacpan/metacpan-api/blob/master/docs/API-docs.md) provides a good
15-
starting point for REST access to MetaCPAN.
11+
as the option to create complex queries. [The `docs/`
12+
directory](https://github.com/metacpan/metacpan-api/blob/master/docs/API-docs.md)
13+
provides a good starting point for REST access to MetaCPAN.
1614

17-
Expanding Your Author Info
18-
--------------------------
15+
## Expanding Your Author Info
1916

2017
MetaCPAN allows authors to add custom metadata about themselves to the index.
2118
[Log in to MetaCPAN](https://metacpan.org/account/profile) to add more
2219
information about yourself.
2320

24-
Installing Your Own MetaCPAN:
25-
---------------------------------------
21+
## Installing Your Own MetaCPAN
2622

27-
If you want to run MetaCPAN locally, we encourage you to start with [metacpan-docker](https://github.com/metacpan/metacpan-docker).
28-
However, you may still find some info here:
23+
If you want to run MetaCPAN locally, we encourage you to start with
24+
[metacpan-docker](https://github.com/metacpan/metacpan-docker). However, you
25+
may still find some info here:
2926

3027
## Troubleshooting Elasticsearch
3128

@@ -34,28 +31,35 @@ You can restart Elasticsearch (ES) manually if you need to troubleshoot.
3431
```sh
3532
sudo service elasticsearch restart
3633
```
37-
If you are unable to access [[http://localhost:9200]] (give it a few seconds) you should kill the Elasticsearch process and run it in foreground to see the debug output
34+
35+
If you are unable to access [[http://localhost:9200]] (give it a few seconds)
36+
you should kill the Elasticsearch process and run it in foreground to see the
37+
debug output
3838

3939
```sh
4040
sudo service elasticsearch stop
4141
cd /opt/elasticsearch
4242
sudo bin/elasticsearch -f
4343
```
4444

45-
If you get a "Can't start up: not enough memory" error when trying to start Elasticsearch, you likely need to update your JRE. On Ubuntu:
45+
If you get a "Can't start up: not enough memory" error when trying to start
46+
Elasticsearch, you likely need to update your JRE. On Ubuntu:
4647

4748
```sh
4849
# fixes "not enough memory" errors
4950
sudo apt-get install openjdk-6-jre
5051
```
5152

52-
(Note: If you intend to try indexing a full MiniCPAN, you may find that Elasticsearch wants to use more open filehandles than your system allows by default. [This script](https://gist.github.com/3230962) can be used to start ES with the appropriate ulimit adjustment).
53+
(Note: If you intend to try indexing a full MiniCPAN, you may find that
54+
Elasticsearch wants to use more open filehandles than your system allows by
55+
default. [This script](https://gist.github.com/3230962) can be used to start ES
56+
with the appropriate ulimit adjustment).
5357

5458
## Run the test suite
5559

56-
The test suite accesses Elasticsearch on port 9900.
57-
The developer VM should have a dedicated test instance running in the background already,
58-
but if you want to run it manually:
60+
The test suite accesses Elasticsearch on port 9900. The developer VM should
61+
have a dedicated test instance running in the background already, but if you
62+
want to run it manually:
5963

6064
```sh
6165
cd /opt/elasticsearch
@@ -85,7 +89,8 @@ The test suite has to pass all tests.
8589
./bin/run bin/metacpan release /path/to/cpan/authors/id/
8690
```
8791

88-
You should note that you can index either your CPAN mirror or a minicpan mirror. You can even index just parts of a mirror:
92+
You should note that you can index either your CPAN mirror or a minicpan
93+
mirror. You can even index just parts of a mirror:
8994

9095
```sh
9196
./bin/run bin/metacpan release /path/to/cpan/authors/id/{A,B}
@@ -103,36 +108,42 @@ You should note that you can index either your CPAN mirror or a minicpan mirror.
103108
./bin/run bin/metacpan author --cpan /path/to/cpan/
104109
```
105110

106-
Note that minicpan doesn't provide the 00whois.xml file which is used to generate the index; you will have to download it manually (it is in the authors/ directory) in order to index authors.
111+
Note that minicpan doesn't provide the 00whois.xml file which is used to
112+
generate the index; you will have to download it manually (it is in the
113+
authors/ directory) in order to index authors.
107114

108-
wget -O /path/to/cpan/authors/00whois.xml cpan.cpantesters.org/authors/00whois.xml
115+
```bash
116+
wget -O /path/to/cpan/authors/00whois.xml cpan.cpantesters.org/authors/00whois.xml
117+
```
109118

110-
It also doesn't include author.json files, so that data will also be missing unless you get it from somewhere else.
119+
It also doesn't include author.json files, so that data will also be missing
120+
unless you get it from somewhere else.
111121

112122
## Set Up Proxy in Front of ElasticSearch
113123

114124
Start API server on port 5000
125+
115126
```sh
116127
./bin/run plackup -p 5000 -r
117128
```
118129

119-
This will start a single-threaded test server. If you need extra performance, use `Starman` instead.
130+
This will start a single-threaded test server. If you need extra performance,
131+
use `Starman` instead.
120132

121133
## Notes
122134

123135
For a full list of options:
136+
124137
```sh
125138
./bin/run bin/metacpan release --help
126139
```
127140

128-
Contributing:
129-
-------------
141+
## Contributing
130142

131143
If you'd like to get involved, find us at #metacpan on irc.perl.org or open an
132144
issue on GitHub and let us know what you'd like to start working on.
133145

134-
IRC
135-
---
146+
## IRC
136147

137148
You can find us at #metacpan on irc.perl.org
138149
Access it via [web interface](https://chat.mibbit.com/?channel=%23metacpan&server=irc.perl.org).

0 commit comments

Comments
 (0)