aslushnikov / latex-online

Online latex compiler. You give it a link, it gives you PDF
http://latexonline.cc
MIT License
496 stars 89 forks source link

Report compilation progress #29

Open aslushnikov opened 7 years ago

aslushnikov commented 7 years ago

It would be nice to report progress for long-running compilation targets.

Examples of such a long-running compilations are:

bjornregnell commented 7 years ago

YES, this would be nice!

bjornregnell commented 7 years ago

Also, I was a bit confused by the message on the web page that said "compiling..." even if a cached version was opening in another window. I think that if there is already a pfd cached then the web page should say something like "Opening cached pdf..." so that the user does not think that the compilation is on-going when it's not.

aslushnikov commented 7 years ago

Right, the "compiling" statement is misleading. I expect it to be fixed simultaneously with implementation of progress reporting.

MonsieurV commented 7 years ago

Yep, it would be nice that the /pending endpoint reports the status of the current task. Maybe it could return a json payload that look like that when compiling:

{
  "id": "1495582367662",
  "compile": {
    "command": "pdflatex",
    "target": "resume.pdf",
    "type": "git",
    "url": "https://github.com/posquit0/Awesome-CV/blob/master/examples/resume.tex"
  },
  "status": "pending"
}

And when the task is over:

{
  "id": "1495582367662",
  "compile": {
    "command": "pdflatex",
    "target": "resume.pdf",
    "type": "git",
    "url": "https://github.com/posquit0/Awesome-CV/blob/master/examples/resume.tex"
  },
  "status": "done",
  "target_url": "https://latexonline.cc/target?id=1495582367662"
}

Well, something in the vein. Mainly, if we can get the status of the task and the url of the generated file when it's done, the interface would get maybe easier to use.

Also, I'm not sure the /pending method would be required anymore: if the /compile method return the json describing the task status, that would do it no?