bluer-options 5.157.1__tar.gz → 5.162.1__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.

Potentially problematic release.


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

Files changed (78) hide show
  1. {bluer_options-5.157.1/bluer_options.egg-info → bluer_options-5.162.1}/PKG-INFO +1 -1
  2. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/list.sh +7 -0
  3. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/__init__.py +1 -1
  4. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/list/__main__.py +5 -1
  5. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/timer.py +15 -0
  6. {bluer_options-5.157.1 → bluer_options-5.162.1/bluer_options.egg-info}/PKG-INFO +1 -1
  7. {bluer_options-5.157.1 → bluer_options-5.162.1}/LICENSE +0 -0
  8. {bluer_options-5.157.1 → bluer_options-5.162.1}/MANIFEST.in +0 -0
  9. {bluer_options-5.157.1 → bluer_options-5.162.1}/README.md +0 -0
  10. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/alias.sh +0 -0
  11. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/assert.sh +0 -0
  12. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/bluer_options.sh +0 -0
  13. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/bool.sh +0 -0
  14. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/browse.sh +0 -0
  15. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/code.sh +0 -0
  16. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/env/backup.sh +0 -0
  17. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/env/dot/cat.sh +0 -0
  18. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/env/dot/cp.sh +0 -0
  19. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/env/dot/edit.sh +0 -0
  20. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/env/dot/load.sh +0 -0
  21. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/env/dot/seed.sh +0 -0
  22. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/env/dot.sh +0 -0
  23. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/env.sh +0 -0
  24. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/eval.sh +0 -0
  25. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/generic_task.sh +0 -0
  26. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/help.sh +0 -0
  27. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/install.sh +0 -0
  28. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/logging.sh +0 -0
  29. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/open.sh +0 -0
  30. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/options.sh +0 -0
  31. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/pause.sh +0 -0
  32. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/plugins.sh +0 -0
  33. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/pylint.sh +0 -0
  34. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/pytest.sh +0 -0
  35. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/repeat.sh +0 -0
  36. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/seed.sh +0 -0
  37. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/sleep.sh +0 -0
  38. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/source.sh +0 -0
  39. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/string.sh +0 -0
  40. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/terminal.sh +0 -0
  41. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/test.sh +0 -0
  42. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/wait.sh +0 -0
  43. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/.bash/watch.sh +0 -0
  44. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/__main__.py +0 -0
  45. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/assets/example1.sh +0 -0
  46. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/config.env +0 -0
  47. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/elapsed_timer.py +0 -0
  48. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/env/__init__.py +0 -0
  49. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/env/functions.py +0 -0
  50. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/help/__init__.py +0 -0
  51. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/help/__main__.py +0 -0
  52. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/help/functions.py +0 -0
  53. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/help/parsing.py +0 -0
  54. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/host/__init__.py +0 -0
  55. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/host/__main__.py +0 -0
  56. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/host/functions.py +0 -0
  57. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/list/__init__.py +0 -0
  58. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/logger/__init__.py +0 -0
  59. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/logger/config.py +0 -0
  60. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/options/__init__.py +0 -0
  61. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/options/__main__.py +0 -0
  62. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/options/classes.py +0 -0
  63. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/string/__init__.py +0 -0
  64. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/string/__main__.py +0 -0
  65. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/string/constants.py +0 -0
  66. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/string/functions.py +0 -0
  67. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/terminal/__init__.py +0 -0
  68. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/terminal/__main__.py +0 -0
  69. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/terminal/functions.py +0 -0
  70. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options/urls.py +0 -0
  71. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options.egg-info/SOURCES.txt +0 -0
  72. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options.egg-info/dependency_links.txt +0 -0
  73. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options.egg-info/requires.txt +0 -0
  74. {bluer_options-5.157.1 → bluer_options-5.162.1}/bluer_options.egg-info/top_level.txt +0 -0
  75. {bluer_options-5.157.1 → bluer_options-5.162.1}/pyproject.toml +0 -0
  76. {bluer_options-5.157.1 → bluer_options-5.162.1}/requirements.txt +0 -0
  77. {bluer_options-5.157.1 → bluer_options-5.162.1}/setup.cfg +0 -0
  78. {bluer_options-5.157.1 → bluer_options-5.162.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bluer_options
3
- Version: 5.157.1
3
+ Version: 5.162.1
4
4
  Summary: 🌀 Options for Bash.
5
5
  Home-page: https://github.com/kamangir/bluer-options
6
6
  Author: Arash Abadpour (Kamangir)
@@ -85,6 +85,13 @@ function bluer_ai_list_resize() {
85
85
  "${@:3}"
86
86
  }
87
87
 
88
+ function bluer_ai_list_reverse() {
89
+ python3 -m bluer_options.list \
90
+ reverse \
91
+ --items "$1" \
92
+ "${@:2}"
93
+ }
94
+
88
95
  function bluer_ai_list_sort() {
89
96
  python3 -m bluer_options.list \
90
97
  sort \
@@ -6,7 +6,7 @@ ICON = "🌀"
6
6
 
7
7
  DESCRIPTION = f"{ICON} Options for Bash."
8
8
 
9
- VERSION = "5.157.1"
9
+ VERSION = "5.162.1"
10
10
 
11
11
  REPO_NAME = "bluer-options"
12
12
 
@@ -7,7 +7,9 @@ from bluer_options.logger.config import logger
7
7
 
8
8
  NAME = module.name(__file__, NAME)
9
9
 
10
- LIST_OF_TASKS = "filter|in|intersect|item|len|log|next|nonempty|prev|resize|sort"
10
+ LIST_OF_TASKS = (
11
+ "filter|in|intersect|item|len|log|next|nonempty|prev|resize|reverse|sort"
12
+ )
11
13
 
12
14
  parser = argparse.ArgumentParser(NAME)
13
15
  parser.add_argument(
@@ -146,6 +148,8 @@ elif args.task == "prev":
146
148
  print(prev_item)
147
149
  elif args.task == "resize":
148
150
  print(delim.join(list_of_items[: args.count] if args.count >= 0 else list_of_items))
151
+ elif args.task == "reverse":
152
+ print(delim.join(list_of_items[::-1]))
149
153
  elif args.task == "sort":
150
154
  if args.unique:
151
155
  list_of_items = list(set(list_of_items))
@@ -1,5 +1,7 @@
1
1
  import time
2
+
2
3
  from bluer_options import string
4
+ from bluer_options.logger import logger
3
5
 
4
6
 
5
7
  class Timer:
@@ -7,6 +9,7 @@ class Timer:
7
9
  self,
8
10
  period: int,
9
11
  name: str,
12
+ log: bool = False,
10
13
  ):
11
14
  self.count = 0
12
15
  self.hot = False
@@ -15,6 +18,18 @@ class Timer:
15
18
  self.name = name
16
19
  self.start_time = time.time()
17
20
 
21
+ if log:
22
+ logger.info(
23
+ "{}: {} every {}.".format(
24
+ self.__class__.__name__,
25
+ name,
26
+ string.pretty_duration(
27
+ period,
28
+ include_ms=True,
29
+ ),
30
+ )
31
+ )
32
+
18
33
  def reset(self):
19
34
  self.hot = False
20
35
  self.last_hot = time.time()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bluer_options
3
- Version: 5.157.1
3
+ Version: 5.162.1
4
4
  Summary: 🌀 Options for Bash.
5
5
  Home-page: https://github.com/kamangir/bluer-options
6
6
  Author: Arash Abadpour (Kamangir)
File without changes