radboy 0.0.835__py3-none-any.whl → 0.0.837__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/Unified/BACKUP.py CHANGED
@@ -236,6 +236,13 @@ rmc.quikRn(rootdir=ROOTDIR)'''.encode()
236
236
  print(f"{Fore.spring_green_3b}Adding {Fore.green_yellow}{export_folder}{Style.reset}")
237
237
  gzf.add(export_folder)
238
238
 
239
+ defFile=db.detectGetOrSet("currency_definitions_file","currency_definitions.txt",setValue=False,literal=True)
240
+ if defFile:
241
+ defFile=Path(defFile)
242
+ if defFile.exists() and defFile.is_file():
243
+ print(f"{Fore.spring_green_3b}Adding {Fore.green_yellow}{defFile}{Style.reset}")
244
+ gzf.add(defFile)
245
+
239
246
  bootable="__bootable__.py"
240
247
  if bootable:
241
248
  bootable=Path(bootable)
radboy/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION='0.0.835'
1
+ VERSION='0.0.837'
Binary file
@@ -62,12 +62,17 @@ preloader={
62
62
  'desc':f'now to percent time, or time to go',
63
63
  'exec':ndtp
64
64
  },
65
+ f'{uuid1()}':{
66
+ 'cmds':['currency conversion','cur-cvt'],
67
+ 'desc':f'convert currency from one to the another',
68
+ 'exec':currency_conversion,
69
+ },
65
70
  f'{uuid1()}':{
66
71
  'cmds':['generic item or service text template','txt gios '],
67
72
  'desc':f'find the cost to run a device per day',
68
73
  'exec':generic_service_or_item
69
74
  },
70
- f'{uuid1()}':{
75
+ f'{uuid1()}':{
71
76
  'cmds':['reciept book entry','rbe'],
72
77
  'desc':f'reciept book data to name template',
73
78
  'exec':reciept_book_entry,
@@ -1813,4 +1813,158 @@ def golden_ratio():
1813
1813
  else:
1814
1814
  return side2_value
1815
1815
  except Exception as e:
1816
- print(e)
1816
+ print(e)
1817
+
1818
+
1819
+ def currency_conversion():
1820
+ cvt_registry=pint.UnitRegistry()
1821
+
1822
+ definition=f'''
1823
+ USD = [currency]
1824
+ Argentine_Peso = nan usd
1825
+ Australian_Dollar = nan usd
1826
+ Bahraini_Dinar = nan usd
1827
+ Botswana_Pula = nan usd
1828
+ Brazilian_Real = nan usd
1829
+ British_Pound = nan usd
1830
+ Bruneian_Dollar = nan usd
1831
+ Bulgarian_Lev = nan usd
1832
+ Canadian_Dollar = nan usd
1833
+ Chilean_Peso = nan usd
1834
+ Chinese_Yuan_Renminbi = nan usd
1835
+ Colombian_Peso = nan usd
1836
+ Czech_Koruna = nan usd
1837
+ Danish_Krone = nan usd
1838
+ Emirati_Dirham = nan usd
1839
+ Euro = nan usd
1840
+ Hong_Kong_Dollar = nan usd
1841
+ Hungarian_Forint = nan usd
1842
+ Icelandic_Krona = nan usd
1843
+ Indian_Rupee = nan usd
1844
+ Indonesian_Rupiah = nan usd
1845
+ Iranian_Rial = nan usd
1846
+ Israeli_Shekel = nan usd
1847
+ Japanese_Yen = nan usd
1848
+ Kazakhstani_Tenge = nan usd
1849
+ Kuwaiti_Dinar = nan usd
1850
+ Libyan_Dinar = nan usd
1851
+ Malaysian_Ringgit = nan usd
1852
+ Mauritian_Rupee = nan usd
1853
+ Mexican_Peso = nan usd
1854
+ Nepalese_Rupee = nan usd
1855
+ New_Zealand_Dollar = nan usd
1856
+ Norwegian_Krone = nan usd
1857
+ Omani_Rial = nan usd
1858
+ Pakistani_Rupee = nan usd
1859
+ Philippine_Peso = nan usd
1860
+ Polish_Zloty = nan usd
1861
+ Qatari_Riyal = nan usd
1862
+ Romanian_New_Leu = nan usd
1863
+ Russian_Ruble = nan usd
1864
+ Saudi_Arabian_Riyal = nan usd
1865
+ Singapore_Dollar = nan usd
1866
+ South_African_Rand = nan usd
1867
+ South_Korean_Won = nan usd
1868
+ Sri_Lankan_Rupee = nan usd
1869
+ Swedish_Krona = nan usd
1870
+ Swiss_Franc = nan usd
1871
+ Taiwan_New_Dollar = nan usd
1872
+ Thai_Baht = nan usd
1873
+ Trinidadian_Dollar = nan usd
1874
+ Turkish_Lira = nan usd
1875
+
1876
+ @context FX
1877
+ Argentine_Peso = 0.000671 usd
1878
+ Australian_Dollar = 0.651104 usd
1879
+ Bahraini_Dinar = 2.659574 usd
1880
+ Botswana_Pula = 0.070042 usd
1881
+ Brazilian_Real = 0.185537 usd
1882
+ British_Pound = 1.330948 usd
1883
+ Bruneian_Dollar = 0.769854 usd
1884
+ Bulgarian_Lev = 0.594475 usd
1885
+ Canadian_Dollar = 0.714527 usd
1886
+ Chilean_Peso = 0.001062 usd
1887
+ Chinese_Yuan_Renminbi = 0.140424 usd
1888
+ Colombian_Peso = 0.000259 usd
1889
+ Czech_Koruna = 0.047793 usd
1890
+ Danish_Krone = 0.155642 usd
1891
+ Emirati_Dirham = 0.272294 usd
1892
+ Euro = 1.162692 usd
1893
+ Hong_Kong_Dollar = 0.128701 usd
1894
+ Hungarian_Forint = 0.002981 usd
1895
+ Icelandic_Krona = 0.008119 usd
1896
+ Indian_Rupee = 0.011384 usd
1897
+ Indonesian_Rupiah = 0.00006 usd
1898
+ Iranian_Rial = 0.000024 usd
1899
+ Israeli_Shekel = 0.304734 usd
1900
+ Japanese_Yen = 0.006545 usd
1901
+ Kazakhstani_Tenge = 0.00186 usd
1902
+ Kuwaiti_Dinar = 3.261214 usd
1903
+ Libyan_Dinar = 0.183824 usd
1904
+ Malaysian_Ringgit = 0.236753 usd
1905
+ Mauritian_Rupee = 0.02197 usd
1906
+ Mexican_Peso = 0.054181 usd
1907
+ Nepalese_Rupee = 0.007112 usd
1908
+ New_Zealand_Dollar = 0.575051 usd
1909
+ Norwegian_Krone = 0.099905 usd
1910
+ Omani_Rial = 2.603489 usd
1911
+ Pakistani_Rupee = 0.003531 usd
1912
+ Philippine_Peso = 0.017016 usd
1913
+ Polish_Zloty = 0.274017 usd
1914
+ Qatari_Riyal = 0.274725 usd
1915
+ Romanian_New_Leu = 0.228593 usd
1916
+ Russian_Ruble = 0.012559 usd
1917
+ Saudi_Arabian_Riyal = 0.266667 usd
1918
+ Singapore_Dollar = 0.769854 usd
1919
+ South_African_Rand = 0.057932 usd
1920
+ South_Korean_Won = 0.000695 usd
1921
+ Sri_Lankan_Rupee = 0.003293 usd
1922
+ Swedish_Krona = 0.106347 usd
1923
+ Swiss_Franc = 1.256685 usd
1924
+ Taiwan_New_Dollar = 0.032417 usd
1925
+ Thai_Baht = 0.030604 usd
1926
+ Trinidadian_Dollar = 0.147095 usd
1927
+ Turkish_Lira = 0.023829 usd
1928
+ @end'''.lower()
1929
+ defFile=db.detectGetOrSet("currency_definitions_file","currency_definitions.txt",setValue=False,literal=True)
1930
+ if defFile is None:
1931
+ return
1932
+ defFile=Path(defFile)
1933
+ with open(defFile,"w") as out:
1934
+ out.write(definition)
1935
+ cvt_registry.load_definitions(defFile)
1936
+ with cvt_registry.context("fx") as cvtr:
1937
+ while True:
1938
+ try:
1939
+ htext=[]
1940
+ definition=definition.split("@context FX")[-1].replace('\n@end','')
1941
+ cta=len(definition.split("\n"))
1942
+ formats='\n'.join([std_colorize(i,num,cta) for num,i in enumerate(definition.split("\n"))])
1943
+
1944
+ formats=f'''Conversion Formats are:\n{formats}\n'''
1945
+ fields={
1946
+ 'value':{
1947
+ 'default':1,
1948
+ 'type':'float',
1949
+ },
1950
+ 'FromString':{
1951
+ 'default':'USD',
1952
+ 'type':'string',
1953
+ },
1954
+ 'ToString':{
1955
+ 'default':'Euro',
1956
+ 'type':'string'
1957
+ },
1958
+ }
1959
+ fb=FormBuilder(data=fields,passThruText=formats)
1960
+ if fb is None:
1961
+ return
1962
+
1963
+ return_string=fb['ToString'].lower()
1964
+ value_string=f"{fb['value']} {fb['FromString']}".lower()
1965
+ resultant=cvtr.Quantity(value_string).to(return_string)
1966
+
1967
+ #if it gets here return None
1968
+ return resultant
1969
+ except Exception as e:
1970
+ print(e)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radboy
3
- Version: 0.0.835
3
+ Version: 0.0.837
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=SgToyoLIS50W5G7wiM4Tqffg7FIDjsRT6cJtfBX2KRM,17
8
+ radboy/__init__.py,sha256=Lt5UJExw1eXKLI6Couog0sPbuLIfJzQN0FjBwwutauY,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
@@ -378,7 +378,7 @@ radboy/TouchStampC/__pycache__/TouchStampC.cpython-313.pyc,sha256=6A1Z56mlsBBZi4
378
378
  radboy/TouchStampC/__pycache__/__init__.cpython-311.pyc,sha256=0Rn25Y_gKIKFC7fRVMToQ99ozp8rqnK3HkTajb4skdo,236
379
379
  radboy/TouchStampC/__pycache__/__init__.cpython-312.pyc,sha256=Qa5Iy6Fp7_w5wPhQCbj6FFvfMttQoNd5j6DTqYXa_GQ,274
380
380
  radboy/TouchStampC/__pycache__/__init__.cpython-313.pyc,sha256=kA-p_LdocXJQHfYfDE0DQZ3fgzbfoL90Kr0soLsff_w,153
381
- radboy/Unified/BACKUP.py,sha256=ElYwHFuIdIBM2eLOvN9MKNLlaFS72xKngqJnoIX1oDY,19674
381
+ radboy/Unified/BACKUP.py,sha256=uB7yXUYcQF4gQFYC5g-hj7VvFol-6pSHGNvTkvcbTHw,20056
382
382
  radboy/Unified/Unified.py,sha256=l6SLbwnAg6XP_eIhgzj4a3rI54kTDv8kRt_z1A9D_vM,47147
383
383
  radboy/Unified/Unified2.py,sha256=TnJQ5Ir28cLG449o8mDe8Ya1Zx4WaRhuoHfEIrCbJME,42257
384
384
  radboy/Unified/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -414,7 +414,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
414
414
  radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
415
415
  radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
416
416
  radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
417
- radboy/__pycache__/__init__.cpython-313.pyc,sha256=KmkNAT97g6zOJGVVdyfuRiYGUolrAOzvVGSB7MLZSyI,165
417
+ radboy/__pycache__/__init__.cpython-313.pyc,sha256=2HDANE0y-MzfyXdggejP8x31_1oBEK34hOsS_tSYfag,165
418
418
  radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
419
419
  radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
420
420
  radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
@@ -424,8 +424,8 @@ radboy/__pycache__/t.cpython-311.pyc,sha256=bVszNkmfiyoNLd0WUc8aBJc2geGseW4O28cq
424
424
  radboy/__pycache__/te.cpython-311.pyc,sha256=vI8eNUE5VVrfCQvnrJ7WuWpoKcLz-vVK3ifdUZ4UNhk,592
425
425
  radboy/__pycache__/x.cpython-311.pyc,sha256=3jIvWoO5y5WqrL_hRmXNK8O0vO7DwJ4gufjm2b0V7VI,1963
426
426
  radboy/preloader/__init__.py,sha256=lrGR0JF0dkDM8N9ORGUKH_MucUFx1-PI38YsvqS-wgA,926
427
- radboy/preloader/preloader.py,sha256=M60lLzF7A-MvTFiqq0urmhbMMRIJQxQnrpjPI6MsMsY,9060
428
- radboy/preloader/preloader_func.py,sha256=rQzrwV7GUD06Dk_0hlHf_vNsb5AR6gYQtjfq03xbdZk,64473
427
+ radboy/preloader/preloader.py,sha256=Mx7eB2EcKOWPBTbZbUdZg7GM92r6S5OHYcizmB6qn4k,9226
428
+ radboy/preloader/preloader_func.py,sha256=kI0aNB1d42k4vrNfDLd8iYJF9sF8CD-UX5k1j4lFWiM,69651
429
429
  radboy/setCode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
430
430
  radboy/setCode/setCode.py,sha256=8UOf4okbx-Zane99odeoLAS_lfIt8pIaFomN7EtnnVA,5202
431
431
  radboy/setCode/__pycache__/__init__.cpython-311.pyc,sha256=cJuP5rve6Wn7ZO789tixyOlyrHZQWsBxDn9oZGoG5WE,232
@@ -442,7 +442,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
442
442
  radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
443
443
  radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
444
444
  radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
445
- radboy-0.0.835.dist-info/METADATA,sha256=xNUwZW3sNBKnXrYzakyB0BlMSOldWT2wCvYya8QvRz0,1920
446
- radboy-0.0.835.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
447
- radboy-0.0.835.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
448
- radboy-0.0.835.dist-info/RECORD,,
445
+ radboy-0.0.837.dist-info/METADATA,sha256=PdsgN20HiMGTcqkHzA2YE2gvd64YAyupTORE9NzdaI0,1920
446
+ radboy-0.0.837.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
447
+ radboy-0.0.837.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
448
+ radboy-0.0.837.dist-info/RECORD,,