You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering if you could add perma.cc to embiggen. While perma.cc isn't strictly a link shortener, for purposes of altmetrics, it's usually desirable to look at the parent page.
def parsePermaCC(incomingurl)
if incomingurl.include? "perma.cc"
archive = incomingurl.split("perma.cc/")[1]
# https://perma.cc/docs/developer#get-one-archive
url = "https://api.perma.cc/v1/public/archives/#{archive}"
uri = URI(url)
response = JSON.parse(Net::HTTP.get(uri))
return URI(response['url'])
else
return incomingurl
end
end
this is some ruby I hacked up (I usually code in python, so... this is probably all sorts of badwrong) which takes a uri and finds the perma.cc parent url or just passes the url through if not perma.cc'd. I'm thinking an invocation for this can go into follow()
Let me know if this is something you folks would like to include here, or if I should go raise a ticket in altmetric for this.
Cheers,
-Brian
The text was updated successfully, but these errors were encountered:
Hey Brian, I'd like to add support for it into Altmetric indeed, I have my reckons about putting it here on Embiggen though. Will discuss further with the team and let you know. Thanks for sending!
No worries. It isn't an amazing fit for enbiggen since it isn't... quite a link shortener. Let me know how I can help though. Hopefully my proof of concept above is useful. Oh, and I opened a ticket with support on your end: 90862
Hi Folks...
I'm wondering if you could add perma.cc to embiggen. While perma.cc isn't strictly a link shortener, for purposes of altmetrics, it's usually desirable to look at the parent page.
this is some ruby I hacked up (I usually code in python, so... this is probably all sorts of badwrong) which takes a uri and finds the perma.cc parent url or just passes the url through if not perma.cc'd. I'm thinking an invocation for this can go into follow()
Let me know if this is something you folks would like to include here, or if I should go raise a ticket in altmetric for this.
Cheers,
-Brian
The text was updated successfully, but these errors were encountered: