barecat 0.2.6__tar.gz → 0.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {barecat-0.2.6 → barecat-0.2.7}/PKG-INFO +1 -1
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/_version.py +16 -3
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/cli_impl.py +17 -7
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/upgrade_database.py +1 -2
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat.egg-info/PKG-INFO +1 -1
- {barecat-0.2.6 → barecat-0.2.7}/.github/workflows/python-publish.yml +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/.gitignore +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/.readthedocs.yaml +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/LICENSE +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/MANIFEST.in +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/README.md +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/Makefile +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/_static/styles/my_theme.css +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/index.rst +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/attribute.rst +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/class.rst +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/data.rst +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/exception.rst +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/function.rst +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/method.rst +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/module.rst +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/package.rst +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/autoapi/python/property.rst +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/_templates/copyright.html +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/abbrev_long.bib +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/conf.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/index.rst +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/make.bat +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/references.bib +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/docs/requirements.txt +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/figure.png +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/pyproject.toml +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/setup.cfg +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/__init__.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/archive_formats.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/cli.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/codecs.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/common.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/consumed_threadpool.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/core/__init__.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/core/barecat.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/core/index.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/core/sharder.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/defrag.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/exceptions.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/from_tar_stream.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/glob_to_regex.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/progbar.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/sql/schema.sql +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/threadsafe.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/to_tar_stream.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/upgrade_database2.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/util.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat/viewerqt6.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat.egg-info/SOURCES.txt +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat.egg-info/dependency_links.txt +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat.egg-info/entry_points.txt +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat.egg-info/requires.txt +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/src/barecat.egg-info/top_level.txt +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/tests/test_barecat.py +0 -0
- {barecat-0.2.6 → barecat-0.2.7}/tests/test_cli.py +0 -0
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
3
|
|
|
4
|
-
__all__ = [
|
|
4
|
+
__all__ = [
|
|
5
|
+
"__version__",
|
|
6
|
+
"__version_tuple__",
|
|
7
|
+
"version",
|
|
8
|
+
"version_tuple",
|
|
9
|
+
"__commit_id__",
|
|
10
|
+
"commit_id",
|
|
11
|
+
]
|
|
5
12
|
|
|
6
13
|
TYPE_CHECKING = False
|
|
7
14
|
if TYPE_CHECKING:
|
|
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
|
|
|
9
16
|
from typing import Union
|
|
10
17
|
|
|
11
18
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
+
COMMIT_ID = Union[str, None]
|
|
12
20
|
else:
|
|
13
21
|
VERSION_TUPLE = object
|
|
22
|
+
COMMIT_ID = object
|
|
14
23
|
|
|
15
24
|
version: str
|
|
16
25
|
__version__: str
|
|
17
26
|
__version_tuple__: VERSION_TUPLE
|
|
18
27
|
version_tuple: VERSION_TUPLE
|
|
28
|
+
commit_id: COMMIT_ID
|
|
29
|
+
__commit_id__: COMMIT_ID
|
|
19
30
|
|
|
20
|
-
__version__ = version = '0.2.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
31
|
+
__version__ = version = '0.2.7'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 7)
|
|
33
|
+
|
|
34
|
+
__commit_id__ = commit_id = 'gb334ebf79'
|
|
@@ -245,7 +245,12 @@ def barecat2archive(src_path, target_path):
|
|
|
245
245
|
|
|
246
246
|
def print_ncdu_json(path):
|
|
247
247
|
timestamp = time.time()
|
|
248
|
-
|
|
248
|
+
import importlib.metadata
|
|
249
|
+
|
|
250
|
+
progver = importlib.metadata.version('barecat')
|
|
251
|
+
progver = '.'.join(progver.split('.')[:3])
|
|
252
|
+
|
|
253
|
+
print(f'[1,1,{{"progname":"barecat","progver": {progver},"timestamp":{timestamp}}},')
|
|
249
254
|
with barecat_.Index(path) as index_reader:
|
|
250
255
|
_print_ncdu_json(index_reader, '')
|
|
251
256
|
print(']')
|
|
@@ -255,15 +260,20 @@ def _print_ncdu_json(index_reader, dirpath):
|
|
|
255
260
|
basename = '/' if dirpath == '' else osp.basename(dirpath)
|
|
256
261
|
|
|
257
262
|
print('[', json.dumps(dict(name=basename, asize=4096, ino=0)), end='')
|
|
258
|
-
|
|
259
|
-
if
|
|
263
|
+
infos = index_reader.listdir_infos(dirpath)
|
|
264
|
+
file_infos = [f for f in infos if isinstance(f, BarecatFileInfo)]
|
|
265
|
+
subdir_infos = [d for d in infos if isinstance(d, BarecatDirInfo)]
|
|
266
|
+
del infos
|
|
267
|
+
|
|
268
|
+
if file_infos:
|
|
260
269
|
filedump = json.dumps(
|
|
261
|
-
[dict(name=osp.basename(
|
|
270
|
+
[dict(name=osp.basename(fi.path), asize=fi.size, dsize=fi.size, ino=0) for fi in file_infos]
|
|
262
271
|
)
|
|
263
272
|
print(',', filedump[1:-1], end='')
|
|
264
|
-
del
|
|
265
|
-
|
|
273
|
+
del file_infos
|
|
274
|
+
|
|
275
|
+
for subdir in subdir_infos:
|
|
266
276
|
print(',')
|
|
267
|
-
_print_ncdu_json(index_reader,
|
|
277
|
+
_print_ncdu_json(index_reader, subdir.path)
|
|
268
278
|
|
|
269
279
|
print(']', end='')
|
|
@@ -26,7 +26,7 @@ def main():
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def upgrade_schema(path: str):
|
|
29
|
-
with barecat.Index(
|
|
29
|
+
with barecat.Index(path + '-sqlite-index', readonly=False) as index_out:
|
|
30
30
|
c = index_out.cursor
|
|
31
31
|
c.execute('COMMIT')
|
|
32
32
|
c.execute('PRAGMA foreign_keys=OFF')
|
|
@@ -100,7 +100,6 @@ def update_crc32c(path_out: str, workers=8):
|
|
|
100
100
|
def temp_crc_writer_main(dbpath, future_iter):
|
|
101
101
|
with sqlite3.connect(dbpath) as conn:
|
|
102
102
|
c = conn.cursor()
|
|
103
|
-
c.execute('COMMIT')
|
|
104
103
|
c.execute('PRAGMA synchronous=OFF')
|
|
105
104
|
c.execute('PRAGMA journal_mode=OFF')
|
|
106
105
|
c.execute("CREATE TABLE IF NOT EXISTS crc32c (path TEXT PRIMARY KEY, crc32c INTEGER)")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|