radboy 0.0.669__py3-none-any.whl → 0.0.701__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/Prompt.py CHANGED
@@ -124,6 +124,9 @@ def orderList(l,inverse=False):
124
124
  return l
125
125
  return query
126
126
 
127
+ def limitOffset(query,limit=10,offset=0):
128
+ return query.limit(limit).offset(offset)
129
+
127
130
  def orderQuery(query,orderBy,inverse=False):
128
131
  LookUpState=db.detectGetOrSet('list maker lookup order',False,setValue=False,literal=False)
129
132
  if not isinstance(LookUpState,bool):
@@ -320,7 +320,7 @@ class SimpleScanUi:
320
320
  if not terse:
321
321
  msg=std_colorize(f"{Fore.light_magenta}{__class__.__name__}{Fore.dark_goldenrod}{i}",num,cta)
322
322
  else:
323
- msg=std_colorize(f"{Fore.light_magenta}{i.ScannedText}:{Fore.light_red}{i.ssid}[{Fore.green_yellow}{i.DTOE}] = {Fore.cyan}{i.TimesScanned} {Fore.dark_goldenrod}",num,cta)
323
+ msg=self.terse(i,num,cta)
324
324
  print(msg)
325
325
  elif doWhat.lower() in "reset/rst".split("/"):
326
326
  self.edit(i,reset=True)
@@ -334,6 +334,9 @@ class SimpleScanUi:
334
334
  print(f"{Fore.grey_70}{'*'*os.get_terminal_size().columns}")
335
335
  print(FORMAT)
336
336
 
337
+ def terse(self,i,num,cta):
338
+ return std_colorize(f"{Fore.light_magenta}{i.ScannedText}:{Fore.light_red}{i.ssid}[{Fore.green_yellow}{i.DTOE}] = {Fore.cyan}{i.TimesScanned} {Fore.dark_goldenrod}",num,cta)
339
+
337
340
  def edit(self,i:SimpleScan,excludes=['ssid',],reset=False,clear=False):
338
341
  if reset:
339
342
  with Session(ENGINE) as session:
@@ -366,6 +369,88 @@ class SimpleScanUi:
366
369
  r=session.query(SimpleScan).filter(SimpleScan.ssid==i.ssid).update(fd)
367
370
  session.commit()
368
371
 
372
+ def last_TimesScanned(self):
373
+ '''print hight times scanned w/ prompt for how many and offset'''
374
+ default=True
375
+ FORMAT=f"terse==short;default={default};output is short using {Fore.light_steel_blue}[- chunked ScannedText]{Fore.light_magenta}ScannedText:{Fore.light_red}ssid[{Fore.green_yellow}DTOE]={Fore.cyan}TimesScanned | Note = \"if not None or ''\"{Style.reset}"
376
+ terse=Control(func=FormBuilderMkText,ptext="Terse output [False/True] ",helpText=FORMAT,data="boolean")
377
+ if terse is None:
378
+ return
379
+ elif terse in ['NaN',]:
380
+ terse=False
381
+ elif terse in ['d',]:
382
+ terse=default
383
+ '''print the newest scan'''
384
+ with Session(ENGINE) as session:
385
+ query=session.query(SimpleScan)
386
+ query=orderQuery(query,SimpleScan.TimesScanned)
387
+ limit=Control(func=FormBuilderMkText,ptext="max to display?",helpText="an integer",data="integer")
388
+ if limit in [None,'NaN']:
389
+ return
390
+ elif limit in ['d',]:
391
+ limit=10
392
+
393
+ offset=Control(func=FormBuilderMkText,ptext="what is the offset from 0?",helpText="what is 0/start+offset",data="integer")
394
+ if offset in [None,'NaN']:
395
+ return
396
+ elif offset in ['d',]:
397
+ offset=0
398
+ query=limitOffset(query,limit,offset)
399
+
400
+ results=query.all()
401
+ cta=len(results)
402
+
403
+ for num,i in enumerate(results):
404
+ if terse:
405
+ msg=self.terse(i,num,cta)
406
+ else:
407
+ msg=std_colorize(f"{Fore.light_magenta}{__class__.__name__}{Fore.dark_goldenrod}{i}",num,cta)
408
+
409
+ print(msg)
410
+ if (num % 15) == 0 and num > 0:
411
+ print(f"{Fore.grey_70}{'*'*os.get_terminal_size().columns}")
412
+
413
+ def last_DTOE(self):
414
+ default=True
415
+ FORMAT=f"terse==short;default={default};output is short using {Fore.light_steel_blue}[- chunked ScannedText]{Fore.light_magenta}ScannedText:{Fore.light_red}ssid[{Fore.green_yellow}DTOE]={Fore.cyan}TimesScanned | Note = \"if not None or ''\"{Style.reset}"
416
+ terse=Control(func=FormBuilderMkText,ptext="Terse output [False/True] ",helpText=FORMAT,data="boolean")
417
+ if terse is None:
418
+ return
419
+ elif terse in ['NaN',]:
420
+ terse=False
421
+ elif terse in ['d',]:
422
+ terse=default
423
+ '''print the newest scan'''
424
+ with Session(ENGINE) as session:
425
+ query=session.query(SimpleScan)
426
+ query=orderQuery(query,SimpleScan.DTOE)
427
+ limit=Control(func=FormBuilderMkText,ptext="max to display?",helpText="an integer",data="integer")
428
+ if limit in [None,'NaN']:
429
+ return
430
+ elif limit in ['d',]:
431
+ limit=10
432
+
433
+ offset=Control(func=FormBuilderMkText,ptext="what is the offset from 0?",helpText="what is 0/start+offset",data="integer")
434
+ if offset in [None,'NaN']:
435
+ return
436
+ elif offset in ['d',]:
437
+ offset=0
438
+ query=limitOffset(query,limit,offset)
439
+
440
+ results=query.all()
441
+ cta=len(results)
442
+
443
+ for num,i in enumerate(results):
444
+ if terse:
445
+ msg=self.terse(i,num,cta)
446
+ else:
447
+ msg=std_colorize(f"{Fore.light_magenta}{__class__.__name__}{Fore.dark_goldenrod}{i}",num,cta)
448
+
449
+ print(msg)
450
+ if (num % 15) == 0 and num > 0:
451
+ print(f"{Fore.grey_70}{'*'*os.get_terminal_size().columns}")
452
+
453
+
369
454
  def __init__(self):
