diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9ee5349 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Elliot Nunn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..0250e33 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +`machfs` is a pure Python 3 library for reading and writing disk images in the +Apple's long-deprecated [Hierarchical File +System](https://en.wikipedia.org/wiki/Hierarchical_File_System) format. It +operates entirely on in-memory `bytes` objects. Images are serialised and +deserialised in one go using the `read` and `write` methods of the `Volume` +object. + +The directory hierarchy of a `Volume` is then accessed and manipulated like a +Python `dict`. `Folder` and `File` objects represent the contents of the +filesystem. diff --git a/machfs/__init__.py b/machfs/__init__.py new file mode 100644 index 0000000..4326eae --- /dev/null +++ b/machfs/__init__.py @@ -0,0 +1 @@ +from main import Volume, Folder, File diff --git a/bitmanip.py b/machfs/bitmanip.py similarity index 100% rename from bitmanip.py rename to machfs/bitmanip.py diff --git a/btree.py b/machfs/btree.py similarity index 100% rename from btree.py rename to machfs/btree.py diff --git a/directory.py b/machfs/directory.py similarity index 100% rename from directory.py rename to machfs/directory.py diff --git a/main.py b/machfs/main.py similarity index 100% rename from main.py rename to machfs/main.py diff --git a/main_test.py b/machfs/main_test.py similarity index 100% rename from main_test.py rename to machfs/main_test.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..20b498d --- /dev/null +++ b/setup.py @@ -0,0 +1,21 @@ +from distutils.core import setup + +setup( + name='machfs', + version='0.1dev', + author='Elliot Nunn', + author_email='elliotnunn@me.com', + description='Library for reading and writing Macintosh HFS volumes', + long_description=open('README.md').read(), + long_description_content_type='text/markdown', + license='MIT', + url='https://github.com/elliotnunn/machfs', + classifiers=[ + 'Programming Language :: Python :: 3 :: Only', + 'Operating System :: OS Independent', + 'License :: OSI Approved :: MIT License', + 'Topic :: System :: Filesystems', + 'Development Status :: 3 - Alpha', + ], + packages=['machfs'], +)