Created
May 2, 2026 07:33
-
-
Save s3rgeym/a51a55dcdb8ad981d42dce5f5dece613 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data="""\ | |
| 1. [✓] org.freedesktop.Platform.GL.default 24.08 u flathub 25.8 MB / 147.8 MB | |
| 2. [✓] org.freedesktop.Platform.GL.default 24.08extra u flathub 25.9 MB / 147.8 MB | |
| 3. [✓] org.freedesktop.Platform.Locale 24.08 u flathub 850.4 kB / 388.9 MB | |
| 4. [✓] org.freedesktop.Platform.ffmpeg-full 24.08 u flathub 5.4 kB / 12.1 MB | |
| 5. [✓] org.freedesktop.Sdk.Locale 24.08 u flathub 1.9 MB / 394.4 MB | |
| 6. [✓] org.freedesktop.Sdk.Locale 25.08 u flathub 18.5 kB / 394.8 MB | |
| 7. [✓] org.gnome.Platform.Locale 49 u flathub 18.5 kB / 385.8 MB | |
| 8. [✓] org.gnome.Platform.Locale 50 u flathub 18.5 kB / 386.0 MB | |
| 9. [✓] org.gnome.Platform 50 u flathub 1.4 MB / 408.8 MB | |
| 10. [✓] org.gimp.GIMP stable u flathub 30.6 MB / 99.5 MB | |
| 11. [✓] org.gnome.Platform 49 u flathub 7.3 MB / 407.9 MB | |
| 12. [✓] org.freedesktop.Sdk 25.08 u flathub 1.3 MB / 596.2 MB | |
| 13. [✓] org.freedesktop.Sdk 24.08 u flathub 11.6 MB / 631.2 MB | |
| 14. [✓] org.freedesktop.Platform 24.08 u flathub 2.3 MB / 268.4 MB | |
| 15. [✓] org.libreoffice.LibreOffice.Locale stable u flathub 10.3 kB / 91.6 MB | |
| 16. [✓] org.libreoffice.LibreOffice stable u flathub 169.9 MB / 326.4 MB | |
| 17. [✓] org.mozilla.Thunderbird.Locale stable u flathub 5.5 MB / 5.5 MB | |
| 18. [✓] org.mozilla.Thunderbird stable u flathub 69.0 MB / 108.3 MB | |
| 19. [✓] org.shotcut.Shotcut.Locale stable i flathub 3.5 kB / 644.9 kB | |
| 20. [✓] org.shotcut.Shotcut stable u flathub 24.1 MB / 78.3 MB\ | |
| """ | |
| def convert_size(s,u): | |
| return float(s)*({'kB':1<<10,'MB':1<<20,'GB':1<<30})[u] | |
| sizes = [] | |
| for line in data.split('\n'): | |
| d_s, d_u, _, t_s, t_u = line.split()[-5:] | |
| sizes.append((convert_size(d_s, d_u), convert_size(t_s, t_u))) | |
| print(sizes) | |
| downloaded = sum(s[0] for s in sizes) | |
| total = sum(s[1] for s in sizes) | |
| print(downloaded, '/', total, '=', downloaded / total*100, '%') |
s3rgeym
commented
Jun 22, 2026
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment