The GetID3 Plugin is for Grav CMS. It integrates the getID3 library into Grav CMS.
Installing the GetID3 plugin can be done in one of two ways. The GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file.
The simplest way to install this plugin is via the Grav Package Manager (GPM) through your system's terminal (also called the command line). From the root of your Grav install type:
bin/gpm install get-id3
This will install the GetID3 plugin into your /user/plugins
directory within Grav. Its files can be found under /your/site/grav/user/plugins/get-id3
.
To install this plugin, just download the zip version of this repository and unzip it under /your/site/grav/user/plugins
. Then, rename the folder to get-id3
. You can find these files on GitHub or via GetGrav.org.
You should now have all the plugin files under
/your/site/grav/user/plugins/get-id3
NOTE: This plugin is a modular component for Grav which requires Grav and the Error and Problems to operate.
After enabling the plugin, the getID3 library attempts to install itself automatically. In the event of an error, you will need to install it manually from its homepage.
Extract the files and copy the contents of getid3 subfolder to this plugin's library folder. The structure should look something like this:
get-id3
├── blueprints.yaml
├── CHANGELOG.md
├── get-id3.php
├── get-id3.yaml
├── library
│ ├── extension.cache.dbm.php
│ ├── extension.cache.mysqli.php
│ ├── extension.cache.mysql.php
│ ├── extension.cache.sqlite3.php
│ ├── getid3.lib.php
| .
| .
| .
The php files with names "write.*.php" are not needed for this plugin, but there's no harm in including them.
Before configuring this plugin, you should copy the user/plugins/get-id3/get-id3.yaml
to user/config/plugins/get-id3.yaml
and only edit that copy.
enabled: true
This plugin provides no visual functionality. It integrates the getID3 PHP library into GravCMS for other plugins (i.e. the Podcast plugin) to use.
File metadata can be retrieved by code similar to:
$meta = GetID3Plugin::analyzeFile($file)
where $file
is a path to a media file.
- Initially inspired by the Drupal module getid3
- Ole Vik, who was patient with my Slack questions.
- James Heinrich, for his php library.
This plugin is licensed under the MIT license. The php library getID3 is licensed under various other licenses, as seen here https://github.com/JamesHeinrich/getID3.
- Find a way to upgrade existing get-id3 library files when this package updates.