This project has been archived by its maintainers, and is no longer receiving any updates.
Hairball is a plugin-able framework useful for static analysis of Scratch
projects.
The paper and presentation slides for Hairball can be found at:
http://cs.ucsb.edu/~bboe/p/cv#sigcse13
A Hairball demo web service is running and available at:
http://hairball.herokuapp.com
## Hairball installation
With a proper python environment (one which has `pip` available), installation
is as simple as `pip install hairball`. `easy_install` can also be used via
`easy_install hairball`.
To install from source, first checkout this project and then navigate your
command-line interface to the outer hairball directory that contains
`setup.py`. Then run `python setup.py install`.
## Running Hairball
Once installed, to see how to use hairball run `hairball --help`. That will
produce output similar to the following:
```
Usage: hairball -p PLUGIN_NAME [options] PATH...
PATH can be either the path to a scratch file, or a directory containing
scratch files. Multiple PATH arguments can be provided.
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-d DIR, --plugin-dir=DIR
Specify the path to a directory containing plugins.
Plugins in this directory take precedence over
similarly named plugins included with Hairball.
-p PLUGIN, --plugin=PLUGIN
Use the named plugin to perform analysis. This option
can be provided multiple times.
-k KURT_PLUGIN, --kurt-plugin=KURT_PLUGIN
Provide either a python import path (e.g, kelp.octopi)
to a package/module, or the path to a python file,
which will be loaded as a Kurt plugin. This option can
be provided multiple times.
```
## Available Plugins
Below are a list of available plugins that can be used as the `-p PLUGIN_NAME`
option:
* blocks.BlockCounts
* blocks.DeadCode
* checks.Animation (not fully tested)
* checks.BroadcastReceive
* checks.SaySoundSync (not fully tested)
* duplicate.DuplicateScripts
* initialization.AttributeInitialization
* initialization.VariableInitialization (not fully tested)
Note: The output for each plugin is not yet completely standardized. Please
feel free to file any issues or make improvements and send pull requests.
## Caching Support
The python Kurt package unfortunately is pretty slow to parse Scratch 1.4 (and
similar) files. To remedy this situation, Hairball has built-in support for
caching a serialized version of the Kurt object. On subsequent passes through
the same data you should notice a TREMENDOUS speed improvement.
__Note__: At the moment the cache is unbounded, so keep an eye on your disk
space. The cache location can be discovered by running:
python -c "import appdirs; print appdirs.user_cache_dir('Hairball', 'bboe')"
Metadata
Release files for hairball 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hairball-0.3.tar.gz | 14.7 kB | Without provenance | Details for hairball-0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hairball-0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for hairball-0.3-py2.py3-none-any.whl |
Total release size: 33.5 kB
Release files / hairball-0.3.tar.gz
| Download URL | hairball-0.3.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a83f91f5930817c73534fdd881c4af7408d44c95bf46103335daa6af20cfb3a6
|
|
BLAKE2b-256 checksum How to use checksums |
7ab6ae7ce365ab07c1770241a59ca74f7d4ad069c05fc08d7b26a0a787549c2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / hairball-0.3-py2.py3-none-any.whl
| Download URL | hairball-0.3-py2.py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2b6b12639e30b359adfb402e6d3b1dada337f997d826b6449040715965bec27e
|
|
BLAKE2b-256 checksum How to use checksums |
9bec8c3c889f19fd617c49fa5ec9715ba705d21658289309c06d80e79ffd2109
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for hairball 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.