All Projects → blackwinter → Ruby Filemagic

blackwinter / Ruby Filemagic

Ruby bindings to the magic(4) library, revised.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Ruby Filemagic

Matrix Appservice Twitter
Twitter AS bridge for Matrix
Stars: ✭ 27 (-79.07%)
Mutual labels:  unmaintained
React Axe
[DEPRECATED] Accessibility auditing for React.js applications
Stars: ✭ 1,201 (+831.01%)
Mutual labels:  unmaintained
Tgcameraviewcontroller
Custom camera with AVFoundation. Beautiful, light and easy to integrate with iOS projects.
Stars: ✭ 1,432 (+1010.08%)
Mutual labels:  unmaintained
Bootstrap Imageupload
A Bootstrap/jQuery plugin to preview image uploads.
Stars: ✭ 49 (-62.02%)
Mutual labels:  unmaintained
Django Alexa
Amazon Alexa Skills Kit integration for Django -- PENDING ADOPTION
Stars: ✭ 68 (-47.29%)
Mutual labels:  unmaintained
Framework7 With Angularjs Demo App
⛔️ Unmaintained and deprecated!
Stars: ✭ 81 (-37.21%)
Mutual labels:  unmaintained
Notifo Imap Listener
ARCHIVED - Listens for incoming mail and forwards it to notifo
Stars: ✭ 10 (-92.25%)
Mutual labels:  unmaintained
Openpgp.rb
[Retired] OpenPGP.rb is a pure-Ruby implementation of the OpenPGP Message Format (RFC 4880).
Stars: ✭ 115 (-10.85%)
Mutual labels:  unmaintained
Knife Role Spaghetti
Knife plugin for Chef to draw dependency graphs for roles. Cut through the spaghetti with a knife.
Stars: ✭ 68 (-47.29%)
Mutual labels:  unmaintained
Touch Dnd
Advanced touch-compatible Drag and Drop library providing Draggable, Droppable and Sortable for Zepto.js and jQuery
Stars: ✭ 104 (-19.38%)
Mutual labels:  unmaintained
Autocomplete Ruby
Provides intelligent code completion for Ruby in the Atom editor. Requires RSense.
Stars: ✭ 50 (-61.24%)
Mutual labels:  unmaintained
Gsxlib
A PHP library for communicating with Apple's GSX web service API
Stars: ✭ 66 (-48.84%)
Mutual labels:  unmaintained
Stargus
Importer and scripts for Starcraft
Stars: ✭ 94 (-27.13%)
Mutual labels:  unmaintained
Ipfs Textbook
[unmaintained] Helping me understand what IPFS is and how it works
Stars: ✭ 43 (-66.67%)
Mutual labels:  unmaintained
Ticons Cli
Command-Line version of TiCons for generating icons and splash screens for Titanium & Alloy projects.
Stars: ✭ 109 (-15.5%)
Mutual labels:  unmaintained
Djangoffice
Project management/CRM for small offices - Clients, Jobs, Tasks, Rates, Activities, Timesheets, Contacts, Invoices etc. etc.
Stars: ✭ 13 (-89.92%)
Mutual labels:  unmaintained
Vagrant Librarian Chef
*UNMAINTAINED* A Vagrant plugin to install Chef cookbooks using Librarian-Chef.
Stars: ✭ 80 (-37.98%)
Mutual labels:  unmaintained
Capistrano Mb
[unmaintained] Capistrano tasks for deploying Rails from scratch to Ubuntu 16.04 and 18.04
Stars: ✭ 117 (-9.3%)
Mutual labels:  unmaintained
Ostel
Open Secure Telephony platform (no longer maintained)
Stars: ✭ 115 (-10.85%)
Mutual labels:  unmaintained
Splendidbacon
Project Management for hackers
Stars: ✭ 102 (-20.93%)
Mutual labels:  unmaintained

= FileMagic Library Binding

== VERSION

This documentation refers to filemagic version 0.7.2

== DESCRIPTION

FileMagic extension module. See also libmagic(3), file(1) and magic(4).

=== Constants

MAGIC_NONE:: No flags MAGIC_DEBUG:: Turn on debugging MAGIC_SYMLINK:: Follow symlinks MAGIC_COMPRESS:: Check inside compressed files MAGIC_DEVICES:: Look at the contents of devices MAGIC_MIME:: Return a mime string MAGIC_CONTINUE:: Return all matches, not just the first MAGIC_CHECK:: Print warnings to stderr

=== Methods

file(filename):: Returns a textual description of the contents of the filename argument buffer(string):: Returns a textual description of the contents of the string argument check(filename):: Checks the validity of entries in the database file passed in as filename compile(filename):: Compiles the database file passed in as filename load(filename):: Loads the database file passed in as filename close():: Closes the magic database and frees any memory allocated

=== Synopsis

require 'filemagic'

p FileMagic::VERSION

=> "0.7.2"

p FileMagic::MAGIC_VERSION

=> "5.28"

p FileMagic.new.flags

=> []

FileMagic.open(:mime) { |fm| p fm.flags # => [:mime_type, :mime_encoding] p fm.file(FILE) # => "text/plain; charset=us-ascii" p fm.file(FILE, true) # => "text/plain"

fm.flags = [:raw, :continue]
p fm.flags
# => [:continue, :raw]

}

fm = FileMagic.new p fm.flags

=> []

mime = FileMagic.mime p mime.flags

=> [:mime_type, :mime_encoding]

=== Environment

The environment variable +MAGIC+ can be used to set the default magic file name.

=== Installation

Install the gem:

sudo gem install ruby-filemagic

The file(1) library and headers are required:

Debian/Ubuntu:: +libmagic-dev+ Fedora/SuSE:: +file-devel+ Gentoo:: +sys-libs/libmagic+ OS X:: brew install libmagic

=== Build native extension

rake docker💎native

Requires Docker[https://docker.com] to be installed.

== LINKS

Homepage:: http://www.darwinsys.com/file/ Documentation:: https://blackwinter.github.com/ruby-filemagic Source code:: https://github.com/blackwinter/ruby-filemagic RubyGem:: https://rubygems.org/gems/ruby-filemagic Travis CI:: https://travis-ci.org/blackwinter/ruby-filemagic

== AUTHORS

== CREDITS

  • Martin Carpenter mailto:[email protected] for Ruby 1.9.2 compatibility and other improvements.

  • Pavel Lobashov (@ShockwaveNN) for Dockerfile to build cross-compiled Windows extension (pull request #26).

== COPYING

The filemagic extension library is copywrited free software by Travis Whitton [email protected]. You can redistribute it under the terms specified in the COPYING file of the Ruby distribution.

== WARRANTY

THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].