steenzout/python-kerfi-vangasvipur
Python tools to manipulate the information retrieved from the system_profiler.
python-kerfi-vangasvipur
Python tools to manipulate output from the OSX system_profiler.
It uses:
- git for version control
- pip to manage Python packages
- tox for automation and setup development environments
- Sphinx for documentation
usage
kv-print
Using stdout:
$ cat tests/input.txt | kv-print -t raw "Applications.Console.Version"
Applications.Console.Version 10.9
Using a file and a regular expression:
$ kv-print -f tests/input.txt "Applications\.Console.*"
Applications.Console.Location /Applications/Utilities/Console.app
Applications.Console.Kind Intel
Applications.Console.64-Bit_(Intel) Yes
Applications.Console.Version 10.9
Applications.Console.Obtained_from Apple
Applications.Console.Signed_by Software Signing, Apple Code Signing Certification Authority, Apple Root CA
When using a file as input you don't need to set the format option.
kerfi
Kerfi means in system in icelandic.
This is the directory which will hold your files.
docs
Directory where you'll store the Sphinx configuration files and
where the documentation will be generated.
.gitignore
File where you specify which files Git should ignore.
A generic file has been provided.
You can use gitignore.io to
produce other files that will better suit your development environment.
For more information, you can check "git-scm.com : gitignore".
LICENSE
The Apache 2 license.
pytest.ini
The pytest configuration file.
You can read
"pytest : Changing standard (Python) test discovery"
for more information on how to use this file to customize pytest's behavior.
README.md
This file.
Check "here" for help
with Markdown syntax.
requirements.txt
On this file you specify the list of packages the project depends.
Read "pip : Requirement Files"
to understand how you can properly use this file to define your project's dependencies.
setup.py
The setup script whre you'll describe the project / product, authors, maintainers and
information on how to distribute it.
Read "Python : 2. Writing the Setup Script",
for more information.
tests
The directory where you should add your unit tests.
test-requirements.txt
On this file you specify the list of packages the project needs to run its tests.
An example of the possible contents of this file has been provided.
Read "pip : Requirement Files"
to understand how you can properly use this file to define your project's test dependencies.
tox.ini
The tox configuration file.
It contains basic information about your project and test environments.
I recommend installling tox and
use it to run your tests and generate the documentation.
# run the tests
$ tox
# generate the documentation
$ tox -e docs


