Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsgoecke-echi_files

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsgoecke-echi_files

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

h1. ECHI Files Ruby Library

h2. Description

A library that allows one to take an ASCII or Binary file from an Avaya CMS External Call History Interface (ECHI) and convert it into a Ruby hash for further processing.

h2. Features

  • Convert Binary file to Ruby hash
  • Convert ASCII file to Ruby hash
  • Support both standard and extended file formats
  • Tested with both Ruby 1.8.6 and JRuby 1.1.5

h2. Example


require 'echi_files'

#Provide a filename to process as an argument on the commandline
filename = File.expand_path(ARGV[0])

#Open the file
filehandle = open(filename, "rb")

#Instantiate an EchiFiles class to process your ASCII or BINARY files
echi_handler = EchiFiles.new

#Use this to process a binary file
file_type = 'BINARY'
format = 'EXTENDED'
#In some cases the extra_byte is needed
extra_byte = true
data = echi_handler.process_file(filehandle, file_type, format, extra_byte)

#Use this to process a binary file
file_type = 'ASCII'
format = 'EXTENDED'
extra_byte = true
#Use this to process an ASCII file
data = echi_handler.process_file(filehandle, file_type, format, extra_byte)

#If you need to strip in characters from the asaiuui field
#@data Is the Array of Hashes converted above
#@array_of_decimal_values Is an array of decimal ascii values to be stripped
data = echi_handler.strip_asaiuui(data, array_of_decimal_values)
</code>
</pre>	

h2. Dependencies

  • FasterCSV 1.4.0+

h2. Installation

sudo gem install jsgoecke-echi_files --source=http://gems.github.com/

FAQs

Package last updated on 11 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc