Skip to content
Snippets Groups Projects
Commit b4f4d7f7 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Create a simple web service to convert an FTN nodelist to syncterm.lst

Tested with this:
wget --content-disposition --post-file=nodelist.010 http://synchro.net/fido-nodelist-syncterm.ssjs
parent 7d4f9f0c
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
var nodelist = new File(system.temp_dir + "nodelist.txt");
if(!nodelist.open("w")) {
write("Error " + nodelist.error + " opening " + nodelist.name);
exit(1);
}
nodelist.write(http_request.post_data, http_request.post_data.length);
nodelist.close();
var syncterm = new File(system.temp_dir + "syncterm.lst");
load({}, "fido-nodelist-syncterm.js", nodelist.name, syncterm.name);
if(!syncterm.open("r")) {
write("Error " + syncterm.error + " opening " + syncterm.name);
exit(2);
}
http_reply.header["Content-Type"] = "application/octet-stream";
http_reply.header["Content-Disposition"] = 'inline; filename="syncterm.lst"';
http_reply.status = "200 here's your file";
writeln(syncterm.read());
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment