0.0
No commit activity in last 3 years
No release in over 3 years
Tax generator is a simple XML processor and generator of HTMl files and uses celluloid to generate files in asyncronous way
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.1, ~> 1.1
~> 3.0, >= 3.0.4
>= 0.8, ~> 0.8
>= 1.11, ~> 1.11
>= 13.0, ~> 13.0
>= 3.5, ~> 3.5
>= 3.9, ~> 3.9
>= 0.18, ~> 0.18
>= 0.0.6, ~> 0.0.6
~> 0.9, >= 0.9.20

Runtime

>= 1.7
>= 0.9.6
>= 4.4.1
>= 2.0.1, < 3
 Project Readme

tax_generator

Gem Version Gem Downloads Analytics

NEW Improvements in version 0.6.0

  • a lot of refactoring and bug fixes
  • removed Celluloid in favor of Concurrent-Ruby for better performance

Description

Simple batch processor that takes 2 xml files as input and generates html files with information from the xml elements and uses celluloid to generate files in asyncronous way

  • taxonomy.xml holds the information about how elements are related to each other.

  • destinations.xml holds the actual text content for each element.

Each generated web page has:

  • Element text content.

  • Navigation that allows the user to browse to elements that are higher in the taxonomy

  • Navigation that allows the user to browse to destinations that are lower in the taxonomy

Requirements

  1. Ruby 1.9.x or Ruby 2.x.x
  2. ActiveSuport >= 4.2.0
  3. concurrent-ruby >= 1.0
  4. concurrent-ruby-edge >= 0.2
  5. nokogiri >= 1.6.7
  6. slop >= 4.2.1
  7. rubytree >= 0.9.6
  8. tilt >= 2.0

Compatibility

Rails >3.0 only. MRI 1.9.x, 2.x

Installation Instructions

Add the following to your Gemfile :

  gem "tax_generator"

And use it like this in your code:

 TaxGenerator::Application.new.run(options)

or like this:

 processor = TaxGenerator::Processor.new(options)
 processor.work

where options should be a hash that can contain this keys:

  • input_dir
    • Represents where the taxonomy and the destinations xml files are located ( Default is './data/input')
  • output_dir
    • Represents where the newly created html files will be located ( Default is './data/output')
  • taxonomy_filename
    • Represents the taxonomy file name ( Default is 'taxonomy.xml')
  • destinations_filename
    • Represents the destinations xml file name ( Default is 'destinations.xml')

This can also be run from command line using following command:

  gem install tax_generator
  tax_generator -i INPUT_DIR -o OUTPUT_DIR -t TAXONOMY_FILENAME -d DESTINATIONS_FILENAME

Available command line options when executing a command

  • -i or --input_dir

    • Represents where the taxonomy and the destinations xml files are located ( Default is './data/input')
  • -o or --output_dir

    • Represents where the newly created html files will be located ( Default is './data/output')
  • -t or --taxonomy_filename

    • Represents the taxonomy file name ( Default is 'taxonomy.xml')
  • -d or --destinations_filename

    • Represents the destinations xml file name ( Default is 'destinations.xml')

Testing

To test, do the following:

  1. cd to the gem root.
  2. bundle install
  3. bundle exec rake

Contributions

Please log all feedback/issues via Github Issues. Thanks.

Contributing to tax_generator

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
  • You can read more details about contributing in the Contributing document

== Copyright

Copyright (c) 2015 bogdanRada. See LICENSE.txt for further details.