Skip to content

πŸ“ File filter for version control systems.

Notifications You must be signed in to change notification settings

SheetJS/rooster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Rooster

LogoMakr_7ZIRlg

Rooster is a file filter for version control systems.

Installation

  1. Clone the repo

git clone https://github.com/SheetJS/rooster.git rooster

  1. Run go build
cd rooster
go build

Usage

In order to use rooster a config file must be provided:

Usage of ./rooster:
  -config string
        Rooster's config file (default ".rooster.yaml")

The layout of the .rooster.yaml is as follows:

- repo: https://github.com/foo/bar
  extensions:
    - docx
    - doc
    - xlsx
  out: foo_bar

- repo: https://github.com/baz/qux
  type: svn
  extensions:
    - .docx
    - .doc
    - xlsx
  out: baz_qux

- repo: https://github.com/quux/corge
  type: hg
  extensions:
    - md
    - "*.x*"

Each object must have the following keys:

  • repo: The repository's URL
  • extension: An array of extensions to filter for

Note the following:

  1. The leading . is optional, unless shell patterns are used (see below).
  2. Standard shell patterns (as defined here) may be used.
    • If a shell pattern is used then the leading . becomes mandatory, and the extension must be enclosed in quotes.

The following keys are optional:

  • type: The version control system to use (supported options: git,svn,hg) [default: git]
  • out: The output directory to save the filtered files to (default: rooster_output_xxxx)

Example Output

Once rooster is done each filtered repository will have a output directory similar to the one below:

rooster_output_xxx
β”œβ”€β”€ doc
β”œβ”€β”€ docx
└── txt

Where all docx files will be in the docx directory and all the doc files will be in the doc folder, etc, etc.

Dependencies

You'll need to have your vcs provider installed on your system. An exception to this is git as rooster uses a go-based implementation of git.

The currently supported vcs'es are:

  • Git
  • Subversion
  • Mercurial

Credits

Logo

Created at LogoMakr.com

go-git

For the awesome git library written in pure go.

go-yaml

For the awesome YAML parser.