-
-
Save TrickBit/968b30eba031779d7fd1f858d0e5a764 to your computer and use it in GitHub Desktop.
Convert a github file URL to a raw.githubusercontent.com URL (that can be directly accessed for things like view.qiime2.org or wget)
This file contains hidden or 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
# your link goes here | |
link = "https://github.com/knightlab-analyses/qurro-mackerel-analysis/blob/master/AnalysisOutput/qurro-plot.qzv" | |
# note: this will break if a repo/organization or subfolder is named "blob" -- would be ideal to use a fancy regex | |
# to be more precise here | |
print(link.replace("github.com", "raw.githubusercontent.com").replace("/blob/", "/")) | |
# example output link: | |
# https://raw.githubusercontent.com/knightlab-analyses/qurro-mackerel-analysis/master/AnalysisOutput/qurro-plot.qzv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment