radboy 0.0.771__py3-none-any.whl → 0.0.854__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.

Files changed (39) hide show
  1. radboy/Comm/RxTx.py +4 -493
  2. radboy/Comm/__pycache__/RxTx.cpython-313.pyc +0 -0
  3. radboy/CookBook/CookBook.py +4 -0
  4. radboy/DB/ExerciseTracker.py +64 -27
  5. radboy/DB/GEMINI.py +146 -0
  6. radboy/DB/Prompt.py +150 -7
  7. radboy/DB/__pycache__/ExerciseTracker.cpython-313.pyc +0 -0
  8. radboy/DB/__pycache__/Prompt.cpython-313.pyc +0 -0
  9. radboy/DB/__pycache__/db.cpython-313.pyc +0 -0
  10. radboy/DB/db.py +141 -10
  11. radboy/DayLog/DayLogger.py +1 -1
  12. radboy/DayLog/__pycache__/DayLogger.cpython-313.pyc +0 -0
  13. radboy/FB/FBMTXT.py +48 -1
  14. radboy/FB/__pycache__/FBMTXT.cpython-313.pyc +0 -0
  15. radboy/HowDoYouDefineMe/CoreEmotions.py +268 -9
  16. radboy/Lookup2/Lookup2.py +31 -1
  17. radboy/Lookup2/__pycache__/Lookup2.cpython-313.pyc +0 -0
  18. radboy/RNE/RNE.py +7 -0
  19. radboy/RNE/__pycache__/RNE.cpython-313.pyc +0 -0
  20. radboy/TasksMode/SetEntryNEU.py +16 -2
  21. radboy/TasksMode/Tasks.py +546 -101
  22. radboy/TasksMode/__pycache__/SetEntryNEU.cpython-313.pyc +0 -0
  23. radboy/TasksMode/__pycache__/Tasks.cpython-313.pyc +0 -0
  24. radboy/Unified/BACKUP.py +443 -0
  25. radboy/Unified/Unified.py +2 -321
  26. radboy/Unified/__pycache__/Unified.cpython-313.pyc +0 -0
  27. radboy/Unified/__pycache__/bareCA.cpython-313.pyc +0 -0
  28. radboy/Unified/__pycache__/clearalll.cpython-313.pyc +0 -0
  29. radboy/Unified/bareCA.py +26 -2
  30. radboy/Unified/clearalll.py +6 -0
  31. radboy/__init__.py +1 -1
  32. radboy/__pycache__/__init__.cpython-313.pyc +0 -0
  33. radboy/code.png +0 -0
  34. radboy/preloader/preloader.py +70 -0
  35. radboy/preloader/preloader_func.py +688 -2
  36. {radboy-0.0.771.dist-info → radboy-0.0.854.dist-info}/METADATA +1 -1
  37. {radboy-0.0.771.dist-info → radboy-0.0.854.dist-info}/RECORD +39 -37
  38. {radboy-0.0.771.dist-info → radboy-0.0.854.dist-info}/WHEEL +0 -0
  39. {radboy-0.0.771.dist-info → radboy-0.0.854.dist-info}/top_level.txt +0 -0
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/DB/Prompt.py CHANGED
@@ -59,7 +59,8 @@ def std_colorize(m,n,c,start=f'',end=''):
59
59
  '''
60
60
  '''Formula/Price menu options'''
61
61
  PRICE=['quick price','qprc','price','prc']
62
- FMLA=['fmlau','formulae-u','pre-formula','formulas']
62
+ FMLA=['fmlau','formulae-u','pre-formula','formulas','fmla']
63
+ HEALTHLOG=['healthlog','health log universal','healthlogu','healthloguniversal','hlu','health-log-universal']
63
64
  def timedout(ptext,htext='',timeout_returnable="timeout"):
64
65
  try:
65
66
  while True:
@@ -250,6 +251,48 @@ class Obfuscate:
250
251
  out.write(self.b64d)
251
252
  print("Finalized:",self.b64d)
252
253
  print("Saved to:",self.FILE)
254
+ return self.returnMsg(self.b64d.decode("utf-8"))
255
+
256
+ def readMsgFile(self):
257
+ try:
258
+ data=[]
259
+ FILE=db.detectGetOrSet("OBFUSCATED MSG FILE",value="MSG.txt",setValue=False,literal=True)
260
+ with open(FILE,"r") as fio:
261
+ ttl=0
262
+ for num,line in enumerate(fio.readlines()):
263
+ ttl=num
264
+ fio.seek(0)
265
+ counter=0
266
+ while True:
267
+
268
+ x=fio.readline()
269
+ data.append(x)
270
+ if not x:
271
+ break
272
+ try:
273
+ print(std_colorize(x,counter,ttl))
274
+ except Exception as ee:
275
+ print(x,ee)
276
+ counter+=1
277
+ return str(Obfuscate.returnMsg(None,''.join(data)))
278
+ except Exception as e:
279
+ print(e)
280
+
281
+
282
+ def returnMsg(self,data):
283
+ try:
284
+ d=Control(func=FormBuilderMkText,ptext=f'Return "{data}"',helpText="Hit Enter to save. return the data to the terminal for things like text2file",data="boolean")
285
+ print(d)
286
+ if d in ['NaN',None,False]:
287
+ return
288
+ elif d in ['d',]:
289
+ FILE=db.detectGetOrSet("OBFUSCATED MSG FILE",value="MSG.txt",setValue=False,literal=True)
290
+ with open(FILE,"w") as out:
291
+ out.write(data)
292
+ else:
293
+ return data
294
+ except Exception as e:
295
+ print(e)
253
296
 
254
297
  def decrypt(self):
255
298
  try:
@@ -264,6 +307,7 @@ class Obfuscate:
264
307
  cipher = AES.new(self.password,AES.MODE_ECB)
265
308
  self.decoded = unpad(cipher.decrypt(base64.b64decode(self.encoded)),16).decode("utf-8")
266
309
  print(f"'{self.decoded}'")
310
+ return self.returnMsg(self.decoded)
267
311
  except Exception as e:
268
312
  print(e)
269
313
 
@@ -284,6 +328,7 @@ class Obfuscate:
284
328
  helpText=f'''
