Skip to content

Commit

Permalink
Updated 3rd party request script to get rid of issues with download a…
Browse files Browse the repository at this point in the history
…dded comparator tool housed in private git.
  • Loading branch information
makingglitches committed May 8, 2021
1 parent be29f8c commit e14ff52
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 1 deletion.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ async function startJob(destfilename, storeitem, authToken) {
console.log(err);
});




var pipe = request.get(url + '=d' + storeitem.voption);

pipe.on('error', function(err) {
Expand Down
17 changes: 16 additions & 1 deletion node_modules/request/request.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions pcbs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

const fs = require('fs');

var count =0


function recursepath(path) {
var files = [];

var dir = fs.readdirSync(path, { withFileTypes: true });

for (var i in dir) {

var name = dir[i].name.toString();

if (dir[i].isFile() && name!=".gitignore'") {
files.push(path + '\\' + dir[i].name.toString());
}
else {
if (name!=".git" && name !='bin' && name !='obj' && name!="node_modules" )
{
files = files.concat(recursepath(path + '\\' + dir[i].name));
}
}
}

return files;
}

var txt = fs.readFileSync("m.txt").toString();

var words = txt.split(/\s/);

var files = recursepath("C:\\Users\\John\\Documents\\CensusProject\\QrCode");
var pcfiles = [];
var oldfiles =[];
for (var i in files)
{
pcfiles.push ('git mv \"'+files[i]+'\" \"'+files[i]+'bs\"');
oldfiles.push ('git mv \"'+files[i]+'bs\" \"'+files[i]+'\"');

}

var s="";

for (var p in pcfiles)
{
s+=pcfiles[p]+"\n";
}

fs.writeFileSync('remscript.txt',s);

s="";

for (var o in oldfiles)
{
s+=oldfiles[o]+"\n";
}

fs.writeFileSync('oldscript.txt',s);

1 comment on commit e14ff52

@makingglitches
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request/request#3365

issue fixed with code change.

Please sign in to comment.