Open phraenquex opened 2 years ago
Terrific! Rearrange file, please (while we're at it): @duncanpeacock @TJGorrie
Download URL: https://fragalysis.xchem.diamond.ac.uk/viewer/react/download/tag/a7ea4b13-90b2-4040-8396-6d3fe7b111a3
Download snapshot: https://https://fragalysis.xchem.diamond.ac.uk/viewer/react/projects/1350/1010"
[Ensure they render as clickable hyperlink in the pdf, and include https://]
The following options were checked in the download dialogue:
[use actual words in the modal - just type them across if necessary]
[Add a brief description of what this means, e.g. ]
JSON command sent from front-end to backend to generate the download. This can be reused programmatically as a POST command
The actual JSON (as currently)
[The text as you currently have it.]
[The list as you currently have it]
I've discussed this with Boris and I think I have a solution which will/should work.
These are the essential steps:
The complexity is in the JSON string, so it would be best if we can keep that quite simple. Any formatting of the PDF should be done by the backend, so the JSON needs to just indicate what section the data item belongs to and what it is. A structure like this should work:
{ "download_urls" : {"download_url" : "/viewer/react/download/tag/etc...", "snapshot_url" : "/viewer/react/projects/1350/1010" }, "download_options_list" : {"Selected: All structures" : "True", etc.}, "download_command_json": " .. " }
I've made the URLs relative as the back end should add the host/HTTPS when it adds the URLs to the file.
In terms of work, it is a bit fiddly as I explained before - I need to construct the Readme using the JSON and I had a few problems with formatting and the pandoc library (that does the translation) first time round. So I think we're looking at around 8 - 10 hours work including some joint testing with Boris to make sure the front and back ends are talking to each other properly before we go to staging.
This ticket is being split into two parts:
Part 1 :
Part 2 :
Fixed in V2. But referring to this spec from #1259
Continuing from #747