newtex-cli 0.1.1.dev1__tar.gz → 0.1.3.dev0__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.
Files changed (33) hide show
  1. {newtex_cli-0.1.1.dev1 → newtex_cli-0.1.3.dev0}/.gitignore +1 -5
  2. {newtex_cli-0.1.1.dev1 → newtex_cli-0.1.3.dev0}/PKG-INFO +11 -4
  3. {newtex_cli-0.1.1.dev1 → newtex_cli-0.1.3.dev0}/README.md +8 -1
  4. {newtex_cli-0.1.1.dev1 → newtex_cli-0.1.3.dev0}/pyproject.toml +3 -2
  5. {newtex_cli-0.1.1.dev1 → newtex_cli-0.1.3.dev0}/src/newtex/cli.py +0 -4
  6. {newtex_cli-0.1.1.dev1 → newtex_cli-0.1.3.dev0}/src/newtex/config.py +6 -2
  7. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/ACM-Reference-Format.bst +3224 -0
  8. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/README.txt +412 -0
  9. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/acm-jdslogo.png +0 -0
  10. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/acmart.cls +3655 -0
  11. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/acmauthoryear.bbx +908 -0
  12. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/acmauthoryear.cbx +219 -0
  13. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/acmdatamodel.dbx +33 -0
  14. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/acmguide.pdf +0 -0
  15. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/acmnumeric.bbx +893 -0
  16. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/acmnumeric.cbx +5 -0
  17. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/sample-base.bib +1487 -0
  18. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/sample-franklin.png +0 -0
  19. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/sample-sigconf-authordraft.tex +847 -0
  20. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/sample-sigconf-biblatex.tex +845 -0
  21. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/sample-sigconf-i13n.tex +888 -0
  22. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/sample-sigconf-lualatex.tex +847 -0
  23. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/sample-sigconf-xelatex.tex +847 -0
  24. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/sample-sigconf.tex +847 -0
  25. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/sampleteaser.pdf +0 -0
  26. newtex_cli-0.1.3.dev0/src/newtex/resources/templates/acm/software.bib +145 -0
  27. newtex_cli-0.1.3.dev0/src/newtex/scaffold.py +82 -0
  28. newtex_cli-0.1.1.dev1/src/newtex/scaffold.py +0 -37
  29. {newtex_cli-0.1.1.dev1 → newtex_cli-0.1.3.dev0}/src/newtex/__init__.py +0 -0
  30. {newtex_cli-0.1.1.dev1 → newtex_cli-0.1.3.dev0}/src/newtex/gitignore_utils.py +0 -0
  31. {newtex_cli-0.1.1.dev1 → newtex_cli-0.1.3.dev0}/src/newtex/resources/__init__.py +0 -0
  32. {newtex_cli-0.1.1.dev1 → newtex_cli-0.1.3.dev0}/src/newtex/resources/gitignore/tex-base.gitignore +0 -0
  33. {newtex_cli-0.1.1.dev1 → newtex_cli-0.1.3.dev0}/src/newtex/validators.py +0 -0
@@ -20,11 +20,6 @@ dist/
20
20
  !.env
21
21
  !.env.example
22
22
 
23
- # PyPI credentials (never commit real tokens)
24
- .pypirc
25
- .pypirc.*
26
- !.pypirc.example
27
-
28
23
  # OS / editor
29
24
  .DS_Store
30
25
  .idea/
@@ -32,3 +27,4 @@ dist/
32
27
 
33
28
  # Personal
34
29
  note.txt
30
+
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: newtex-cli
3
- Version: 0.1.1.dev1
3
+ Version: 0.1.3.dev0
4
4
  Summary: Local LaTeX project scaffolder
5
- Project-URL: Homepage, https://example.internal/newtex
6
- Project-URL: Repository, https://example.internal/newtex/repo
5
+ Project-URL: Homepage, https://github.com/sg98ccy/newtex-cli
6
+ Project-URL: Repository, https://github.com/sg98ccy/newtex-cli
7
7
  License: Proprietary
8
8
  Classifier: Environment :: Console
9
9
  Classifier: Programming Language :: Python :: 3
@@ -30,11 +30,14 @@ Description-Content-Type: text/markdown
30
30
  ## 1. Installation
31
31
 
32
32
  ```bash
33
- pipx install newtex-scaffold
33
+ pipx install newtex-cli
34
34
  ```
35
35
 
36
36
  ## 2. Configuration
37
37
 
38
+ By default, `acm` is bundled inside the package and resolves to `package://acm`.
39
+ You can run `newtex <project-name> acm` immediately after `pipx install`.
40
+
38
41
  ### 2.1 Local environment file
39
42
 
