Compare commits
No commits in common. "main" and "v0.16.1" have entirely different histories.
44
.github/workflows/main.yml
vendored
44
.github/workflows/main.yml
vendored
@ -4,47 +4,19 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: https://gitea.com/actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- name: Zip Artifacts
|
- name: Archive Server
|
||||||
uses: https://github.com/thedoctor0/zip-release@master
|
uses: thedoctor0/zip-release@master
|
||||||
with:
|
with:
|
||||||
type: 'zip'
|
type: 'zip'
|
||||||
filename: 'server.zip'
|
filename: 'server.zip'
|
||||||
exclusions: '*.git*'
|
exclusions: '*.git*'
|
||||||
- name: Release Archive
|
- name: Release Archive
|
||||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
server_url: https://gitea.wpgcommunity.net
|
allowUpdates: true
|
||||||
files: 'server.zip'
|
artifacts: "server.zip"
|
||||||
docker:
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: https://gitea.com/actions/checkout@master
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
${{ vars.DOCKER_REPO }}/costhive
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
with:
|
|
||||||
config-inline: |
|
|
||||||
[registry."${{ vars.DOCKER_REPO }}"]
|
|
||||||
http = true
|
|
||||||
insecure = true
|
|
||||||
- name: Login to Gitea Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ vars.DOCKER_REPO }}
|
|
||||||
username: ${{ vars.DOCKER_USER }}
|
|
||||||
password: ${{ secrets.DOCKER_PASS }}
|
|
||||||
- name: Build and push
|
|
||||||
uses: https://github.com/docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
push: true
|
|
||||||
context: .
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
FROM python@sha256:c66cf219ac0083a9af2ff90e16530f16cd503c59eb7909feb3b8f3524dc1a87e
|
FROM python@sha256:21c9f0b22213295a13bd678c5b45aa587ff6cb01cd99b6cf0e6928f4c777006b
|
||||||
# python:3.12.2-slim-bullseye (amd64)
|
# python:3.11.4-slim-bullseye (arm/v7)
|
||||||
RUN useradd costhive
|
RUN useradd costhive
|
||||||
|
|
||||||
WORKDIR /home/costhive
|
WORKDIR /home/costhive
|
||||||
@ -16,7 +16,7 @@ RUN python -m venv venv; \
|
|||||||
|
|
||||||
COPY backend backend
|
COPY backend backend
|
||||||
|
|
||||||
ENV FLASK_APP=run.py
|
ENV FLASK_APP run.py
|
||||||
|
|
||||||
RUN chmod +x boot.sh; \
|
RUN chmod +x boot.sh; \
|
||||||
chown -R costhive:costhive .
|
chown -R costhive:costhive .
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -1,38 +0,0 @@
|
|||||||
"""raise password char length
|
|
||||||
|
|
||||||
Revision ID: 782a2409df41
|
|
||||||
Revises: 926395732c3e
|
|
||||||
Create Date: 2025-06-03 21:01:23.169897
|
|
||||||
|
|
||||||
"""
|
|
||||||
from alembic import op
|
|
||||||
import sqlalchemy as sa
|
|
||||||
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
|
||||||
revision = '782a2409df41'
|
|
||||||
down_revision = '926395732c3e'
|
|
||||||
branch_labels = None
|
|
||||||
depends_on = None
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
|
||||||
with op.batch_alter_table('user', schema=None) as batch_op:
|
|
||||||
batch_op.alter_column('password_hash',
|
|
||||||
existing_type=sa.VARCHAR(length=128),
|
|
||||||
type_=sa.String(length=255),
|
|
||||||
existing_nullable=False)
|
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
|
||||||
with op.batch_alter_table('user', schema=None) as batch_op:
|
|
||||||
batch_op.alter_column('password_hash',
|
|
||||||
existing_type=sa.String(length=255),
|
|
||||||
type_=sa.VARCHAR(length=128),
|
|
||||||
existing_nullable=False)
|
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
|
||||||
@ -9,7 +9,7 @@ from werkzeug.security import generate_password_hash, check_password_hash
|
|||||||
class User(UserMixin, db.Model):
|
class User(UserMixin, db.Model):
|
||||||
id = db.Column(db.BigInteger, primary_key=True, autoincrement=True)
|
id = db.Column(db.BigInteger, primary_key=True, autoincrement=True)
|
||||||
email = db.Column(db.String(255), nullable=False, unique=True)
|
email = db.Column(db.String(255), nullable=False, unique=True)
|
||||||
password_hash = db.Column(db.String(255), nullable=False)
|
password_hash = db.Column(db.String(128), nullable=False)
|
||||||
|
|
||||||
LoginToken = db.relationship("LoginToken", backref='User', lazy='dynamic')
|
LoginToken = db.relationship("LoginToken", backref='User', lazy='dynamic')
|
||||||
Bought = db.relationship("Bought", secondary="login_token",
|
Bought = db.relationship("Bought", secondary="login_token",
|
||||||
|
|||||||
@ -27,7 +27,7 @@ class PDFReceipt:
|
|||||||
with fitz.open(file, filetype="pdf") as doc:
|
with fitz.open(file, filetype="pdf") as doc:
|
||||||
words = []
|
words = []
|
||||||
for page in doc:
|
for page in doc:
|
||||||
words.extend(page.get_text("words", textpage=page.get_textpage_ocr(language = 'deu'), sort=True))
|
words.extend(page.get_text("words", textpage=page.get_textpage_ocr(), sort=True))
|
||||||
return words
|
return words
|
||||||
|
|
||||||
def _getStoreName(words: list[tuple]) -> str:
|
def _getStoreName(words: list[tuple]) -> str:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user