08-07-2022, 07:37 PM
(05-11-2022, 01:59 AM)SMcNeill Wrote: (Say that title ten times fast! That's a great tongue twister!)
Code: (Select All)Screen _NewImage(1024, 720, 32)
com$ = "curl -H " + Chr$(34) + "Accept: application/vnd.github.v3+json" + Chr$(34)
com$ = com$ + " https://api.github.com/repos/QB64-Phoenix-Edition/QB64pe/releases"
com$ = com$ + " >temp.txt"
Shell _Hide com$
_Delay 1 'give the os time to download and create the file
Open "temp.txt" For Binary As #1
Do Until EOF(1)
Line Input #1, temp$
If InStr(temp$, "download_count") Then Print Mid$(temp$, 27);
If InStr(temp$, "browser_download_url") Then Print Mid$(temp$, 33)
Loop
For anyone who wants to take a look at the number of downloads the Phoenix Edition has for each release, you can use the little app above to do so.
If you're really curious about a lot more junk than just the download count, you can open the "temp.txt" and get a whole status report on the repo and the releases and such. I'm not certain if anyone else would be interested in this type of thing, but I thought I'd share just in case.
Does not work for me, get error something like input past file.
b = b + ...