assets/js/pipeline.js
//once the save button is clicked, the filenames are saved into a text file
once the save button is clicked, the filenames are saved into a text file
once the save button is clicked the filenames are saved into a text file
function run(event) {
    var fs = require('fs');
    var data = document.getElementById("file").textContent;
    var inputName = document.getElementById("custom-IFB-text").textContent;
    var outputName = document.getElementById("custom-OFB-text").textContent;
    var cl = document.getElementById("file").className;
    var cl2 = document.getElementsByClassName("empty");
    inputName = inputName.trim()
    fs.writeFileSync('assets/config.txt', inputName + '\n', (err) => { throw err });
    for (var i = 0; i < document.getElementsByClassName("empty").length; i++) {
        var n = document.getElementsByClassName("empty")[i].textContent;
        n = n.trim();
        fs.appendFileSync('assets/config.txt', n + "\n", (err) => { throw err });
    }
    outputName = outputName.trim()
    fs.appendFileSync('assets/config.txt', inputName + '\n', (err) => { throw err });
    alert("Data has been saved. Running PluMA...");
    var exec = require('child_process').exec;
    child = exec('"Release/PluMA Windows.exe" ./pluma ../config.txt',
      function (error, stdout, stderr) {
        console.log('stdout: ' + stdout);
        console.log('stderr: ' + stderr);
        if (error !== null) {
          console.log('exec error: ' + error);
        }
      });
}
function run ( event ) { var fs = require ( 'fs' ) ; var data = document . getElementById ( "file" ) . textContent ; var inputName = document . getElementById ( "custom-IFB-text" ) . textContent ; var outputName = document . getElementById ( "custom-OFB-text" ) . textContent ; var cl = document . getElementById ( "file" ) . className ; var cl2 = document . getElementsByClassName ( "empty" ) ; inputName = inputName . trim ( ) fs . writeFileSync ( 'assets/config.txt' , inputName + '\n' , ( err ) => { throw err } ) ; for ( var i = 0 ; i < document . getElementsByClassName ( "empty" ) . length ; i ++ ) { var n = document . getElementsByClassName ( "empty" ) [ i ] . textContent ; n = n . trim ( ) ; fs . appendFileSync ( 'assets/config.txt' , n + "\n" , ( err ) => { throw err } ) ; } outputName = outputName . trim ( ) fs . appendFileSync ( 'assets/config.txt' , inputName + '\n' , ( err ) => { throw err } ) ; alert ( "Data has been saved. Running PluMA..." ) ; var exec = require ( 'child_process' ) . exec ; child = exec ( '"Release/PluMA Windows.exe" ./pluma ../config.txt' , function ( error , stdout , stderr ) { console . log ( 'stdout: ' + stdout ) ; console . log ( 'stderr: ' + stderr ) ; if ( error !== null ) { console . log ( 'exec error: ' + error ) ; } } ) ; }
once the save button is clicked, the filenames are saved into a text file
once the save button is clicked the filenames are saved into a text file
//call pluma