285
329
  e,encrypt - make msg on INPUT and store in {self.FILE}
286
330
  de,decrypt - decrypt msg from {self.FILE}
331
+ rf,readfile - read data/msg from {self.FILE} and print to screen
287
332
  '''
288
333
  doWhat=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Obfuscate Menu",helpText=helpText,data="str")
289
334
  if doWhat in [None,]:
@@ -294,6 +339,8 @@ de,decrypt - decrypt msg from {self.FILE}
294
339
  self.encrypt()
295
340
  elif doWhat.lower() in ['de','decrypt']:
296
341
  self.decrypt()
342
+ elif doWhat.lower() in ['rf','readfile']:
343
+ self.readMsgFile()
297
344
  else:
298
345
  print(helpText)
299
346
 
@@ -1020,6 +1067,13 @@ class Prompt(object):
1020
1067
  def cse(code):
1021
1068
  with Session(db.ENGINE) as session:
1022
1069
  query=session.query(db.Entry).filter(db.Entry.InList==True,or_(db.Entry.Code.icontains(code),db.Entry.Barcode.icontains(code),db.Entry.Name.icontains(code)))
1070
+ LookUpState=db.detectGetOrSet('list maker lookup order',False,setValue=False,literal=False)
1071
+ if not isinstance(LookUpState,bool):
1072
+ LookUpState=db.detectGetOrSet('list maker lookup order',False,setValue=True,literal=False)
1073
+ if LookUpState == True:
1074
+ results=results_query.order_by(db.Entry.Timestamp.asc(),db.Entry.Name,db.Entry.Barcode,db.Entry.Code,db.Entry.Description,db.Entry.Note)
1075
+ else:
1076
+ results=results_query.order_by(db.Entry.Timestamp.desc(),db.Entry.Name,db.Entry.Barcode,db.Entry.Code,db.Entry.Description,db.Entry.Note)
1023
1077
  results=query.all()
1024
1078
  ct=len(results)
1025
1079
  if ct < 1:
@@ -1158,9 +1212,9 @@ class Prompt(object):
1158
1212
  if not isinstance(LookUpState,bool):
1159
1213
  LookUpState=db.detectGetOrSet('list maker lookup order',False,setValue=True,literal=False)
1160
1214
  if LookUpState == True:
1161
- results=results_query.order_by(db.Entry.Timestamp.asc()).all()
1215
+ results=results_query.order_by(db.Entry.Timestamp.asc(),db.Entry.Name,db.Entry.Barcode,db.Entry.Code,db.Entry.Description,db.Entry.Note).all()
1162
1216
  else:
1163
- results=results_query.order_by(db.Entry.Timestamp.desc()).all()
1217
+ results=results_query.order_by(db.Entry.Timestamp.desc(),db.Entry.Name,db.Entry.Barcode,db.Entry.Code,db.Entry.Description,db.Entry.Note).all()
1164
1218
  ct=len(results)
1165
1219
  if ct < 1:
1166
1220
  msg=f"{Fore.light_steel_blue}Nothing in {Fore.slate_blue_1}Bld{Fore.light_red}LS!{Style.reset}"
@@ -1304,6 +1358,8 @@ class Prompt(object):
1304
1358
  {Fore.medium_spring_green}= {Fore.green_3a}NetPrice({total*decc(i.Price)+tax+crv:.{getcontext().prec}f}){Style.reset}
1305
1359
  {Fore.medium_violet_red}PercentOfTotal({super_total:.{getcontext().prec}f}%) of FinalTotal({getSuperTotal(results,location_fields,colormapped)['final total']})
1306
1360
  {Fore.orange_red_1}TaxRate({taxRate:.{getcontext().prec}f})={decc(taxRate*100):.{getcontext().prec}f}%{Style.reset}
1361
+ {Fore.light_cyan}Location = {Fore.light_steel_blue}{i.Location}{Style.reset}
1362
+ {Fore.grey_70}Note = \"\"\"\n{Fore.grey_50}{i.Note}{Fore.grey_70}\"\"\"{Style.reset}
1307
1363
  {'*'*os.get_terminal_size().columns}{Style.reset}"""
1308
1364
  if bldlse:
1309
1365
  db.logInput(msg,user=False,filter_colors=True,maxed_hfl=False,ofile=Prompt.bld_file)
@@ -2109,6 +2165,18 @@ class Prompt(object):
2109
2165
  continue
2110
2166
  elif cmd.lower() == 'obf msg':
2111
2167
  Obfuscate()
2168
+ elif cmd.lower() == 'obf msg rf':
2169
+ return func(Obfuscate.readMsgFile(Obfuscate),data)
2170
+ elif cmd.lower() in generate_cmds(startcmd=['dt','datetime',],endCmd=['of entry','oe']):
2171
+ dtoe=Control(func=FormBuilderMkText,ptext="Date String",helpText="a datestring",data="datetime")
2172
+ if dtoe in [None,"NaN"]:
2173
+ continue
2174
+ return func(dtoe,data)
2175
+ elif cmd.lower() in generate_cmds(startcmd=['dt','datetime',],endCmd=['of entry string','oes']):
2176
+ dtoe=Control(func=FormBuilderMkText,ptext="Date String",helpText="a datestring",data="datetime")
2177
+ if dtoe in [None,"NaN"]:
2178
+ continue
2179
+ return func(str(dtoe),data)
2112
2180
  elif cmd.startswith("c2cb#"):
2113
2181
  with db.Session(db.ENGINE) as session:
2114
2182
  ncb_text=cmd.split('c2cb#')[-1]
@@ -2247,6 +2315,8 @@ class Prompt(object):
2247
2315
  return func(str(t),data)
2248
2316
  elif cmd.lower() in ['esu',]:
2249
2317
  TM.Tasks.TasksMode.Lookup()
2318
+ elif cmd.lower() in HEALTHLOG:
2319
+ TM.Tasks.TasksMode(parent=self,engine=db.ENGINE,init_only=True).healthlog()
2250
2320
  elif cmd.lower() in ['daylogu','dlu']:
2251
2321
  TM.Tasks.TasksMode(parent=self,engine=db.ENGINE,init_only=True).product_history()
2252
2322
  elif cmd.lower() in ['neu',]:
@@ -2260,7 +2330,8 @@ class Prompt(object):
2260
2330
  elif cmd.lower() in ['tsu','j','journal','jrnl']:
2261
2331
  TSC.TouchStampC.TouchStampC(parent=self,engine=db.ENGINE)
2262
2332
  elif cmd.lower() in ['tvu','tag data']:
2263
- pc.run(engine=db.ENGINE)
2333
+ alternate=pc.run(engine=db.ENGINE)
2334
+
2264
2335
  elif cmd.lower() in ['exe','execute','x']:
2265
2336
  TM.Tasks.TasksMode(parent=self,engine=db.ENGINE,init_only=True).executeInLine()
2266
2337
  continue
@@ -2405,10 +2476,18 @@ class Prompt(object):
2405
2476
  llo_modes=["dlu.cr","Prompt.lsbld","esu","t.[mksl||qsl||set Shelf||set Display]"]
2406
2477
  extra=f'''
