Skip to main content

Utility for defining then downloading, concatenating and minifying your project's external library files

Project description

Build Status Coverage Status PyPI Status

Copyright (C) 2013-2014 Samuel Colvin S@muelColvin.com

Python tool and library for downloading, concatenating and minifying library files (eg. Javascript and CSS) so they don’t clog up your repo.

Definition files can either be JSON or Python (see examples). So the versions of libraries used in your project can be defined in version control without the need for files from external projects.

usage: grablib [-h] [-t LIBS_ROOT] [-s LIBS_ROOT_SLIM] [-w OVERWRITE]
               [-p FILE_PERMISSIONS] [-v {0,1,2,3}] [--no-colour]
               [file-path-or-json]

grablib

Utility for defining then downloading, concatenating and minifying your
projects external library files eg. Javascript, CSS.

grablib Version: 0.1
(https://github.com/samuelcolvin/grablib).
All optional arguments can also be set in the definition file.

positional arguments:
  file-path-or-json     path to JSON or python file or valid JSON string, defaults to "grablib.json".

optional arguments:
  -h, --help            show this help message and exit
  -t LIBS_ROOT, --libs-root LIBS_ROOT
                        Root directory to put downloaded files in, defaults to the working directory.
  -s LIBS_ROOT_SLIM, --libs-root-slim LIBS_ROOT_SLIM
                        Root directory to put slimmed files in, defaults to libs_root.
  -w OVERWRITE, --overwrite OVERWRITE
                        Overwrite existing files, default is not to download a library if the file already exists
  -p FILE_PERMISSIONS, --file-permissions FILE_PERMISSIONS
                        Explicitly set file permission for each file downloaded, eg. 666
  -v {0,1,2,3}, --verbosity {0,1,2,3}
                        Verbosity Level 0 (nothing except errors), 1 (a little), 2 (default), 3 (everything)
  --no-colour           Do not use color term to colourise output

You can also call grablib from inside python:

import grablib

grablib.grab('path/to/definitions.json|py')

# or with options overridden
grablib.grab('path/to/definitions.json|py', verbosity=3)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grablib-0.1.1.tar.gz (7.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page