httpie / desktop

🚀 HTTPie Desktop — cross-platform API testing client for humans. Painlessly test REST, GraphQL, and HTTP APIs.
https://httpie.io
Other
2.65k stars 32 forks source link

Gnome application launcher #125

Open patxipierce opened 8 months ago

patxipierce commented 8 months ago

Sorry to rise this as an issue, but I've been using httpie desktop a lot and figured I'd share my Gnome installer shell script with everyone.

# HTTPie installer launcher
mkdir -p ~/opt/httpie
httpieVersion=$(elinks --dump --no-numbering "https://github.com/httpie/desktop/releases/latest" | egrep -o 'v[0-9]{1,4}\.[0-9]{1,4}\.[0-9]{1,4}' | head -n 1)
downloadLink=$(elinks --dump --no-numbering "https://github.com/httpie/desktop/releases/expanded_assets/$httpieVersion" | egrep -o '\/httpie\/desktop\/releases\/download\/v[0-9]{1,4}\.[0-9]{1,4}\.[0-9]{1,4}\/HTTPie-[0-9]{1,4}\.[0-9]{1,4}\.[0-9]{1,4}\.AppImage' | head -n 1)
wget "https://github.com$downloadLink" -O ~/opt/httpie/HTTPie.AppImage
wget https://pie-assets.s3.eu-central-1.amazonaws.com/LogoIcons/GB.png  -O /home/${USER}/opt/httpie/httpie.png
chmod +x ~/opt/httpie/HTTPie.AppImage
sudo tee /usr/share/applications/httpie.desktop << EOF
[Desktop Entry]
Name=HTTPie
GenericName=HTTPie
Comment=HTTPie
Exec=/home/${USER}/opt/httpie/HTTPie.AppImage
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/${USER}/opt/httpie/httpie.png
StartupWMClass=HTTPie
StartupNotify=true
EOF

Thanks for the great program

jkbrzt commented 8 months ago

This is great, thanks! We’ll link to this from our upcoming docs.