dekshell 0.2.3__tar.gz → 0.2.4__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 (38) hide show
  1. {dekshell-0.2.3 → dekshell-0.2.4}/PKG-INFO +2 -2
  2. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/__init__.py +6 -2
  3. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/contexts/methods.py +23 -6
  4. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/contexts/properties.py +3 -3
  5. {dekshell-0.2.3 → dekshell-0.2.4}/pyproject.toml +2 -2
  6. {dekshell-0.2.3 → dekshell-0.2.4}/README.md +0 -0
  7. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/__init__.py +0 -0
  8. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/click/__entry__.py +0 -0
  9. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/click/__init__.py +0 -0
  10. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/contexts/__init__.py +0 -0
  11. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/__init__.py +0 -0
  12. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/base/__init__.py +0 -0
  13. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/base/core.py +0 -0
  14. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/comment.py +0 -0
  15. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/define.py +0 -0
  16. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/echo.py +0 -0
  17. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/empty.py +0 -0
  18. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/env.py +0 -0
  19. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/exec.py +0 -0
  20. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/for_.py +0 -0
  21. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/function.py +0 -0
  22. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/if_.py +0 -0
  23. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/input.py +0 -0
  24. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/invoke.py +0 -0
  25. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/pip_.py +0 -0
  26. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/redirect.py +0 -0
  27. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/shell.py +0 -0
  28. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/timout.py +0 -0
  29. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/var.py +0 -0
  30. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/markers/while_.py +0 -0
  31. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/plugin/__init__.py +0 -0
  32. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/core/redirect.py +0 -0
  33. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/utils/__init__.py +0 -0
  34. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/utils/beep.py +0 -0
  35. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/utils/cmd.py +0 -0
  36. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/utils/pkg.py +0 -0
  37. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/utils/serializer.py +0 -0
  38. {dekshell-0.2.3 → dekshell-0.2.4}/dekshell/utils/shell.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dekshell
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Author-Email: sanzenwin <sanzenwin@gmail.com>
5
5
  License: MIT
6
6
  Requires-Python: >=3.8
7
7
  Requires-Dist: packaging<=23.1
8
8
  Requires-Dist: extra-platforms<=3.1.0
9
- Requires-Dist: dektools[date,fetch,ps,tab]<1.0.0
9
+ Requires-Dist: dektools[date,fetch,ignore,ps,tab]<1.0.0
10
10
  Requires-Dist: dekmedia[audio]<1.0.0
11
11
  Description-Content-Type: text/markdown
12
12
 
@@ -17,8 +17,12 @@ from ..utils.shell import shell_bin
17
17
  from ..utils.cmd import ak2cmd, pack_context_full
18
18
 
19
19
 
20
- def shell_file(__not_use_this_var_name__, *args, **kwargs):
21
- shell_wrapper(f'{shell_bin} rf {__not_use_this_var_name__} {ak2cmd(args, kwargs)}')
20
+ def shell_file(__placeholder__filepath, *args, **kwargs):
21
+ shell_wrapper(f'{shell_bin} rf "{__placeholder__filepath}" {ak2cmd(args, kwargs)}')
22
+
23
+
24
+ def shell_file_cd(__placeholder__filepath, *args, **kwargs):
25
+ shell_wrapper(f'{shell_bin} rfc "{__placeholder__filepath}" {ak2cmd(args, kwargs)}')
22
26
 
23
27
 
24
28
  def shell_command_file_cd(filepath, **kwargs):
@@ -5,7 +5,7 @@ import tempfile
5
5
  import getpass
6
6
  from pathlib import Path
7
7
  from dektools.file import sure_dir, write_file, read_text, remove_path, sure_parent_dir, normal_path, \
8
- format_path_desc, read_file, split_ext, path_ext, clear_dir, \
8
+ format_path_desc, read_file, split_ext, path_ext, clear_dir, copy_recurse_ignore, \
9
9
  split_file, combine_split_files, remove_split_files, meta_split_file, tree, iglob, \
10
10
  where, where_list, which, which_list
11
11
  from dektools.hash import hash_file
@@ -19,11 +19,12 @@ from dektools.ps.process import process_detail, process_kill, process_list_all
19
19
  from dektools.time import now
