0.01
No commit activity in last 3 years
No release in over 3 years
Ruby FFI bindings to libextractor, a library for extracting metadata from a variety of file formats.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.4
~> 0.8

Runtime

~> 1.0
 Project Readme

ffi-extractor

CI Code Climate

Description

Ruby FFI bindings to libextractor, a library for extracting metadata from a variety of file formats.

libextractor is a simple library for keyword extraction. libextractor does not support all formats but supports a simple plugging mechanism such that you can quickly add extractors for additional formats, even without recompiling libextractor. libextractor typically ships with a dozen helper-libraries that can be used to obtain keywords from common file-types.

libextractor is a part of the GNU project.

Examples

require 'ffi/extractor'

FFI::Extractor.extract(data) do |plugin,type,format,mime_type,data|
  # ...
end

FFI::Extractor.extract_from(path) do |plugin,type,format,mime_type,data|
  # ...
end

Requirements

Install

$ gem install ffi-extractor

libextractor

  • Debian / Ubuntu

    $ sudo apt-get install libextractor-dev libextractor-plugins-all

  • RedHat / Fedora

    $ sudo dnf install libextractor-devel libextractor-plugins

  • macOS

    $ brew install libextractor

Crystal

extractor.cr is a Crystal port of this library.

Copyright

ffi-extractor - Ruby FFI bindings for libextractor

Copyright (c) 2012 - Hal Brodigan (postmodern.mod3 at gmail.com)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA