glottolog / glottolog-legacy

DEPRECATED. See https://github.com/clld/glottolog
12 stars 11 forks source link

glottolog search api should provide lookup for bibtex key #102

Closed SimonGreenhill closed 7 years ago

SimonGreenhill commented 7 years ago

I'm trying to find something I found using pyglottolog -- the bibtex key anla:AT963C1963. I could not find an obvious way to lookup that key using the refsearch

xrotwang commented 7 years ago
$ glottolog show anla:AT963C1963
Glottolog reference **anla:AT963C1963**

 Canonge, Elliott (ed.) 1963. Copper River wordlists.

@misc{AT963C1963,
    editor = {Canonge, Elliott},
    title = {Copper River wordlists},
    year = {1963},
    url = {http://www.uaf.edu/anla/item.xml?id=AT963C1963},
    anlanote = {On SIL comparative Athabaskan Swadesh 100-word lists. ca. 1963},
    anlclanguage = {Ahtna},
    anlctype = {lexicon},
    glottolog_ref_id = {174320},
    lgcode = {Ahtena [aht]},
    numberofpages = {4}
}
SimonGreenhill commented 7 years ago

Sorry -- meant via the website (e.g. search for AT963C1963 and get to glottolog.org/resource/reference/id/174320

xrotwang commented 7 years ago

Ok, I see. I meant to implement functionality which would redirect http://glottolog.org/resource/reference/id/anla:AT963C1963 appropriately - but this seems to be buggy. Will fix. But the integer ID assigned to a BibTeX record when creating a new online version is stored back in the BibTeX files. It's the

    glottolog_ref_id = {174320},
xrotwang commented 7 years ago

Fixed. Now:

$ curl -I http://glottolog.org/resource/reference/id/anla:AT963C1963
HTTP/1.1 301 Moved Permanently
Date: Wed, 17 May 2017 09:42:53 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 246
Connection: keep-alive
Server: gunicorn/17.5
Location: http://glottolog.org/resource/reference/id/174320
SimonGreenhill commented 7 years ago

Awesome, thanks @xrotwang!