6

http://simplytest.me/ has a nifty autocomplete option for the module suggestions. Screenshot attached.

enter image description here

I did a little digging and figured it out that ajax call being made is to the following url.

http://simplytest.me/simplytest/projects/autocomplete?string=views

I could be use the same end point but I need to get the permission and also the data available is not sufficient for my use case. I wanted to know if Drupal.org provides any authentic feeds of modules so that I will be able to list other details, say the download url for the tarball file.

  • Checkout update module of core. May be you will get an idea from there. – Sumit Madan Dec 19 '14 at 11:26
2
+50

The official Drupal.org feeds available can be found at https://www.drupal.org/api/rss. There is a feed for projects, but to get the information about releases you'll need to parse the JSON of an API request like https://www.drupal.org/api-d7/node.json?field_project_machine_name=media

You can read more about the APIs available and how to use them at https://www.drupal.org/api

UPDATE: If the goal is to a list of all projects and pull their releases, this cannot be done with just an official "feed". It requires scraping the list of projects from Drupal.org and writing code to get the release into, but the code to do that already exists. Lin Clark's ScraperWiki code still works (http://lin-clark.com/blog/2011/07/22/writing-scripts-clone-contrib-projects-gitdrupalorg/). Export the scrapper output as SQL, import that into a custom table, write some code to loop those the projects calling Drupal.org's API to get the release information you are looking for, and save that response. Not as easy as just pulling the information from a feed provided by Drupal.org, but it can be done.

  • There is a feed only for latest modules, you can't search modules by name – Eugene Fidelin Dec 23 '14 at 16:24
  • I'm only answering the question as it was asked "if Drupal.org provides any authentic feeds of modules". If the goal is to get a dump of all projects, that can be done with git... but it's a very different question. – kreynen Dec 23 '14 at 17:09
  • @kreynen Thanks for the answer. Your answer seems to be the most relevant till now. I will wait to see if somebody can provide a feed that can be filtered as well :) – Gokul N K Dec 26 '14 at 16:47
  • 1
    @Gokul N K unfortunately a full list of projects doesn't exist in feed form, but you can scape the project names from Drupal.org using Lin Clark's ScraperWiki code. After forking that code to Morph.io, you can tweak it as needed. It currently returns 6454 full D7 projects. Good luck! – kreynen Dec 29 '14 at 17:14
0

The URL used when creating a new issue https://www.drupal.org/node/add/project-issue requires a project name in it's first step.

This is https://www.drupal.org/project/autocomplete/issue/project so issuing https://www.drupal.org/project/autocomplete/issue/project/gra gives a list of the first 10 items in json format.

-1

There's over 9,000 d7 modules up on drupal.org, and I'm not sure if they put out an rss feed that provides every single module there is. I know drush does a fairly good job of keeping track of modules, so you might want to have a look at that.

There's also an internal function called module_list, not sure how much use that would be to you.

  • module_list() just returns a list of currently active modules on the website, not on drupal.org :) – Eugene Fidelin Dec 23 '14 at 21:06
-1

Well, good question.

I wonder why there is no elegant and easy way to get machine-readable list of all Drupal modules and their data.

What i have found so far for humans are:

  1. Modules search on Drupal.org
  2. Modules search on Drupalmodules.com
  3. Modules index on Drupal.org
  4. Index of Drupal.org git repositories

But non of them provides rss or json out of the box.

If you need just a list of all Drupal modules - i would suggest you to parse Modules index on Drupal.org - there are titles and links of all the modules on one page - quite handy.

But if you need more detailed list which you want continuously keep up-to-date - the only solution so far is to parse on your own this page: Modules search on Drupal.org.

For example do it with import.io service and then integrate into your site with Feeds module - here is a good tutorial: "Scraping websites into Drupal using Feeds and Import.io"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.