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

Add HTML Option for Resources in our API #37

Open
jag3773 opened this issue Oct 10, 2017 · 3 comments
Open

Add HTML Option for Resources in our API #37

jag3773 opened this issue Oct 10, 2017 · 3 comments

Comments

@jag3773
Copy link
Contributor

jag3773 commented Oct 10, 2017

@jag3773 commented on Wed Jan 18 2017

Story

As a developer I want to get resources in HTML format so that I don't have to do any pre-processing of the text to use it.

Notes

Since we are already creating HTML for the live site we should be able to bundle this and provide it as a zip file for download from the API.


@neutrinog commented on Wed Apr 12 2017

@jag3773 how do we want this organized? By chapter? By project/book?


@jag3773 commented on Thu Apr 13 2017

The HTML is already created by the tX pipeline, it's just a matter of putting a link to it in the API. Possibly this task includes zipping the html if it's not already. Check with @richmahn on that.


@neutrinog commented on Mon May 15 2017

I'd vote for zipping and signing just like we do with the usfm.


@neutrinog commented on Thu May 18 2017

@richmahn where is the generated html located that @jag3773 mentioned above?
And what tx function is generating it?


@neutrinog commented on Thu May 18 2017

See https://github.com/unfoldingWord-dev/tx-usfm2html which doesn't seem to be used. I also see https://github.com/unfoldingWord-dev/tx-manager-lambda. It seems that the code is redundant.


@jag3773 commented on Fri May 19 2017

Joel, you might want the pre convert link that is listed on the dashboard page right now, see api.door43.org/dashboard


@neutrinog commented on Wed Aug 02 2017

@jag3773 @richmahn I still don't know what to plug into to get some html.
There are two ways to go about this:

  1. trigger html to be generated each time the api is built.
  2. pull re-built html from some location (would require knowing the source version used in the build).

@neutrinog commented on Thu Aug 03 2017

@richmahn do we have something similar to unfoldingWord/door43.org#409 for the rest of the content? e.g. obs, bible, etc.


@jag3773 commented on Wed Aug 09 2017

Yes, HTML is built already. @richmahn Can you please post the URL pattern ?


@neutrinog commented on Thu Aug 31 2017

@richmahn bump.


@richmahn commented on Fri Sep 01 2017

I see I'm still not tracking being tagged in Github comments very well. Sorry for the delay. The HTML files can be gathered from the CDN, but you'd have to know each book/chapter/file for the compiled HTML. For example, for OBS, if you know owner=Door43 repo=en_obs commit=5d0efd50ed you can get the first chapter of OBS: https://cdn.door43.org/u/Door43/en_obs/5d0efd50ed/01.html

We should put the ZIP file that those files come from on the CDN in that directory, but currently we do not. Unfortunately the are put in the cdn.door43.org/tx/job directory by JOB ID. For example, https://http://cdn.door43.org/tx/job/34a8085982d9371853cb23d83c138fee13d777a4562df6bf202506baf6a89819.zip is the conversion result of some job (not sure which). The only way to know the right file is from the DynamoDB tx-job table.


@jag3773 commented on Fri Sep 01 2017

@richmahn I think we're looking for the print ready HTML, as if user had hit the print button on the project page.


@richmahn commented on Fri Sep 01 2017

@jag3773 That's easier, but can be muddled. For OBS: https://api.door43.org/tx/print?id=Door43/en_obs/5d0efd50ed


@richmahn commented on Fri Sep 01 2017

But if you want it to actually end in .html, you can use: https://cdn.door43.org/u/Door43/en_obs/5d0efd50ed/print_all.html, but that above link needs to be at least called once. I assume you'll put this in a new location, so just use the api link, not the cdn link.


@neutrinog commented on Tue Sep 12 2017

HTML support is working well.. sorta. Some things only work in production and some things only work in develop.

In production we have tA, ULB, and UDB. OBS is only half there because the print url is only returning the title (https://api.door43.org/tx/print?id=Door43-Catalog/en_obs/9156abac16).

In develop only the ULB html link works.
If we can get these html links straightened out everything should flow into the API.


@jag3773 commented on Wed Sep 13 2017

Let's test on 9/14 when our latest tx code is in production.

@da1nerd
Copy link
Contributor

da1nerd commented Oct 11, 2017

This has been tabled until further notice.

@jag3773 jag3773 removed the blocked label Apr 27, 2018
@jag3773
Copy link
Contributor Author

jag3773 commented Apr 27, 2018

@neutrinog Now that unfoldingWord-dev/tx-manager#201 is deployed, I don't think this issue is blocked anymore, is that correct?

@da1nerd
Copy link
Contributor

da1nerd commented Apr 27, 2018

I believe so.

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

No branches or pull requests

2 participants