oh-my-batch 0.4.9__py3-none-any.whl → 0.5.0__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.
oh_my_batch/batch.py CHANGED
@@ -13,13 +13,17 @@ class BatchMaker:
13
13
  self._script_bottom = []
14
14
  self._command = []
15
15
 
16
- def add_work_dirs(self, *dir: str):
16
+ def add_work_dirs(self, *dir: str, abs=False):
17
17
  """
18
18
  Add working directories
19
19
 
20
20
  :param dir: Directories to work on, can be glob patterns
21
+ :param abs: Whether to convert to absolute path
21
22
  """
22
- self._work_dirs.extend(expand_globs(dir))
23
+ paths = expand_globs(dir)
24
+ if abs:
25
+ paths = [os.path.abspath(p) for p in paths]
26
+ self._work_dirs.extend(paths)
23
27
  return self
24
28
 
25
29
  def add_header_files(self, *file: str, encoding='utf-8'):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: oh-my-batch
3
- Version: 0.4.9
3
+ Version: 0.5.0
4
4
  Summary:
5
5
  License: GPL
6
6
  Author: weihong.xu
@@ -2,14 +2,14 @@ oh_my_batch/__init__.py,sha256=BsRNxZbqDWfaIZJGxzIDqCubRWztMGFDceW08TECuFs,98
2
2
  oh_my_batch/__main__.py,sha256=sWyFZMwWNvhkanwZSJRGfBBDoIevhC028dTSB67i6yI,61
3
3
  oh_my_batch/assets/__init__.py,sha256=Exub46UbQaz2V2eXpQeiVfnThQpXaNeuyjlGY6gBSZc,130
4
4
  oh_my_batch/assets/functions.sh,sha256=LaiavZBu84D7C1r-dWhf91vPTuHXCMV1DQZUIPVQnjE,1001
5
- oh_my_batch/batch.py,sha256=BBrRlkTw9sLS4s3xmRGW-Ok3-qZi68_iaNpfDO7iYv4,3827
5
+ oh_my_batch/batch.py,sha256=1aVLP2KAbfNo0Asw7khh5HGCrh1PbYLNXLmiR-sWWcs,3988
6
6
  oh_my_batch/cli.py,sha256=Jyz8q2pUYke3mfJS6F_G9S9hApddgXxQw1BsN6Kfkjc,553
7
7
  oh_my_batch/combo.py,sha256=A5flYsjugcelj105P6Nq4M3kNGtdqh3c7QaSIL3hUcg,9954
8
8
  oh_my_batch/job.py,sha256=8qFYscHGzIQhX-HrAGxCCv7h2T8Ls1Fj0gmNEBdP5Go,7227
9
9
  oh_my_batch/misc.py,sha256=G_iOovRCrShBJJCc82QLN0CvMqW4adOefEoY1GedEiw,452
10
10
  oh_my_batch/util.py,sha256=5ve2QcviuF0UHFLrsXmjMTj0ogXJ4g05q1y-yWCFuOk,2409
11
- oh_my_batch-0.4.9.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
12
- oh_my_batch-0.4.9.dist-info/METADATA,sha256=nnVCB-BUnDfpNBHX5LUNeLMl7aWTlMZ3bOtbd1WdyVE,5174
13
- oh_my_batch-0.4.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
- oh_my_batch-0.4.9.dist-info/entry_points.txt,sha256=ZY2GutSoNjjSyJ4qO2pTeseKUFgoTYdvmgkuZZkwi68,77
15
- oh_my_batch-0.4.9.dist-info/RECORD,,
11
+ oh_my_batch-0.5.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
12
+ oh_my_batch-0.5.0.dist-info/METADATA,sha256=PnmjPUSjhK9CocNBQDYqRGNsy9KITN0Hr93H-V9onTA,5174
13
+ oh_my_batch-0.5.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
14
+ oh_my_batch-0.5.0.dist-info/entry_points.txt,sha256=ZY2GutSoNjjSyJ4qO2pTeseKUFgoTYdvmgkuZZkwi68,77
15
+ oh_my_batch-0.5.0.dist-info/RECORD,,