cantor

command module
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 3 Imported by: 0

README

cantor

goreportcard

基于 wails + vue + github-api 实现的个人图床 mac app

点我下载 Cantor-v0.0.5.dmg


必读 QA

Q: what's cantor?
A: it means "康托尔集", 意指图床
Q: 使用应用前准备工作
A: 在 github 新建仓库和申请 access_token

申请 access_token

Q: 使用步骤
- 打开应用, 填写相关配置 (配置存储于 ~/.cantor/config.json 中)
- 点击上传图片文件, 应用会通过 github api 将图片文件上传至配置的仓库中
- 应用上传文件列表中, 可点击标题打开链接, 亦可直接复制链接
- 上传文件列表的数据存储在 `仓库/resource/database.json`
Q: repo 目录说明
|____resource           图床资源目录
| |____database.json    上传文件记录
|____backend            后端代码目录  
|____frontend           前端代码目录
|____assets             个人资源目录
Q: 其他 blabla..
- 当前 app 只支持 Mac 10.14+, 其他平台应用需下载源码, 自行编译
- 应用日志位置在 ~/.cantor/cantor.log
- 上传图片最大 2M, 只支持 png gif jpg jpeg, 有需要可以下载源码自行调整编译

DIY

准备工作

# 安装 wails
go get -u github.com/wailsapp/wails/cmd/wails
wails -help

# 下载 cantor
git clone https://github.com/evercyan/cantor
# 本 repo 下 resource, assets 均是个人的资源存储, 和项目无关

浏览器调试

# 安装前端组件
cd ./cantor/frontend/
npm install
# 启动前端服务
npm run serve

# 启动后端服务
cd ./cantor/
sh run.sh debug

# 打开 http://127.0.0.1:8080/
# 浏览器调试模式下, 不支持上传文件(需要调用系统文件选择功能), 其余功能正常

编译可执行文件和 app

# 生成可执行文件 ./build/Cantor
sh run.sh test

# 生成 mac app ./build/Cantor.app
sh run.sh build

Snapshot

cantor-1

cantor-2

cantor-3

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
cantor Module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL