Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
3e48756
umbau auf maven und hertlbot
Feb 23, 2020
71dbe4e
Usernames dynamisch setzt bar
Feb 23, 2020
767ccf9
run und docker command auch linux umgestellt.
Feb 23, 2020
d76fafa
output optimiert.
Feb 23, 2020
712f2bd
preiseFoto hinzugefuegt
Mar 11, 2020
8d4ad0e
unnoetige Imports entfernt
Mar 11, 2020
5bca282
preisefot gefixt.
Mar 11, 2020
524dc81
Alle befehle lowercase
Mar 11, 2020
454ac1e
Logging aktiviert
Oct 11, 2020
424611b
Nun mit Photo delete
Oct 11, 2020
c5868f0
photopfad auf jar only umgestellt.
Oct 11, 2020
6864507
photopfad nun dynamischer
Oct 11, 2020
b4eca41
microstream
Dec 12, 2020
3e7874d
mircostream
Dec 13, 2020
7b6c82e
mircostream
Dec 13, 2020
0302b2f
mircostream
Dec 13, 2020
53f6523
mircostream
Dec 13, 2020
05ed24a
mircostream
Dec 13, 2020
5c4e75b
mircostream
Dec 13, 2020
365f03f
Positionen add angefangen.
Jan 6, 2021
d14118d
Positionen hinzufügen abgeschlossen.
Jan 7, 2021
88199d9
Merge Conflicts
AMeierDev Feb 18, 2021
35fe442
Change to OfName
AMeierDev Feb 18, 2021
8b963e8
Merge pull request #1 from AMeierDev/feature/microstream
AMeierDev Feb 18, 2021
d966a61
Merge pull request #2 from AMeierDev/develop
AMeierDev Feb 18, 2021
5e3d595
update to telrambot 5.0
AMeierDev Feb 24, 2021
b7222c5
Change Licence
AMeierDev Feb 24, 2021
1939493
Update LICENSE.adoc
AMeierDev Feb 24, 2021
9aa14c8
CleAning up the code
AMeierDev Feb 24, 2021
d6585b8
Code cleaning
AMeierDev Feb 25, 2021
0b27d96
KeyBoardMethods moved in own class
AMeierDev Feb 26, 2021
f257308
Keyboardbuilder
AMeierDev Feb 27, 2021
21addbf
Update TelegramKeyBoardBuilder.java
AMeierDev Feb 27, 2021
bb437bc
Rename to englisch
AMeierDev Feb 27, 2021
b5f6caa
Rename to English
AMeierDev Feb 27, 2021
7747e2d
rights and roles subcommit
AMeierDev Mar 1, 2021
71f0449
BotMain clean up
AMeierDev Mar 7, 2021
a136447
Rights implemented
AMeierDev Mar 7, 2021
3d5f8ba
order close implementetd
AMeierDev Mar 7, 2021
0193b2d
order committed
AMeierDev Mar 8, 2021
b204687
add username to orderuser
AMeierDev Mar 9, 2021
dc0bb5f
Admin TotalOrder
AMeierDev Mar 9, 2021
06d37a6
Merge pull request #4 from AMeierDev/develop
AMeierDev Mar 9, 2021
c2d012f
fix creaor id, add description howto
AMeierDev Mar 9, 2021
b5f29ef
Merge pull request #5 from AMeierDev/develop
AMeierDev Mar 9, 2021
8545c38
Fixes
AMeierDev Mar 10, 2021
4be57c8
Rights and Readme
AMeierDev Mar 10, 2021
df36afe
readme
AMeierDev Mar 10, 2021
4a40442
Merge pull request #6 from AMeierDev/develop
AMeierDev Mar 10, 2021
d8035f8
Update README.adoc
AMeierDev Mar 10, 2021
cf1c14c
Merge pull request #7 from AMeierDev/develop
AMeierDev Mar 10, 2021
ca1d014
Update README.adoc
AMeierDev Mar 10, 2021
a778fcc
Merge pull request #8 from AMeierDev/develop
AMeierDev Mar 10, 2021
efc5533
Fixes
AMeierDev Mar 18, 2021
a8a71fe
closed fixed
AMeierDev Mar 18, 2021
d0f2be1
Preis anpassung
AMeierDev Oct 20, 2021
561c952
Artikel erweitert.
AMeierDev Oct 20, 2021
e3c78c9
Artikel korriegiert
AMeierDev Oct 20, 2021
9feb178
init gefixt
AMeierDev Oct 20, 2021
e478462
add ClearAll
AMeierDev Oct 20, 2021
ece5fa5
ClearAll gefixt,
AMeierDev Oct 20, 2021
98f805b
ClearAll gefixt.
AM-Xdev Oct 20, 2021
e51d8fd
Update to newest Telegram
AMeierDev Nov 10, 2021
6221e72
wieder auf 11 wegen raspi
AM-Xdev Nov 16, 2021
7a3af4e
Dockerfile fertig gestellt.
AMeierDev Nov 16, 2021
74a68ed
multiarch erklärt
AM-Xdev Nov 17, 2021
fad3fd4
Storage eine ebene tiefer
AMeierDev Nov 18, 2021
fe4f341
Dockerfile + Volumes +exampels
AM-Xdev Nov 19, 2021
a110613
Locale DE
AMeierDev Nov 20, 2021
2c0b7c3
Exmaples with env.list
AMeierDev Nov 20, 2021
1841acc
Aufgeräumt
AMeierDev Nov 20, 2021
50ebbed
gitirgnore angepasst
AMeierDev Nov 20, 2021
5a50d0e
start sh verbessert
AMeierDev Nov 20, 2021
908d5d8
Create develop Action
AMeierDev Nov 21, 2021
768d93a
Merge branch 'master' into develop
AMeierDev Nov 21, 2021
9220b1f
Update CI with docker
AMeierDev Nov 21, 2021
8ed829b
Docker file fixed
AMeierDev Nov 21, 2021
f186285
Docker with login and push
AMeierDev Nov 21, 2021
41f942b
change secrat access
AMeierDev Nov 21, 2021
34210b8
Buildfile docker secrets
AMeierDev Nov 21, 2021
4290380
docker push
AMeierDev Nov 23, 2021
3eb3f22
docker push with setup
AMeierDev Nov 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/build_java_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify

