Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A free, open API for everything you want to know about CPAN

License

NotificationsYou must be signed in to change notification settings

metacpan/metacpan-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI

MetaCPAN aims to provide a free, open web service which provides metadata forCPAN modules.

REST API

MetaCPAN is based on Elasticsearch, so it provides a RESTful interface as wellas the option to create complex queries.Thedocs/directoryprovides a good starting point for REST access to MetaCPAN.

Expanding Your Author Info

MetaCPAN allows authors to add custom metadata about themselves to the index.Log in to MetaCPAN to add moreinformation about yourself.

Installing Your Own MetaCPAN

If you want to run MetaCPAN locally, we encourage you to start withmetacpan-docker. However, youmay still find some info here:

Troubleshooting Elasticsearch

You can restart Elasticsearch (ES) manually if you need to troubleshoot.

sudo service elasticsearch restart

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 thedebug output

sudo service elasticsearch stopcd /opt/elasticsearchsudo bin/elasticsearch -f

If you get a "Can't start up: not enough memory" error when trying to startElasticsearch, you likely need to update your JRE. On Ubuntu:

# fixes "not enough memory" errorssudo apt-get install openjdk-6-jre

(Note: If you intend to try indexing a full MiniCPAN, you may find thatElasticsearch wants to use more open filehandles than your system allows bydefault.This script can be used to start ESwith the appropriate ulimit adjustment).

Run the test suite

The test suite accesses Elasticsearch on port 9900. The developer VM shouldhave a dedicated test instance running in the background already, but if youwant to run it manually:

cd /opt/elasticsearchsudo bin/elasticsearch -f -Des.http.port=9900 -Des.cluster.name=testing

Then run the test suite:

cd /home/metacpan/metacpan-api./bin/prove t

The test suite has to pass all tests.

Create the ElasticSearch Index

./bin/run bin/metacpan mapping --delete

--delete will drop all indices first to clear the index from test data.

Begin Indexing Your Modules

./bin/run bin/metacpan release /path/to/cpan/authors/id/

You should note that you can index either your CPAN mirror or a minicpanmirror. You can even index just parts of a mirror:

./bin/run bin/metacpan release /path/to/cpan/authors/id/{A,B}

Tag the Latest Releases

./bin/run bin/metacpan latest --cpan /path/to/cpan/

Index Author Data

./bin/run bin/metacpan author --cpan /path/to/cpan/

Note that minicpan doesn't provide the 00whois.xml file which is used togenerate the index; you will have to download it manually (it is in theauthors/ directory) in order to index authors.

wget -O /path/to/cpan/authors/00whois.xml cpan.cpantesters.org/authors/00whois.xml

It also doesn't include author.json files, so that data will also be missingunless you get it from somewhere else.

Set Up Proxy in Front of ElasticSearch

Start API server on port 5000

./bin/run plackup -p 5000 -r

This will start a single-threaded test server. If you need extra performance,useStarman instead.

Notes

For a full list of options:

./bin/run bin/metacpan release --help

Contributing

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

IRC

You can find us at #metacpan on irc.perl.orgAccess it viaweb interface.

About

A free, open API for everything you want to know about CPAN

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp