Feature: add video,text file and markdown file preview

This commit is contained in:
萌萌哒赫萝
2023-02-21 18:42:50 +08:00
parent 893e33d591
commit b3ce9b9543
21 changed files with 967 additions and 23 deletions

23
scripts/link.js Normal file
View File

@@ -0,0 +1,23 @@
const pkg = require('../package.json')
const version = pkg.version
// TODO: use the same name format
const generateURL = (platform, ext, prefix = 'PicList-') => {
return `https://release.piclist.cn/${version}/${prefix}${version}${platform}${ext}`
}
const platformExtList = [
['-arm64', '.dmg', 'PicList-'],
['-x64', '.dmg', 'PicList-'],
['', '.AppImage', 'PicList-'],
['-ia32', '.exe', 'PicList-Setup-'],
['-x64', '.exe', 'PicList-Setup-'],
['', '.exe', 'PicList-Setup-'],
['_amd64', '.snap', 'piclist_']
]
const links = platformExtList.map(([arch, ext, prefix]) => {
const markdownLink = `[${prefix}${version}${arch}${ext}](${generateURL(arch, ext, prefix)})`
return markdownLink
})
console.log(links.join('\n'))