Compare commits

28 Commits

Author SHA1 Message Date
gav
1274909088 Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-09-12 14:41:25 +07:00
gav
bd3b859add Update '.drone.yml'
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-09-12 14:37:10 +07:00
gav
6fa27c175f Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-09-12 14:19:18 +07:00
gav
530c9c96fd Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-09-12 13:25:04 +07:00
gav
0c3ac88812 Update '.drone.yml' 2022-05-08 13:50:42 +07:00
gav
ad9dce9a89 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-05-08 13:49:28 +07:00
gav
65531336ad Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2022-05-08 13:39:26 +07:00
gav
169e9c36a9 Update '.drone.yml'
All checks were successful
continuous-integration/drone/push Build is passing
2022-05-08 13:37:54 +07:00
gav
9d8d1d0fdd Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-05-08 13:33:43 +07:00
gav
bd82a7c1a7 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-05-08 13:33:12 +07:00
gav
fc50d21ab2 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-05-08 13:32:03 +07:00
gav
ce4c89aa8d Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-05-08 13:29:20 +07:00
gav
b6b6d0e6aa Update '.drone.yml' 2022-05-08 13:28:04 +07:00
gav
bf36286307 Update '.drone.yml'
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-05-08 13:22:48 +07:00
gav
7113f914c5 Update '.drone.yml'
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-05-08 13:14:03 +07:00
gav
b686d39818 Update '.drone.yml'
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-05-08 13:13:46 +07:00
gav
166b2bd8ef Update '.drone.yml' 2022-05-08 13:13:25 +07:00
gav
f9217fd736 Update '.drone.yml'
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-05-08 13:11:32 +07:00
gav
26ac8ddc90 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-05-08 13:05:29 +07:00
gav
2c18fec1f6 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-05-08 13:02:32 +07:00
gav
08fc8f56e7 Update '.drone.yml' 2022-05-08 13:01:39 +07:00
gav
f26f7cce37 Update '.drone.yml'
Some checks failed
continuous-integration/drone/push Build is failing
2022-05-08 02:36:30 +07:00
b313b15686 Test fix nft_svc
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
2022-05-08 01:11:56 +07:00
aacb413176 Some fix
All checks were successful
continuous-integration/drone/push Build is passing
2022-05-08 01:06:05 +07:00
efc711cd3b Added jpeg to png converted images
All checks were successful
continuous-integration/drone/push Build is passing
2022-05-08 01:02:04 +07:00
b77f1bc13d Remove jpeg's
All checks were successful
continuous-integration/drone/push Build is passing
2022-05-08 00:49:08 +07:00
55f17606d6 Merge branch 'main' of https://gitea.gavt45.ru/gav/es-bot
All checks were successful
continuous-integration/drone/push Build is passing
2022-05-08 00:44:41 +07:00
e0c9aad35a Update pictures 2022-05-08 00:44:19 +07:00
347 changed files with 324 additions and 776 deletions

View File

@ -1,10 +1,58 @@
# ---
# kind: pipeline
# type: docker
# name: deploy-to-docker-vm
# clone:
# disable: true
# steps:
# - name: greeting
# image: appleboy/drone-ssh
# settings:
# host:
# from_secret: docker_host
# username:
# from_secret: docker_user
# key:
# from_secret: docker_privkey
# port: 2200
# script:
# - whoami
# - uname -a
# - mkdir -p deploy; cd deploy
# - git clone https://gitea.gavt45.ru/gav/es-bot.git
# - cd es-bot
# - git checkout main
# - docker-compose build
# when:
# branch:
# - main
# ---
# kind: pipeline
# type: docker
# name: test-secrets-pipeline
# steps:
# - name: test-secrets
# image: alpine
# environment:
# HOST:
# from_secret: docker_host
# commands:
# - env
kind: pipeline
type: docker
name: default
steps:
- name: greeting
image: alpine
commands:
- echo hello
- echo world
- name: docker
image: plugins/docker
settings:
auto_tag: true
registry: registry.gavt45.ru
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry.gavt45.ru/es-bot

View File

@ -16,7 +16,7 @@ def open_image_as_array(path):
def get_encoded_img(arr):
img = Image.fromarray(arr).convert("L")
img = Image.fromarray(arr)
img_byte_arr = io.BytesIO()
img.save(img_byte_arr, format='PNG')
encoded_img = base64.encodebytes(img_byte_arr.getvalue()).decode('ascii')
@ -26,13 +26,14 @@ def get_encoded_img(arr):
@app.route('/getImage', methods=['GET'])
def get_image():
# print(random.choice(os.listdir(IMAGE_PATH)))
image = mpimg.imread(os.path.join(IMAGE_PATH, random.choice(os.listdir(IMAGE_PATH))))
file = os.path.join(IMAGE_PATH, random.choice(os.listdir(IMAGE_PATH)))
# buffered = io.BytesIO()
# image.save(buffered, format="JPEG")
# img_str = base64.b64encode(buffered.getvalue())
image = base64.encodebytes(open(file, 'rb').read()).decode('ascii')
return jsonify({
"code": 0,
"image": get_encoded_img(image),
"image": image,
"first_time": 1
})

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
nft_svc/pics/pic_0.jpg (Stored with Git LFS)

Binary file not shown.

BIN
nft_svc/pics/pic_1.jpg (Stored with Git LFS)

Binary file not shown.

BIN
nft_svc/pics/pic_10.jpg (Stored with Git LFS)

Binary file not shown.

BIN
nft_svc/pics/pic_100.jpg (Stored with Git LFS)

Binary file not shown.

BIN
nft_svc/pics/pic_101.jpg (Stored with Git LFS)

Binary file not shown.

BIN
nft_svc/pics/pic_102.jpg (Stored with Git LFS)

Binary file not shown.

BIN
nft_svc/pics/pic_103.jpg (Stored with Git LFS)

Binary file not shown.

BIN
nft_svc/pics/pic_104.jpg (Stored with Git LFS)

Binary file not shown.

BIN
nft_svc/pics/pic_105.jpg (Stored with Git LFS)

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More