Codebase list xapp / 5638742 files / usr / bin / upload-system-info
5638742

Tree @5638742 (Download .tar.gz)

upload-system-info @5638742raw · history · blame

#!/usr/bin/python3

import subprocess, os

inxi = subprocess.Popen(['inxi', '-Fxxrzc0'], stdout=subprocess.PIPE)
pastebin = subprocess.Popen(['/usr/bin/pastebin'], stdin=inxi.stdout, stdout=subprocess.PIPE)
inxi.stdout.close()
output = pastebin.communicate()[0]
output = output.split()[0] # if we have more than one URL, only use the first one
pastebin.wait()
subprocess.call(['xdg-open', output])