2407
2478
  [Generation]
2408
- {Fore.grey_70}**{Fore.light_sea_green}'crbc',"checked random barcode"{Fore.light_yellow}- generate a random, but non-local-system existant barcode for input{Style.reset}
2409
- {Fore.grey_70}**{Fore.light_sea_green}'cruid',"checked uid"{Fore.light_yellow}- generate a uid, but non-local-system existant uid for input{Style.reset}
2479
+ {Fore.orange_red_1}--To Copy Codes--{Style.reset}
2410
2480
  {Fore.grey_70}**{Fore.light_sea_green}'bcd-gen','bcd-img'{Fore.light_yellow}- generate a custom barcode img from input data possible output is selected from {barcode.PROVIDED_BARCODES}{Style.reset}
2411
2481
  {Fore.grey_70}**{Fore.light_sea_green}'qr-gen','qr-img'{Fore.light_yellow}- generate a custom barcode img from input data possible output is selected{Style.reset}
2482
+ {Fore.grey_70}**{Fore.light_salmon_1}'cpcd cd128'{Fore.light_blue} cp barcode to Code128 and save to {Fore.light_green}the same as bcd-img{Style.reset}
2483
+ {Fore.grey_70}**{Fore.light_salmon_1}'cpcd cd39'{Fore.light_blue} cp barcode to Code39 and save to {Fore.light_green}the same as bcd-img{Style.reset}
2484
+ {Fore.grey_70}**{Fore.light_salmon_1}'cpcd upca'{Fore.light_blue} cp barcode to UPCA and save to {Fore.light_green}the same as bcd-img{Style.reset}
2485
+ {Fore.grey_70}**{Fore.light_salmon_1}'cpcd ean8'{Fore.light_blue} cp barcode to EAN8 and save to {Fore.light_green}the same as bcd-img{Style.reset}
2486
+ {Fore.grey_70}**{Fore.light_salmon_1}'cpcd ean13'{Fore.light_blue} cp barcode to EAN13 and save to {Fore.light_green}the same as bcd-img{Style.reset}
2487
+ {Fore.grey_70}**{Fore.light_salmon_1}'cpcd ean14'{Fore.light_blue} cp barcode to EAN14 and save to {Fore.light_green}the same as bcd-img{Style.reset}
2488
+ {Fore.orange_red_1}--Text && Code Generation--{Style.reset}
2489
+ {Fore.grey_70}**{Fore.light_sea_green}'crbc',"checked random barcode"{Fore.light_yellow}- generate a random, but non-local-system existant barcode for input{Style.reset}
2490
+ {Fore.grey_70}**{Fore.light_sea_green}'cruid',"checked uid"{Fore.light_yellow}- generate a uid, but non-local-system existant uid for input{Style.reset}
2412
2491
  {Fore.grey_70}**{Fore.light_sea_green}{','.join(generate_cmds(startcmd=["nano",],endCmd=["id",]))}{Fore.light_yellow} - generate collision resistance nano ids{Style.reset}
