更新日期
2025.04.14
neeview43.2版测试通过
neeview下载
电脑上已经安装了.NET运行库可以下载fd版本,地址:https://github.com/neelabo/NeeView/releases/
neeview开启脚本功能
选项,设置,指令,脚本,使用脚本(开),打开脚本文件夹
neeview一键保存当前图片命名为文件名加图片名
在脚本文件夹新建文件:neeview一键保存当前图片命名为文件名加图片名.nvjs
第15行修改成要保存图片的目录,斜杠要写两遍
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
var saveImagePath = "H:\\ecomic截图"
function getFileNameWithoutExt(fileName) { var lastDotIndex = fileName.lastIndexOf('.'); return lastDotIndex === -1 ? fileName : fileName.substring(0, lastDotIndex); }
function getFileExtension(fileName) { var lastDotIndex = fileName.lastIndexOf('.'); return lastDotIndex === -1 ? '' : fileName.substring(lastDotIndex); }
function getFileNameFromPath(filePath) { var pathParts = filePath.split('\\'); return pathParts[pathParts.length - 1]; }
function getRelativeFilePath(zipFilePath, imageFilePath) { if (imageFilePath.startsWith(zipFilePath)) { return imageFilePath.substring(zipFilePath.length).replace(/\\/g, '_'); } }
var param01 = { "Mode": "Original", "IsOriginalSize": "True", "IsShowToast": "False", "OverwriteMode": "AddNumber", "FileNameMode": "BookPageNumber", "ExportFolder": saveImagePath }
nv.Command.ExportImage.Patch(param01).Execute()
var getBookPath = nv.Book.Path
var getBookFileName = getFileNameFromPath(nv.Book.Path)
var getBookFileNameWithoutSuffix = getFileNameWithoutExt(getBookFileName)
var getCurrentPageIndex = nv.Book.ViewPages[0].Index
var getCurrentPagePath = nv.Book.ViewPages[0].Path
var getCurrentPageFileName = getFileNameFromPath(nv.Book.ViewPages[0].Path)
var getCurrentPageFileSuffix = getFileExtension(nv.Book.ViewPages[0].Path)
var getCurrentPageRelativePath = getRelativeFilePath(getBookPath, getCurrentPagePath)
oldFileName = saveImagePath + '\\' + getBookFileNameWithoutSuffix + '_' + getCurrentPageIndex + getCurrentPageFileSuffix
newFileName = saveImagePath + '\\' + getBookFileNameWithoutSuffix + getCurrentPageRelativePath
var cmdPara = ' /c SET "COPYCMD=/Y" && move "' + oldFileName + '" "' + newFileName + '" && echo '
var param02 = { "Command": "cmd.exe", "Parameter": cmdPara }
nv.Command.OpenExternalApp.Patch(param02).Execute()
nv.ShowToast(newFileName + '文件已保存。')
|
设置快捷键
默认快捷键是Ctrl+S,修改在
选项,设置,指令,指令设置,拉到最下面,neeview一键保存当前图片命名为文件名加页数,双击,快捷键,如果有叹号是冲突了,点消除冲突,选择脚本名
之后Ctrl+S,neeview右下角会显示XX已存储
参考文章
neeview,帮助,脚本说明