Explorar el Código

Fix Mendeley's BibTeX URL field mangling

Ryan C. Thompson hace 5 años
padre
commit
6de87fab2a
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      Snakefile

+ 2 - 0
Snakefile

@@ -253,6 +253,8 @@ shortest URL is kept.'''
                 try:
                     entry_urls = regex.split('\\s+', entry['url'])
                     shortest_url = min(entry_urls, key=len)
+                    # Need to fix e.g. 'http://www.pubmedcentral.nih.gov/articlerender.fcgi?artid=55329{\\&}tool=pmcentrez{\\&}rendertype=abstract'
+                    shortest_url = re.sub('\\{\\\\(.)\\}', '\\1', shortest_url)
                     entry['url'] = shortest_url
                 except KeyError:
                     pass