Giter Club home page Giter Club logo

mast's Introduction

Mast

       ___
.-----'---'-.
|           |
|           |
|           |
'-----------'

Homepage . Source Code . Report Issue . Mailing List . IRC Channel

<img src=“http://travis-ci.org/rubyworks/mast.png” />

DESCRIPTION

Mast is a commandline utility for generating MANIFEST and DIGEST lists. It can be useful in conjunction with packaging tools, or as a stand-alone tool for monitoring file changes.

FEATURES

  • Intuitive command-line interface –simply specify what to include.

  • Self-referential header makes updating manifests easy.

  • Checksum digests can highlight file changes.

USAGE

Mast makes the process of generating manifests very easy, and even allows manifests to be updated without repeating inclusion/exclusion criteria by storing the command parameters in a comment line at the top of the generated output.

Lets try a simple example. Lets say we have the following folder structure, using ls -R we see:

$ ls -R
.:
demo_rtar  mint

./demo_rtar:
Lorem_ipsum.txt  lib  meta  web

./demo_rtar/lib:
demo_rock

./demo_rtar/lib/demo_rock:
tryme.rb

./demo_rtar/meta:
data

./demo_rtar/web:
index.html  rocklobster.jpg

./mint:
loremipsum.txt  tryme.rb

Now lets look at the same folder via ‘mast’.

$ mast
#!mast
demo_rtar
demo_rtar/Lorem_ipsum.txt
demo_rtar/lib
demo_rtar/lib/demo_rock
demo_rtar/lib/demo_rock/tryme.rb
demo_rtar/meta
demo_rtar/meta/data
demo_rtar/web
demo_rtar/web/index.html
demo_rtar/web/rocklobster.jpg
mint
mint/loremipsum.txt
mint/tryme.rb

As you can see it has listed all the files contained in the current folder. Notice also the first line is empty except for the ‘#’ character. This is a standard shell comment mark. We can specify special criteria to the mast command and these options will be reflected on this line. For example, lets say the mint directory is extraneous and we do not want it included in the list of files.

$ mast -x mint
#!mast -x mint
demo_rtar
demo_rtar/Lorem_ipsum.txt
demo_rtar/lib
demo_rtar/lib/demo_rock
demo_rtar/lib/demo_rock/tryme.rb
demo_rtar/meta
demo_rtar/meta/data
demo_rtar/web
demo_rtar/web/index.html
demo_rtar/web/rocklobster.jpg

So you can see how the commandline options carry over to the top comment line of the ouput. The advantage of this is that if you save the output to a standard location, i.e. a file named MANIFEST or meta/manifest with an optional ‘.txt` prefix (case insensitive), then you can automaitcally update the file by calling mast --update.

$ mast -x mint > MANIFEST

$ mast --update
MANIFEST updated.

You can also add a checksum to the file list to create a DIGEST.

$ mast -x mint -g sha1

Mast also provides options for ignoring files based on their basename, as well as omitting default excludes and ignores so that all files are lists. Use the –help option for more details.

HOW TO INSTALL

To install with RubyGems simply open a console and type:

$ gem install mast

For a traditional site installation use Ruby Setup (gem install setup).

$ tar -xvzf mast-1.3.0.tar.gz
$ cd mast-1.3.0.tar.gz
$ sudo setup.rb

See Ruby Setup for more information.

Copyright © 2009 Rubyworks

Mast is distributable according to the terms of the BSD-2-Clause license.

See COPYING.rdoc for details.

mast's People

Contributors

trans avatar

Watchers

James Cloos avatar  avatar  avatar

mast's Issues

Test Coverage

I admit it. I waterfalled this project big time. So, BIG FAT TODO, go back and add some reasonable test coverage.

The "--show" option should be universal

The "--show" option should be renamed and be made viable as an option useful to the other command options. It would simply pull the command line options from another manifest file as if they were typed for the current command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.