Compare commits

..

No commits in common. "master" and "0.6.0" have entirely different histories.

3 changed files with 30 additions and 19 deletions

View File

@ -1,14 +1,13 @@
# Grail # Grail(cloud)
Version: 0.6.1 * Version: 0.5.1
Date: 23.05.2021 * Date: 16.01.2021
*********************************
Instant Upload Screenshot-Tool based on the idea of Gyazoo.
[This needs a settings.ini containing credentials]
## Description: **->MS Windows only!**
Instant Upload Screenshot-Tool based on the idea of Gyazoo. *********************************
[Edit the settings.ini file for online upload (using either SFTP or Nextcloud)] [Precompiled Download](https://git.lukasmahler.de/attachments/92de34c2-faf6-473d-87a0-0e885809540b "download")
->Currently Windows only!
## Precompiled:
[Download](https://git.lukasmahler.de/attachments/607f8474-4c42-4c89-a245-3cbd4b66be58 "0.6.1")

View File

@ -1,7 +1,7 @@
__author__ = "Lukas Mahler" __author__ = "Lukas Mahler"
__copyright__ = "Copyright 2018-2021" __copyright__ = "Copyright 2018-2021"
__version__ = "0.6.1" __version__ = "0.6.0"
__date__ = "23.05.2021" __date__ = "22.05.2021"
__email__ = "lm@ankerlab.de" __email__ = "lm@ankerlab.de"
__status__ = "Development" __status__ = "Development"
@ -51,7 +51,7 @@ class Fillscreen(QtWidgets.QWidget, Ui_View):
############################################################################################### ###############################################################################################
############################################################################################### ###############################################################################################
# Monkeycode for trying to block input for content under the transparent window. # Bastelstüble wegen Transparentem Window welches aber den Input auf unterliegendes blockieren soll
# self.setAttribute(QtCore.Qt.WA_TranslucentBackground, True) # self.setAttribute(QtCore.Qt.WA_TranslucentBackground, True)
# self.setBackgroundRole(QtGui.QPalette.Base) # self.setBackgroundRole(QtGui.QPalette.Base)
@ -166,6 +166,7 @@ def read_ini(rootdir):
"USR = ; YOUR NEXTCLOUD USER, THIS CAN BE BLANK TO GET ASKED INTERACTIVELY\n" "USR = ; YOUR NEXTCLOUD USER, THIS CAN BE BLANK TO GET ASKED INTERACTIVELY\n"
"PASS = ; YOUR NEXTCLOUD USERS PW, THIS CAN BE BLANK TO GET ASKED INTERACTIVELY\n" "PASS = ; YOUR NEXTCLOUD USERS PW, THIS CAN BE BLANK TO GET ASKED INTERACTIVELY\n"
"PTH = ; THE NEXTCLOUD FOLDER PATH WHERE TO PUT THE SCREENSHOT\n" "PTH = ; THE NEXTCLOUD FOLDER PATH WHERE TO PUT THE SCREENSHOT\n"
"WHERE = ; THIS SHOULD BE THE FULL ONLINE URL\n"
"\n" "\n"
"# IF MODE IS LOCAL YOU MAY CHANGE THE SETTINGS BELOW\n" "# IF MODE IS LOCAL YOU MAY CHANGE THE SETTINGS BELOW\n"
"[LOCAL]\n" "[LOCAL]\n"
@ -201,12 +202,15 @@ def read_ini(rootdir):
usr = config.get(mode, 'USR') usr = config.get(mode, 'USR')
passw = config.get(mode, 'PASS') passw = config.get(mode, 'PASS')
pth = config.get(mode, 'PTH') pth = config.get(mode, 'PTH')
where = config.get(mode, 'WHERE')
myini.update( myini.update(
MODE = mode, MODE = mode,
URL = url, URL = url,
TIMEOUT = timeout,
USR = usr, USR = usr,
PASS = passw, PASS = passw,
PTH = pth, PTH = pth,
WHERE = sslurl(where, ssl)
) )
elif mode == "LOCAL": elif mode == "LOCAL":
where = config.get('LOCAL', 'WHERE') where = config.get('LOCAL', 'WHERE')
@ -357,9 +361,11 @@ def upload_to_url_nextcloud(tempsave):
# NEXTCLOUD INFO # NEXTCLOUD INFO
url = settings['URL'] url = settings['URL']
timeout = settings['TIMEOUT']
usr = settings['USR'] usr = settings['USR']
passw = settings['PASS'] passw = settings['PASS']
pth = settings['PTH'] + os.path.basename(tempsave) pth = settings['PTH'] + os.path.basename(tempsave)
where = settings['WHERE'] + os.path.basename(tempsave)
# Test Connection first or go into fallback # Test Connection first or go into fallback
r = head(url) r = head(url)
@ -386,13 +392,8 @@ def upload_to_url_nextcloud(tempsave):
save_to_local(tempsave, fallback=1) save_to_local(tempsave, fallback=1)
return return
# Had to monkeypatch the pyocclient libary here to stop AttributeErrors on 'share_file_with_link' calls
# (https://github.com/owncloud/pyocclient/issues/263)
print("Starting to Upload...") print("Starting to Upload...")
nxt.put_file(pth, tempsave) nxt.put_file(pth, tempsave)
link_info = nxt.share_file_with_link(pth)
where = link_info.get_link()
print("Screen was Uploaded: URL: " + where) print("Screen was Uploaded: URL: " + where)
open_url(where) open_url(where)

11
grail_build.cfg Normal file
View File

@ -0,0 +1,11 @@
[ship]
param = --onefile --windowed
icon = C:\Users\lukas\Desktop\Dump\08_Resources\camera.ico
[debug]
param = --onefile
icon = C:\Users\lukas\Desktop\Dump\08_Resources\camera.ico
[test]
param = --onedir --noupx --add-binary msvcp140.dll;.
icon = C:\Users\lukas\Desktop\Dump\08_Resources\camera.ico