|
@ -40,6 +40,24 @@ class File { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Download a file from a url |
|
|
|
|
|
* @returns {Promise<string>} filepath |
|
|
|
|
|
*/ |
|
|
|
|
|
async fakeDownload() { |
|
|
|
|
|
const url = URL.parse(this.url); |
|
|
|
|
|
this.filename = slugify(url.hostname, { lower: true }); |
|
|
|
|
|
const filepath = path.join(dest, `bodacc-datadila.opendatasoft.com-1697536785170.csv`); |
|
|
|
|
|
const generatedpath = path.join(dest, `bodacc-datadila.opendatasoft.com-generated-1697536785170-2.csv`); |
|
|
|
|
|
this.filepath = filepath; |
|
|
|
|
|
this.generatedpath = generatedpath; |
|
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
|
resolve(filepath); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Download a file from a url |
|
|
* Download a file from a url |
|
|
* @returns {Promise<string>} filepath |
|
|
* @returns {Promise<string>} filepath |
|
|