370
455
  MENUDO="edit,delete, clear count,reset all fields"
371
456
  self.options={}
@@ -396,6 +481,16 @@ drop and regenerate SimpleScan Table
396
481
  'desc':f'List Scans with search by scanned text',
397
482
  'exec':lambda self=self:self.list_scan(sch=True)
398
483
  }
484
+ self.options[str(uuid1())]={
485
+ 'cmds':['last by dtoe','lst dtoe'],
486
+ 'desc':f'List Scans with limit and offset using rllo/vllo for ordering by dtoe',
487
+ 'exec':lambda self=self:self.last_DTOE()
488
+ }
489
+ self.options[str(uuid1())]={
490
+ 'cmds':['last by timesscanned','lst ts'],
491
+ 'desc':f'List Scans with limit and offset using rllo/vllo for ordering by TimesScanned',
492
+ 'exec':lambda self=self:self.last_TimesScanned()
493
+ }
399
494
  self.options[str(uuid1())]={
400
495
  'cmds':['list scan dated','lst scn dt','lst dt','list dtd','lst d'],
401
496
  'desc':f'List Scans within start and end dates',
radboy/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION='0.0.669'
1
+ VERSION='0.0.701'
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radboy
3
- Version: 0.0.669
3
+ Version: 0.0.701
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=KI7Jmf3MX0Zng_YUvcjVKN2siyUOhaMAHQGzpPuX8KQ,41373
7
7
  radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
8
- radboy/__init__.py,sha256=erBJX94e0b7luwg7Ep_v9dVd0oo9onLH7jLrWLcDu9U,17
8
+ radboy/__init__.py,sha256=iuHEEs5j_Ov73OobzqYbt07uX8rqu-rnsOwTbLCocpw,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
@@ -88,7 +88,7 @@ radboy/DB/OrderedAndRxd.py,sha256=PZ_Rbm0H3DFhHuN1SZEnd1RhEnKOU_L0X0MHXwYN3-s,23
88
88
  radboy/DB/PayDay.py,sha256=H2kPGvBCDkMOz7lbxQhYtUt_oAInpxi37Q6MFrah98I,8710
89
89
  radboy/DB/PayModels.py,sha256=hjwWxP7PL33hmfzQl5YTf0HqzaMxXJxFknPdxFJXJc8,3499
90
90
  radboy/DB/PrintLogging.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
91
- radboy/DB/Prompt.py,sha256=RvL5Kyjbg00V8j7uINRLw4JUOvlRF1JHl1OTTkkVmak,174661
91
+ radboy/DB/Prompt.py,sha256=WNa-BDavhV4wZq3M9boG4c8SuKW49ZjMiSwba7Wl5d8,174749
92
92
  radboy/DB/RandomStringUtil.py,sha256=eZCpR907WStgfbk4Evcghjv9hOkUDXH-iMXIq0-kXq8,24386
93
93
  radboy/DB/ResetTools.py,sha256=RbI-Ua7UlsN0S9qLqtEkTWvzyTZ6R-hHR3CW4NHlUPE,6660
94
94
  radboy/DB/SMLabelImporter.py,sha256=eUoBDxVUUEKGL2g_PwkASM67ZB7FmXtSnn4bCagskhY,4013
@@ -102,7 +102,7 @@ radboy/DB/msg.txt,sha256=YxWed6A6tuP1djJ5QPS2Rz3ING4TKKf8kUiCCPtzHXE,7937
102
102
  radboy/DB/rad_types.py,sha256=mtZpBMIFPcw1IhmO7UQ7nV_1gNNURs4INwx3x40hLUU,4725
103
103
  radboy/DB/renderText2Png.py,sha256=PWnTicLTfOPg9UlQYia3wMpjM9rh7MIyDVsmcsDRUBo,5678
104
104
  radboy/DB/testClass.py,sha256=t3zT1gbvReUncnPY8R9JUfKXQ5UEB2wmQx8DNeds0hI,310
105
- radboy/DB/SimpleScanner/SimpleScanner.py,sha256=QZP2CV_GKGvnIz3x2Q6MRHT9LMKL7FnhTDRP_xVLi14,23392
105
+ radboy/DB/SimpleScanner/SimpleScanner.py,sha256=ll6bX9BrQTIVY8gI9kb_4IWeX91AA18MjbS7kQa1KI4,27584
106
106
  radboy/DB/SimpleScanner/__init__.py,sha256=BknbeGbEv48sqoCWwCQbKbgbqLUuBAyeeIh4EFerJ0g,899
107
107
  radboy/DB/__pycache__/DatePicker.cpython-311.pyc,sha256=VMJnJ7scb4VHMQi1HDZCF67KVYfb9m-fZK96IAoJzTQ,19676
108
108
  radboy/DB/__pycache__/DatePicker.cpython-312.pyc,sha256=cc5XWJ6Sbtcg0xWPz3SOP93VceIqr1pH42kjkLl5iYs,30294
@@ -115,7 +115,7 @@ radboy/DB/__pycache__/FormBuilder.cpython-312.pyc,sha256=p1o-5SMRL8OXP_XQ5liUpf-
115
115
  radboy/DB/__pycache__/PrintLogging.cpython-312.pyc,sha256=pIAFqTi6OiQQORSc-oMH1zAbsdH7sY1TifxrN_QOvnU,148
116
116
  radboy/DB/__pycache__/Prompt.cpython-311.pyc,sha256=P2uPRpeqfLFtxieZ0JHBG3X_HZzWUCsFSLb_fpRqky0,6407
117
117
  radboy/DB/__pycache__/Prompt.cpython-312.pyc,sha256=6CcQ1gE2hcz3cKPjo4f6d7xNM2PTDnl8NzQG0Pme5BE,142886
118
- radboy/DB/__pycache__/Prompt.cpython-313.pyc,sha256=Ke-daS6l0DhStSjLvGzutY_FfWWIylOby89nbMJH0UQ,259600
118
+ radboy/DB/__pycache__/Prompt.cpython-313.pyc,sha256=OthX67Hbsx3tXUPTZDcV6Hs3k1NEuwMGs9XtoiOz43o,259834
119
119
  radboy/DB/__pycache__/RandomStringUtil.cpython-312.pyc,sha256=TrbEY89MuLmNlvoo5d8vOE6Dyshh5_EMlTZvk8MDVN4,48597
120
120
  radboy/DB/__pycache__/RandomStringUtil.cpython-313.pyc,sha256=MCcgVwV2Y-9rAY2FVaJZCKcou3HDX70EZudoiCigT0o,49217
121
121
  radboy/DB/__pycache__/ResetTools.cpython-311.pyc,sha256=4Vyc57iAAF0yRPjjglnVKovnTn8OoFIi6Zok3Wpj_YM,9292
@@ -404,7 +404,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
404
404
  radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
405
405
  radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
406
406
  radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
407
- radboy/__pycache__/__init__.cpython-313.pyc,sha256=uzJFFYLqmYtI-dd1pdPygPVsDJqdHDykIARoujKlQ9o,165
407
+ radboy/__pycache__/__init__.cpython-313.pyc,sha256=1EBkBNOU3XfAgBg4h4Y0F_fP3cQXi-L-4QH97SJB-oc,165
408
408
  radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
409
409
  radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
410
410
  radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
@@ -432,7 +432,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
432
432
  radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
433
433
  radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
434
434
  radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
435
- radboy-0.0.669.dist-info/METADATA,sha256=lKugmllt-n-d0MxsQy01VOUn645EKPPNFcZTJl7mxLY,1891
436
- radboy-0.0.669.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
437
- radboy-0.0.669.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
438
- radboy-0.0.669.dist-info/RECORD,,
435
+ radboy-0.0.701.dist-info/METADATA,sha256=WQx1r3u2PfcikFdBkgliaT_plpuW1lMHOrwfOYNYxak,1891
436
+ radboy-0.0.701.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
437
+ radboy-0.0.701.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
438
+ radboy-0.0.701.dist-info/RECORD,,