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

@@ -2,6 +2,35 @@ from . import *
2
2
 
3
3
 
4
4
  class CookBookUi:
5
+ def list_uids_names(self):
6
+ while True:
7
+ try:
8
+ with Session(ENGINE) as session:
9
+ stext=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Name or UID?[b=skip]",helpText="b|back skips",data="string")
10
+ if stext is None:
11
+ return None,None
12
+ if stext in ['d',]:
13
+ query=session.query(CookBook)
14
+ else:
15
+ query=session.query(CookBook).filter(or_(CookBook.recipe_uid.icontains(stext),CookBook.recipe_name.icontains(stext)))
16
+ query=query.group_by(CookBook.recipe_uid,CookBook.recipe_name)
17
+ query=orderQuery(query,CookBook.DTOE,inverse=True)
18
+ results=query.all()
19
+ ct=len(results)
20
+ htext=[]
21
+ for num,i in enumerate(results):
22
+ htext.append(std_colorize(f"'{i.recipe_name}' [Name] - '{i.recipe_uid}' [UID] - '{i.cbid}' [cbid]",num,ct))
23
+ htext='\n'.join(htext)
24
+ print(htext)
25
+ which=Prompt.__init2__(None,func=FormBuilderMkText,ptext="which index to use?",helpText=htext,data="integer")
26
+ if which is None:
27
+ return None,None
28
+ elif which in ['d',]:
29
+ which=0
30
+ return results[which].recipe_uid,results[which].recipe_name
31
+ except Exception as e:
32
+ print(e)
33
+
5
34
  def total_rcp(self):
6
35
  with Session(ENGINE) as session:
7
36
  rcp=self.ls_rcp_names(asSelector=True,whole=True,names=True)
@@ -65,6 +94,7 @@ class CookBookUi:
65
94
  #edit everything found by searchtext using recipe_uid as the final selection parameter
66
95
  def create_new_rcp(self):
67
96
  with Session(ENGINE) as session:
97
+ ruid,rname=self.list_uids_names()
68
98
  uid=uuid1()
69
99
  uid=str(uid)
70
100
  excludes=['cbid','DTOE','recipe_uid','Instructions','recipe_name']
@@ -163,8 +193,14 @@ class CookBookUi:
163
193
  return
164
194
  instructions={
165
195
  'Instructions':{'default':'','type':'text'},
166
- 'recipe_name':{'default':'','type':'string'}}
196
+ 'recipe_name':{'default':'','type':'string'},
197
+ 'recipe_uid':{'default':'','type':'string'}}
198
+ if rname is not None:
199
+ instructions['recipe_name']['default']=rname
200
+ if ruid is not None:
201
+ instructions['recipe_uid']['default']=ruid
167
202
  fdi=FormBuilder(data=instructions)
203
+
168
204
  if fdi is None:
169
205
  print("User Quit Early, so all work has been deleted!")
170
206
  r=session.query(CookBook).filter(CookBook.recipe_uid==uid).delete()
Binary file
radboy/DB/db.py CHANGED
@@ -710,9 +710,9 @@ class EntryExtras:
710
710
 
711
711
  def std_colorize(m,n,c):
712
712
  if ((n % 2) != 0) and n > 0:
713
- msg=f'{Fore.cyan}{n}/{Fore.light_yellow}{n+1}{Fore.light_red} of {c} {Fore.dark_goldenrod}{m}{Style.reset}'
713
+ msg=f'{Fore.cyan}{n}/{Fore.light_yellow}{n+1}{Fore.light_red} of {c} {Fore.dark_goldenrod}{m}{Style.reset}\n'
714
714
  else:
715
- msg=f'{Fore.light_cyan}{n}/{Fore.green_yellow}{n+1}{Fore.orange_red_1} of {c} {Fore.light_salmon_1}{m}{Style.reset}'
715
+ msg=f'{Fore.light_cyan}{n}/{Fore.green_yellow}{n+1}{Fore.orange_red_1} of {c} {Fore.light_salmon_1}{m}{Style.reset}\n'
716
716
  return msg
717
717
 
718
718
  class Template:
@@ -2,7 +2,35 @@ from . import *
2
2
 
3
3
 
4
4
  class PhoneBookUi:
5
-
5
+ def list_uids_names(self):
6
+ while True:
7
+ try:
8
+ with Session(ENGINE) as session:
9
+ stext=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Name or UID?[b=skip]",helpText="b|back skips",data="string")
10
+ if stext is None:
11
+ return None,None
12
+ if stext in ['d',]:
13
+ query=session.query(PhoneBook)
14
+ else:
15
+ query=session.query(PhoneBook).filter(or_(PhoneBook.phone_uid.icontains(stext),PhoneBook.phone_name.icontains(stext)))
16
+ query=query.group_by(PhoneBook.phone_uid,PhoneBook.phone_name)
17
+ query=orderQuery(query,PhoneBook.DTOE,inverse=True)
18
+ results=query.all()
19
+ ct=len(results)
20
+ htext=[]
21
+ for num,i in enumerate(results):
22
+ htext.append(std_colorize(f"{i.phone_name}[Name] - {i.phone_uid}[UID] - {i.pbid}[pbid]",num,ct))
23
+ htext='\n'.join(htext)
24
+ print(htext)
25
+ which=Prompt.__init2__(None,func=FormBuilderMkText,ptext="which index to use?",helpText=htext,data="integer")
26
+ if which is None:
27
+ return None,None
28
+ elif which in ['d',]:
29
+ which=0
30
+ return results[which].phone_uid,results[which].phone_name
31
+ except Exception as e:
32
+ print(e)
33
+
6
34
  def create_new_rcp(self):
