radboy 0.0.804__py3-none-any.whl → 0.0.806__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 radboy might be problematic. Click here for more details.

radboy/DB/GEMINI.py ADDED
@@ -0,0 +1,146 @@
1
+ '''Everything in this file is generated by an AI, not me'''
2
+
3
+ import math
4
+ from typing import Optional
5
+
6
+ class GEMINI_SequencePredictor:
7
+ """
8
+ Analyzes the specific sequence [1.25, 3, 4, 5, 7, 10, ..., 20].
9
+
10
+ The class generates the full finite sequence and provides a method to find
11
+ the next value in the sequence based on an arbitrary input 'x', including
12
+ extrapolation if 'x' exceeds the defined sequence limit (20.0).
13
+ """
14
+ def __init__(self):
15
+ """
16
+ Generates the complete sequence, which is stored internally.
17
+ The pattern: differences increase by 1 (+1, +2, +3, ...) starting
18
+ from the 4th term (5), and the sequence is capped at 20.
19
+ """
20
+ # 1. Initialize with the known starting numbers
21
+ sequence: list[float] = [1.25, 3.0, 4.0]
22
+ current_value = 4.0
23
+ difference = 1 # Initial difference for the pattern (4 + 1 = 5)
24
+
25
+ # 2. Loop to apply the increasing difference pattern up to the limit 20
26
+ while True:
27
+ next_value = current_value + difference
28
+
29
+ # Check the stopping condition: 20 must be the final number.
30
+ if next_value >= 20.0:
31
+ # If 20 is not already the last element, add it and stop.
32
+ if sequence[-1] != 20.0:
33
+ sequence.append(20.0)
34
+ break
35
+ else:
36
+ # Add the number and increment the difference for the next step.
37
+ sequence.append(next_value)
38
+ current_value = next_value
39
+ difference += 1
40
+
41
+ # The final sequence: [1.25, 3.0, 4.0, 5.0, 7.0, 10.0, 14.0, 19.0, 20.0]
42
+ self.sequence = sequence
43
+ # Store the state for extrapolation: The last natural pattern step was 19.0,
44
+ # and the next difference *should* be 6.
45
+ self.last_natural_term = 19.0
46
+ self.next_difference_start = 6.0
47
+
48
+ print(f"Generated Finite Sequence: {self.sequence}")
49
+
50
+ def _extrapolate_next_value(self, input_x: float) -> float:
51
+ """
52
+ Handles the case where input_x > 20.0 by continuing the sequence pattern
53
+ (difference +1) until the predicted term is greater than input_x.
54
+ """
55
+ current_val = self.last_natural_term
56
+ difference = self.next_difference_start
57
+
58
+ while True:
59
+ next_val = current_val + difference
60
+
61
+ if next_val > input_x:
62
+ # This is the next theoretical sequence number that follows input_x
63
+ print(f"(Extrapolated Anchor: {current_val} with Diff {difference}, Prediction: {next_val})")
64
+ return next_val
65
+
66
+ current_val = next_val
67
+ difference += 1.0
68
+
69
+ def get_next_sequence_value(self, input_x: float) -> float:
70
+ """
71
+ Finds the closest match 'c' to 'input_x' in the sequence and returns
72
+ the next value. If 'input_x' is greater than 20.0, it extrapolates the
73
+ sequence pattern to find the prediction.
74
+
75
+ Args:
76
+ input_x (float): The user's arbitrary input number.
77
+
78
+ Returns:
79
+ float: The next value in the sequence after the anchor point.
80
+ """
81
+ # --- CASE 1: INPUT EXCEEDS THE FINITE SEQUENCE LIMIT (20.0) ---
82
+ if input_x > 20.0:
83
+ print(f"Input {input_x} exceeds the sequence limit (20.0). Entering extrapolation mode.")
84
+ return self._extrapolate_next_value(input_x)
85
+
86
+ # --- CASE 2: INPUT IS WITHIN THE FINITE SEQUENCE (<= 20.0) ---
87
+
88
+ anchor_index = 0
89
+ min_difference = abs(input_x - self.sequence[0])
90
+
91
+ # 1. Find the Anchor Point (closest match in the sequence)
92
+ for i, number in enumerate(self.sequence):
93
+ current_difference = abs(input_x - number)
94
+
95
+ # Tie-breaker logic: Use "<=" to favor the larger number.
96
+ if current_difference < min_difference:
97
+ min_difference = current_difference
98
+ anchor_index = i
99
+ elif current_difference == min_difference:
100
+ # Explicitly ensure the larger value is chosen in case of a tie
101
+ if number > self.sequence[anchor_index]:
102
+ anchor_index = i
103
+
104
+ # 2. Determine the Next Value
105
+
106
+ anchor_value = self.sequence[anchor_index]
107
+ print(f"Input {input_x} anchors at {anchor_value} (Index {anchor_index}).")
108
+
109
+ # If the anchor is the last element (20.0), return 20.0 as the "next"
110
+ # since the finite list ends here.
111
+ if anchor_index == len(self.sequence) - 1:
112
+ print("Anchor is the final term. Returning the final term.")
113
+ return anchor_value
114
+ else:
115
+ # Otherwise, return the element at the next index
116
+ next_value = self.sequence[anchor_index + 1]
117
+ return next_value
118
+
119
+ # --- Example Usage ---
120
+ '''
121
+ if __name__ == "__main__":
122
+ predictor = SequencePredictor()
123
+ print("\n--- Next Value Predictions ---")
124
+
125
+ # Example 1: Standard case (Input 7.0)
126
+ input1 = 7.0
127
+ next1 = predictor.get_next_sequence_value(input1)
128
+ print(f"Next value after {input1} is: {next1}\n") # Expected: 10.0 (Anchors at 7.0)
129
+
130
+ # Example 2: Extrapolation Case 1 (Input 21.0 > 20.0)
131
+ # Theoretical sequence continues: 19 + 6 = 25. Since 25 > 21, the prediction is 25.
132
+ input2 = 21.0
133
+ next2 = predictor.get_next_sequence_value(input2)
134
+ print(f"Next value after {input2} is: {next2}\n") # Expected: 25.0
135
+
136
+ # Example 3: Extrapolation Case 2 (Input 26.0)
137
+ # Theoretical sequence continues: 19 + 6 = 25. 25 < 26. Next step: 25 + 7 = 32.
138
+ input3 = 26.0
139
+ next3 = predictor.get_next_sequence_value(input3)
140
+ print(f"Next value after {input3} is: {next3}\n") # Expected: 32.0
141
+
142
+ # Example 4: Edge Case (Input 19.5 - Closest to 20.0)
143
+ input4 = 19.5
144
+ next4 = predictor.get_next_sequence_value(input4)
145
+ print(f"Next value after {input4} is: {next4}\n") # Expected: 20.0 (Anchors at 20.0)
146
+ '''
radboy/TasksMode/Tasks.py CHANGED
@@ -51,6 +51,8 @@ from radboy.DB.SimpleScanner import SimpleScanner
51
51
  from radboy.DB.NW.NetWorth import *
