ansible/roles/modernpaste/files/paste-info.py
Ricky Elrod 150f622bcb fix paste info and deactivation scripts
Signed-off-by: Ricky Elrod <relrod@redhat.com>
2018-04-11 13:51:50 +00:00

15 lines
458 B
Python

#!/usr/bin/env python
import sys
sys.path.append('/usr/share/modern-paste/app')
import modern_paste
from util.cryptography import get_decid
from database.paste import get_paste_by_id
paste_id = get_decid(sys.argv[1])
paste = get_paste_by_id(paste_id)
print('Decrypted ID: ' + str(paste_id))
print('Title : ' + paste.title)
print('Language : ' + paste.language)
print('Views : ' + str(paste.views))
print('Contents : \n' + paste.contents)