Created
December 29, 2021 02:18
-
-
Save OKsign/0007438c77b088fd409499237f02d6b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Requirements: | |
1. merge_images.py from https://github.com/255/merge-images/blob/master/merge_images.py (and requirements for running script) | |
2. yad (sudo apt install yad) | |
3. AutoKey (with gtk+, install via Ubuntu Software) | |
--------------------------------------------------- | |
tested on AutoKey 0.95.10, Ubuntu 20.04.3 LTS | |
""" | |
import os | |
from datetime import datetime | |
utime = datetime.now() | |
utime2 = utime.strftime("%Y_%m_%d_%H.%M.%S") | |
output_file = '/home/john/Desktop/output-combine_images_%s.png' % utime2 | |
script_file = '/home/john/Desktop/merge_images.py' | |
column = 0 | |
cmd1 = "yad --center --title='Merge Images' --width=300 --height=100 --on-top --text='Drop Here' --dnd" | |
aa = system.exec_command(cmd1) | |
bb = aa.replace("file://", "") | |
bb_sp = bb.split('\n') | |
list_file = [] | |
for i in bb_sp: | |
ff = i.replace(" ","\ ") | |
list_file.append(ff) | |
files = " ".join(list_file) | |
cmd2 = "python3 %s -c %s -o %s %s" % (script_file,column,output_file,files) | |
os.system(cmd2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment