-
-
Save AI-nsley69/a55918558b699de1d8887f8c2e7d3a8f to your computer and use it in GitHub Desktop.
log
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
#!/bin/bash | |
# Small script to upload files to https://mclo.gs, requires jq to be installed | |
# Example usage: log latest.log | |
# Example output: https://mclo.gs/ABCDEFG | |
content="content=$(cat $1)" | |
request=$(curl --location --request POST 'https://api.mclo.gs/1/log' \ | |
--header 'Content-Type: application/x-www-form-urlencoded' \ | |
--data-urlencode "$content" 2>/dev/null | jq -r '.id') | |
echo "https://mclo.gs/$request" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment