Skip to content

Commit 2734416

Browse files
Soutrik DasSoutrik Das
Soutrik Das
authored and
Soutrik Das
committed
Added Readme for Image to URL , Updated Script List
1 parent 1b63796 commit 2734416

File tree

2 files changed

+102
-62
lines changed

2 files changed

+102
-62
lines changed

Image to URL/README.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Image to URL using imgbb api
2+
3+
## Description
4+
5+
Had a bit of problem while handling the functionality in mac.
6+
On windows it was okay, but mac apparently has a lot of problems if you want to listen to keyboard inputs ( to trigger the shortcut)
7+
So the solution was to not listen for the trigger on mac, but instead use the automator.app and create a workflow using the python file.
8+
9+
## How to use it ?
10+
11+
12+
### Windows :
13+
Install all the required python libraries
14+
change `device` to "windows".
15+
Get api key from imgbb, and put it in .env in the root of this repository.
16+
Change shortcut to whatever you want, by default its set to Ctrl + Shift + Z
17+
Change your escape button ( to close the script using keyboard ) , default is "Esc"
18+
19+
20+
### Mac
21+
For Mac users :
22+
Change the `device` to "mac"
23+
Get API key , put it in .env in the root of this repository.
24+
25+
( Theoretically you should be able to do this but I was not able to for some reason )
26+
27+
1. Open Automator > Create a new Quick Action Workflow
28+
2. Drag "Run Shell Script" to the right side > Change Workflow Receives to "no input"
29+
3. Keep the shell as it is, change the script to `python3 <full path to script>` ( use python or python3 , whichever you have )
30+
4. Save it, Go to Keyboard Shortcuts > Services > General > Set the Keyboard shortcut for this saved workflow
31+
32+
But since I had a problem with this , this is how I did it :
33+
34+
1. Open Automator > create new Quick Action workflow
35+
2. Drag "Run Shell Script" to the right side > Change Workflow Receives to "no input"
36+
3. Change the shell to "python3" ( for me , could be different for you) , and then paste the entire script into automator
37+
4. Keep in mind , in doing so the api key has to be in the code , and not in the .env file., also comment out all the dotenv stuff.

0 commit comments

Comments
 (0)