Skip to content

Commit 0201c0c

Browse files
committed
Migrate workflow from Python 2 to Python 3
macOS no longer ships with python (Python 2). This commit: - Switch Run Script nodes from python to python3 in info.plist - Remove dependency on Alfred-Workflow library (Python 2 only) in upload-s3.py, replace with direct sys.path manipulation - Remove vendored lib/ from repo, add .gitignore and requirements.txt (run: pip3 install --target ./lib -r requirements.txt) - Remove unused workflow/ and Alfred_Workflow egg-info directories
1 parent 90426ee commit 0201c0c

2,948 files changed

Lines changed: 28 additions & 946230 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
lib/
2+
*.pyc
3+
__pycache__/

Alfred_Workflow-1.33-py2.7.egg-info/PKG-INFO

Lines changed: 0 additions & 168 deletions
This file was deleted.

Alfred_Workflow-1.33-py2.7.egg-info/SOURCES.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

Alfred_Workflow-1.33-py2.7.egg-info/dependency_links.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

Alfred_Workflow-1.33-py2.7.egg-info/installed-files.txt

Lines changed: 0 additions & 24 deletions
This file was deleted.

Alfred_Workflow-1.33-py2.7.egg-info/not-zip-safe

Lines changed: 0 additions & 1 deletion
This file was deleted.

Alfred_Workflow-1.33-py2.7.egg-info/top_level.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,18 @@ https://github.com/PatelUtkarsh/Alfred-Workflow-Upload-R2/assets/5015489/1559487
1313

1414

1515

16-
## Download
16+
## Requirements
1717

18-
https://github.com/PatelUtkarsh/Alfred-Workflow-Upload-R2/releases
18+
- Python 3 (ships with macOS or install via `brew install python3`)
19+
20+
## Install
21+
22+
1. Download the latest release from https://github.com/PatelUtkarsh/Alfred-Workflow-Upload-R2/releases
23+
2. Install Python dependencies:
24+
25+
```bash
26+
pip3 install --target ./lib -r requirements.txt
27+
```
1928

2029
## Usage
2130

info.plist

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
<key>escaping</key>
132132
<integer>102</integer>
133133
<key>script</key>
134-
<string>python upload-s3.py "text" {query}</string>
134+
<string>python3 upload-s3.py "text" {query}</string>
135135
<key>scriptargtype</key>
136136
<integer>0</integer>
137137
<key>scriptfile</key>
@@ -194,7 +194,7 @@
194194
<key>escaping</key>
195195
<integer>102</integer>
196196
<key>script</key>
197-
<string>python upload-s3.py "{query}"</string>
197+
<string>python3 upload-s3.py "{query}"</string>
198198
<key>scriptargtype</key>
199199
<integer>0</integer>
200200
<key>scriptfile</key>
@@ -385,15 +385,15 @@
385385
<key>variablesdontexport</key>
386386
<array>
387387
<string>cf_account_id</string>
388-
<string>cf_bucket_name</string>
388+
<string>cf_secret_key</string>
389389
<string>cf_access_key</string>
390390
<string>shorturl</string>
391391
<string>tinypng_api_key</string>
392+
<string>cf_bucket_name</string>
392393
<string>cf_region</string>
393-
<string>cf_secret_key</string>
394394
</array>
395395
<key>version</key>
396-
<string>1.2</string>
396+
<string>1.3</string>
397397
<key>webaddress</key>
398398
<string>https://github.com/patelutkarsh</string>
399399
</dict>
-1.89 MB
Binary file not shown.

0 commit comments

Comments
 (0)