From 7b275c7e6f953be305a1b66cf2e11eee19c4701f Mon Sep 17 00:00:00 2001 From: Dan Puttick Date: Thu, 10 Aug 2017 18:12:30 -0400 Subject: [PATCH] Rename bin/ to filecheck/ --- .travis.yml | 2 +- README.md | 6 +++--- {bin => filecheck}/README.md | 0 {bin => filecheck}/__init__.py | 0 {bin => filecheck}/config.py | 0 {bin => filecheck}/filecheck.py | 2 +- scripts/run_filecheck_single_file.py | 6 +++--- setup.py | 2 +- tests/test_filecheck.py | 2 +- tests/test_filecheck_logging.py | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) rename {bin => filecheck}/README.md (100%) rename {bin => filecheck}/__init__.py (100%) rename {bin => filecheck}/config.py (100%) rename {bin => filecheck}/filecheck.py (99%) diff --git a/.travis.yml b/.travis.yml index b8b8294..5386cc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,7 +79,7 @@ install: # - popd script: - - travis_wait py.test --cov=kittengroomer --cov=bin tests/ + - travis_wait py.test --cov=kittengroomer --cov=filecheck tests/ notifications: email: diff --git a/README.md b/README.md index d89e79c..5752c0d 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ PyCIRCLean is the core Python code used by [CIRCLean](https://github.com/CIRCL/C USB key and document sanitizer created by [CIRCL](https://www.circl.lu/). This module has been separated from the device-specific scripts and can be used for dedicated security applications to sanitize documents from hostile environments to trusted environments. PyCIRCLean is currently Python 3.3+ compatible. Also, while [kittengroomer](./kittengroomer) can -run on any platform supported by python-magic/libmagic, [filecheck.py](./bin/filecheck.py) has some dependencies that are -Linux-only, and running the full test suite will require access to a Linux box or VM. +run on any platform supported by python-magic/libmagic, [filecheck.py](./filecheck/filecheck.py) has some dependencies that +are Linux-only, and running the full test suite will require access to a Linux box or VM. # Installation @@ -30,7 +30,7 @@ and sanitization workflows in different organizations such as industrial environments or restricted/classified ICT environments. A series of practical examples utilizing PyCIRCLean can be found in the [./examples](./examples) directory. Note: for commits beyond version 2.2.0 these examples are out of date and not guaranteed to work with the PyCIRCLean API. Please check [helpers.py](./kittengroomer/ -helpers.py) or [filecheck.py](./bin/filecheck.py) to see the new API interface. +helpers.py) or [filecheck.py](./filecheck/filecheck.py) to see the new API interface. The following simple example using PyCIRCLean will only copy files with a .conf extension matching the 'text/plain' mimetype. If any other file is found in the source directory, the files won't be copied to the destination directory. diff --git a/bin/README.md b/filecheck/README.md similarity index 100% rename from bin/README.md rename to filecheck/README.md diff --git a/bin/__init__.py b/filecheck/__init__.py similarity index 100% rename from bin/__init__.py rename to filecheck/__init__.py diff --git a/bin/config.py b/filecheck/config.py similarity index 100% rename from bin/config.py rename to filecheck/config.py diff --git a/bin/filecheck.py b/filecheck/filecheck.py similarity index 99% rename from bin/filecheck.py rename to filecheck/filecheck.py index ee8a033..85d3dbe 100644 --- a/bin/filecheck.py +++ b/filecheck/filecheck.py @@ -17,7 +17,7 @@ from PIL import Image from pdfid import PDFiD, cPDFiD from kittengroomer import FileBase, KittenGroomerBase, Logging -from bin.config import Config +from filecheck.config import Config SEVENZ_PATH = '/usr/bin/7z' diff --git a/scripts/run_filecheck_single_file.py b/scripts/run_filecheck_single_file.py index 7f62845..949e129 100644 --- a/scripts/run_filecheck_single_file.py +++ b/scripts/run_filecheck_single_file.py @@ -1,10 +1,10 @@ import sys -from bin.filecheck import File +from filecheck.filecheck import File -PATH='tests/dangerous/bypass.docx' -# PATH='tests/normal/word_docx.docx' +PATH = 'tests/dangerous/bypass.docx' +# PATH = 'tests/normal/word_docx.docx' def main(): diff --git a/setup.py b/setup.py index 21b03f9..9d26896 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( description='Standalone CIRCLean/KittenGroomer code.', packages=['kittengroomer'], scripts=[ - 'bin/filecheck.py' + 'filecheck/filecheck.py' ], classifiers=[ 'License :: OSI Approved :: BSD License', diff --git a/tests/test_filecheck.py b/tests/test_filecheck.py index b9f1b9a..78c72ed 100644 --- a/tests/test_filecheck.py +++ b/tests/test_filecheck.py @@ -7,7 +7,7 @@ import pytest import yaml try: - from bin.filecheck import KittenGroomerFileCheck, File + from filecheck.filecheck import KittenGroomerFileCheck, File NODEPS = False except ImportError: NODEPS = True diff --git a/tests/test_filecheck_logging.py b/tests/test_filecheck_logging.py index 7373101..08c6c2c 100644 --- a/tests/test_filecheck_logging.py +++ b/tests/test_filecheck_logging.py @@ -7,7 +7,7 @@ from datetime import datetime import pytest try: - from bin.filecheck import KittenGroomerFileCheck + from filecheck.filecheck import KittenGroomerFileCheck NODEPS = False except ImportError: NODEPS = True