52
52
  from decimal import Decimal as DEC
53
53
  from radboy.DB.lsToday import *
54
+ from radboy.DB.GEMINI import *
55
+
54
56
  def today():
55
57
  dt=datetime.now()
56
58
  return date(dt.year,dt.month,dt.day)
@@ -904,6 +906,35 @@ SALES TAX ON APPLICABLE TANGIBLE ITEMS = (PRICE + CRV) * TTL TAX RATE
904
906
  print(e)
905
907
  return result
906
908
 
909
+ def dollar_tree_multiprices_GEMINI():
910
+ zta=GEMINI_SequencePredictor()
911
+ prices=list(set([zta.get_next_sequence_value(i) for i in range(-5,20)]))
912
+ prices.insert(0,1.25)
913
+ htext=[]
914
+ cta=len(prices)
915
+ for num,i in enumerate(prices):
916
+ htext.append(std_colorize(i,num,cta))
917
+
918
+ htext='\n'.join(htext)
919
+ while True:
920
+ try:
921
+ print(htext)
922
+ idx=Control(func=FormBuilderMkText,ptext=f"which price's index[0({Fore.orange_red_1}d=default{Fore.light_yellow})]?",helpText=f"{htext}\nan integer between 0 and {cta-1}",data="integer")
923
+ if idx is None:
924
+ return None
925
+ elif idx in ['d',]:
926
+ return prices[0]
927
+
928
+ if idx in range(0,cta):
929
+ return prices[idx]
930
+ else:
931
+ print(f"{Fore.orange_red_1}use a number within 0-{cta-1}!")
932
+ continue
933
+
934
+ except Exception as e:
935
+ print(e)
936
+ return result
937
+
907
938
  def tax_rate_from_oldPriceAndNewPrice():
908
939
  result=None
