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

sw_ruby_tika_app

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sw_ruby_tika_app

  • 1.14.0
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

Ruby Tika Parser

Introduction

This is a simple frontend to the Java Tika parser command line jar / app.

It is the same as running:

java -server -Djava.awt.headless=true -jar tika-app-0.10.jar FileToParse.pdf

with options like --xml, --text, etc.

Installation

To install, add ruby_tika_app to your Gemfile and run bundle install:

gem 'ruby_tika_app'

Note about installation

RubyTikaApp is a pretty big gem since it includes the ruby-tika-app jarfile. It might take a while to install.

Usage

First, you need Java installed. And it needs to be in your $PATH.

Then:

require 'ruby_tika_app'

rta = RubyTikaApp.new("sample_file.pdf")

puts rta.to_xml # <xml output>

# You also get to_json, to_text, to_text_main, and to_metadata

Testing

Run:

bundle exec rspec spec/

NOTE: Since we are using an underlying java library to connect to external URLs we can't use a standard mocking library. The test suite starts a rack-based web server.

Contributing

Fork on GitHub and after you've committed tested patches, send a pull request.

FAQs

Package last updated on 27 Mar 2017

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