40
43
  Create `.env.local` in the project root:
@@ -105,6 +108,10 @@ newtex --templates-list
105
108
 
106
109
  - Project names must be lowercase kebab-case (example: `exlang-paper`).
107
110
  - If a template path is invalid, the CLI exits with an error message.
111
+ - Template sources support three modes:
112
+ - local directory path (copied as-is)
113
+ - `package://<name>` (copied from bundled package resources)
114
+ - remote template URL (scaffolded via Copier)
108
115
 
109
116
  ## 5. Build & Publish
110
117
 
@@ -5,11 +5,14 @@
5
5
  ## 1. Installation
6
6
 
7
7
  ```bash
8
- pipx install newtex-scaffold
8
+ pipx install newtex-cli
9
9
  ```
10
10
 
11
11
  ## 2. Configuration
12
12
 
13
+ By default, `acm` is bundled inside the package and resolves to `package://acm`.
14
+ You can run `newtex <project-name> acm` immediately after `pipx install`.
15
+
13
16
  ### 2.1 Local environment file
14
17
 
15
18
  Create `.env.local` in the project root:
@@ -80,6 +83,10 @@ newtex --templates-list
80
83
 
81
84
  - Project names must be lowercase kebab-case (example: `exlang-paper`).
82
85
  - If a template path is invalid, the CLI exits with an error message.
86
+ - Template sources support three modes:
87
+ - local directory path (copied as-is)
88
+ - `package://<name>` (copied from bundled package resources)
89
+ - remote template URL (scaffolded via Copier)
83
90
 
84
91
  ## 5. Build & Publish
85
92
 
@@ -28,8 +28,8 @@ dependencies = [
28
28
  newtex = "newtex.cli:app"
29
29
 
30
30
  [project.urls]
31
- Homepage = "https://example.internal/newtex"
32
- Repository = "https://example.internal/newtex/repo"
31
+ Homepage = "https://github.com/sg98ccy/newtex-cli"
32
+ Repository = "https://github.com/sg98ccy/newtex-cli"
33
33
 
34
34
  [tool.hatch.version]
35
35
  source = "vcs"
@@ -51,6 +51,7 @@ include = [
51
51
  [tool.hatch.build]
52
52
  include = [
53
53
  "src/newtex/resources/gitignore/*.gitignore",
54
+ "src/newtex/resources/templates/**/*",
54
55
  ]
55
56
 
56
57
  [project.optional-dependencies]
@@ -278,10 +278,6 @@ def main(
278
278
  _info(f"Template: [bold]{template_alias}[/bold]")
279
279
  _info(f"Target project: [bold]{name}[/bold]")
280
280
 
281
- if not Path(template_path).exists():
282
- _error(f"Template path not found: {template_path}")
283
- raise typer.Exit(code=1)
284
-
285
281
  try:
286
282
  with console.status("[bold cyan]Scaffolding project...[/bold cyan]"):
287
283
  scaffold_project(
@@ -8,6 +8,7 @@ CONFIG_DIR = Path.home() / ".config" / "newtex"
8
8
  CONFIG_FILE = CONFIG_DIR / "templates.yml"
9
9
  ACM_TEMPLATE_ENV = "NEWTEX_TEMPLATE_ACM_PATH"
10
10
  DEFAULT_TEMPLATE_ENV = "NEWTEX_DEFAULT_TEMPLATE"
11
+ ACM_PACKAGED_TEMPLATE = "package://acm"
11
12
 
12
13
 
13
14
  def _load_environment() -> None:
@@ -20,7 +21,7 @@ def _default_config() -> dict:
20
21
  "default_template": os.getenv(DEFAULT_TEMPLATE_ENV, "acm"),
21
22
  "templates": {
22
23
  "acm": {
23
- "path": os.getenv(ACM_TEMPLATE_ENV, ""),
24
+ "path": os.getenv(ACM_TEMPLATE_ENV, ACM_PACKAGED_TEMPLATE),
24
25
  "description": "ACM Conference Proceedings Primary Article",
25
26
  }
26
27
  },
@@ -38,11 +39,14 @@ def _apply_env_overrides(config: dict) -> dict:
38
39
  acm_template = templates.setdefault(
39
40
  "acm",
40
41
  {
41
- "path": "",
42
+ "path": ACM_PACKAGED_TEMPLATE,
42
43
  "description": "ACM Conference Proceedings Primary Article",
43
44
  },
44
45
  )
45
46
 
47
+ if not acm_template.get("path"):
48
+ acm_template["path"] = ACM_PACKAGED_TEMPLATE
49
+
46
50
  if acm_path:
47
51
  acm_template["path"] = acm_path
48
52