|
|
@ -19,16 +19,14 @@ class TaJian { |
|
|
|
URL=https://microsoft.com/
|
|
|
|
URL=https://microsoft.com/
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
async saveUrlShortcut(filename, data) { |
|
|
|
async saveUrlShortcut(filename, data) { |
|
|
|
//console.log('TaJian try to save shortcut url');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
const dirPath = path.resolve(this.save_dir); |
|
|
|
const dirPath = path.resolve(this.save_dir); |
|
|
|
const filepath = `${dirPath}/${filename}.url`; |
|
|
|
const filepath = `${dirPath}/${filename}.url`; |
|
|
|
|
|
|
|
|
|
|
|
const shortUrlContent = `\[InternetShortcut\] |
|
|
|
const shortUrlContent = `\[InternetShortcut\] |
|
|
|
URL=${data.url} |
|
|
|
URL=${data.url} |
|
|
|
`;
|
|
|
|
`;
|
|
|
|
await writeFile(filepath, shortUrlContent, { encoding: 'utf8' }); |
|
|
|
await writeFile(filepath, shortUrlContent, { encoding: 'utf8' }); |
|
|
|
}catch(error) { |
|
|
|
}catch(error) { |
|
|
|
console.error('Save short url file failed: %s', error); |
|
|
|
console.error('Save short url file failed: %s', error); |
|
|
@ -39,8 +37,6 @@ URL=${data.url} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async saveDescriptionFiles(filename, data) { |
|
|
|
async saveDescriptionFiles(filename, data) { |
|
|
|
//console.log('TaJian try to save description files');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
const dirPath = path.resolve(this.save_dir); |
|
|
|
const dirPath = path.resolve(this.save_dir); |
|
|
|
|
|
|
|
|
|
|
|