An open API service indexing awesome lists of open source software.

https://github.com/graysonchen/dbf_writer


https://github.com/graysonchen/dbf_writer

Last synced: 12 months ago
JSON representation

Awesome Lists containing this project

README

          

= dbf_writer

DbfWriter is a small lib for writing arrays of objects as DBF files.

It'll write the data directly to disk, in binary format without having to pass through data access layers, which should be (I hope) very fast.
It's inspired on the DbfExporter library for .NET

== Contributing to dbf_writer

* 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.

== EXAMPLE

require 'rubygems'
require 'dbf_writer'

subject = FileWriter.new
subject.add_field 'data1'
subject.add_row 'FIELD_DATA_USED'
subject.add_row 'SECOND_ROW_DATA'
subject.add_field 'data2'
subject.add_row 'FIELD_DATA_USED2'
subject.add_row 'SECOND_ROW_DATA2'
value = subject.to_binary_string

File.open(filename="test.dbf", 'w') do |dbf|
dbf.write(value)
end

== Copyright

Copyright (c) 2010 Mereghost. See LICENSE.txt for further details.