7
35
  with Session(ENGINE) as session:
8
36
  uid=uuid1()
@@ -11,13 +39,19 @@ class PhoneBookUi:
11
39
  session.add(phonebook)
12
40
  session.commit()
13
41
  excludes=['pbid','DTOE']
42
+ uid,name=self.list_uids_names()
14
43
  instructions={i.name:{'default':getattr(phonebook,i.name),'type':str(i.type).lower()} for i in PhoneBook.__table__.columns if i.name not in excludes}
44
+ if name is not None:
45
+ instructions['phone_name']['default']=name
46
+ if uid is not None:
47
+ instructions['phone_uid']['default']=uid
15
48
  fdi=FormBuilder(data=instructions)
16
49
  if fdi is None:
17
50
  print("User Quit Early, so all work has been deleted!")
18
51
  r=session.delete(phonebook)
19
52
  session.commit()
20
53
  else:
54
+
21
55
  session.query(PhoneBook).filter(PhoneBook.pbid==phonebook.pbid).update(fdi)
22
56
  session.commit()
23
57
 
radboy/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION='0.0.460'
1
+ VERSION='0.0.462'
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radboy
3
- Version: 0.0.460
3
+ Version: 0.0.462
4
4
  Summary: A small example package
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=Lt2reA6xchq3U7Y08DvkrHboZ25i1ts7X2E9gSIwcVg,41101
7
7
  radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
8
- radboy/__init__.py,sha256=_auH3f3uw_Q1llr9-QCbdDOXPfyUbdwVSOBLDF_ndrY,17
8
+ radboy/__init__.py,sha256=kpHn1pRc--4nMkiUEYusuSW61dY0HiyolFFBEm4Gs9g,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
@@ -75,7 +75,7 @@ radboy/ConvertCode/__pycache__/__init__.cpython-311.pyc,sha256=1-K1vfRZxAs9MoOyy
75
75
  radboy/ConvertCode/__pycache__/__init__.cpython-312.pyc,sha256=77LSCMdrPg91lbsloPumUo1SpAt5A8l1WPgTxGIvwTs,274
76
76
  radboy/ConvertCode/__pycache__/__init__.cpython-313.pyc,sha256=4F9h0V0Z5sQHdZQGEsnfCSLMQK4lUD5CzJwU4Elv-EU,153
77
77
  radboy/ConvertCode/__pycache__/codep.cpython-311.pyc,sha256=-qJqPEjGOP1-x6Xw6W4Msfuu2iwVffN_-DerH18Is2o,1086
78
- radboy/CookBook/CookBook.py,sha256=fSxrf7fql4ewIFKINm-_WHhcpXE2VtTj1nkTK6re8jU,16841
78
+ radboy/CookBook/CookBook.py,sha256=AQ-Qj4ZYJDXQJ2UH5lvvjsg3gqWFRoEa9Etvva9KkA8,18206
79
79
  radboy/CookBook/__init__.py,sha256=svTiqqFxHZeqYCRorLx6qLxL3oI1pil4fxomm-kkQ88,927
80
80
  radboy/DB/CoinCombo.py,sha256=NJfTmx3XYgS41zkAyyO2W6de1Mj3rWsCWqU4ikHfvJI,13604
81
81
  radboy/DB/DatePicker.py,sha256=6eNjmryFWPpzrRYmI418UwSGin3XpJlL52h8cauanbY,18004
@@ -92,7 +92,7 @@ radboy/DB/SMLabelImporter.py,sha256=eUoBDxVUUEKGL2g_PwkASM67ZB7FmXtSnn4bCagskhY,
92
92
  radboy/DB/__init__.py,sha256=JiigA9B7GalP7YuRdcwyGDu5PDSBahoi0lLjtScxlN8,49
93
93
  radboy/DB/blankDataFile.py,sha256=YX_05Usi71UpDkZN9UTMYwUipbTndTAtEgqzBEga0kE,9285
94
94
  radboy/DB/config.py,sha256=bvu43dUl1_yO3Zq3gsLuenGUgJSiS3S9Cs6ppFEvZbg,239
95
- radboy/DB/db.py,sha256=orVeHi4XzG7MH0yvmkBITEYzXMojJIp9NW01qWQ9Euc,242902
95
+ radboy/DB/db.py,sha256=CK-Lt9W91xwwfgYD90Uk0rPjb0VezF_bEJO9Hdq7a4o,242906
96
96
  radboy/DB/glossary_db.py,sha256=1_qxeEpjjEtpWB_eDjsgJisimLv7OBm75MuqM-Lt6zg,28218
