Open docrostov opened 1 year ago
https://github.com/Rinn/kolmafia-scripts/blob/release/RelaySnapshot/relay/relay_snapshot.ash
this is rinn's code to make cc_snapshot do it; very simple but i think we can do that supes easily
Sample ash:
void main() {
string output = cli_execute_output('call greenbox.js');
matcher url_matcher = create_matcher('<a href="(.*?)">', output);
string page = "";
if (find(url_matcher)) {
page += '<html>';
page += ' <head>';
page += ' <meta http-equiv = "refresh" content = "0; url = ' + url_matcher.group(1) + '" />';
page += ' </head>';
page += ' <body>';
page += ' <p>Redirecting to Greenbox...</p>';
page += ' </body>';
page += '</html>';
}
write(page);
}
rinn had a dope ass idea to do this and i think it should be pretty easy but i am not figuring out how to do it right now, just posting it in issues