No commit activity in last 3 years
No release in over 3 years
A utility for converting the Harmonized Tariff Schedule from hts.usitc.gov to JSON, SQL, and XML.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0

Runtime

 Project Readme

HarmonizedTariff

A utility for converting the Harmonized Tariff Schedule from hts.usitc.gov 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) 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) 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