This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🏗️ Change to Python for caching and less dependencies
- Loading branch information
Showing
9 changed files
with
155 additions
and
523 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
.static_storage/ | ||
.media/ | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
.DS_Store | ||
|
||
workflow/ | ||
.idea/ | ||
Alfred_Workflow-* |
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,2 @@ | ||
# Gitmoji workflow for Alfred | ||
Search for [gitmoji](https://gitmoji.carloscuesta.me/) using | ||
[Alfred](https://www.alfredapp.com/) and copy them to the clipboard easily. | ||
|
||
## Installation | ||
You can download the latest version [here](https://github.com/leolabs/alfred-gitmoji/releases/latest). | ||
Just open it in Alfred to install this workflow. No further steps are required. | ||
|
||
## Updating the database | ||
This workflow ships with the current version of the gitmoji database, so you can | ||
use it offline, if needed. If you want to update the database, run `gm update`. | ||
|
||
## Used libraries | ||
This workflow uses [jq](https://stedolan.github.io/jq/) to process the database. | ||
# alfred-gitmoji | ||
Search for gitmoji using Alfred and copy them to the clipboard easily |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/python | ||
# encoding: utf-8 | ||
|
||
import sys | ||
|
||
from workflow import Workflow3, web | ||
|
||
gitmoji_db = 'https://raw.githubusercontent.com/carloscuesta/gitmoji/master/src/data/gitmojis.json' | ||
|
||
|
||
def get_gitmoji_db(): | ||
return web.get(gitmoji_db).json() | ||
|
||
|
||
def main(wf): | ||
data = wf.cached_data('gitmoji_db', get_gitmoji_db, max_age=86400) | ||
|
||
for emoji in data['gitmojis']: | ||
wf.add_item( | ||
title=emoji['emoji'] + ' ' + emoji['code'], | ||
subtitle=emoji['description'], | ||
valid=True, | ||
icon='9B7FE8AC-6582-4825-917E-92D0E0291CC1.png', | ||
match=emoji['name'] + ' ' + emoji['description'], | ||
arg=emoji['code'], | ||
copytext=emoji['code'], | ||
largetext=emoji['code'] | ||
) | ||
|
||
wf.send_feedback() | ||
|
||
|
||
if __name__ == '__main__': | ||
wf3 = Workflow3() | ||
sys.exit(wf3.run(main)) |
Oops, something went wrong.