ankcompiler 0.1.0__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.
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: ankcompiler
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A CLI tool for compiling Anki decks, defined in Markdown
|
|
5
|
+
Author-Email: Quinn Herden <55929299+QuinnHerden@users.noreply.github.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.12
|
|
8
|
+
Requires-Dist: typer>=0.12.3
|
|
9
|
+
Requires-Dist: genanki>=0.13.1
|
|
10
|
+
Requires-Dist: toml>=0.10.2
|
|
11
|
+
Requires-Dist: pydantic>=2.7.4
|
|
12
|
+
Requires-Dist: pydantic-settings>=2.3.4
|
|
13
|
+
Requires-Dist: dataclasses>=0.6
|
|
14
|
+
Requires-Dist: python-frontmatter>=1.1.0
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# AnkCompiler
|
|
18
|
+
A CLI tool for compiling Anki decks, defined in Markdown.
|
|
19
|
+
## Usage
|
|
20
|
+
Run `ankc --help` for usage information.
|
|
21
|
+
## Credits
|
|
22
|
+
Inspiration taken from [lukesmurry](https://github.com/lukesmurray/markdown-anki-decks)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "ankcompiler"
|
|
3
|
+
description = "A CLI tool for compiling Anki decks, defined in Markdown"
|
|
4
|
+
authors = [
|
|
5
|
+
{ name = "Quinn Herden", email = "55929299+QuinnHerden@users.noreply.github.com" },
|
|
6
|
+
]
|
|
7
|
+
dependencies = [
|
|
8
|
+
"typer>=0.12.3",
|
|
9
|
+
"genanki>=0.13.1",
|
|
10
|
+
"toml>=0.10.2",
|
|
11
|
+
"pydantic>=2.7.4",
|
|
12
|
+
"pydantic-settings>=2.3.4",
|
|
13
|
+
"dataclasses>=0.6",
|
|
14
|
+
"python-frontmatter>=1.1.0",
|
|
15
|
+
]
|
|
16
|
+
requires-python = ">=3.12"
|
|
17
|
+
readme = "README.md"
|
|
18
|
+
version = "0.1.0"
|
|
19
|
+
|
|
20
|
+
[project.license]
|
|
21
|
+
text = "MIT"
|
|
22
|
+
|
|
23
|
+
[tool.pdm]
|
|
24
|
+
distribution = true
|
|
25
|
+
|
|
26
|
+
[tool.pdm.dev-dependencies]
|
|
27
|
+
dev = [
|
|
28
|
+
"black>=24.4.2",
|
|
29
|
+
"flake8>=7.1.0",
|
|
30
|
+
"pytest>=8.2.2",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[tool.pdm.scripts]
|
|
34
|
+
test = "pdm run pytest"
|
|
35
|
+
fmt = "pdm run black ."
|
|
36
|
+
check-fmt = "pdm run black --check ."
|
|
37
|
+
|
|
38
|
+
[tool.pdm.scripts.checks]
|
|
39
|
+
composite = [
|
|
40
|
+
"check-fmt",
|
|
41
|
+
"test",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[build-system]
|
|
45
|
+
requires = [
|
|
46
|
+
"pdm-backend",
|
|
47
|
+
]
|
|
48
|
+
build-backend = "pdm.backend"
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import re
|
|
2
|
+
|
|
3
|
+
from typer.testing import CliRunner
|
|
4
|
+
|
|
5
|
+
from app.cli.entry import app
|
|
6
|
+
|
|
7
|
+
runner = CliRunner()
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TestEntry:
|
|
11
|
+
@staticmethod
|
|
12
|
+
def test_default():
|
|
13
|
+
result = runner.invoke(app, [])
|
|
14
|
+
assert result.exit_code == 0
|
|
15
|
+
|
|
16
|
+
@staticmethod
|
|
17
|
+
def test_version():
|
|
18
|
+
result = runner.invoke(app, ["--version"])
|
|
19
|
+
assert result.exit_code == 0
|
|
20
|
+
|
|
21
|
+
match = re.match(r"(\d+\.\d+\.\d+\n)", result.stdout)
|
|
22
|
+
if not match:
|
|
23
|
+
raise AssertionError(f"Unexpected version format: {result.stdout}")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class TestDecks:
|
|
27
|
+
@staticmethod
|
|
28
|
+
def test_deck_list():
|
|
29
|
+
result = runner.invoke(
|
|
30
|
+
app,
|
|
31
|
+
[
|
|
32
|
+
"deck",
|
|
33
|
+
"list",
|
|
34
|
+
],
|
|
35
|
+
)
|
|
36
|
+
assert result.exit_code == 1
|
|
37
|
+
|
|
38
|
+
result = runner.invoke(
|
|
39
|
+
app,
|
|
40
|
+
["deck", "list", "--depth", "2"],
|
|
41
|
+
)
|
|
42
|
+
assert result.exit_code == 0
|