909
940
  print('tax_rate_from_oldPriceAndNewPrice()')
@@ -993,6 +1024,11 @@ SALES TAX ON APPLICABLE TANGIBLE ITEMS = (PRICE + CRV) * TTL TAX RATE
993
1024
  'desc':f'{Fore.light_yellow}Dollar($tree) Tree {Fore.medium_violet_red}multi-price selector{Style.reset}',
994
1025
  'exec':dollar_tree_multiprices
995
1026
  },
1027
+ f'{uuid1()}':{
1028
+ 'cmds':generate_cmds(startcmd=['dt g','dollar tree gemini','$tree gmni','dollar-tree-gemini'],endCmd=['prcs','prices','prces','mpc',]),
1029
+ 'desc':f'{Fore.light_yellow}Dollar($tree) Tree {Fore.medium_violet_red}multi-price selector ; {Fore.orange_red_1}This bit was generated using GOOGLE GEMINI.{Style.reset}',
1030
+ 'exec':dollar_tree_multiprices_GEMINI
1031
+ },
996
1032
  f'{uuid1()}':{
997
1033
  'cmds':generate_cmds(startcmd=['salary','sal','slry'],endCmd=['2hours','2hr','tohr','tohour','-hour','-hr']),
998
1034
  'desc':f'{Fore.light_yellow}Annual Salary{Fore.medium_violet_red} from hourly wage rate and hours worked{Style.reset}',
@@ -3120,15 +3156,17 @@ so use {Fore.orange_red_1}ls-lq/ls Shelf {Fore.light_yellow}from {Fore.light_mag
3120
3156
  new_image=detectGetOrSet("list maker new item new image default",False,setValue=False,literal=False)
3121
3157
  ask_taxes=detectGetOrSet("list maker new item taxes default",False,setValue=False,literal=False)
3122
3158
  use_search=detectGetOrSet("list maker new item search default",False,setValue=False,literal=False)
3123
-
3159
+ one_shot=detectGetOrSet("list maker one shot default",False,setValue=False,literal=False)
3124
3160
  auto_text=f" [a,auto] use current settings and set defaults for any unset settings from system storage."
3125
3161
  m=f'{Fore.orange_red_1}INIT({ready}){Fore.light_yellow} -> '
3126
3162
  #names that are not always necessary
3127
3163
  if not auto:
3128
- use_name=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a"],PassThru=True),ptext=f"{m}Ask for Entry {Fore.cyan}Name{Fore.light_yellow} For New Items? [y({Fore.orange_red_1}d=default{Fore.light_yellow})/N]",helpText=f"a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False; {auto_text}",data="boolean")
3164
+ use_name=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a","o","oneshot","1shot"],PassThru=True),ptext=f"{m}Ask for Entry {Fore.cyan}Name{Fore.light_yellow} For New Items? [y({Fore.orange_red_1}d=default{Fore.light_yellow})/N]",helpText=f"a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False; {auto_text}",data="boolean")
3129
3165
  if use_name in [None,]:
3130
3166
  return
3131
- elif use_name in ['a','auto']:
3167
+ elif use_name in ["auto","a","o","oneshot","1shot"]:
3168
+ if use_name in ["o","oneshot","1shot"]:
3169
+ one_shot=True
3132
3170
  auto=True
3133
3171
  elif use_name in [False,]:
3134
3172
  use_name=False
@@ -3137,14 +3175,17 @@ so use {Fore.orange_red_1}ls-lq/ls Shelf {Fore.light_yellow}from {Fore.light_mag
3137
3175
 
3138
3176
 
3139
3177
 
3178
+
3140
3179
  if not auto:
3141
3180
  ready+=1
3142
3181
  m=f'{Fore.orange_red_1}INIT({ready}){Fore.light_yellow} -> '
3143
3182
  #extras that are not always necessary
3144
- use_code=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a"],PassThru=True),ptext=f"{m}Ask for Entry {Fore.cyan}Codes{Fore.light_yellow} For New Items? [y/N({Fore.orange_red_1}d=default{Fore.light_yellow})]",helpText=f"a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False; {auto_text}",data="boolean")
3183
+ use_code=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a","o","oneshot","1shot"],PassThru=True),ptext=f"{m}Ask for Entry {Fore.cyan}Codes{Fore.light_yellow} For New Items? [y/N({Fore.orange_red_1}d=default{Fore.light_yellow})]",helpText=f"a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False; {auto_text}",data="boolean")
3145
3184
  if use_code in [None,]:
3146
3185
  return
3147
- elif use_code in ['a','auto']:
3186
+ elif use_code in ["auto","a","o","oneshot","1shot"]:
3187
+ if use_code in ["o","oneshot","1shot"]:
3188
+ one_shot=True
3148
3189
  auto=True
3149
3190
  elif use_code in ['d',False,]:
3150
3191
  use_code=False
@@ -3155,10 +3196,12 @@ so use {Fore.orange_red_1}ls-lq/ls Shelf {Fore.light_yellow}from {Fore.light_mag
3155
3196
  ready+=1
3156
3197
  m=f'{Fore.orange_red_1}INIT({ready}){Fore.light_yellow} -> '
3157
3198
  #extras that are not always necessary
3158
- use_search=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a"],PassThru=True),ptext=f"{m}ask to search for {Fore.cyan}Entry{Fore.light_yellow} For New Items? [y/N({Fore.orange_red_1}d=default{Fore.light_yellow})]",helpText=f"a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False; {auto_text}",data="boolean")
3199
+ use_search=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a","o","oneshot","1shot"],PassThru=True),ptext=f"{m}ask to search for {Fore.cyan}Entry{Fore.light_yellow} For New Items? [y/N({Fore.orange_red_1}d=default{Fore.light_yellow})]",helpText=f"a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False; {auto_text}",data="boolean")
3159
3200
  if use_search in [None,]:
3160
3201
  return
3161
- elif use_search in ['a','auto']:
3202
+ elif use_search in ["auto","a","o","oneshot","1shot"]:
3203
+ if use_search in ["o","oneshot","1shot"]:
3204
+ one_shot=True
3162
3205
  auto=True
3163
3206
  elif use_search in ['d',False,]:
3164
3207
  use_search=False
@@ -3169,10 +3212,12 @@ so use {Fore.orange_red_1}ls-lq/ls Shelf {Fore.light_yellow}from {Fore.light_mag
3169
3212
  ready+=1
3170
3213
  m=f'{Fore.orange_red_1}INIT({ready}){Fore.light_yellow} -> '
3171
3214
  #names that are not always necessary
3172
- use_casecount=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a"],PassThru=True),ptext=f"{m}Ask for Entry {Fore.cyan}CaseCount{Fore.light_yellow} For New Items? [y/N({Fore.orange_red_1}d=default{Fore.light_yellow})]",helpText=f"a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False; {auto_text}",data="boolean")
3215
+ use_casecount=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a","o","oneshot","1shot"],PassThru=True),ptext=f"{m}Ask for Entry {Fore.cyan}CaseCount{Fore.light_yellow} For New Items? [y/N({Fore.orange_red_1}d=default{Fore.light_yellow})]",helpText=f"a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False; {auto_text}",data="boolean")
3173
3216
  if use_casecount in [None,]:
3174
3217
  return
3175
- elif use_casecount in ['a','auto']:
3218
+ elif use_casecount in ["auto","a","o","oneshot","1shot"]:
3219
+ if use_casecount in ["o","oneshot","1shot"]:
3220
+ one_shot=True
3176
3221
  auto=True
3177
3222
  elif use_casecount in ['d',False]:
3178
3223
  use_casecount=False
@@ -3183,10 +3228,12 @@ so use {Fore.orange_red_1}ls-lq/ls Shelf {Fore.light_yellow}from {Fore.light_mag
3183
3228
  ready+=1
3184
3229
  m=f'{Fore.orange_red_1}INIT({ready}){Fore.light_yellow} -> '
3185
3230
  #extras that are not always necessary
3186
- use_price=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a"],PassThru=True),ptext=f"{m}Ask for Entry {Fore.cyan}Price{Fore.light_yellow} For New Items? [y({Fore.orange_red_1}d=default{Fore.light_yellow})/N]",helpText=f"a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False; {auto_text}",data="boolean")
3231
+ use_price=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a","o","oneshot","1shot"],PassThru=True),ptext=f"{m}Ask for Entry {Fore.cyan}Price{Fore.light_yellow} For New Items? [y({Fore.orange_red_1}d=default{Fore.light_yellow})/N]",helpText=f"a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False; {auto_text}",data="boolean")
3187
3232
  if use_price in [None,]:
3188
3233
  return
3189
- elif use_price in ['a','auto']:
3234
+ elif use_price in ["auto","a","o","oneshot","1shot"]:
3235
+ if use_price in ["o","oneshot","1shot"]:
3236
+ one_shot=True
3190
3237
  auto=True
3191
3238
  elif use_price in [False,]:
3192
3239
  use_price=False
@@ -3197,10 +3244,12 @@ so use {Fore.orange_red_1}ls-lq/ls Shelf {Fore.light_yellow}from {Fore.light_mag
3197
3244
  ready+=1
3198
3245
  m=f'{Fore.orange_red_1}INIT({ready}){Fore.light_yellow} -> '
3199
3246
  #extras that are not always necessary
3200
- use_notes=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a"],PassThru=True),ptext=f"{m}Ask for Entry {Fore.cyan}Notes{Fore.light_yellow} For New Items? [y/N({Fore.orange_red_1}d=default{Fore.light_yellow})]",helpText=f"a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False; {auto_text}",data="boolean")
3247
+ use_notes=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a","o","oneshot","1shot"],PassThru=True),ptext=f"{m}Ask for Entry {Fore.cyan}Notes{Fore.light_yellow} For New Items? [y/N({Fore.orange_red_1}d=default{Fore.light_yellow})]",helpText=f"a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False; {auto_text}",data="boolean")
3201
3248
  if use_notes in [None,]:
3202
3249
  return
3203
- elif use_notes in ['a','auto']:
3250
+ elif use_notes in ["auto","a","o","oneshot","1shot"]:
3251
+ if use_notes in ["o","oneshot","1shot"]:
3252
+ one_shot=True
3204
3253
  auto=True
3205
3254
  elif use_notes in ['d',False]:
3206
3255
  use_notes=False
@@ -3210,11 +3259,13 @@ so use {Fore.orange_red_1}ls-lq/ls Shelf {Fore.light_yellow}from {Fore.light_mag
3210
3259
  if not auto:
3211
3260
  ready+=1
3212
3261
  m=f'{Fore.orange_red_1}INIT({ready}){Fore.light_yellow} -> '
3213
- default_quantity_action=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a"],PassThru=True),ptext=f"{m}Set The Default Quantity to the quantity retrieved + this value? 'd'=1",helpText="a positive(+) or Negative(-) integer.",data="float")
3262
+ default_quantity_action=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a","o","oneshot","1shot"],PassThru=True),ptext=f"{m}Set The Default Quantity to the quantity retrieved + this value? 'd'=1",helpText="a positive(+) or Negative(-) integer.",data="float")
3214
3263
 
3215
3264
  if default_quantity_action in [None,]:
3216
3265
  return
3217
- elif default_quantity_action in ['a','auto']:
3266
+ elif default_quantity_action in ["auto","a","o","oneshot","1shot"]:
3267
+ if default_quantity_action in ["o","oneshot","1shot"]:
3268
+ one_shot=True
3218
3269
  auto=True
3219
3270
  elif default_quantity_action in ['d',]:
3220
3271
  default_quantity_action=1
@@ -3222,10 +3273,12 @@ so use {Fore.orange_red_1}ls-lq/ls Shelf {Fore.light_yellow}from {Fore.light_mag
3222
3273
  if not auto:
3223
3274
  ready+=1
3224
3275
  m=f'{Fore.orange_red_1}INIT({ready}){Fore.light_yellow} -> '
3225
- barcode_might_be_number=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a"],PassThru=True),ptext=f"{m}might a barcode looking value be a number at Quantity Input [y/N]",helpText="a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False",data="boolean")
3276
+ barcode_might_be_number=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a","o","oneshot","1shot"],PassThru=True),ptext=f"{m}might a barcode looking value be a number at Quantity Input [y/N]",helpText="a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False",data="boolean")
3226
3277
  if barcode_might_be_number in [None,]:
3227
3278
  return
3228
- elif barcode_might_be_number in ['a','auto']:
3279
+ elif barcode_might_be_number in ["auto","a","o","oneshot","1shot"]:
3280
+ if barcode_might_be_number in ["o","oneshot","1shot"]:
3281
+ one_shot=True
3229
3282
  auto=True
3230
3283
  elif barcode_might_be_number in ['d',False]:
3231
3284
  barcode_might_be_number=False
@@ -3235,10 +3288,12 @@ so use {Fore.orange_red_1}ls-lq/ls Shelf {Fore.light_yellow}from {Fore.light_mag
3235
3288
  if not auto:
3236
3289
  ready+=1
3237
3290
  m=f'{Fore.orange_red_1}INIT({ready}){Fore.light_yellow} -> '
3238
- new_image=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a"],PassThru=True),ptext=f"{m}ask for new image path{Fore.light_yellow} For New Items? [y/N({Fore.orange_red_1}d=default{Fore.light_yellow})]",helpText="a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False",data="boolean")
3291
+ new_image=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a","o","oneshot","1shot"],PassThru=True),ptext=f"{m}ask for new image path{Fore.light_yellow} For New Items? [y/N({Fore.orange_red_1}d=default{Fore.light_yellow})]",helpText="a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False",data="boolean")
3239
3292
  if new_image in [None,]:
3240
3293
  return
3241
- elif new_image in ['a','auto']:
3294
+ elif new_image in ["auto","a","o","oneshot","1shot"]:
3295
+ if new_image in ["o","oneshot","1shot"]:
3296
+ one_shot=True
3242
3297
  auto=True
3243
3298
  elif new_image in ['d',False]:
3244
3299
  new_image=False
@@ -3248,10 +3303,12 @@ so use {Fore.orange_red_1}ls-lq/ls Shelf {Fore.light_yellow}from {Fore.light_mag
3248
3303
  if not auto:
3249
3304
  ready+=1
3250
3305
  m=f'{Fore.orange_red_1}INIT({ready}){Fore.light_yellow} -> '
3251
- ask_taxes=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a"],PassThru=True),ptext=f"{m}check if you want to fill out tax data{Fore.light_yellow} For New Items? [y({Fore.orange_red_1}d=default{Fore.light_yellow}/N)]",helpText="a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False",data="boolean")
3306
+ ask_taxes=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text=text,data=data,passThru=["auto","a","o","oneshot","1shot"],PassThru=True),ptext=f"{m}check if you want to fill out tax data{Fore.light_yellow} For New Items? [y({Fore.orange_red_1}d=default{Fore.light_yellow}/N)]",helpText="a boolean value from either of (0,f,n,no,false,False) or (1,t,true,True,yes,y) or formula that equates to a True or a False",data="boolean")
3252
3307
  if ask_taxes in [None,]:
3253
3308
  return
3254
- elif ask_taxes in ['a','auto']:
3309
+ elif ask_taxes in ["auto","a","o","oneshot","1shot"]:
3310
+ if ask_taxes in ["o","oneshot","1shot"]:
3311
+ one_shot=True
3255
3312
  auto=True
3256
3313
  elif ask_taxes in ['d',False,]:
3257
3314
  ask_taxes=False
@@ -3963,7 +4020,11 @@ Location Fields:
3963
4020
  ptext=f'''{hafnhaf}
3964
4021
  {Fore.light_red}Enter {Style.bold}{Style.underline}{Fore.orange_red_1}Quantity/Formula{Style.reset} amount|+amount|-amount|a,+a,-a(advanced)|r,+r,-r(ReParseFormula) (Enter==1)|{Fore.light_green}ipcv={Fore.dark_goldenrod}PalletCount-value[{Fore.light_steel_blue}:-){Fore.dark_goldenrod}]|{Fore.light_green}iscv={Fore.dark_goldenrod}ShelfCount-value[{Fore.light_steel_blue}:-(){Fore.dark_goldenrod}]|{Fore.light_green}ilcv={Fore.dark_goldenrod}LoadCount-value[{Fore.light_steel_blue};-){Fore.dark_goldenrod}]|{Fore.light_green}iccv={Fore.dark_goldenrod}CaseCount-value[{Fore.light_steel_blue}:-P{Fore.dark_goldenrod}]|{Fore.light_green}ipcvc{Fore.dark_goldenrod}=(PalletCount-value)/CaseCount[{Fore.light_steel_blue}:-D{Fore.dark_goldenrod}]|{Fore.light_green}iscvc{Fore.dark_goldenrod}=(ShelfCount-value)/CaseCount[{Fore.light_steel_blue}:-|{Fore.dark_goldenrod}]|{Fore.light_green}ilcvc{Fore.dark_goldenrod}=(LoadCount-value)/CaseCount[{Fore.light_steel_blue}:-*{Fore.dark_goldenrod}]|{Fore.light_green}iccvc{Fore.dark_goldenrod}=(CaseCount-value)/CaseCount[{Fore.light_steel_blue}:O{Fore.dark_goldenrod}]{Style.reset}'''
3965
4022
 
3966
- p=Prompt.__init2__(None,func=mkT,ptext=f"{ptext}",helpText=self.helpText_barcodes.replace('#CODE#',code_log),data=code,qc=lambda self=self,code=code:self.NewEntryMenu(code=code),replace_ptext=lambda result=result,fieldname=fieldname,code=code:hnf(resultx=result,fieldname=fieldname,code=code))
4023
+ if not one_shot:
4024
+ p=Prompt.__init2__(None,func=mkT,ptext=f"{ptext}",helpText=self.helpText_barcodes.replace('#CODE#',code_log),data=code,qc=lambda self=self,code=code:self.NewEntryMenu(code=code),replace_ptext=lambda result=result,fieldname=fieldname,code=code:hnf(resultx=result,fieldname=fieldname,code=code))
4025
+ else:
4026
+ p=int(detectGetOrSet("list maker oneshot qty dflt",1,setValue=False,literal=False)),f'+{detectGetOrSet("list maker oneshot qty dflt",1,setValue=False,literal=False)}',''
4027
+ #float(1),text,''
3967
4028
  if self.next_barcode():
3968
4029
  continue
3969
4030
  if p in [None,]:
radboy/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION='0.0.804'
1
+ VERSION='0.0.806'
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radboy
3
- Version: 0.0.804
3
+ Version: 0.0.806
4
4
  Summary: A Retail Calculator for Android/Linux
5
5
  Author: Carl Joseph Hirner III
6
6
  Author-email: Carl Hirner III <k.j.hirner.wisdom@gmail.com>
@@ -5,7 +5,7 @@ radboy/Holidays.txt,sha256=y-JZPihh5iaWKxMIHNXD39yVuVmf1vMs4FdNDcg0f1Y,3114
5
5
  radboy/InventoryGlossary.txt,sha256=018-Yqca6DFb10jPdkUY-5qhkRlQN1k3rxoTaERQ-LA,91008
6
6
  radboy/RecordMyCodes.py,sha256=h30zoTqt-XLt_afDPlxMxBiKKwmKi3N-yAuldNCqXUo,41476
7
7
  radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
8
- radboy/__init__.py,sha256=0HJcNwPUN695SxSFk8TMqlhBbyE1n2FRsanLCIq56Tw,17
8
+ radboy/__init__.py,sha256=LUDAFYzhZ2L9T3DqORKKF4zG74U_PiEHL4Z2W7ep_DI,17
9
9
  radboy/api_key,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  radboy/case-export-2024-05-14-13-10-00.672971.xlsx,sha256=Wd592d_VLFmfUI9KKKSVjNwjV91euc1T7ATyvwvUhlg,5431
11
11
  radboy/case-export-2024-05-14-13-13-22.540614.xlsx,sha256=OnGrhmScHfGp_mVaWW-LNMsqrQgyZDpiU3wV-2s3U5Q,5556
@@ -83,6 +83,7 @@ radboy/DB/DatePicker.py,sha256=B75mDtXQrkHRCpoU9TJsaBVvkK37ykMaJyaiqGOo4dM,18334
83
83
  radboy/DB/DisplayItemDb.py,sha256=uVvrNyFyBuKvrw-BEPXKYvfa-QWyFN5ahESi2l6vUUA,52046
84
84
  radboy/DB/EstimatedPayCalendarWorkSheet.txt,sha256=GOjRSmGxFoNTdAnpPe2kGv7CkXDrh0Mee01HslamGbo,17173
85
85
  radboy/DB/ExerciseTracker.py,sha256=hs_RG7YWFsu8KYkMe2PIKtTyxl9MzbnWXuTCXffF3K8,38219
86
+ radboy/DB/GEMINI.py,sha256=kN75rQuCkDq6IgnXTNPWyxGtRulO68qf5RdP-eJj3kc,6057
86
87
  radboy/DB/LetterWriter.py,sha256=0B14GB-hJK2Xf_TFASriOELFygiI1LwkSb__R3tUiU0,2631
87
88
  radboy/DB/OrderedAndRxd.py,sha256=v_vrTOiTDhKqT5KErK6MOG_u4Nt7ug2MoLTHvAnm88M,19450
88
89
  radboy/DB/PayDay.py,sha256=H2kPGvBCDkMOz7lbxQhYtUt_oAInpxi37Q6MFrah98I,8710
@@ -356,7 +357,7 @@ radboy/SystemSettings/__pycache__/__init__.cpython-312.pyc,sha256=aIzp4Po0t8EhSA
356
357
  radboy/SystemSettings/__pycache__/__init__.cpython-313.pyc,sha256=QFDuoidxMWsGVLsy5lN-rDs6TP8nKJ4yyCyiamNOhwo,156
357
358
  radboy/TasksMode/ReFormula.py,sha256=REDRJYub-OEOE6g14oRQOLOQwv8pHqVJy4NQk3CCM90,2255
358
359
  radboy/TasksMode/SetEntryNEU.py,sha256=mkV9zAZe0lfpu_3coMuIILEzh6PgCNi7g9lJ4yDUpYM,20596
359
- radboy/TasksMode/Tasks.py,sha256=bKINtfQfMp8SqIe8zhgqVG8ZtqB-IAGw0zFDq4my6Go,377417
360
+ radboy/TasksMode/Tasks.py,sha256=4j3OGM-s-Vg63HbEX2CnAarzKcFv475_hljXBZA_El4,381079
360
361
  radboy/TasksMode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
361
362
  radboy/TasksMode/__pycache__/ReFormula.cpython-311.pyc,sha256=QEG3PwVw-8HTd_Mf9XbVcxU56F1fC9yBqWXYPLC39DU,4865
362
363
  radboy/TasksMode/__pycache__/ReFormula.cpython-312.pyc,sha256=aX7BWm2PPjCTnxsbGUitR-2h9hq4AjaBiHMrUXvIl0Y,3967
@@ -365,7 +366,7 @@ radboy/TasksMode/__pycache__/SetEntryNEU.cpython-312.pyc,sha256=pCdFj61aPKkHL6Sv
365
366
  radboy/TasksMode/__pycache__/SetEntryNEU.cpython-313.pyc,sha256=jMSrUX9pvEhf67uVwrPE2ZlBCems8V7tHJ1LcC15ovU,24603
366
367
  radboy/TasksMode/__pycache__/Tasks.cpython-311.pyc,sha256=6QOTJnLiXSKdF81hkhy3vyrz49PPhS20s5_0X52g3Hw,131120
367
368
  radboy/TasksMode/__pycache__/Tasks.cpython-312.pyc,sha256=hyJwdaYaaRLdcrNxgg36diJ5iijX5_3I0UAORsj-6LU,310295
368
- radboy/TasksMode/__pycache__/Tasks.cpython-313.pyc,sha256=R3G5CSokMjE9zcpPe0PPKAAIc8HH7Cpx53BvRTwjf2M,451997
369
+ radboy/TasksMode/__pycache__/Tasks.cpython-313.pyc,sha256=p33x1LWn97JFHcnaeqpAx3gejYT25Q5i_80H7qCxqbY,454684
369
370
  radboy/TasksMode/__pycache__/__init__.cpython-311.pyc,sha256=PKV1JbihEacm639b53bZozRQvcllSkjGP3q8STVMxF4,234
370
371
  radboy/TasksMode/__pycache__/__init__.cpython-312.pyc,sha256=ERgnEvRMiGSecWp1BpNzLdSq_SdKw7GvFWUvUM7bLVw,272
371
372
  radboy/TasksMode/__pycache__/__init__.cpython-313.pyc,sha256=lvsTxukyvGKB3C0rdF9dQi_bvVh6ceDVINfwcuIsd0s,151
@@ -412,7 +413,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
412
413
  radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
413
414
  radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
414
415
  radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
415
- radboy/__pycache__/__init__.cpython-313.pyc,sha256=bFup5sr-K2_0yGslk_Wa144z_IocvNg3FNuXWU2qfc8,165
416
+ radboy/__pycache__/__init__.cpython-313.pyc,sha256=kMG1ClFxW3TIUbSY1sWrkqDu9DLix6d3-Ici6Cgugmg,165
416
417
  radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
417
418
  radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
418
419
  radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
@@ -440,7 +441,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
440
441
  radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
441
442
  radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
442
443
  radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
443
- radboy-0.0.804.dist-info/METADATA,sha256=ZiFhZ2t8h8ASiI_OqLsi7NLRTTGB77byYIKWLQXU_94,1920
444
- radboy-0.0.804.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
445
- radboy-0.0.804.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
446
- radboy-0.0.804.dist-info/RECORD,,
444
+ radboy-0.0.806.dist-info/METADATA,sha256=dR5EI49_jQSytU2s12xnHHed2IjLFtx1PdMZdQ7mF6c,1920
445
+ radboy-0.0.806.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
446
+ radboy-0.0.806.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
447
+ radboy-0.0.806.dist-info/RECORD,,