Gitman: Auto-Commit all

This commit is contained in:
kake26 2025-01-28 20:11:05 -06:00
parent 9792d5092b
commit 7faef44749
Signed by: kake26
GPG key ID: E8AFC43591876B4D
9 changed files with 96 additions and 21 deletions

BIN
kratom

Binary file not shown.

0
kratom.db Normal file → Executable file
View file

17
kratom.pb Normal file → Executable file
View file

@ -5,22 +5,9 @@
UseSQLiteDatabase()
XIncludeFile "kratomfrm1.pbf"
XIncludeFile "splash.pbf"
XIncludeFile "pocketbase.pb"
Declare updatelist() ; declare forward procedure
; A little positioning work
desktop = ExamineDesktops()
screenWidth = DesktopWidth(0)
screenHeight = DesktopHeight(0)
; Define the window dimensions
windowWidth = 1140
windowHeight = 630
; Calculate the center position
xPos = (screenWidth - windowWidth) / 2
yPos = (screenHeight - windowHeight) / 2
Opensplash();xPos,yPos)
; init code
@ -107,7 +94,7 @@ Repeat
Until Event = #PB_Event_CloseWindow ; Quit on any window close
; IDE Options = PureBasic 6.12 LTS (Linux - x64)
; CursorPosition = 23
; CursorPosition = 7
; Folding = -
; EnableXP
; DPIAware

0
kratom.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Before After
Before After

0
kratom.xcf Normal file → Executable file
View file

0
kratomfrm1.pbf Normal file → Executable file
View file

12
kratomprj.pbp Normal file → Executable file
View file

@ -7,20 +7,20 @@
<section name="data">
<explorer view="opt/purebasic/examples/" pattern="0"/>
<log show="1"/>
<lastopen date="2024-09-19 22:30" user="kake26" host="kake26-20l6s42e00"/>
<lastopen date="2024-11-09 15:30" user="kake26" host="kake26-20l6s42e00"/>
</section>
<section name="files">
<file name="kratom.pb">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" sortindex="999" panelstate="+"/>
<fingerprint md5="e1e75b4483da6ceabf322cd25597f501"/>
<config load="0" scan="1" panel="1" warn="1" lastopen="1" sortindex="1" panelstate="+"/>
<fingerprint md5="400df858203159074435b23915b0812c"/>
</file>
<file name="kratomfrm1.pbf">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" sortindex="999" panelstate="+"/>
<config load="0" scan="1" panel="1" warn="1" lastopen="1" sortindex="2" panelstate="+"/>
<fingerprint md5="31d9af98eae5516222cbb39a1fa88bbd"/>
</file>
<file name="splash.pbf">
<config load="0" scan="1" panel="1" warn="1" lastopen="0" sortindex="999" panelstate="+"/>
<fingerprint md5="0813b9d39735fd2a3e9a74e20dd54f61"/>
<config load="0" scan="1" panel="1" warn="1" lastopen="1" sortindex="3" panelstate="+"/>
<fingerprint md5="8df5bda897f97ffbf7e74fbcad9c854d"/>
</file>
</section>
<section name="targets">

88
pocketbase.pb Executable file
View file

@ -0,0 +1,88 @@
; Pocketbase support written from scratch
; Login
url.s = "https://pb.penguinpost.net/api/admins/auth-with-password"
; note this is a post with a small bit of json
;{
; "identity": "yourloginemail",
; "password": "yoursupersecretpassword"
;}
If CreateJSON(0)
login = SetJSONObject(JSONValue(0))
SetJSONString(AddJSONMember(login, "identity"), "offal@pngpst.net")
SetJSONString(AddJSONMember(login, "password"), "Perl1isgod!")
Debug ComposeJSON(0, #PB_JSON_PrettyPrint)
EndIf
NewMap Header$()
Header$("Content-Type") = "application/json"
Header$("User-Agent") = "Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0"
HttpRequest = HTTPRequest(#PB_HTTP_Post, url, ComposeJSON(0) , 0, Header$())
If HttpRequest
Debug "StatusCode: " + HTTPInfo(HTTPRequest, #PB_HTTP_StatusCode)
Debug "Response: " + HTTPInfo(HTTPRequest, #PB_HTTP_Response)
; Now we need to get the token
; CreateJSON(1)
;ParseJSON(1,HTTPInfo(HTTPRequest, #PB_HTTP_Response))
json$ = HTTPInfo(HTTPRequest, #PB_HTTP_Response)
If ParseJSON(1, json$) ; returns garbage without the PB ascii there not sure why
ObjectValue = JSONValue(1)
If ExamineJSONMembers(ObjectValue)
While NextJSONMember(ObjectValue)
Debug "Key: " + JSONMemberKey(ObjectValue)
MemberValue = JSONMemberValue(ObjectValue)
; Now extract the actual value based on its type
Select JSONType(MemberValue)
Case #PB_JSON_String
Debug "Value (String): " + GetJSONString(MemberValue)
Case #PB_JSON_Number
Debug "Value (Number): " + StrD(GetJSONDouble(MemberValue))
Case #PB_JSON_Boolean
Debug "Value (Boolean): " + Bool(GetJSONBoolean(MemberValue))
Case #PB_JSON_Object
Debug "Value (Object): (nested object)"
; You could further examine this nested object if needed.
Case #PB_JSON_Array
Debug "Value (Array): (nested array)"
; Handle array values if needed.
Default
Debug "Value (Unknown type)"
EndSelect
Wend
EndIf
Else
Debug JSONErrorMessage()
EndIf
EndIf
; IDE Options = PureBasic 6.12 LTS (Linux - x64)
; CursorPosition = 43
; FirstLine = 33
; Folding = -
; EnableXP
; DPIAware

0
splash.pbf Normal file → Executable file
View file