Added /usr/bin/pastebin and /usr/bin/upload-system-info
Clement Lefebvre
7 years ago
24 | 24 |
Package: xapps-common
|
25 | 25 |
Architecture: all
|
26 | 26 |
Multi-Arch: foreign
|
27 | |
Depends: ${misc:Depends}, ${python:Depends}, python, python-gi
|
|
27 |
Depends: ${misc:Depends}, ${python:Depends}, python, python-gi, inxi, xdg-utils, gist
|
28 | 28 |
Description: Common files for XApp desktop apps
|
29 | 29 |
This package includes files that are shared between several XApp
|
30 | 30 |
apps (i18n files and configuration schemas).
|
|
0 |
#!/usr/bin/python3
|
|
1 |
|
|
2 |
import sys
|
|
3 |
import os
|
|
4 |
import stat
|
|
5 |
import subprocess
|
|
6 |
|
|
7 |
content = ""
|
|
8 |
|
|
9 |
mode = os.fstat(0).st_mode
|
|
10 |
if stat.S_ISFIFO(mode):
|
|
11 |
content = sys.stdin.read()
|
|
12 |
elif stat.S_ISREG(mode):
|
|
13 |
content = sys.stdin.read()
|
|
14 |
else:
|
|
15 |
args = sys.argv[1:]
|
|
16 |
if len(args) == 1 and os.path.exists(args[0]):
|
|
17 |
with open(args[0], 'r') as infile:
|
|
18 |
content = infile.read()
|
|
19 |
else:
|
|
20 |
str_args = ' '.join(args)
|
|
21 |
content = str_args
|
|
22 |
|
|
23 |
if content != "":
|
|
24 |
p = subprocess.Popen(["/usr/bin/gist-paste"], stdin=subprocess.PIPE)
|
|
25 |
p.communicate(content.encode("UTF-8"))
|
|
0 |
#!/usr/bin/python3
|
|
1 |
|
|
2 |
import subprocess
|
|
3 |
|
|
4 |
inxi = subprocess.Popen(['inxi', '-Fxxrzc0'], stdout=subprocess.PIPE)
|
|
5 |
gist = subprocess.Popen(['gist-paste'], stdin=inxi.stdout, stdout=subprocess.PIPE)
|
|
6 |
inxi.stdout.close()
|
|
7 |
output = gist.communicate()[0]
|
|
8 |
gist.wait()
|
|
9 |
|
|
10 |
subprocess.call(['xdg-open', output])
|