2413
2492
  {Fore.grey_70}**{Fore.light_sea_green}'upcify','format upc','fupc'{Fore.light_yellow} Format input text to look '{db.Entry.rebar(None,"TESTTEXTUPCA")}{Style.reset}'
2414
2493
  {Fore.grey_70}**{Fore.light_sea_green}'codify','format code','fcode'{Fore.light_yellow} Format input text to look '{db.Entry.cfmt(None,"TESTTEXT")}{Style.reset}'
@@ -2428,6 +2507,7 @@ class Prompt(object):
2428
2507
  {Fore.light_yellow}Don't Use {Fore.grey_70}**{Style.reset}
2429
2508
  {Fore.grey_70}**{Fore.light_green}sft{Fore.light_red}u{Fore.light_steel_blue} - search for text across whole DB and return it as input{Style.reset}
2430
2509
  {Fore.grey_70}**{Fore.light_green}ne{Fore.light_red}u{Fore.light_steel_blue} - create a new entry menu{Style.reset}
2510
+ {Fore.grey_70}**{Fore.light_green}{HEALTHLOG}{Fore.light_steel_blue} - open healthlog utility anywhere{Style.reset}
2431
2511
  {Fore.grey_70}**{Fore.light_green}bld{Fore.light_red}ls{Fore.light_steel_blue} - list all items with InList==True and has a location value above {Fore.light_red}0{Style.reset}
