= Usage of Library

== Requiring it

To require the Cookbooks Project somewhere, do this:

  require 'cookbooks'

== Using Cookbooks from Ruby

Inside of any given .rb file, you can use the Cookbooks gem as the following example shows:

_ = Cookbooks.new
_['htop']
data = _.htop # This here will return the data structure.

The data structure is basically just a hash that describes the various attributes of a given project.

In the above context, data would hold the information for htop.

You can find the available cookbooks by doing the following:

_.available_cookbooks? # Feedback the available cookbooks.

There is a large collection of small scripts in the directory cookbooks/utility_scripts/ - you can show a summary by doing:

Cookbooks.show_utility_scripts

Each .rb file there should have a small header that explains what the respective .rb file will do. You may want to check these out.

The class RegisteredTags can be used to register all available tags in a .yml “database”.

Simply can run this file to register every available tag into a yaml file, which we can then load if we are to search for registered tags, rather than relying on “grep” itself. Thus, searching for tags will now be available as well without grep - you have to run it once to register the available programs before you can use it.