https://github.com/utensils/mits
A Multifamily Information and Transactions Standard document parser
https://github.com/utensils/mits
ruby sax-parser standard xml
Last synced: 6 months ago
JSON representation
A Multifamily Information and Transactions Standard document parser
- Host: GitHub
- URL: https://github.com/utensils/mits
- Owner: utensils
- License: mit
- Created: 2015-03-11T17:53:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-28T23:33:50.000Z (about 10 years ago)
- Last Synced: 2025-03-21T02:22:08.427Z (7 months ago)
- Topics: ruby, sax-parser, standard, xml
- Language: Ruby
- Homepage:
- Size: 480 KB
- Stars: 14
- Watchers: 10
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MITS
A SAX powered reader for [Multifamily Information and Transactions Standard \(MITS\)](http://www.mitsproject.org/) compatible documents.
Currently supporting MITS __3.0__ & __4.1__ (default).
[](https://rubygems.org/gems/mits) [](https://travis-ci.org/doomspork/mits) [](https://codeclimate.com/github/doomspork/mits) [](https://coveralls.io/r/doomspork/mits?branch=master) [](https://gemnasium.com/doomspork/mits)
## Installation
gem install mits
## Getting Started
Create a `MITS::Document` with a local filepath or URL:
```ruby
document = MITS::Document.new('/example/path/mits_compatible_feed.xml', version: 3.0)
```Iterating over properties is easy:
```ruby
document.properties do |property|
puts "#{property.name} now available online at #{property.website}"
end
```The `#properties` method returns a `Enumerator` if no block is provided:
```ruby
document.properties.each_with_object([]) do |property, arr|
# Only include properties with 2 or more units
arr.push(property) if property.units.size > 2
end
```## Contributing
Feedback, feature requests, and fixes are welcomed and encouraged. Please make appropriate use of [Issues](https://github.com/doomspork/mits/issues) and [Pull Requests](https://github.com/doomspork/mits/pulls). All code should have accompanying tests.
## Author
MITS is written and maintained by [@doomspork](http://github.com/doomspork) as part of [CityLeash.com](https://cityleash.com).
## License
Please see [LICENSE](https://github.com/doomspork/mits/blob/master/LICENSE) for licensing details.