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

Write usfm2html Conversion Module for Bible #46

Closed
9 tasks
jag3773 opened this issue Jul 26, 2016 · 1 comment
Closed
9 tasks

Write usfm2html Conversion Module for Bible #46

jag3773 opened this issue Jul 26, 2016 · 1 comment
Milestone

Comments

@jag3773
Copy link
Contributor

jag3773 commented Jul 26, 2016

Story

As a translator I want to see my Bible translation uploads on a pretty HTML page so that I can review the text and share it with others.

Notes

Some specification at https://github.com/unfoldingWord-dev/door43.org/wiki/tX-Development-Architecture#tx-conversion-modules

We need a convertor that takes USFM files and converts them to HTML. This should expect well formed USFM files as input (USFM Spec at http://paratext.org/system/files/usfmReference2_4.pdf)

This repo should have well formed USFM files that could be used for testing https://git.door43.org/jag3773/ULB-pt-br .

History

@codemis said "Completed with the following commits:

Definition of Done

  • Code is written
  • Travis CI is configured and passing:
    • For code building
    • For code unit testing
    • For deploying
  • Coveralls is configured to report code test coverage (and is greater %70)
  • Peer review of code before deploying to production
  • Documentation of code functions (input/output, internal logic)
  • Documentation of public facing features on Wiki as needed
@jag3773 jag3773 changed the title Convert: USFM → HTML Write usfm2html Conversion Module for Bible Jul 28, 2016
@benjore benjore added this to the WST Sprint #1 - Aug 31, 2016 milestone Aug 25, 2016
@richmahn
Copy link
Member

richmahn commented Aug 29, 2016

@ethantkoenig Let me know if you need help understanding the payload from tx-manager, but my fork of tx-md2html should help greatly, starting at https://github.com/richmahn/tx-md2html/blob/master/functions/convert/main.py#L115. Here is also a sample payload of an OBS MD2HTML that tx-manager sends to tx-md2html:

{
  "data": {
    "job": {
      "links": {
        "href": "/job/89fb6a25-6df1-11e6-b82e-3f697fe82f1b",
        "method": "GET",
        "rel": "self"
      },
      "output_format": "html",
      "user": "richmahn",
      "output_expiration": "2016-08-30T14:06:45Z",
      "input_format": "md",
      "job_id": "89fb6a25-6df1-11e6-b82e-3f697fe82f1b",
      "created_at": "2016-08-29T14:04:45Z",
      "source": "https://s3-us-west-2.amazonaws.com/test-tx-webhook/2ca5c9a2-6df0-11e6-b995-b110841e3ee1.zip",
      "eta": "2016-08-29T14:06:45Z",
      "output": "https://test-cdn.door43.org/tx/job/89fb6a25-6df1-11e6-b82e-3f697fe82f1b.zip",
      "resource_type": "obs"
    },
    "cdn_bucket": "test-cdn.door43.org"
    "cdn_file": "tx/job/89fb6a25-6df1-11e6-b82e-3f697fe82f1b.zip",
  }
}

While the job data (that is what is stored in the database but also sent to the converter) has the "ouput" URL for the zip file the converter will make, I also include "cdn_bucket" and "cdn_file" for where you should put it in S3 for simplicity. Ask on Slack in a DM if you have questions.

@benjore benjore modified the milestones: WST Sprint #2, WST Sprint #1 Sep 1, 2016
@benjore benjore mentioned this issue Sep 1, 2016
9 tasks
@benjore benjore modified the milestones: WST Sprint #3, WST Sprint #2 Sep 14, 2016
@jag3773 jag3773 closed this as completed Sep 21, 2016
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

5 participants