Phoenix Edition Repo Info
#1
(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.  Wink
Reply
#2
(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.  Wink

Does not work for me, get error something like input past file.
b = b + ...
Reply
#3
@bplus Make it $Console:Only and then remove the _Hide from that Shell statement. It'll display the issue for you. When I tried earlier, I had to run the program 2 or 3 times, as it kept saying "github servers are busy" or some such nonsense.
Reply
#4
OK thanks!

I also increased the delay. Data Success!
   
b = b + ...
Reply




Users browsing this thread: 4 Guest(s)