2432
2512
  {Fore.grey_70}**{Fore.light_green}s{Fore.light_red}bld{Fore.light_steel_blue} - search with barcode in all items with InList==True and has a location value above {Fore.light_red}0{Style.reset}
2433
2513
  {Fore.grey_70}**{Fore.light_green}"bldlse","builde","buildlse","build list export ","bld ls exp",'elsbld','export list build','exp ls bld','ebld'{Fore.light_steel_blue} - same as versions without export, but dumps list to {Path(Prompt.bld_file).absolute()}{Style.reset}
@@ -2449,6 +2529,7 @@ class Prompt(object):
2449
2529
  {Fore.grey_70}**{Fore.light_green}comm{Fore.light_steel_blue} - send an email message with gmail{Style.reset}
2450
2530
 
2451
2531
  {Fore.grey_70}**{Fore.light_steel_blue}obf msg {Fore.spring_green_3a}encrypted msgs via {db.detectGetOrSet("OBFUSCATED MSG FILE",value="MSG.txt",setValue=False,literal=True)} and Prompt Input{Style.reset}
2532
+ {Fore.grey_70}**{Fore.light_steel_blue}read {Fore.spring_green_3a}{db.detectGetOrSet("OBFUSCATED MSG FILE",value="MSG.txt",setValue=False,literal=True)} and return the string{Style.reset}
2452
2533
  {Fore.grey_70}**{Fore.light_green}{PRICE}{Fore.light_steel_blue} Calculate price information using user provided data for an arbitrary product who Data is not in the Entry table{Style.reset}
2453
2534
  {Fore.grey_70}**{Fore.light_green}{FMLA}{Fore.light_steel_blue} use some pre-built formulas for returning values to the prompt{Style.reset}
2454
2535
  {Fore.grey_70}** {Fore.light_steel_blue}{generate_cmds(startcmd=['simple','smpl'],endCmd=['scanner','scanr','scnnr','scnr'])} {Fore.light_green}a scanner recorder that only records the text,times scanned,and dtoe, and when when time permits, comment.{Style.reset}
@@ -2494,6 +2575,9 @@ Use an App Like Google Keep, or Notion, to Store a note with the Title as the Na
2494
2575
  {Fore.grey_85}** {Fore.light_steel_blue}'fbht','fmbh','formbuilder help','form helptext'{Fore.light_green}FormBuilderHelpText; extra keywords when asked for time and date{Style.reset}
