radboy 0.0.424__py3-none-any.whl → 0.0.425__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 +10 -0
- radboy/DB/__pycache__/Prompt.cpython-313.pyc +0 -0
- radboy/HealthLog/HealthLog.py +38 -8
- radboy/HealthLog/__pycache__/HealthLog.cpython-313.pyc +0 -0
- radboy/__init__.py +1 -1
- radboy/__pycache__/__init__.cpython-313.pyc +0 -0
- {radboy-0.0.424.dist-info → radboy-0.0.425.dist-info}/METADATA +1 -1
- {radboy-0.0.424.dist-info → radboy-0.0.425.dist-info}/RECORD +10 -10
- {radboy-0.0.424.dist-info → radboy-0.0.425.dist-info}/WHEEL +0 -0
- {radboy-0.0.424.dist-info → radboy-0.0.425.dist-info}/top_level.txt +0 -0
radboy/DB/Prompt.py
CHANGED
|
@@ -31,6 +31,16 @@ import biip
|
|
|
31
31
|
import radboy.Orders.MilkWaterOrder as MWR
|
|
32
32
|
import itertools
|
|
33
33
|
|
|
34
|
+
def orderQuery(query,orderBy):
|
|
35
|
+
LookUpState=db.detectGetOrSet('list maker lookup order',False,setValue=False,literal=False)
|
|
36
|
+
if not isinstance(LookUpState,bool):
|
|
37
|
+
LookUpState=db.detectGetOrSet('list maker lookup order',False,setValue=True,literal=False)
|
|
38
|
+
if LookUpState == True:
|
|
39
|
+
query=query.order_by(orderBy.asc())
|
|
40
|
+
else:
|
|
41
|
+
query=query.order_by(orderBy.desc())
|
|
42
|
+
return query
|
|
43
|
+
|
|
34
44
|
def generate_cmds(startcmd,endCmd):
|
|
35
45
|
cmd=(startcmd,endCmd)
|
|
36
46
|
cmds=[]
|
|
Binary file
|
radboy/HealthLog/HealthLog.py
CHANGED
|
@@ -58,17 +58,23 @@ class HealthLogUi:
|
|
|
58
58
|
entry=None
|
|
59
59
|
if 'EntryBarcode' in useColumns:
|
|
60
60
|
h=f'{Fore.light_red}HealthLog{Fore.light_yellow}@{Style.bold}{Fore.deep_sky_blue_3b}AHS{Fore.light_yellow} : '
|
|
61
|
-
barcode=Prompt.__init2__(None,func=FormBuilderMkText,ptext=f"{h}Barcode|Code|Name: ",helpText="what was consumed?",data="string")
|
|
61
|
+
barcode=Prompt.__init2__(None,func=FormBuilderMkText,ptext=f"{h}Barcode|Code|Name[b=skips search]: ",helpText="what was consumed?",data="string")
|
|
62
62
|
if barcode not in [None,]:
|
|
63
63
|
while True:
|
|
64
64
|
try:
|
|
65
|
-
entry=session.query(Entry).filter(or_(Entry.Barcode==barcode,Entry.Barcode.icontains(barcode),Entry.Name.icontains(barcode),Entry.Code==barcode,Entry.Code.icontains(barcode)))
|
|
65
|
+
entry=session.query(Entry).filter(or_(Entry.Barcode==barcode,Entry.Barcode.icontains(barcode),Entry.Name.icontains(barcode),Entry.Code==barcode,Entry.Code.icontains(barcode)))
|
|
66
|
+
|
|
67
|
+
entry=orderQuery(entry,Entry.Timestamp)
|
|
68
|
+
entry=entry.all()
|
|
66
69
|
ct=len(entry)
|
|
67
|
-
if ct
|
|
70
|
+
if ct > 0:
|
|
71
|
+
htext=[]
|
|
68
72
|
for num, i in enumerate(entry):
|
|
69
73
|
msg=f"{Fore.light_red}{num}/{Fore.medium_violet_red}{num+1} of {Fore.light_sea_green}{ct} -> {i.seeShort()}"
|
|
74
|
+
htext.append(msg)
|
|
70
75
|
print(msg)
|
|
71
|
-
|
|
76
|
+
htext='\n'.join(htext)
|
|
77
|
+
which=Prompt.__init2__(None,func=FormBuilderMkText,ptext=f"Which {Fore.light_red}index?{Fore.light_yellow}",helpText=f"{htext}\n{Fore.light_red}number{Fore.light_yellow} farthest to left of screen{Style.reset}",data="integer")
|
|
72
78
|
if which not in [None,]:
|
|
73
79
|
excludes.extend(["EntryBarcode","EntryName","EntryId"])
|
|
74
80
|
if which == 'd':
|
|
@@ -76,8 +82,26 @@ class HealthLogUi:
|
|
|
76
82
|
else:
|
|
77
83
|
entry=entry[which]
|
|
78
84
|
else:
|
|
79
|
-
|
|
85
|
+
htext=f"{Fore.orange_red_1}No Results for '{Fore.cyan}{barcode}{Fore.orange_red_1}'{Style.reset}"
|
|
86
|
+
again=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Try another search?[yes/no=default]",helpText=htext,data="boolean")
|
|
87
|
+
if again is None:
|
|
88
|
+
return
|
|
89
|
+
elif again in [False,'d']:
|
|
90
|
+
entry=None
|
|
91
|
+
break
|
|
92
|
+
else:
|
|
93
|
+
barcode=Prompt.__init2__(None,func=FormBuilderMkText,ptext=f"{h}Barcode|Code|Name[b=skips search]: ",helpText="what was consumed?",data="string")
|
|
94
|
+
continue
|
|
95
|
+
|
|
96
|
+
else:
|
|
97
|
+
htext=f"{Fore.orange_red_1}No Results for '{Fore.cyan}{barcode}{Fore.orange_red_1}'{Style.reset}"
|
|
98
|
+
again=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Try another search?[yes/no=default]",helpText=htext,data="boolean")
|
|
99
|
+
if again is None:
|
|
100
|
+
return
|
|
101
|
+
elif again in [False,'d']:
|
|
80
102
|
break
|
|
103
|
+
else:
|
|
104
|
+
continue
|
|
81
105
|
break
|
|
82
106
|
except Exception as e:
|
|
83
107
|
print(e)
|
|
@@ -184,7 +208,9 @@ class HealthLogUi:
|
|
|
184
208
|
def showAll(self):
|
|
185
209
|
try:
|
|
186
210
|
with Session(ENGINE) as session:
|
|
187
|
-
results=session.query(HealthLog)
|
|
211
|
+
results=session.query(HealthLog)
|
|
212
|
+
results=orderQuery(results,HealthLog.DTOE)
|
|
213
|
+
results=results.all()
|
|
188
214
|
ct=len(results)
|
|
189
215
|
for num,i in enumerate(results):
|
|
190
216
|
view=[]
|
|
@@ -200,6 +226,7 @@ class HealthLogUi:
|
|
|
200
226
|
output=Path("HealthLogAll.xlsx")
|
|
201
227
|
with Session(ENGINE) as session:
|
|
202
228
|
query=session.query(HealthLog)
|
|
229
|
+
query=orderQuery(query,HealthLog.DTOE)
|
|
203
230
|
df=pd.read_sql(query.statement,session.bind)
|
|
204
231
|
df.to_excel(output,index=False)
|
|
205
232
|
print(output.absolute())
|
|
@@ -213,6 +240,7 @@ class HealthLogUi:
|
|
|
213
240
|
not_none=[i for i in HealthLog.__table__.columns if str(i.name) in not_none]
|
|
214
241
|
with Session(ENGINE) as session:
|
|
215
242
|
query=session.query(HealthLog).filter(or_(*[i!=None for i in not_none]))
|
|
243
|
+
query=orderQuery(query,HealthLog.DTOE)
|
|
216
244
|
df=pd.read_sql(query.statement,session.bind)
|
|
217
245
|
df=df[fields]
|
|
218
246
|
df.to_excel(output,index=False)
|
|
@@ -229,7 +257,9 @@ class HealthLogUi:
|
|
|
229
257
|
fields=[i for i in HealthLog.__table__.columns if str(i.name) in fields]
|
|
230
258
|
not_none=[i for i in HealthLog.__table__.columns if str(i.name) in not_none]
|
|
231
259
|
with Session(ENGINE) as session:
|
|
232
|
-
results=session.query(HealthLog).filter(or_(*[i!=None for i in not_none]))
|
|
260
|
+
results=session.query(HealthLog).filter(or_(*[i!=None for i in not_none]))
|
|
261
|
+
results=orderQuery(results,HealthLog.DTOE)
|
|
262
|
+
results=results.all()
|
|
233
263
|
ct=len(results)
|
|
234
264
|
for num,i in enumerate(results):
|
|
235
265
|
view=[]
|
|
@@ -301,7 +331,7 @@ class HealthLogUi:
|
|
|
301
331
|
},
|
|
302
332
|
'add consumed':{
|
|
303
333
|
'cmds':['afd','add fd','add food','adfd','add fuel','ad fl','afl'],
|
|
304
|
-
'desc':'Create a NEW HealthLog for JUST
|
|
334
|
+
'desc':'Create a NEW HealthLog for JUST food',
|
|
305
335
|
'exec':lambda self=self:self.add_healthlog_specific(
|
|
306
336
|
useColumns=["EntryBarcode",
|
|
307
337
|
"EntryName",
|
|
Binary file
|
radboy/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION='0.0.
|
|
1
|
+
VERSION='0.0.425'
|
|
Binary file
|
|
@@ -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=0qFnt3gEk58-8S1uCmVBbtOItFJ0zp0Yt7RqXsF0ksY,41364
|
|
7
7
|
radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
|
|
8
|
-
radboy/__init__.py,sha256
|
|
8
|
+
radboy/__init__.py,sha256=-qGaiDL3RC6OjP3dDI7attgZyIF5FnFJmjo4xNHGEYA,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,7 +83,7 @@ radboy/DB/ExerciseTracker.py,sha256=CZ8jdKJiAE_QTAiJTRXi8ZOnS1NUiSvWVSKLHLpYVGk,
|
|
|
83
83
|
radboy/DB/PayDay.py,sha256=H2kPGvBCDkMOz7lbxQhYtUt_oAInpxi37Q6MFrah98I,8710
|
|
84
84
|
radboy/DB/PayModels.py,sha256=hjwWxP7PL33hmfzQl5YTf0HqzaMxXJxFknPdxFJXJc8,3499
|
|
85
85
|
radboy/DB/PrintLogging.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
86
|
-
radboy/DB/Prompt.py,sha256=
|
|
86
|
+
radboy/DB/Prompt.py,sha256=cOIE6EiUiUZ5a9Myosc7h1zBsn0Q6dy8H5tl2eGxsNA,137036
|
|
87
87
|
radboy/DB/RandomStringUtil.py,sha256=eZCpR907WStgfbk4Evcghjv9hOkUDXH-iMXIq0-kXq8,24386
|
|
88
88
|
radboy/DB/ResetTools.py,sha256=RbI-Ua7UlsN0S9qLqtEkTWvzyTZ6R-hHR3CW4NHlUPE,6660
|
|
89
89
|
radboy/DB/SMLabelImporter.py,sha256=eUoBDxVUUEKGL2g_PwkASM67ZB7FmXtSnn4bCagskhY,4013
|
|
@@ -107,7 +107,7 @@ radboy/DB/__pycache__/FormBuilder.cpython-312.pyc,sha256=p1o-5SMRL8OXP_XQ5liUpf-
|
|
|
107
107
|
radboy/DB/__pycache__/PrintLogging.cpython-312.pyc,sha256=pIAFqTi6OiQQORSc-oMH1zAbsdH7sY1TifxrN_QOvnU,148
|
|
108
108
|
radboy/DB/__pycache__/Prompt.cpython-311.pyc,sha256=P2uPRpeqfLFtxieZ0JHBG3X_HZzWUCsFSLb_fpRqky0,6407
|
|
109
109
|
radboy/DB/__pycache__/Prompt.cpython-312.pyc,sha256=6CcQ1gE2hcz3cKPjo4f6d7xNM2PTDnl8NzQG0Pme5BE,142886
|
|
110
|
-
radboy/DB/__pycache__/Prompt.cpython-313.pyc,sha256=
|
|
110
|
+
radboy/DB/__pycache__/Prompt.cpython-313.pyc,sha256=z6EYrFIbvSmHk_KV1x5KEYGM50x-1YEA_YITLr3tVM4,209967
|
|
111
111
|
radboy/DB/__pycache__/RandomStringUtil.cpython-312.pyc,sha256=TrbEY89MuLmNlvoo5d8vOE6Dyshh5_EMlTZvk8MDVN4,48597
|
|
112
112
|
radboy/DB/__pycache__/RandomStringUtil.cpython-313.pyc,sha256=MCcgVwV2Y-9rAY2FVaJZCKcou3HDX70EZudoiCigT0o,49217
|
|
113
113
|
radboy/DB/__pycache__/ResetTools.cpython-311.pyc,sha256=4Vyc57iAAF0yRPjjglnVKovnTn8OoFIi6Zok3Wpj_YM,9292
|
|
@@ -208,10 +208,10 @@ radboy/GeoTools/__pycache__/GeoClass.cpython-313.pyc,sha256=eZ6hpLKoic1XCb7BKKg-
|
|
|
208
208
|
radboy/GeoTools/__pycache__/OSMClass.cpython-312.pyc,sha256=5RoT8_wiI8R7yb_B9FWIC7mALdGNoqyWtkzsjM2pbh0,40387
|
|
209
209
|
radboy/GeoTools/__pycache__/__init__.cpython-312.pyc,sha256=Y7Xtrzwm44-xuY_4NK8aDjYfVmXIzUFWOyexJu9le8A,1238
|
|
210
210
|
radboy/GeoTools/__pycache__/__init__.cpython-313.pyc,sha256=-bk9eEIxWZgHYZHtNJbrpubDRWkbdYNkGr5J7sVhyIE,1238
|
|
211
|
-
radboy/HealthLog/HealthLog.py,sha256=
|
|
211
|
+
radboy/HealthLog/HealthLog.py,sha256=CXumO1N_XXzn7kpynxTqfScQ-rxU4DFHp41VvXa8uL0,19659
|
|
212
212
|
radboy/HealthLog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
213
213
|
radboy/HealthLog/__pycache__/HealthLog.cpython-312.pyc,sha256=hTo4o7jo9L2yqPZgzuKUw_kon_PVcCuTRguELTuLrIo,27946
|
|
214
|
-
radboy/HealthLog/__pycache__/HealthLog.cpython-313.pyc,sha256=
|
|
214
|
+
radboy/HealthLog/__pycache__/HealthLog.cpython-313.pyc,sha256=WFH3UTIWisG7eq1YeffnfCwHGg0Pc6aPStWWrtyuhmE,32187
|
|
215
215
|
radboy/HealthLog/__pycache__/__init__.cpython-312.pyc,sha256=yZrYKBk31pGSjCRqmqzpX409iw-muC1zsNO2ObqkGlY,272
|
|
216
216
|
radboy/HealthLog/__pycache__/__init__.cpython-313.pyc,sha256=cqdZbEJKq9XVoVqDAwsW0pwwBBGSerJNWGlST3YVR3g,151
|
|
217
217
|
radboy/InListRestore/ILR.py,sha256=s8fbbHLKQSVJX1VaeyGE-vdIUGBEbOPX29kRIG2j2WY,16847
|
|
@@ -390,7 +390,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
|
|
|
390
390
|
radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
|
|
391
391
|
radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
|
|
392
392
|
radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
|
|
393
|
-
radboy/__pycache__/__init__.cpython-313.pyc,sha256=
|
|
393
|
+
radboy/__pycache__/__init__.cpython-313.pyc,sha256=7CI6I-PXacEkcq6XUzaKnaVeq6z1mK4LnYWdnJJmeog,165
|
|
394
394
|
radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
|
|
395
395
|
radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
|
|
396
396
|
radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
|
|
@@ -415,7 +415,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
|
|
|
415
415
|
radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
|
|
416
416
|
radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
|
|
417
417
|
radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
|
|
418
|
-
radboy-0.0.
|
|
419
|
-
radboy-0.0.
|
|
420
|
-
radboy-0.0.
|
|
421
|
-
radboy-0.0.
|
|
418
|
+
radboy-0.0.425.dist-info/METADATA,sha256=bYaDa_CyvwK-3XczUYa7IBv0v9J3bK4bZBUqs_dd5H4,794
|
|
419
|
+
radboy-0.0.425.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
420
|
+
radboy-0.0.425.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
|
|
421
|
+
radboy-0.0.425.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|