8000 Add flexibility for different email formats · Issue #17 · Sage-Bionetworks/synapsemonitor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add flexibility for different email formats #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
thomasyu888 opened this issue Oct 7, 2021 · 1 comment
Open

Add flexibility for different email formats #17

thomasyu888 opened this issue Oct 7, 2021 · 1 comment
Assignees

Comments

@thomasyu888
Copy link
Member
thomasyu888 commented Oct 7, 2021

Email query URL instead of the dataframe with all the files changed

import base64
import json

view_id = "syn26135977"
query_statement = f"SELECT * FROM {view_id} where name = 'batch.pem'"
query_info = {"sql": query_statement, "additionalFilters": [], "includeEntityEtag": True, "offset": 0, "limit": 25, "sort": []}
encoded_query = base64.b64encode(json.dumps(query_info).encode()).decode()

url = f"https://www.synapse.org/#!Synapse:{view_id}/tables/query/{encoded_query}"
print(url)

Replace view_id and query_statement to see the results.

@thomasyu888 thomasyu888 changed the title Add support for query URL to be emailed Email query URL instead of the dataframe with all the files changed Oct 7, 2021
@thomasyu888 thomasyu888 changed the title Email query URL instead of the dataframe with all the files changed Add flexibility for different email formats Jan 22, 2022
@thomasyu888
Copy link
Member Author

From @hhunterzinck

It would be great to have the flexibility for different formats of emails or other variations on an Action class' behavior. Maybe another parameter to _action(self, modified_entities, format) that determines calls to other functions in the Action class? For example, with the EmailAction, the function to construct the body could be selected via this parameter with a default function for body format being a comma-delimited list.

if format == 'default':
body = _default(modified_entities)
elif format == 'fancy':
body = fancy(modified_entities)

6741

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0