entangled-cli 2.0.0b4__tar.gz → 2.0.0b5__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.
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/PKG-INFO +2 -3
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/filedb.py +12 -6
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/pyproject.toml +2 -5
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/LICENSE +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/README.md +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/__init__.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/code_reader.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/commands/__init__.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/commands/init.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/commands/status.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/commands/stitch.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/commands/sync.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/commands/tangle.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/commands/watch.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/config/__init__.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/config/language.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/config/version.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/construct.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/document.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/errors/__init__.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/errors/internal.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/errors/user.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/hooks/__init__.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/hooks/base.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/hooks/build.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/main.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/markdown_reader.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/parsing.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/properties.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/py.typed +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/status.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/tangle.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/transaction.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/utility.py +0 -0
- {entangled_cli-2.0.0b4 → entangled_cli-2.0.0b5}/entangled/version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: entangled-cli
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0b5
|
|
4
4
|
Summary: Literate Programming toolbox
|
|
5
5
|
Home-page: https://entangled.github.io/
|
|
6
6
|
License: Apache 2
|
|
@@ -10,11 +10,10 @@ Requires-Python: >=3.11,<4.0
|
|
|
10
10
|
Classifier: License :: Other/Proprietary License
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Provides-Extra: rich
|
|
14
13
|
Requires-Dist: argh (>=0.28.1,<0.29.0)
|
|
15
14
|
Requires-Dist: filelock (>=3.12.0,<4.0.0)
|
|
16
15
|
Requires-Dist: mawk (>=0.1.4,<0.2.0)
|
|
17
|
-
Requires-Dist: rich (>=13.3.5,<14.0.0)
|
|
16
|
+
Requires-Dist: rich (>=13.3.5,<14.0.0)
|
|
18
17
|
Requires-Dist: watchdog (>=3.0.0,<4.0.0)
|
|
19
18
|
Project-URL: Repository, https://github.com/entangled/entangled.py
|
|
20
19
|
Description-Content-Type: text/markdown
|
|
@@ -16,6 +16,14 @@ from .version import __version__
|
|
|
16
16
|
from .utility import normal_relative, ensure_parent
|
|
17
17
|
|
|
18
18
|
|
|
19
|
+
def hexdigest(s: str) -> str:
|
|
20
|
+
"""Creates a MD5 hash digest from a string. Before hashing, the string has
|
|
21
|
+
linefeed `\\r` characters and trailing newlines removed, and the string
|
|
22
|
+
is encoded as UTF-8."""
|
|
23
|
+
content = s.replace("\r", "").rstrip("\n").encode()
|
|
24
|
+
return hashlib.sha256(content).hexdigest()
|
|
25
|
+
|
|
26
|
+
|
|
19
27
|
@dataclass
|
|
20
28
|
class FileStat:
|
|
21
29
|
path: Path
|
|
@@ -26,10 +34,10 @@ class FileStat:
|
|
|
26
34
|
@staticmethod
|
|
27
35
|
def from_path(path: Path, deps: Optional[list[Path]]):
|
|
28
36
|
stat = os.stat(path)
|
|
29
|
-
with open(path, "
|
|
30
|
-
|
|
37
|
+
with open(path, "r") as f:
|
|
38
|
+
digest = hexdigest(f.read())
|
|
31
39
|
return FileStat(
|
|
32
|
-
path, deps, datetime.fromtimestamp(stat.st_mtime),
|
|
40
|
+
path, deps, datetime.fromtimestamp(stat.st_mtime), digest
|
|
33
41
|
)
|
|
34
42
|
|
|
35
43
|
def __lt__(self, other: FileStat) -> bool:
|
|
@@ -136,9 +144,7 @@ class FileDB:
|
|
|
136
144
|
return self._files.keys()
|
|
137
145
|
|
|
138
146
|
def check(self, path: Path, content: str) -> bool:
|
|
139
|
-
return (
|
|
140
|
-
hashlib.sha256(content.encode()).hexdigest() == self._files[path].hexdigest
|
|
141
|
-
)
|
|
147
|
+
return hexdigest(content) == self._files[path].hexdigest
|
|
142
148
|
|
|
143
149
|
@staticmethod
|
|
144
150
|
def initialize() -> FileDB:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "entangled-cli"
|
|
3
|
-
version = "2.0.0-beta-
|
|
3
|
+
version = "2.0.0-beta-5"
|
|
4
4
|
description = "Literate Programming toolbox"
|
|
5
5
|
repository = "https://github.com/entangled/entangled.py"
|
|
6
6
|
homepage = "https://entangled.github.io/"
|
|
@@ -17,7 +17,7 @@ mawk = "^0.1.4" # use mawk as line parsing engine
|
|
|
17
17
|
watchdog = "^3.0.0" # file watching
|
|
18
18
|
filelock = "^3.12.0" # file lock for json db
|
|
19
19
|
argh = "^0.28.1"
|
|
20
|
-
rich =
|
|
20
|
+
rich = "^13.3.5"
|
|
21
21
|
|
|
22
22
|
[tool.poetry.group.dev.dependencies]
|
|
23
23
|
pytest = "^7.3.1"
|
|
@@ -29,9 +29,6 @@ mkdocs-material = "^9.1.13"
|
|
|
29
29
|
mkdocstrings = {extras = ["python"], version = "^0.21.2"}
|
|
30
30
|
twine = "^4.0.2"
|
|
31
31
|
|
|
32
|
-
[tool.poetry.extras]
|
|
33
|
-
rich = ["rich"]
|
|
34
|
-
|
|
35
32
|
[build-system]
|
|
36
33
|
requires = ["poetry-core"]
|
|
37
34
|
build-backend = "poetry.core.masonry.api"
|
|
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
|