Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
umpirsky committed Jan 7, 2016
0 parents commit d350f90
Show file tree
Hide file tree
Showing 5,636 changed files with 1,128,371 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) Saša Stamenković <umpirsky@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Country List
============

List of all currencies in all data formats.

Formats Available
-----------------

- Text
- JSON
- YAML
- XML
- HTML
- CSV
- SQL
* MySQL
* PostgreSQL
* SQLite
- PHP

Build
-----

Currency list is available out of the box, but if you want to submit patches, add new formats,
update data source or contribute in any other way, you will probably want to rebuild the list:

```bash
$ composer install
$ ./bin/build
31 changes: 31 additions & 0 deletions bin/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env php
<?php

include __DIR__ . '/../vendor/autoload.php';

class Currency extends Umpirsky\ListGenerator\Importer\Importer
{
private $locale;
private $currencyBundle;

public function __construct()
{
$this->locale = new Symfony\Component\Locale\Locale();
$this->currencyBundle = Symfony\Component\Intl\Intl::getCurrencyBundle();
}

public function getLanguages()
{
return $this->locale->getLocales();
}

public function getData($language)
{
return $this->currencyBundle->getCurrencyNames($language);
}
}

(new Umpirsky\ListGenerator\Builder\Builder(
new Currency(),
__DIR__.'/../data'
))->run();
19 changes: 19 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "umpirsky/country-list",
"type": "library",
"description": "List of all currencies in all data formats.",
"license": "MIT",
"authors": [
{
"name": "Saša Stamenković",
"email": "umpirsky@gmail.com"
}
],
"require": {
"php": "~5.4"
},
"require-dev": {
"umpirsky/list-generator": "^1.1",
"symfony/locale": "^2.7|^3.0"
}
}
Loading

0 comments on commit d350f90

Please sign in to comment.