minecraft-datapack-language 17.0.12__py3-none-any.whl → 17.0.14__py3-none-any.whl

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.
@@ -1,3 +1,3 @@
1
- current: "17.0.10"
2
- tag: "v17.0.10"
3
- updated_at: "2025-09-10T23:56:34Z"
1
+ current: "17.0.12"
2
+ tag: "v17.0.12"
3
+ updated_at: "2025-09-11T00:04:18Z"
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '17.0.12'
32
- __version_tuple__ = version_tuple = (17, 0, 12)
31
+ __version__ = version = '17.0.14'
32
+ __version_tuple__ = version_tuple = (17, 0, 14)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -74,8 +74,9 @@ Examples:
74
74
  completion_sub.add_parser('doctor', help='Diagnose completion install status')
75
75
 
76
76
  # Docs command
77
- docs_parser = subparsers.add_parser('docs', help='Docs utilities')
77
+ docs_parser = subparsers.add_parser('docs', help='Open or serve docs')
78
78
  docs_sub = docs_parser.add_subparsers(dest='docs_cmd', help='Docs subcommands')
79
+ docs_sub.add_parser('open', help='Open the MDL Getting Started docs in your browser')
79
80
  docs_serve = docs_sub.add_parser('serve', help='Serve project docs locally')
80
81
  docs_serve.add_argument('--port', type=int, default=8000, help='Port to serve on (default: 8000)')
81
82
  docs_serve.add_argument('--dir', default='docs', help='Docs directory to serve (default: docs)')
@@ -92,11 +93,11 @@ Examples:
92
93
  return 0
93
94
 
94
95
  if not args.command:
96
+ parser.print_help()
97
+ print("")
95
98
  print("Tip: Create a new project with: mdl new <project_name>")
96
99
  print(" After creating a project, you can serve local docs with: mdl docs serve --dir docs")
97
100
  print(" Or run the generated scripts: ./serve_docs.sh (bash) or ./serve_docs.ps1 (PowerShell)")
98
- print("")
99
- parser.print_help()
100
101
  return 0
101
102
 
102
103
  try:
@@ -352,6 +353,11 @@ A Minecraft datapack created with MDL (Minecraft Datapack Language).
352
353
  print(f"Created new MDL project: {project_dir}/")
353
354
  print(f" - {mdl_file}")
354
355
  print(f" - {readme_file}")
356
+ if (project_dir / 'docs').exists():
357
+ print(" - docs/ (local docs)")
358
+ if (project_dir / 'docs_site').exists():
359
+ print(" - docs_site/ (prebuilt HTML docs)")
360
+ print(" - serve_docs.sh, serve_docs.ps1")
355
361
  print(f"\nNext steps:")
356
362
  print(f" 1. cd {project_name}")
357
363
  print(f" 2. mdl build --mdl {project_name}.mdl -o dist")
@@ -366,6 +372,7 @@ def copy_packaged_docs_into(project_dir: Path) -> bool:
366
372
  Raises FileExistsError if destination exists.
367
373
  """
368
374
  embedded_root = importlib_resources_files("minecraft_datapack_language").joinpath("_embedded", "docs")
375
+ embedded_site = importlib_resources_files("minecraft_datapack_language").joinpath("_embedded", "docs_site")
369
376
  try:
370
377
  # Some importlib.resources implementations require as_file for files; for dirs, check existence
371
378
  if not Path(str(embedded_root)).exists():
@@ -373,10 +380,19 @@ def copy_packaged_docs_into(project_dir: Path) -> bool:
373
380
  except Exception:
374
381
  return False
375
382
 
383
+ # Copy raw docs
376
384
  dest = project_dir / "docs"
377
385
  if dest.exists():
378
386
  raise FileExistsError("docs directory already exists")
379
387
  shutil.copytree(str(embedded_root), str(dest))
388
+ # Copy prebuilt HTML site if available
389
+ try:
390
+ if Path(str(embedded_site)).exists():
391
+ site_dest = project_dir / "docs_site"
392
+ if not site_dest.exists():
393
+ shutil.copytree(str(embedded_site), str(site_dest))
394
+ except Exception:
395
+ pass
380
396
  return True
381
397
 
382
398
 
@@ -386,7 +402,10 @@ def create_docs_serve_scripts(project_dir: Path) -> None:
386
402
  bash_script.write_text("""#!/usr/bin/env bash
