0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Local files parser. It parses files stored in a local directories and writes the information into db in JSON format.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Biblioteque

Travis-ci
Codeclimate

Biblioteque is a little gem that provides all necessary methods to create databases of files stored in local directories.

Usage example

require 'biblioteque'
engine = Biblioteque::Engine.new

Now we can create a new database:

engine.create_db("<DBname>", "<PathToDatabaseFile>")

then we need to load created db:

db = engine.load_db("<PathToDatabaseFile>")

Let's add a new library:

db.create_library("<LibraryName>")

and load it:

library = db.libraries.first

and import files information into it:

library.add("<PathToCrawlForFiles>")

Now, we can search for added files in a library:

library.search('<FileNameOrPatternToSearch>')

or in entiry database:

db.search('<FileNameOrPatternToSearch>')

Oh! and do not forget to save all the changes:

db.save

Dependencies

This project doesn't have any runtime dependencies, only Ruby 1.9.3+. During development, the dependencies are: redcarpet, yard, mocha.

Installation

Add this line to your application's Gemfile:

gem 'biblioteque'

And then execute:

$ bundle

Or install it yourself as:

$ gem install biblioteque

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request