20
20
  from dektools.str import shlex_split, shlex_quote
21
21
  from dektools.shell import shell_wrapper, is_user_admin
22
+ from dektools.match import GeneralMatcher, glob2re, glob_compile, glob_match
23
+ from dektools.git import git_clean_dir, git_apply, git_parse_modules, git_fetch_min, git_list_remotes
22
24
  from ...utils.beep import sound_notify
23
25
  from ..markers.base.core import MarkerBase, get_inner_vars
24
26
  from ..markers.invoke import InvokeMarker, GotoMarker
25
27
  from ..redirect import search_bin_by_path_tree
26
- from .properties import current_os
27
28
 
28
29
 
29
30
  def _is_true(x):
@@ -174,6 +175,7 @@ default_methods = {
174
175
  'wf': write_file,
175
176
  'rt': read_text,
176
177
  'rf': read_file,
178
+ 'ci': copy_recurse_ignore,
177
179
 
178
180
  'sf': split_file,
179
181
  'sfr': remove_split_files,
@@ -207,10 +209,17 @@ default_methods = {
207
209
  'notequal': lambda x, y: x != y,
208
210
  'beep': lambda x=True: sound_notify(x),
209
211
 
210
- 'invoke': lambda __not_use_this_var_name__, *args, **kwargs: InvokeMarker.execute_file(
211
- None, __not_use_this_var_name__, args, kwargs),
212
- 'goto': lambda __not_use_this_var_name__, *args, **kwargs: GotoMarker.execute_file(
213
- None, __not_use_this_var_name__, args, kwargs),
212
+ 'invoke': lambda __placeholder__filepath, *args, **kwargs: InvokeMarker.execute_file(
213
+ None, __placeholder__filepath, args, kwargs),
214
+ 'goto': lambda __placeholder__filepath, *args, **kwargs: GotoMarker.execute_file(
215
+ None, __placeholder__filepath, args, kwargs),
216
+
217
+ 'glob': {
218
+ 're': glob2re,
219
+ 'compile': glob_compile,
220
+ 'match': glob_match,
221
+ 'matcher': GeneralMatcher,
222
+ },
214
223
 
215
224
  'shlex': {
216
225
  'split': shlex_split,
@@ -222,4 +231,12 @@ default_methods = {
222
231
  'fetch': download_file,
223
232
  'download': download_from_http,
224
233
  },
234
+
235
+ 'git': {
236
+ 'apply': git_apply,
237
+ 'remotes': git_list_remotes,
238
+ 'modules': git_parse_modules,
239
+ 'fetch': git_fetch_min,
240
+ 'clean': git_clean_dir,
241
+ }
225
242
  }
@@ -65,10 +65,10 @@ default_properties = {
65
65
  'mingw': sysconfig.get_platform() == 'mingw',
66
66
  'msys': sys.platform == 'msys',
67
67
  'wsl': 'Microsoft' in read_text('/proc/version', default=''),
68
- 'win': platform.system() == 'Windows',
69
- 'mac': platform.system() == 'Darwin',
68
+ 'windows': platform.system() == 'Windows',
69
+ 'macos': platform.system() == 'Darwin',
70
70
  'linux': platform.system() == 'Linux',
71
- 'name': {'Windows': 'win', 'Darwin': 'mac', 'Linux': 'linux'}.get(platform.system()),
71
+ 'name': {'Windows': 'windows', 'Darwin': 'macos', 'Linux': 'linux'}.get(platform.system()),
72
72
  'entry': current_os,
73
73
  },
74
74
  'path': {
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dekshell"
3
- version = "0.2.3"
3
+ version = "0.2.4"
4
4
  description = ""
5
5
  authors = [
6
6
  { name = "sanzenwin", email = "sanzenwin@gmail.com" },
@@ -8,7 +8,7 @@ authors = [
8
8
  dependencies = [
9
9
  "packaging<=23.1",
10
10
  "extra-platforms<=3.1.0",
11
- "dektools[date,fetch,ps,tab]<1.0.0",
11
+ "dektools[ignore,date,fetch,ps,tab]<1.0.0",
12
12
  "dekmedia[audio]<1.0.0",
13
13
  ]
14
14
  requires-python = ">=3.8"
File without changes
File without changes
File without changes
File without changes