bluer-options 5.183.1__py3-none-any.whl → 5.187.1__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.

Potentially problematic release.


This version of bluer-options might be problematic. Click here for more details.

bluer_options/__init__.py CHANGED
@@ -6,7 +6,7 @@ ICON = "🌀"
6
6
 
7
7
  DESCRIPTION = f"{ICON} Options for Bash."
8
8
 
9
- VERSION = "5.183.1"
9
+ VERSION = "5.187.1"
10
10
 
11
11
  REPO_NAME = "bluer-options"
12
12
 
@@ -48,6 +48,12 @@ parser.add_argument(
48
48
  help="0|1",
49
49
  default=0,
50
50
  )
51
+ parser.add_argument(
52
+ "--int",
53
+ type=int,
54
+ help="0|1",
55
+ default=0,
56
+ )
51
57
  parser.add_argument(
52
58
  "--min",
53
59
  type=float,
@@ -75,13 +81,13 @@ elif args.task == "pretty_date":
75
81
  )
76
82
  elif args.task == "random":
77
83
  print(
78
- "{:8}".format(
84
+ ("{:0.8f}" if args.float == 1 else "{:0.0f}").format(
79
85
  random.uniform(
80
86
  args.min,
81
87
  args.max,
82
88
  )
83
89
  )
84
- if args.float == 1
90
+ if args.float == 1 or args.int == 1
85
91
  else string.random(args.length)
86
92
  )
87
93
  else:
@@ -99,6 +99,7 @@ def pretty_date(
99
99
  short: bool = False,
100
100
  squeeze: bool = False,
101
101
  unique: bool = False,
102
+ unique_length: int = 6,
102
103
  ) -> str:
103
104
  format = ""
104
105
  if include_date:
@@ -117,7 +118,7 @@ def pretty_date(
117
118
  if include_seconds:
118
119
  format += ":%S"
119
120
  if unique:
120
- format += f":{random(length=6)}"
121
+ format += f":{random(length=unique_length)}"
121
122
  if as_filename:
122
123
  format = (
123
124
  format.replace(" ", "-")
@@ -304,11 +305,12 @@ def random(
304
305
  return "".join(random_module.choice(alphabet) for _ in range(length))
305
306
 
306
307
 
307
- def timestamp() -> str:
308
+ def timestamp(unique_length: int = 6) -> str:
308
309
  return pretty_date(
309
310
  as_filename=True,
310
311
  include_time=True,
311
312
  unique=True,
313
+ unique_length=unique_length,
312
314
  )
313
315
 
314
316
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bluer_options
3
- Version: 5.183.1
3
+ Version: 5.187.1
4
4
  Summary: 🌀 Options for Bash.
5
5
  Home-page: https://github.com/kamangir/bluer-options
6
6
  Author: Arash Abadpour (Kamangir)
@@ -1,4 +1,4 @@
1
- bluer_options/__init__.py,sha256=BrWGGuQt42s4MJ4vxyBIvisqfD_h33JKVKe3tDOJvSQ,288
1
+ bluer_options/__init__.py,sha256=56tkD_4CoZxBlwzs2SA7-pByFN1PSwBao91XBJDFByg,288
2
2
  bluer_options/__main__.py,sha256=-6ce9W1uXkle4YtEYlSUMWxSmsur3dRDA4_MvNNhEVg,236
3
3
  bluer_options/config.env,sha256=2AG3xuWiMqaNmlCNDWQOJ_AssKk7KXhn0XDIkHWNQ2Q,30
4
4
  bluer_options/timer.py,sha256=UPmsfCjbEWpcjXgMpYemXieheMJH_UpuemhVGsKYVoE,2470
@@ -58,17 +58,17 @@ bluer_options/options/__init__.py,sha256=q0Ymi9oCBwgN0g7NVeYh4XgiICOtH8W8Wuaa52N
58
58
  bluer_options/options/__main__.py,sha256=wnCzX2dxIgrjZ6qoDnE_YBE6xzJO5ME5u-gCPmb02cw,1479
59
59
  bluer_options/options/classes.py,sha256=dcfGd34y6vDYvj-v-Bb5uOyy79mwV0s98czYFJ9hB9U,2211
60
60
  bluer_options/string/__init__.py,sha256=MsbbLbg13Pmq2qkYqwOU1bc27_VvfiZ_alcKYH7zzI8,546
61
- bluer_options/string/__main__.py,sha256=zC9Pipo66aMo5gEiIDbBWFzaukjIp7RttkCoHZFZXOQ,1707
61
+ bluer_options/string/__main__.py,sha256=yv6pNK4cYua6ySYbxpACfIiF4NSNAoBiiaMWQmWt_wU,1844
62
62
  bluer_options/string/constants.py,sha256=hfUx6xihcOsTayceAumyxyV2fbAr45_o4J-4ejKWrgM,216
63
- bluer_options/string/functions.py,sha256=ogHO3Yee365CE_LIM2gwdQYQKFzPJ5z-rDTdoOIOOUg,7939
63
+ bluer_options/string/functions.py,sha256=Z8_9F-4_KescGQgNBsRVHU7S1UtYrlV_kMJPwcvha3A,8038
64
64
  bluer_options/terminal/__init__.py,sha256=kyNhbC5NVCuqrUhbbTeAOTW1ZO7MRRbi0RtXGBFKtJc,73
65
65
  bluer_options/terminal/__main__.py,sha256=3o465bp44c2f1KHDn4j664hpbvu8wKOwQ2c1OPoa6Xc,902
66
66
  bluer_options/terminal/functions.py,sha256=A23uHLeU4JIctmecOFk_KhIfOeHu-WMjnSzBj2KiF3U,1947
67
67
  bluer_options/timing/__init__.py,sha256=CCIJKvRVdimLdk46WOc_C-t8HHTVFPdGxQTFCFrN5zc,127
68
68
  bluer_options/timing/classes.py,sha256=6savdv6s_2IJaGvTzHK_umeu51Qoj4JCJc_Ey4WEAyY,3795
69
69
  bluer_options/timing/elapsed_timer.py,sha256=ecM11nzXnoDL_k6p41YPH28-OLnYreg_CgPQlbv4mjI,897
70
- bluer_options-5.183.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
71
- bluer_options-5.183.1.dist-info/METADATA,sha256=T6AsS-z55DTuKIxy0BweorXR0kYIkjkaWAfutY6VBwY,4951
72
- bluer_options-5.183.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
73
- bluer_options-5.183.1.dist-info/top_level.txt,sha256=yw9slt8n3R7IiYmf83OtHtB8Z-EgP9UwyQTk1EGiAJU,14
74
- bluer_options-5.183.1.dist-info/RECORD,,
70
+ bluer_options-5.187.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
71
+ bluer_options-5.187.1.dist-info/METADATA,sha256=BH41KlDi9gqOZyia3V-9qteKV44OFMZpu8cJjYPmFYA,4951
72
+ bluer_options-5.187.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
73
+ bluer_options-5.187.1.dist-info/top_level.txt,sha256=yw9slt8n3R7IiYmf83OtHtB8Z-EgP9UwyQTk1EGiAJU,14
74
+ bluer_options-5.187.1.dist-info/RECORD,,