https://github.com/toddtreece/harmonized_tariff
A utility for converting the Harmonized Tariff Schedule from hts.usitc.gov to JSON, SQL, and XML.
https://github.com/toddtreece/harmonized_tariff
Last synced: about 1 year ago
JSON representation
A utility for converting the Harmonized Tariff Schedule from hts.usitc.gov to JSON, SQL, and XML.
- Host: GitHub
- URL: https://github.com/toddtreece/harmonized_tariff
- Owner: toddtreece
- License: mit
- Created: 2013-04-29T23:04:32.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-05-01T00:27:02.000Z (about 13 years ago)
- Last Synced: 2024-04-25T05:01:32.723Z (about 2 years ago)
- Language: Ruby
- Homepage: hts.usitc.gov
- Size: 4.03 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# HarmonizedTariff
A utility for converting the Harmonized Tariff Schedule from [hts.usitc.gov](http://www.usitc.gov/tata/hts/_1300_delimited.htm) to JSON, SQL, and XML.
## Installation
Add this line to your application's Gemfile:
gem 'harmonized_tariff'
And then execute:
$ bundle
Or install it yourself as:
$ gem install harmonized_tariff
## Usage
$ hts --help
Usage: bundle exec bin/hts [options]
Specific options:
-s, --source [PATH] Set source file
-o, --output [PATH] Set destination folder path
--type [TYPE] Select output format (json, xml, sql, gz (gzipped sql))
-v, --verbose Print output to screen
Common options:
-h, --help Show this message
--version Show version
**Example 1:** use the provided source file ([2013](http://www.usitc.gov/tata/hts/_1300_delimited.htm)) and output it as gzipped SQL to the Desktop
$ hts --output ~/Desktop --type gz
Outputting converted gzipped SQL to: /Users/todd/Desktop/hts.gz
**Example 2:** use a different source file ([2012](http://www.usitc.gov/tata/hts/_1201_delimited.htm)) and output it as XML to the Desktop
$ hts --source ~/Desktop/1201_HTS_delimited.txt --output ~/Desktop --type xml
Outputting converted XML to: /Users/todd/Desktop/hts.xml
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request