leveldir

Multi-level directory structure data stores in python3
git clone git://git.defalsify.org/python-leveldir.git
Log | Files | Refs | LICENSE

commit 5925974fa5b56b50234f7590f462ec227aa65ad5
parent 9805d109d0646141ee13e75a69ba0ec954a0d5f3
Author: lash <dev@holbrook.no>
Date:   Sun, 30 Jan 2022 13:56:13 +0000

Make master file a dotfile

Diffstat:
MCHANGELOG | 2++
Mleveldir/base.py | 4++--
Mleveldir/hex.py | 2+-
Mrun_tests.sh | 2+-
Msetup.cfg | 2+-
5 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,3 +1,5 @@ +- 0.3.0 + * Make master file a dotfile - 0.2.0 * Add subdirectory entry mode for hexdir * Add custom hex formatting for path generation diff --git a/leveldir/base.py b/leveldir/base.py @@ -14,7 +14,7 @@ class LevelDir: self.__verify_directory() - self.master_file = os.path.join(self.path, 'master') + self.master_file = os.path.join(self.path, '.master') def have(self, k): @@ -48,7 +48,7 @@ class LevelDir: @classmethod def __prepare_directory(cls, path): os.makedirs(path, exist_ok=True) - state_file = os.path.join(path, 'master') + state_file = os.path.join(path, '.master') try: os.stat(state_file) except FileNotFoundError: diff --git a/leveldir/hex.py b/leveldir/hex.py @@ -97,7 +97,7 @@ class HexDir(LevelDir): prefix = f.read(self.prefix_length) key = f.read(self.key_length) f.close() - return (prefix, key) + return (prefix, key) def to_subpath(self, hx): diff --git a/run_tests.sh b/run_tests.sh @@ -2,7 +2,7 @@ set +e set +x -export PYTHONPATH=. +export PYTHONPATH=${PYTHONPATH}:. for f in `ls tests/*.py`; do python $f if [ $? -gt 0 ]; then diff --git a/setup.cfg b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = leveldir -version = 0.2.0 +version = 0.3.0 description = Create multi-level directory structures author = Louis Holbrook author_email = dev@holbrook.no