Skip to content

Commit

Permalink
ss-main: added first pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Sulstice committed Mar 31, 2022
1 parent 8a8c5ed commit 3336de7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,23 @@ def __init__(self,
smarts_pattern
):

self.smarts_pattern = smarts_pattern
self.smarts_pattern = self.prepare_smarts_for_url(smarts_pattern)


self.base_url = "https://smarts.plus/smartsview/download_rest?"
self.url = self.base_url + f"smarts={self.smarts_pattern}"
self.url = self.base_url + f'smarts={self.smarts_pattern}'

def prepare_smarts_for_url(self, smarts_pattern):

'''
Replace some characters with URL accepted characters
'''

return smarts_pattern.replace("%", "%25").\
replace("&", "%26").replace("+", "%2B").\
replace("#", "%23").replace(";", "%3B")

def get_image(self):

Expand Down
2 changes: 1 addition & 1 deletion global_chem_extensions/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# ----
setup(
name="global_chem_extensions",
version="0.7.5",
version="0.7.6",
packages=find_packages(),
license='MPL 2.0',
author="Suliman Sharif",
Expand Down

0 comments on commit 3336de7

Please sign in to comment.