📃 The main project repository
PHP
Latest commit bb28055 Jan 19, 2017 @asgrim asgrim Bump build to 6020

README.md

Browser Capabilities Project

Build Status Code Coverage Scrutinizer Quality Score

This tool is used to build and maintain browscap files.

Install

$ git clone git://github.com/browscap/browscap.git
$ cd browscap
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install

Usage

bin/browscap build [version]

For further documentation on the build command, see here.

Demonstrating Functionality

You can export a new set of browscap.ini from the JSON files:

$ bin/browscap build 5020-test
Resource folder: <your source dir>
Build folder: <your target dir>
Generating full_asp_browscap.ini [ASP/FULL]
Generating full_php_browscap.ini [PHP/FULL]
Generating browscap.ini [ASP]
Generating php_browscap.ini [PHP]
...
All done.
$

Now you if you look at browscap/browscap.ini you will see a new INI file has been generated.

Then you can compare to an original 5020 version full_asp_browscap.ini to check for differences:

$ bin/browscap diff build/full_asp_browscap.ini build/full_asp_browscap_5020.ini
The following differences have been found:

[GJK_Browscap_Version]
"Released" differs (L / R): Thu, 29 Aug 2013 22:54:50 +0100 / Mon, 29 Jul 2013 22:22:31 -0000
"Version" differs (L / R): 5020-test / 5020

There were 2 differences found in the comparison.
$

You can see here the only differences were the release date and version number, which is normal - so it works! :)

Directory Structure

  • bin - Contains executable files
  • build - Contains various builds
  • resources - Files needed to build the various files, also used to validate the capabilities
  • src - The code of this project lives here

Contributing

For instructions on how to contribute see the CONTRIBUTE.md file.

License

See the LICENSE file.