387
403
  set -e
388
404
  PORT=${PORT:-8000}
389
- DIR=${1:-docs}
405
+ DIR=${1:-}
406
+ if [ -z "$DIR" ]; then
407
+ if [ -d docs_site ]; then DIR=docs_site; else DIR=docs; fi
408
+ fi
390
409
  if [ ! -d "$DIR" ]; then
391
410
  echo "Error: docs directory '$DIR' not found"; exit 1
392
411
  fi
@@ -406,8 +425,9 @@ fi
406
425
  ps1_script.write_text("""
407
426
  param(
408
427
  [int]$Port = 8000,
409
- [string]$Dir = "docs"
428
+ [string]$Dir = ""
410
429
  )
430
+ if (-not $Dir) { if (Test-Path 'docs_site') { $Dir = 'docs_site' } else { $Dir = 'docs' } }
411
431
  if (-not (Test-Path $Dir)) { Write-Host "Error: docs directory '$Dir' not found"; exit 1 }
412
432
  # Prefer Jekyll if available and Gemfile exists
413
433
  $gemfile = (Test-Path (Join-Path $Dir 'Gemfile')) -or (Test-Path 'Gemfile')
@@ -591,6 +611,16 @@ def _remove_line_from_file(path: Path, line: str) -> None:
591
611
 
592
612
  def docs_command(args) -> int:
593
613
  cmd = args.docs_cmd
614
+ # Default action: open website getting started page
615
+ if cmd is None or cmd == 'open':
616
+ try:
617
+ import webbrowser
618
+ webbrowser.open('https://www.mcmdl.com/docs/getting-started/')
619
+ print("Opened MDL Getting Started in your default browser.")
620
+ return 0
621
+ except Exception as e:
622
+ print(f"Failed to open browser: {e}")
623
+ return 1
594
624
  if cmd == 'serve':
595
625
  port = getattr(args, 'port', 8000)
596
626
  directory = getattr(args, 'dir', 'docs')
@@ -27,7 +27,7 @@ _mdl_complete() {
27
27
  COMPREPLY=( $(compgen -W "print install uninstall doctor" -- "$cur") )
28
28
  ;;
29
29
  docs)
30
- COMPREPLY=( $(compgen -W "serve" -- "$cur") )
30
+ COMPREPLY=( $(compgen -W "open serve" -- "$cur") )
31
31
  ;;
32
32
  esac
33
33
  }
@@ -27,5 +27,6 @@ complete -c mdl -n "__fish_seen_subcommand_from completion" -a "uninstall" -d "U
27
27
  complete -c mdl -n "__fish_seen_subcommand_from completion" -a "doctor" -d "Diagnose setup"
28
28
 
29
29
  # docs subcommands
30
+ complete -c mdl -n "__fish_seen_subcommand_from docs" -a "open" -d "Open docs website"
30
31
  complete -c mdl -n "__fish_seen_subcommand_from docs" -a "serve" -d "Serve docs locally"
31
32
 
@@ -20,7 +20,7 @@ Register-ArgumentCompleter -Native -CommandName mdl -ScriptBlock {
20
20
  'print','install','uninstall','doctor' | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }
21
21
  }
22
22
  'docs' {
23
- 'serve' | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }
23
+ 'open','serve' | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }
24
24
  }
25
25
  }
26
26
  }
@@ -20,7 +20,7 @@ _mdl() {
20
20
  _values 'subcommands' 'print' 'install' 'uninstall' 'doctor'
21
21
  ;;
22
22
  docs)
23
- _values 'subcommands' 'serve'
23
+ _values 'subcommands' 'open' 'serve'
24
24
  ;;
25
25
  esac
26
26
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: minecraft-datapack-language
3
- Version: 17.0.12
3
+ Version: 17.0.14
4
4
  Summary: Compile MDL language with explicit scoping into a Minecraft datapack (1.21+ ready). Features variables, control flow, error handling, and VS Code extension.
5
5
  Project-URL: Homepage, https://www.mcmdl.com
6
6
  Project-URL: Documentation, https://www.mcmdl.com/docs
@@ -1,7 +1,7 @@
1
1
  minecraft_datapack_language/__init__.py,sha256=0KVXBE4ScRaRUrf83aA2tVB-y8A_jplyaxVvtHH6Uw0,1199
2
- minecraft_datapack_language/_version.py,sha256=Na0c13EH4pNVBGzO7cGMn_hnIJYj2hp5GRQbBpTRUYk,708
2
+ minecraft_datapack_language/_version.py,sha256=_XHqeKIfR4bcto9-z-EiMmSKIyboSjBra3o8Gv49fkQ,708
3
3
  minecraft_datapack_language/ast_nodes.py,sha256=L5izavSeXDr766vsfRvJrcnflXNJyXcy0WSfyJPq2ZA,4484
4
- minecraft_datapack_language/cli.py,sha256=S5Lbv7c5U3osy1S-pYoRH8J5fu2KaTTWCoo2YcKhDaI,22610
4
+ minecraft_datapack_language/cli.py,sha256=tT5jXsqOCrsJ-nmh4JwSjRT0ECwA1ycjt4q9ZreXdno,23929
5
5
  minecraft_datapack_language/dir_map.py,sha256=HmxFkuvWGkzHF8o_GFb4BpuMCRc6QMw8UbmcAI8JVdY,1788
6
6
  minecraft_datapack_language/mdl_compiler.py,sha256=Cs3fXtIAG4_Johp7h3BeYOs9RNUogkvYsR8Dvt7Ek1E,70720
7
7
  minecraft_datapack_language/mdl_errors.py,sha256=r0Gu3KhoX1YLPAVW_iO7Q_fPgaf_Dv9tOGSOdKNSzmw,16114
@@ -17,7 +17,7 @@ minecraft_datapack_language/_embedded/docs/_config.yml,sha256=wx1F7KonP5t0fvF8ow
17
17
  minecraft_datapack_language/_embedded/docs/docs.md,sha256=odOG-EryTrvQFaAEbcqEbtqmPVR1xzQQf5Yc0S0zwFY,4042
18
18
  minecraft_datapack_language/_embedded/docs/downloads.md,sha256=Lp4ShcqCuDoGypswm5sGYORCOYVwGDmVLEz-5NyKndQ,10250
19
19
  minecraft_datapack_language/_embedded/docs/index.md,sha256=lyUqzvaeQhTZdir_6lpEMExWBUFlLcti7KoJVzQ_57Q,9855
20
- minecraft_datapack_language/_embedded/docs/_data/version.yml,sha256=DDmR8TgMb5RDCkwdjH2XPY8qWBnLIz7xICCVa6XviW0,70
20
+ minecraft_datapack_language/_embedded/docs/_data/version.yml,sha256=7RkbL2QrWI5Dy0VECkPlo02A-ph5Zfd33xNV0X4yQwA,70
21
21
  minecraft_datapack_language/_embedded/docs/_docs/cli-reference.md,sha256=yrZW8pp6T124XCUKuG-59S5YDY0WevaIQ7SwfXQ_Irw,11922
22
22
  minecraft_datapack_language/_embedded/docs/_docs/contributing.md,sha256=Qs-AHky6G9P4L0siMg3l9dAO8I8AzSGW-htEaM_C-Gg,9434
23
23
  minecraft_datapack_language/_embedded/docs/_docs/docs-hub.md,sha256=b0oyaoYkEeKOjG2bRWm4MUnrd03tznKPcECIkhS1sUw,7464
@@ -44,13 +44,13 @@ minecraft_datapack_language/_embedded/docs/icons/icon-128.png,sha256=8qLrcvJstu_
44
44
  minecraft_datapack_language/_embedded/docs/icons/icon-256.png,sha256=xGBlOusbqOz9IK4y00mdTOwnmBodUhW3hYVwPMTDaP0,73748
45
45
  minecraft_datapack_language/_embedded/docs/icons/icon-512.png,sha256=gnvZTDfMAWlIvQ5t9Vi1Kixr8_IVjqXD55iAbhmPmGI,351088
46
46
  minecraft_datapack_language/_embedded/docs/icons/icon-64.png,sha256=FlYhdwjQ6U9-AvREJ0Ic3jZ6LLpWlEBl1fRvgZ3AdPI,6403
47
- minecraft_datapack_language/completions/mdl.bash,sha256=mlRdQ1PwoFwl7Fw5j7u0mhsNdxfbLSfkz1FMiI4DuWc,957
48
- minecraft_datapack_language/completions/mdl.fish,sha256=ReWjaqUwjQni-hUZfVQG2CsI5fE7uJpoywiKrQhtcFw,1923
49
- minecraft_datapack_language/completions/mdl.ps1,sha256=b2A1sFCtY23sv1-LILhPu0lphnZqzVjl__AtvCUMWtU,1744
50
- minecraft_datapack_language/completions/mdl.zsh,sha256=Pdx6yuSFaK2-UIsriVoJJacuWnw2f9DOWrVhPJLBAwo,633
51
- minecraft_datapack_language-17.0.12.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
52
- minecraft_datapack_language-17.0.12.dist-info/METADATA,sha256=PhapTzt91Pa30EkUz0SYKIrU8xq3O1oPk6tT4mCN1is,8418
53
- minecraft_datapack_language-17.0.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
54
- minecraft_datapack_language-17.0.12.dist-info/entry_points.txt,sha256=c6vjBeCiyQflvPHBRyBk2nJCSfYt3Oc7Sc9V87ySi_U,108
55
- minecraft_datapack_language-17.0.12.dist-info/top_level.txt,sha256=ADtFI476tbKLLxEAA-aJQAfg53MA3k_DOb0KTFiggfw,28
56
- minecraft_datapack_language-17.0.12.dist-info/RECORD,,
47
+ minecraft_datapack_language/completions/mdl.bash,sha256=CclfMEuE2w6fqLEcIsTncyFg-XdJjwvp1zCF87jBhBc,962
48
+ minecraft_datapack_language/completions/mdl.fish,sha256=iZOFQKMiPyQ5Tqaw1SQYK3b1Rc17DnEJEXc2pTdEIPc,2010
49
+ minecraft_datapack_language/completions/mdl.ps1,sha256=mPK3zWI5JFhGKmvhgpGeiUdqNJDaGXoZufOaPNlJUxQ,1751
50
+ minecraft_datapack_language/completions/mdl.zsh,sha256=wLiAhrL9iVqUiAUzkjtDZZcDLHDGPpNBYkZQcuWoWNg,640
51
+ minecraft_datapack_language-17.0.14.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
52
+ minecraft_datapack_language-17.0.14.dist-info/METADATA,sha256=f3_Bqtyc6rCqYnuBEnyCgrsrW1w55Il9IJCzuw9MwzQ,8418
53
+ minecraft_datapack_language-17.0.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
54
+ minecraft_datapack_language-17.0.14.dist-info/entry_points.txt,sha256=c6vjBeCiyQflvPHBRyBk2nJCSfYt3Oc7Sc9V87ySi_U,108
55
+ minecraft_datapack_language-17.0.14.dist-info/top_level.txt,sha256=ADtFI476tbKLLxEAA-aJQAfg53MA3k_DOb0KTFiggfw,28
56
+ minecraft_datapack_language-17.0.14.dist-info/RECORD,,