-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: amgamen/chatbot:latest
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
/bin
/build
/out
/target/
microStream.db/
data/
herthaehnchen_bot*
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM eclipse-temurin:17.0.1_12-jdk-focal
LABEL maintainer="AMDev"

RUN groupadd --system -g 1001 telegrambot && adduser --uid 1001 --gid 1001 --disabled-password --shell /bin/false telegrambot

COPY --chown=telegrambot:telegrambot target/lib /opt/telegrambot/lib/
COPY --chown=telegrambot:telegrambot target/java.telegrambots-0.9-FINAL.jar /opt/telegrambot/
RUN chown telegrambot:telegrambot /opt/telegrambot
RUN chmod +x /opt/telegrambot/java.telegrambots-0.9-FINAL.jar
# Set the locale
RUN sed -i '/de_DE.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG de_DE.UTF-8
ENV LANGUAGE de_DE:en
ENV LC_ALL de_DE.UTF-8

WORKDIR /opt/telegrambot/

USER telegrambot

#CMD ["echo $UID"]

ENTRYPOINT ["sh" , "-c", "java -cp java.telegrambots-0.9-FINAL.jar:./lib/* de.bigamgamen.java.telegrambots.hertlhendl.HertlHendlBot ${BOT_TOKEN}:${BOT_KEY} ${BOT_NAME} ${CREATOR_ID}"]
671 changes: 28 additions & 643 deletions LICENSE.adoc

Large diffs are not rendered by default.

72 changes: 57 additions & 15 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,26 +1,68 @@
= Java & Telegram ChatBot Workshop
= Telegram ChatBot For Order things in Small Groups, with a Microstream storing solution

ifdef::env-github[:outfilesuffix: .adoc]

image:https://travis-ci.org/chatbot-workshop/java-telegram-workshop.svg?branch=master["Build Status", link="https://travis-ci.org/chatbot-workshop/java-telegram-workshop"]
image:https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg["gitmoji", link="https://gitmoji.carloscuesta.me"]
== How to

=== Developer how to use:

Create your Ownbot :
https://github.com/chatbot-workshop/java-telegram-workshop/blob/master/WORKSHOP.adoc

Start the Bot like this.

java -cp java.telegrambots-0.9-FINAL.jar:./lib/* de.bigamgamen.java.telegrambots.hertlhendl.HertlHendlBot TOKEN bot_name CREATOR_ID

Or test it with this bot:
@herthaehnchen_bot



=== User how to use:

type
/help
and choose an command.

Usecase: Make an order:

/neuebestellung
/bestellungenkeyboard

choose a Button

/bestellung 0

add article to order with Buttons

/addposition 1/2-Hähnchen 0
/addposition Krautsalat 0

Commit your order

/commitorder 0


=== Admin how to use:

/adminoffnenebestellungen


*This repository is part of the chat bot workshop with https://www.fihlon.ch/[Marcus Fihlon].*

== Copyright and Licensing

Copyright (C) 2018 Marcus Fihlon
Copyright (C) 2020 Arne Meier

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
http://www.apache.org/licenses/LICENSE-2.0

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

See the <<LICENSE#,LICENSE>> file for details.
Loading