summaryrefslogtreecommitdiff
path: root/bin/extra/steamidtoname
diff options
context:
space:
mode:
Diffstat (limited to 'bin/extra/steamidtoname')
-rwxr-xr-xbin/extra/steamidtoname8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/extra/steamidtoname b/bin/extra/steamidtoname
new file mode 100755
index 0000000..f1cee31
--- /dev/null
+++ b/bin/extra/steamidtoname
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+[ "$#" -eq 0 ] && >&2 printf "usage: steamidtoname <id>" && exit 1
+name="$(curl -s https://store.steampowered.com/app/"$1"/ |
+ pup -p 'title text{}' |
+ sed 's/on Steam$//')"
+
+printf '%s\n' "$name"