# obs-data-process **Repository Path**: xiaozefeng/obs-data-process ## Basic Information - **Project Name**: obs-data-process - **Description**: obs data process - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-12 - **Last Updated**: 2021-12-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Huawei Cloud OBS Image Process > 华为云 obs(一个华为云的存储产品) 图片处理 工具 > > 由于系统需要展示各种尺寸的图片,所以需要对图片进行裁剪, 如果直接使用华为云在线裁剪,会出现访问延迟不稳定的情况。 > > 本工具就是在基于华为云图片裁剪的基础上,将裁剪的图片冗余存储,来达到稳定的访问延迟的控制。 ## Features - [x] 并行处理 - [x] 数据来源从文件读取 - [x] 自定义裁剪格式 (见 conf/hotel_commands.json) ## Installation - Download and install go (https://go.dev/dl/) - Prepare go proxy (https://goproxy.io/zh/) - Run > `make build ` - Now, you can see the binary call `batch` (Linux) or `batch.exe` (Windows) ## Usage > make sure you already install the binary ```shell ./batch -c=conf/app.yaml # default: conf/app.yaml -bucket=hotel # default: hotel -ds=./data.json # default: ./data.json -type=1 # options: 1 hotel 2 mall default: 1 ``` ## Configuration #### app.yaml ```yaml obs: ak: B3T3CS5HO31YFDVUYQ8O # obs ak sk: t0PRnnBTnL004XEnAOojihvPuMREa6jio5mQXu5D # obs sk endpoint: http://obs.cn-south-1.myhuaweicloud.com # obs endpoint cdn: https://img.otmchina.cn/ # access image domain command: hotel: conf/hotel_commands.json # obs image process commands for hotel mall: conf/mall_commands.json # obs image process commands for mall ```