Once a Space or a set of .rst files have been downloaded, a script should go through them:
collect the page IDs (it's a field value) for ALL available .rst files
go through each .rst file, and for every link with the format https://optile.atlassian.net/wiki/spaces/SECOPS/pages/$pagenum ($pagenum being the page ID of the page), replace it with the local link
Once a Space or a set of .rst files have been downloaded, a script should go through them:
https://optile.atlassian.net/wiki/spaces/SECOPS/pages/$pagenum
($pagenum being the page ID of the page), replace it with the local link