Open sbailey opened 5 years ago
It is very doable to just update prev/next nights, as I would just rewrite the previous and next night. However, after heavy contemplation, I'm unsure as to handle the first night
and last night
links.
If the updating night happens to be the first or last night (which it most likely will), then I would have to go back to change all of the nights' first night
and last night
links. One option I've been contemplating is making a separate text document to store the last and last nights, and all the html files should reference this .txt document when linking first night
and last night
. However, since I'm working in html, there is no native file reader that can read local files, so I would either have to make a seperate .js file, or import a javascript library just to do so. Clearly, things get muddled really quickly; do you have any idea on how to go about this, or rather, should I just ignore updating the first
and last
tags entirely?
I have implemented a version where it completely disregards the first
and last
links, but (I hope) correctly updates next
and prev
links. It is found under the update_prev_next
branch (I did not pull request the branch because I am still unsure if we want to try to implement the first
and last
links, or not).
This is closely related to issue #47, but it is potentially tricker and messier and I'm not sure exactly how we want to do this, so implement #47 first and then we'll deal with this in a separate branch + PR:
When updating a single night without regenerating all nights, check if the previous and next nights also need to be updated so that their prev/next links are correct. The logic might be something like this:
The primary use case here is when we are N+1 nights into the survey and just got new data, we can update the plots for night N without having to re-generate all previous N nights, while still having the Nth night updated so that its "next" link will work.