97
97
  radboy/DB/masterLookup.py,sha256=DBaM2uscG3_X5dek49wjdnOzhrjWhKgvOEz_umdz0mY,4566
98
98
  radboy/DB/msg.txt,sha256=YxWed6A6tuP1djJ5QPS2Rz3ING4TKKf8kUiCCPtzHXE,7937
@@ -127,7 +127,7 @@ radboy/DB/__pycache__/config.cpython-312.pyc,sha256=Qo7E6MHrF6yqvKgepNFyCoekZXiv
127
127
  radboy/DB/__pycache__/config.cpython-313.pyc,sha256=_8wCIg_3jhyJjxnExD2Sm6aY-uZTw036p7Ki5znL7dc,376
128
128
  radboy/DB/__pycache__/db.cpython-311.pyc,sha256=rNgigyBd0D-cg1JxKAS8t0B_k0IEJivgVlRaZE10Xis,210105
129
129
  radboy/DB/__pycache__/db.cpython-312.pyc,sha256=ANDJPC0RoavbmSKFxG15vC7B4rEGyVt7xRJt7XGY3OA,334609
130
- radboy/DB/__pycache__/db.cpython-313.pyc,sha256=NrMJ4gRa1mpA8GMdHNBASUPyV3sojls0nLibAQgtZZA,385768
130
+ radboy/DB/__pycache__/db.cpython-313.pyc,sha256=PPJ49n7D8abZMbyoSnnptfuawUxwXEXNVEo8SGlRBsc,386031
131
131
  radboy/DB/__pycache__/glossary_db.cpython-312.pyc,sha256=8UL-29cKqtKovx0BANm6kzKKteef1BW_2qF3wumzst4,36023
132
132
  radboy/DB/__pycache__/glossary_db.cpython-313.pyc,sha256=Ke9bkvllGv5CK0JdT9DRvQ3MOdrXxoYv7TVLNkqLux0,36582
133
133
  radboy/DB/__pycache__/masterLookup.cpython-312.pyc,sha256=bQiOkmMwwHgcO18tYSWGQ-YUff4GQlKVhBMp1GoWAqY,6324
@@ -282,7 +282,7 @@ radboy/POS/__pycache__/POS.cpython-313.pyc,sha256=-es1vNYvFK6MXznK6FTNTcsdGZzpC6
282
282
  radboy/POS/__pycache__/__init__.cpython-311.pyc,sha256=EjkCiNyf59_mmFLzbgGLqpStpeo9gi2dx8IZlhg_Qyg,228
283
283
  radboy/POS/__pycache__/__init__.cpython-312.pyc,sha256=mpESqOMEmBPUkkkP2Sci7XPA3MSko8Qw-eMFB2854EE,266
284
284
  radboy/POS/__pycache__/__init__.cpython-313.pyc,sha256=DR0_hbFS6FQFh6GWnXDs5bXThEqOZoNBwuzGOW_X9co,145
285
- radboy/PhoneBook/PhoneBook.py,sha256=PmznDKAcLsIuzIpei1-1y9HeLieA-tdx5NewHhSnrac,13437
285
+ radboy/PhoneBook/PhoneBook.py,sha256=qdGu9y2HP7tmVbjEXLAJ3oMdOFY0PY_3me-jXfeHzD8,14735
286
286
  radboy/PhoneBook/__init__.py,sha256=ehY4XgI8wlGvgUugs1HHrMLSaGQi2ox9bGGDIJCq9_E,928
287
287
  radboy/PunchCard/CalcTimePad.py,sha256=wpjHbGtqkhWgPABoR_wSwroP3-0o_TH2EKASKUPqsZg,4315
288
288
  radboy/PunchCard/PunchCard.py,sha256=Y4hzx5lLFw-1yDyxJukt-Xb3_ADsF6wEmpW_egXGCDc,38123
@@ -396,7 +396,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
396
396
  radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
397
397
  radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
398
398
  radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
399
- radboy/__pycache__/__init__.cpython-313.pyc,sha256=fwVHfGHkvuehwHeJMRBXfxL_Yuh5sccGCc4vznNdj_Y,165
399
+ radboy/__pycache__/__init__.cpython-313.pyc,sha256=RcvIsnWCXVIm3F3-0tNeLWW-GXrVfY6cLWhSqL5g_CA,165
400
400
  radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
401
401
  radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
402
402
  radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
@@ -421,7 +421,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
421
421
  radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
422
422
  radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
423
423
  radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
424
- radboy-0.0.460.dist-info/METADATA,sha256=3nYXoJl7SmgemsZ89dStSxV8ZbEhbvGcK1aruXUUlbM,1601
425
- radboy-0.0.460.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
426
- radboy-0.0.460.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
427
- radboy-0.0.460.dist-info/RECORD,,
424
+ radboy-0.0.462.dist-info/METADATA,sha256=ROsOvJzeFQboQrP0gyNgl0tfMd8C3dSrrSNV1S0qnwg,1601
425
+ radboy-0.0.462.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
426
+ radboy-0.0.462.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
427
+ radboy-0.0.462.dist-info/RECORD,,