2495
2576
  {Fore.grey_70}{llo_modes} Modes ONLY **{Fore.light_green}'rllo','reverse list lookup order'{Fore.light_green}Reverse the ordering used by the List Maker's listing modes for Entry Lookup, i.e. set Shelf,mksl,qsl{Style.reset}
2496
2577
  {Fore.grey_70}{llo_modes} Modes ONLY **{Fore.light_green}'vllo','view list lookup order'{Fore.light_green}View the ordering used by the List Maker's listing modes for Entry Lookup, i.e. set Shelf,mksl,qsl{Style.reset}
2578
+ [Date Generation]
2579
+ {Fore.grey_70}{generate_cmds(startcmd=['dt','datetime',],endCmd=['of entry','oe'])}{Fore.light_green} Generate a datetime for a field that needs a datetime{Style.reset}
2580
+ {Fore.grey_70}{generate_cmds(startcmd=['dt','datetime',],endCmd=['of entry string','oes'])}{Fore.light_green} Generate a datetime for a field that needs a datetime and return a string{Style.reset}
2497
2581
 
2498
2582
  [List Making]
2499
2583
  {Fore.grey_70}**{Fore.light_green}'mksl','make shopping list','p-slq','prompt slq','set list qty','slqp','slq-p'{Fore.light_steel_blue} make a list using {Fore.green_3a}slq{Fore.light_steel_blue} from {Fore.orange_red_1}Tasks.{Fore.light_red}TasksMode{Style.reset}
@@ -2518,7 +2602,16 @@ Use an App Like Google Keep, or Notion, to Store a note with the Title as the Na
2518
2602
  print(extra)
2519
2603
  print(helpText)
2520
2604
  continue
2521
- elif cmd.lower() in generate_cmds(startcmd=['precision','prcsn'],endCmd=['set','st','=']):
2605
+ elif cmd.lower() in generate_cmds(startcmd=['precision','prcsn','pcn'],endCmd=['nc','no-confirm']):
2606
+ value=Control(func=FormBuilderMkText,ptext="How Many digits of precision is your reciept?",helpText="how many characters long is the total",data="integer")
2607
+ if value in [None,'NaN',]:
2608
+ return
2609
+ elif isinstance(value,int):
2610
+ ROUNDTO=int(db.detectGetOrSet("lsbld ROUNDTO default",value,setValue=True,literal=True))
2611
+ PROMPT_CONTEXT.prec=ROUNDTO
2612
+ elif value in ['d','default','']:
2613
+ pass
2614
+ elif cmd.lower() in generate_cmds(startcmd=['precision','prcsn','pcn'],endCmd=['set','st','=']):
2522
2615
  toplvl=Control(func=FormBuilderMkText,ptext="Is this for everything globally(False)?",helpText="boolean",data="boolean")
2523
2616
  if toplvl in ['NaN',None]:
2524
2617
  continue
@@ -2762,6 +2855,19 @@ Use an App Like Google Keep, or Notion, to Store a note with the Title as the Na
2762
2855
  resultant=db.Entry.cfmt(None,code)
2763
2856
  print(resultant)
2764
2857
  return func(resultant,data)
2858
+ elif cmd.lower() in ['cpcd cd128',]:
2859
+ TM.Tasks.TasksMode(parent=self,engine=db.ENGINE,init_only=True).bcd_img(cp2="code128")
2860
+ elif cmd.lower() in ['cpcd cd39',]:
2861
+ TM.Tasks.TasksMode(parent=self,engine=db.ENGINE,init_only=True).bcd_img(cp2="code39")
2862
+ elif cmd.lower() in ['cpcd upca',]:
2863
+ TM.Tasks.TasksMode(parent=self,engine=db.ENGINE,init_only=True).bcd_img(cp2="upca")
2864
+ elif cmd.lower() in ['cpcd ean13',]:
2865
+ TM.Tasks.TasksMode(parent=self,engine=db.ENGINE,init_only=True).bcd_img(cp2="ean13")
2866
+ elif cmd.lower() in ['cpcd ean8',]:
2867
+ TM.Tasks.TasksMode(parent=self,engine=db.ENGINE,init_only=True).bcd_img(cp2="ean8")
2868
+ elif cmd.lower() in ['cpcd ean14',]:
2869
+ TM.Tasks.TasksMode(parent=self,engine=db.ENGINE,init_only=True).bcd_img(cp2="ean14")
2870
+
2765
2871
  elif cmd.lower() in ['bcd-gen','bcd-img']:
