Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API to obtain metadata of all ITU recommendations? #9

Open
strogonoff opened this issue Jun 24, 2019 · 6 comments
Open

API to obtain metadata of all ITU recommendations? #9

strogonoff opened this issue Jun 24, 2019 · 6 comments
Labels
question Further information is requested

Comments

@strogonoff
Copy link
Contributor

This may be helpful since we’d be able to obtain recommendation details (link, publication data, status, etc.) automatically, letting authors only specify the code.

For example, author writes E.164 and we will be able to fill in the date or other details as requested.

@strogonoff strogonoff added the question Further information is requested label Jun 24, 2019
@strogonoff
Copy link
Contributor Author

So far the only way I can see is scraping URLs of the form https://www.itu.int/rec/T-REC-{{ recommendation code }}/en, but I don’t know if this is viable for all recommendations and whether this webpage is deprecated (I didn’t navigate there using ITU site, only discovered from Google).

@ronaldtse
Copy link
Contributor

@strogonoff the mechanism already exists, in https://github.com/metanorma/relaton-itu 😉

The relaton gem is able to provide YAML output for every ITU Recommendation.

@strogonoff
Copy link
Contributor Author

@ronaldtse That’s glorious!

@strogonoff
Copy link
Contributor Author

@ronaldtse It looks like relaton-itu can look up individual recommendations, but from what I could see it’s not capable of generating a list of all ITU recommendations (or, say, all ITU recommendations approved within given timeframe). Which would natural, since it’s a bibliography library that parses specific references.

In perfect world we would have an ITU recommendation API—which we could actually build ourselves, starting with scraper logic in relaton-itu. Then relaton-itu could even use this API and simplify its logic, especially if we can get ITU to officially support/recognize the API.

@ronaldtse
Copy link
Contributor

ronaldtse commented Jun 26, 2019

it’s not capable of generating a list of all ITU recommendations (or, say, all ITU recommendations approved within given timeframe). Which would natural, since it’s a bibliography library that parses specific references.

You're asking for a lot 😉 Hmm... But the ITU publications interface doesn't allow us to find by dates.

In perfect world we would have an ITU recommendation API—which we could actually build ourselves, starting with scraper logic in relaton-itu. Then relaton-itu could even use this API and simplify its logic, especially if we can get ITU to officially support/recognize the API.

Yes we could do it, it would actually be a great case for Relaton.

But how do we get the data...? It's going to be a nightmare to integrate with their existing document system...

@strogonoff
Copy link
Contributor Author

@ronaldtse

But how do we get the data...? It's going to be a nightmare to integrate with their existing document system...

What I thought:

  • we could borrow the individual recommendation processing logic from Relaton, which is done by scraping,
  • extend it to parsing recommendation lists, also by scraping,
  • having obtained a dataset of recommendations, wrap this into a neat API and offer querying possibilities,
  • get ITU to recognize and support the API[0]
  • use the resources for API support to evolve beyond scraping and eventually normalize their document system a bit

[0] this is the big one. Obviously having an API enables various unexpected uses and opens possibilities, but that’s a difficult point to get across. Beyond that abstract idea, we don’t have many concrete use cases to show. If we want bibliography, they’d say we already have it through Relaton’s scraping; and beyond that we only want it for OB generation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants