├── .gitignore ├── .vscode └── settings.json ├── Dockerfile ├── LICENSE ├── README.md ├── build.sh ├── config.json ├── electron ├── .gitignore ├── .npmrc ├── build.sh ├── index.html ├── main.js ├── package.json ├── preload.js ├── readme.md ├── renamer.ico └── yarn.lock ├── openRenamerBackend ├── .gitignore ├── .idea │ ├── .gitignore │ ├── modules.xml │ ├── openRenamerBackend.iml │ └── vcs.xml ├── api │ ├── ApplicationRuleApi.ts │ ├── AutoPlanApi.ts │ ├── FileApi.ts │ ├── GlobalConfigApi.ts │ ├── PublicApi.ts │ ├── QbServiceApi.ts │ └── RenamerApi.ts ├── config.ts ├── dao │ ├── ApplicationRuleDao.ts │ ├── GlobalConfigDao.ts │ └── SavePathDao.ts ├── entity │ ├── bo │ │ └── rules │ │ │ ├── AutoRule.ts │ │ │ ├── DeleteRule.ts │ │ │ ├── InsertRule.ts │ │ │ ├── ReplaceRule.ts │ │ │ ├── RuleInterface.ts │ │ │ ├── SerializationRule.ts │ │ │ └── TranslateRole.ts │ ├── constants │ │ └── GlobalConfigCodeConstant.ts │ ├── dto │ │ ├── AutoPlanConfigDto.ts │ │ ├── BtListItemDto.ts │ │ └── QbConfigDto.ts │ ├── po │ │ ├── ApplicationRule.ts │ │ ├── GlobalConfig.ts │ │ └── SavePath.ts │ └── vo │ │ ├── FileObj.ts │ │ └── RuleObj.ts ├── index.ts ├── middleware │ ├── controllerEngine.ts │ ├── handleError.ts │ └── init.ts ├── package.json ├── pnpm-lock.yaml ├── service │ ├── ApplicationRuleService.ts │ ├── AutoPlanService.ts │ ├── FileService.ts │ ├── GlobalConfigService.ts │ ├── QbService.ts │ └── RenamerService.ts ├── sqls │ ├── v001__init.sql │ ├── v002__init.sql │ ├── v003_新增默认模板.sql │ ├── v004_新增记录表.sql │ └── v005_新增推荐规则.sql ├── start.sh ├── static │ └── .gitkeep ├── tsconfig.json └── util │ ├── ErrorHelper.ts │ ├── LogUtil.ts │ ├── MediaUtil.ts │ ├── NumberUtil.ts │ ├── ObjectOperate.ts │ ├── ProcesHelper.ts │ ├── QbApiUtil.ts │ ├── SqliteHelper.ts │ ├── TimeUtil.ts │ ├── TranslateUtil.ts │ ├── TranslateWord.ts │ ├── ValUtil.ts │ └── pathUtil.ts └── openRenamerFront ├── .browserslistrc ├── .gitignore ├── .prettierrc ├── README.md ├── babel.config.js ├── jsconfig.json ├── package.json ├── pnpm-lock.yaml ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── assets │ └── logo.png ├── components │ ├── FileChose.vue │ ├── Rule.vue │ ├── Tips.vue │ └── rules │ │ ├── ApplicationRuleList.vue │ │ ├── AutoRule.vue │ │ ├── DeleteRule.vue │ │ ├── InsertRule.vue │ │ ├── ReplaceRule.vue │ │ ├── RuleBlock.vue │ │ ├── SerializationRule.vue │ │ └── TranslateRule.vue ├── main.js ├── router │ └── index.js ├── utils │ ├── Bus.js │ ├── HttpUtil.js │ └── ValUtil.js └── views │ ├── auto │ ├── components │ │ └── editForm.vue │ └── index.vue │ ├── download │ └── config │ │ └── index.vue │ ├── home │ └── Home.vue │ └── public │ └── login.vue └── vue.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | 106 | data 107 | /.idea/.gitignore 108 | /.idea/modules.xml 109 | /.idea/open-renamer.iml 110 | /.idea/vcs.xml 111 | 112 | package-lock.json -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.tabSize": 2, 3 | "editor.detectIndentation": false 4 | } -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:lts-buster-slim 2 | WORKDIR /app 3 | COPY ./openRenamerBackend /app 4 | # RUN chmod 777 -R /app && npm install -g pnpm typescript --registry https://registry.npmmirror.com 5 | # 注意此处未添加npm代理 6 | RUN chmod 777 -R /app && npm install -g pnpm typescript 7 | ENV PORT 80 8 | CMD ["bash", "start.sh"] 9 | 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # open-renamer 2 | 3 |  4 | 5 | renamer 的开源实现版本,BS 应用,支持 arm/x86 部署使用,两种使用方式: 6 | 7 | 1. 部署容器到 nas 8 | 已打包到 dockerhub 中:[hub.docker.com/r/fleyx/open-renamer](https://hub.docker.com/r/fleyx/open-renamer) 9 | 10 | 2. 下载桌面应用使用,目前仅支持 windows,后续计划支持 mac,linux[下载地址](https://github.com/FleyX/open-renamer/releases/latest) 11 | 12 | [点击查看参考文档](https://blog.fleyx.com/blog/detail/20221130) 13 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | base=$(cd "$(dirname "$0")";pwd) 3 | cd $base 4 | rm -rf openRenamerBackend/dist 5 | # 注意此处未添加npm代理 6 | # docker run -it --rm --name buildOpenRenamer --user ${UID} -v $base/openRenamerFront:/opt/front node:lts-slim bash -c "cd /opt/front && npm install -g pnpm --registry https://registry.npmmirror.com && pnpm install --registry https://registry.npmmirror.com && pnpm run build" 7 | docker run -it --rm --name buildOpenRenamer --user ${UID} -v $base/openRenamerFront:/opt/front node:lts-slim bash -c "cd /opt/front && npm install -g pnpm && pnpm install && pnpm run build" 8 | 9 | rm -rf openRenamerBackend/static/* 10 | touch openRenamerBackend/static/.gitkeep 11 | mv openRenamerFront/dist/* openRenamerBackend/static 12 | rm -rf openRenamerBackend/node_modules 13 | 14 | # 单平台打包并推送 15 | #docker build -t fleyx/open-renamer:$0 --push . 16 | # 多平台打包并推送 17 | docker buildx build -t fleyx/open-renamer:$1 --platform linux/amd64,linux/arm64 --push . 18 | docker buildx build -t fleyx/open-renamer:latest --platform linux/amd64,linux/arm64 --push . 19 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "version":1.3 3 | } -------------------------------------------------------------------------------- /electron/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | openRenamerBackend 4 | build 5 | .idea 6 | *.exe -------------------------------------------------------------------------------- /electron/.npmrc: -------------------------------------------------------------------------------- 1 | electron_mirror=https://npmmirror.com/mirrors/electron/ -------------------------------------------------------------------------------- /electron/build.sh: -------------------------------------------------------------------------------- 1 | cd ../openRenamerFront 2 | yarn 3 | npm run build 4 | cd ../openRenamerBackend 5 | yarn 6 | tsc 7 | rm -rf ./static/js 8 | rm -rf ./static/css 9 | cp -r ../openRenamerFront/dist/* ./static 10 | cd ../electron 11 | mkdir -p dist 12 | npm run build -------------------------------------------------------------------------------- /electron/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |