Skip to content

Commit 8aa5b6a

Browse files
author
Beichen Li
committed
initial commit
1 parent 1762679 commit 8aa5b6a

File tree

10 files changed

+746
-0
lines changed

10 files changed

+746
-0
lines changed

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# A universal .gitignore template for electron npm projects
2+
# bcli, Mar.25 2019
3+
4+
# electron dependencies are PRETTY BIG (about 150mb) thus must be ignored at commit
5+
node_modules
6+
7+
# npm generated list of node_modules
8+
package-lock.json
9+
10+
# system files of OSX & Win
11+
.DS_Store
12+
Thumbs.db
13+
14+
# IDEs configurations
15+
# want to know more about IDE .gitignore?
16+
# @see https://www.gitignore.io/
17+
18+
### VisualStudioCode
19+
.vscode/*
20+
!.vscode/settings.json
21+
!.vscode/tasks.json
22+
!.vscode/launch.json
23+
!.vscode/extensions.json
24+
25+
### VisualStudioCode Patch
26+
# Ignore all local history of files
27+
.history

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Shrink Shrimp
2+
3+
**Desktop application for batch shrinking PDFs**
4+
*Best with scanned documents!*
5+
6+
[logo](src/ui/img/shrimp.png)
7+
8+
## Install ##
9+
10+
// for chinese users
11+
npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
12+
13+
npm start
14+
15+
16+
## License ##
17+
[MIT](LICENSE)
18+

package.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "shrink-shrimp",
3+
"version": "0.1.0",
4+
"author": {
5+
"name": "bcli",
6+
"email": "bclicn@gmail.com"
7+
},
8+
"description": "Batch shrink scanned PDFs using GhostScript",
9+
"license": "MIT",
10+
"keywords": [
11+
"PDF",
12+
"Shrink",
13+
"GhostScript"
14+
],
15+
"main": "./src/main.js",
16+
"scripts": {
17+
"start": "npx electron .",
18+
"build": "",
19+
"test": ""
20+
},
21+
"repository": "https://github.com/bclicn/pdf-shrink",
22+
"devDependencies": {
23+
"electron": "^4.1.1",
24+
"electron-packager": "^13.1.1"
25+
},
26+
"dependencies": {
27+
"jquery": "^3.3.1",
28+
"shelljs": "^0.8.3"
29+
}
30+
}

src/js/locales.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* Locales
3+
* @author bcli, Mar.25 2019
4+
* @description currently we support English(en), Simplified Chinese(zh_cn) and Traditional Chinese (zh_tw)
5+
* to add another language, please follow the language code bellow and export it here and import in the rednerer.js
6+
* @see https://www.w3schools.com/tags/ref_language_codes.asp
7+
*/
8+
9+
// English
10+
const en = {
11+
name: "Shrink Shrimp",
12+
drop_pdf_here: "Drop PDF Here",
13+
pdf_not_found: "No PDF Files",
14+
error: "Error",
15+
order: "No.",
16+
filename: "Filename",
17+
rate: "Rate",
18+
reset: "Reset"
19+
};
20+
21+
// Simplified Chinese
22+
const zh_cn = {
23+
name: "虾压",
24+
drop_pdf_here: "拖拽PDF至此",
25+
pdf_not_found: "无PDF文件",
26+
error: "错误",
27+
order: "序号",
28+
filename: "文件名",
29+
rate: "比率",
30+
reset: "重置"
31+
};
32+
33+
// Tranditional Chinese
34+
const zh_tw = {
35+
name: "蝦壓",
36+
drop_pdf_here: "拖拽PDF至此",
37+
pdf_not_found: "無PDF文件",
38+
error: "錯誤",
39+
order: "序號",
40+
filename: "文件名",
41+
rate: "比率",
42+
reset: "重置"
43+
};
44+
45+
// export
46+
module.exports = {en,zh_cn,zh_tw};

0 commit comments

Comments
 (0)