diff --git a/workflow/alfred-linkwarden.py b/workflow/alfred-linkwarden.py
index dabacd8..aaa31ea 100644
--- a/workflow/alfred-linkwarden.py
+++ b/workflow/alfred-linkwarden.py
@@ -14,7 +14,7 @@
}
def lw_url() -> str:
- return os.environ['LW_URL'].rstrip('/')
+ return os.environ['A_LW_URL'].rstrip('/')
def get_links(query: str|None, collection_id: str|None = None):
params = {
@@ -26,20 +26,20 @@ def get_links(query: str|None, collection_id: str|None = None):
if collection_id is not None: params['collectionId'] = collection_id
return requests.get(
url=f"{lw_url()}/api/v1/links",
- headers={"Authorization": f"Bearer {os.environ['LW_API_KEY']}"},
+ headers={"Authorization": f"Bearer {os.environ['A_LW_API_KEY']}"},
params=params
)
def delete_link(link_id: str):
return requests.delete(
url=f"{lw_url()}/api/v1/links/{link_id}",
- headers={"Authorization": f"Bearer {os.environ['LW_API_KEY']}"},
+ headers={"Authorization": f"Bearer {os.environ['A_LW_API_KEY']}"},
)
def get_all_collections():
return requests.get(
url=f"{lw_url()}/api/v1/collections",
- headers={"Authorization": f"Bearer {os.environ["LW_API_KEY"]}"},
+ headers={"Authorization": f"Bearer {os.environ["A_LW_API_KEY"]}"},
)
def query_json_to_workflow_item(response: requests.Response):
@@ -123,7 +123,7 @@ def in_venv():
return (hasattr(sys, 'real_prefix') or
(hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix))
if not in_venv():
- env_loc = os.environ.get("ENV_LOC", "./env")
+ env_loc = os.environ.get("A_ENV_LOC", "./env")
if os.path.isdir(env_loc):
shutil.rmtree(env_loc)
subprocess.run(["bash", "./helper.sh"])
diff --git a/workflow/helper.sh b/workflow/helper.sh
index 5f616de..6bcc47e 100755
--- a/workflow/helper.sh
+++ b/workflow/helper.sh
@@ -1,11 +1,11 @@
#!/bin/bash
set -a # export all vars following, including activation script
-ENV_LOC="./env"
-if [ ! -d "$ENV_LOC" ]; then
- /usr/bin/env python3 -m venv "$ENV_LOC"
- source "${ENV_LOC}/bin/activate"
+A_ENV_LOC="./env"
+if [ ! -d "$A_ENV_LOC" ]; then
+ /usr/bin/env python3 -m venv "$A_ENV_LOC"
+ source "${A_ENV_LOC}/bin/activate"
pip3 install -r ./requirements.txt
fi
-. "${ENV_LOC}/bin/activate"
+. "${A_ENV_LOC}/bin/activate"
set +a
python ./alfred-linkwarden.py "$@"
\ No newline at end of file
diff --git a/workflow/info.plist b/workflow/info.plist
index 6d60fc7..1ebee26 100644
--- a/workflow/info.plist
+++ b/workflow/info.plist
@@ -574,7 +574,7 @@ You can search/display a collection via a custom keyword.
0764D263-0FD7-4BA1-B04C-99673D62C89D
xpos
- 515
+ 500
ypos
430
@@ -588,7 +588,7 @@ You can search/display a collection via a custom keyword.
126EF3B6-E7CB-4C32-BB88-B7CAF26DAFA5
xpos
- 555
+ 575
ypos
245
@@ -627,25 +627,25 @@ You can search/display a collection via a custom keyword.
note
Search a specific collection with a keyword
xpos
- 280
+ 260
ypos
- 225
+ 240
C3938C43-F374-46D7-9C55-3200430ED8C3
xpos
- 280
+ 240
ypos
- 110
+ 105
CCFFCA17-1963-4E36-9935-1E463BA63F05
note
delete link
xpos
- 545
+ 565
ypos
- 75
+ 90
F1F713A4-7DB9-4D20-87CB-D3AD60341D02
@@ -676,7 +676,7 @@ You can search/display a collection via a custom keyword.
type
textfield
variable
- LW_API_KEY
+ A_LW_API_KEY
config
@@ -697,11 +697,9 @@ You can search/display a collection via a custom keyword.
type
textfield
variable
- LW_URL
+ A_LW_URL
- variablesdontexport
-
version
1.4
webaddress