library drupalorg-dom-parser
Scrapes statistics about projects on Drupal.org
balsama/drupalorg-dom-parser
Scrapes statistics about projects on Drupal.org
- Monday, November 27, 2017
- by balsama
- Repository
- 1 Watchers
- 1 Stars
- 21 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 1 Open issues
- 7 Versions
- 0 % Grown
, (*1)
Drupal.org DOM Parser
Retrieves information about a specified project from Drupal.org., (*2)
Usage
$project_name = 'ctools';
$project_stats = new Balsama\DrupalOrgProject\Stats($project_name);
General (Taken from the "Project information" section of the project page)
- Total downloads
$project->getTotalDownloads
- Total installs
$project->getTotalInstalls
Releases (Deduced from the "Downloads" section of the project page)
- Drupal 8 Stability
$project_stats->getD8Stability
Usage (Taken from the Project Usage table on the "project/usage" page)
- Current Drupal 8 usage
$project_stats->getCurrentD8Usage
- Current Drupal 7 usage
$project_stats->getCurrentD7Usage
- All usage data
$project_stats->getAllUsage
Other
- Human-readable name
$project_stats->getHumanReadableName
- Machine name
$project_stats->getMachineName
Other classes
If you're only interested in getting the info from the usage table, you can use the Usage
class instead which only
fetches data from the /project/usage/{project_name} page. This is somewhat less likely to break as D.O seems to change
the markup of that page less frequently., (*3)
Why?
At the time this was created, there wasn't any public facing D.O API. Even now, there is some information that's either
not available or is cumbersome to get via the API., (*4)
1.0.x-dev
1.0.9999999.9999999-dev
Scrapes statistics about projects on Drupal.org
Sources
Download
MIT
The Requires
The Development Requires
by
Adam Balsam
1.0.0-alpha2
1.0.0.0-alpha2
Scrapes statistics about projects on Drupal.org
Sources
Download
MIT
The Requires
The Development Requires
by
Adam Balsam
1.0.0-alpha1
1.0.0.0-alpha1
Scrapes statistics about projects on Drupal.org
Sources
Download
MIT
The Requires
The Development Requires
by
Adam Balsam
dev-fix-tests
dev-fix-tests
Scraps statistics about projects on Drupal.org
Sources
Download
MIT
The Requires
The Development Requires
by
Adam Balsam
0.0.x-dev
0.0.9999999.9999999-dev
Scrapes statistics about projects on Drupal.org
Sources
Download
MIT
The Requires
The Development Requires
by
Adam Balsam
dev-machine-name
dev-machine-name
Scraps statistics about projects on Drupal.org
Sources
Download
MIT
The Requires
The Development Requires
by
Adam Balsam
dev-fix-no-release
dev-fix-no-release
Scraps statistics about projects on Drupal.org
Sources
Download
MIT
The Requires
The Development Requires
by
Adam Balsam