2766
2872
  TM.Tasks.TasksMode(parent=self,engine=db.ENGINE,init_only=True).bcd_img()
2767
2873
  elif cmd.lower() in ['qr-gen','qr-img']:
@@ -3102,6 +3208,43 @@ class Control(Prompt):
3102
3208
  #super().__new__(*args,**kwargs)
3103
3209
  return Prompt.__init2__(self,*args,**kwargs)
3104
3210
 
3211
+ def shield(self,mode="clearAll",fieldname="TasksMode",action_text="Deletion"):
3212
+ h=f'{Prompt.header.format(Fore=Fore,mode=mode,fieldname=fieldname,Style=Style)}'
3213
+
3214
+ code=''.join([str(random.randint(0,9)) for i in range(10)])
3215
+ verification_protection=detectGetOrSet("Protect From Delete",code,setValue=False,literal=True)
3216
+ while True:
3217
+ try:
3218
+ really=Prompt.__init2__(None,func=FormBuilderMkText,ptext=f"{h}Really Perform this {Fore.magenta}Dangerous {Fore.orange_red_1}ACTION({action_text})?",helpText="yes or no boolean,default is NO",data="boolean")
3219
+ if really in [None,]:
3220
+ print(f"{Fore.light_steel_blue}Nothing was {Fore.orange_red_1}{Style.bold}Touched!{Style.reset}")
3221
+ return True
3222
+ elif really in ['d',False]:
3223
+ print(f"{Fore.light_steel_blue}Nothing was {Fore.orange_red_1}{Style.bold}Touched!{Style.reset}")
3224
+ return True
3225
+ else:
3226
+ pass
3227
+ really=Prompt.__init2__(None,func=FormBuilderMkText,ptext=f"To Perform this {Fore.magenta}Dangerous {Fore.orange_red_1}ACTION({action_text}) on everything completely,{Fore.light_steel_blue}what is today's date?[{'.'.join([str(int(i)) for i in datetime.now().strftime("%m.%d.%y").split(".")])}]{Style.reset}",helpText=f"type y/yes for prompt or type as m.d.Y, or use one of {Fore.medium_violet_red}[{Fore.medium_purple_3a}now{Fore.medium_violet_red},{Fore.medium_spring_green}today{Fore.medium_violet_red}]{Fore.light_yellow}",data="datetime")
3228
+ if really in [None,'d']:
3229
+ print(f"{Fore.light_steel_blue}Nothing was {Fore.orange_red_1}{Style.bold}Touched!{Style.reset}")
3230
+ return True
3231
+ today=datetime.today()
3232
+ if really.day == today.day and really.month == today.month and really.year == today.year:
3233
+ really=Prompt.__init2__(None,func=FormBuilderMkText,ptext=f"Please type the verification code {Style.reset}'{db.Entry.cfmt(None,verification_protection)}'?",helpText=f"type '{db.Entry.cfmt(None,verification_protection)}' to finalize!",data="string")
3234
+ if really in [None,]:
3235
+ print(f"{Fore.light_steel_blue}Nothing was {Fore.orange_red_1}{Style.bold}Touched!{Style.reset}")
3236
+ return True
3237
+ elif really in ['d',False]:
3238
+ print(f"{Fore.light_steel_blue}Nothing was {Fore.orange_red_1}{Style.bold}Touched!{Style.reset}")
3239
+ return True
3240
+ elif really == verification_protection:
3241
+ break
3242
+ else:
3243
+ pass
3244
+ except Exception as e:
3245
+ print(e)
3246
+ return False
3247
+
3105
3248
  '''
3106
3249
  cmds template
3107
3250
 
Binary file