Compare commits

..
237 Commits
Author SHA1 Message Date
Julian 27f6b663ab Various fixes for empty Relegation 2026-08-04 21:44:11 +02:00
Julian c8ec6f1846 Small fixes for formula matching 2026-08-03 10:09:38 +02:00
Julian 2055c15906 Small fixes 2026-07-28 00:20:12 +02:00
Julian 3461b61e27 Add config for 2027 2026-07-27 23:52:07 +02:00
Julian 04dca24513 Cleanup code and prepare for AI usage 2026-07-27 21:24:35 +02:00
Julian b0110e1bc8 Remove unnecessary log 2026-06-28 21:44:38 +02:00
Julian 32ef2656f7 Improve logging for WhatsApp Reminders 2026-06-28 19:45:29 +02:00
Julian d19fc04140 Improve logic for adding missing matches with placeholder and formula 2026-06-28 11:32:31 +02:00
Julian 04120d77e8 Prepare WM Tippspiel 2026-05-27 23:36:18 +02:00
Julian e433dbe9e3 Add AEK Athens 2026-03-24 22:42:29 +01:00
Julian 13468de37c Add AZ Alkmaar 2026-03-24 22:40:28 +01:00
Julian 197b5532c7 Add Sigma Olomouc 2026-03-08 15:32:36 +01:00
Julian b09dd6b32b Merge branch 'main' of https://git.codeam.io/Julian/tlw-database-tool 2026-03-08 15:08:18 +01:00
Julian 09ab9650c8 Add Genk 2026-03-08 15:07:30 +01:00
Julian Arndt cd543c9223 Add Como 2026-01-09 10:34:08 +01:00
Julian Arndt 733cc25196 add espanyol 2025-12-02 19:01:44 +01:00
Julian c2fb53f1cf Add Portugal Primeira Liga 2025-11-25 21:47:05 +01:00
Julian 6feffaa6e0 Go Ahead Eagles 2025-11-17 00:24:37 +01:00
Julian Arndt a0ee841573 Add support for Austria Bundesliga 2025-10-27 17:24:54 +01:00
Julian a71330a4da Disable RelegationUpdater 2025-08-23 21:20:12 +02:00
Julian fd47798209 Fix updating of showTable value 2025-08-23 21:13:15 +02:00
Julian 553a013601 Disable RelegationUpdater Pipeline 2025-07-21 23:26:51 +02:00
Julian 870e278049 Add wtl config for season 2026 2025-07-21 23:24:35 +02:00
Julian 73a170bd07 Fix bug in matching formula 2025-07-19 22:27:38 +02:00
Julian ed2131a847 Prepare season 2026 2025-07-19 14:28:39 +02:00
Julian 979a03178a Trigger Relegation Updater 2025-05-19 22:21:54 +02:00
Julian 30eea96662 Add Jenkinsfile for Relegation 2025-05-19 22:17:12 +02:00
Julian 0a50f120e3 Improve handling for leagues without matches this season (ex. world cup) 2025-04-19 18:33:49 +02:00
Julian 7126f2de40 Small improvement 2025-04-19 17:55:39 +02:00
Julian 0e893b9c50 Fix small bug 2025-04-19 17:12:05 +02:00
Julian 828d1dc4d8 Fix jenkinsfiles so that errors are sent to telegram 2025-04-13 18:30:11 +02:00
Julian Arndt d644c8f698 Add more teams 2025-03-27 22:54:12 +01:00
Julian Arndt 68892d9d6c Add Jagiellonia 2025-03-27 22:43:47 +01:00
Julian Arndt d8a00acb2d Merge remote-tracking branch 'origin/main' 2025-03-27 22:41:24 +01:00
Julian Arndt c083aa9c7c Add FK Bodø/Glimt 2025-03-27 22:41:14 +01:00
Julian c054f268b0 Merge remote-tracking branch 'origin/main' 2025-02-03 20:57:55 +01:00
Julian f22b9545d3 Fix false notifications for betters which already dropped out of the WTL Pokal 2025-02-03 20:57:23 +01:00
Julian Arndt 59fab74a01 Disable triggering LigaCup 2025-01-31 12:28:44 +01:00
Julian 3539b23943 Small fixes and workarounds 2025-01-28 19:56:18 +01:00
Julian 2d8e418d66 Fix MatchesListForumUpdater 2025-01-27 22:14:06 +01:00
Julian 9b5b50f174 Replace log4j with slf4j 2025-01-26 23:01:35 +01:00
Julian d426c2b75f Fix correct AWS credentials variable name 2025-01-26 22:36:45 +01:00
Julian 5009146a04 Revert log4j version to major version 2 2025-01-26 22:34:00 +01:00
Julian df4a69f567 Explicitely use java from configured jdk 2025-01-26 22:29:54 +01:00
Julian 81a421ebd3 Update Jenkinsfiles to JDK22 2025-01-26 22:11:23 +01:00
Julian f5735721e2 Refactor API Football to v3 2025-01-26 22:03:10 +01:00
Julian Arndt 31d33aa0f8 Add Auxerre 2024-12-24 13:19:48 +01:00
Julian Arndt e1a0736e1c Fix adding missing match 2024-07-29 21:43:54 +02:00
Julian Arndt fbfbac8ae2 Fix ID for Eredivisie 2024-07-29 09:36:52 +02:00
Julian bb1bb8568e Fix bug 2024-07-28 22:16:22 +02:00
Julian a6fbac60a2 Update config for season 2025 2024-07-28 22:00:24 +02:00
Julian 5adb9fb822 Add config for season 2025 2024-07-28 21:10:18 +02:00
Julian 7d4f66c113 Fix placeholder same match detection 2024-06-25 22:14:05 +02:00
Julian 738d0427d9 Change hours for second WhatsApp Reminder from one hour to two 2024-06-22 22:29:25 +02:00
Julian 6604b0310f Manually enable users for WhatsApp Reminders 2024-06-22 22:21:01 +02:00
Julian d828c9f0b2 Fix small bugs in google calendar event generator 2024-06-20 19:03:44 +02:00
Julian 5502607f3c Add better handling for different phone number formats 2024-06-20 18:28:30 +02:00
Julian f4748d2874 Catch non 200 response codes of WhatsApp tool 2024-06-18 21:58:03 +02:00
Julian a8e9327d3d Add logging to WhatsAppReminder 2024-06-18 21:52:26 +02:00
Julian 0bf72d686b Fix WhatsAppReminder Jenkinsfile 2024-06-18 21:48:12 +02:00
Julian 3215493ac7 Fix WhatsAppReminder Jenkinsfile 2024-06-18 21:43:20 +02:00
Julian 055e4d3d4a Fix WhatsAppReminder Jenkinsfile 2024-06-18 21:37:03 +02:00
Julian 29e4bfbb0b Fix WhatsAppReminder Jenkinsfile 2024-06-18 21:32:22 +02:00
Julian 72a51bf1f9 Add WhatsApp reminder 2024-06-18 21:21:27 +02:00
Julian bd39227f6d Use league name from database for calendar 2024-06-12 20:35:36 +02:00
Julian 4c2650454b Add several improvements for EM 2024-06-08 00:12:59 +02:00
Julian d19cb5561b Update Jenkinsfiles 2024-05-23 23:13:35 +02:00
Julian 1127d9d845 Add missing teams 2024-05-23 22:12:26 +02:00
Julian fc73ce8b27 Add Jenkinsfile for EM-Tippspiel 2024-05-23 21:54:39 +02:00
Julian 813c16fcbb Add FC Toulouse and Stade Brestois 29 2024-05-12 10:20:16 +02:00
Julian 0a2cc9f881 Add Plzen, PAOK Saloniki and Brügge 2024-03-24 11:21:56 +01:00
Julian Arndt cce004230d Fix ID of PSV Eindhoven 2024-01-09 22:10:15 +01:00
Julian Arndt acb1ea6f5a Add PSV Eindhoven 2024-01-09 22:05:20 +01:00
Julian Arndt 5015c61864 Merge remote-tracking branch 'origin/main' 2024-01-05 10:04:54 +01:00
Julian Arndt 4c643404d8 Fix Supercup Jenkinsfile 2024-01-05 10:03:50 +01:00
Julian 15e2f65c43 Add FC Girona 2023-12-17 20:41:01 +01:00
Julian Arndt 02cae28986 Add Sporting Braga 2023-09-27 16:51:01 +02:00
Julian Arndt 44e458a21d Only print errors if errors available 2023-09-27 16:48:26 +02:00
Julian Arndt 5b76f0384b Add Kopenhagen 2023-09-18 09:51:48 +02:00
Julian Arndt 4d4b6f726a Rework rounds parser to support wrongly sorted league rounds 2023-09-10 17:40:12 +02:00
Julian Arndt 119097d101 Only update result if api football match is finished 2023-08-20 11:55:53 +02:00
Julian Arndt 281ac3f2f7 Setup rest of season 2024 2023-08-14 14:35:30 +02:00
Julian Arndt a40b47f469 Fix matches results updater 2023-08-14 10:03:44 +02:00
Julian 9e80cb01e2 Add template config for Tippliga 2023-08-06 18:51:29 +02:00
Julian 9178a97b45 Add teams for wtl pokal 2023-08-06 18:51:12 +02:00
Julian cccd93e6db Add Europa League and fix pipeline 2023-08-05 21:21:56 +02:00
Julian db06d62fba Add teams for wtl pokal 2023-07-30 18:49:02 +02:00
Julian c0ddebf971 Fix api rate limit 2023-07-30 16:41:13 +02:00
Julian af0047136a Fix pipeline 2023-07-30 16:28:33 +02:00
Julian 5000e83012 Add league config for 2024 2023-07-30 16:18:59 +02:00
Julian 82d12ea921 Fix bugs 2023-06-06 16:01:02 +02:00
Julian a2360a3938 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	src/main/java/de/jeyp91/tippliga/TLWMatchesResultsUpdater.java
#	src/test/java/de/jeyp91/tippliga/TLWMatchesResultsUpdaterTest.java
2023-06-06 15:49:54 +02:00
Julian e374de61ae Add auto update of results 2023-06-06 15:48:06 +02:00
Julian c7c1002fb0 Add auto update of results 2023-06-06 15:45:25 +02:00
Julian 2cb0e754ed Merge remote-tracking branch 'origin/main' 2023-06-05 23:20:15 +02:00
Julian edcd8e5f35 Add admin login 2023-06-05 23:19:27 +02:00
Julian Arndt cca81177a5 Add VfB Oldenburg 2023-05-22 16:38:06 +02:00
Julian Arndt f5f140a2a8 Clean up pipelines 2023-04-13 10:40:35 +02:00
Julian Arndt 49a6458d03 Fix wrong trigger 2023-04-13 10:30:02 +02:00
Julian 71d57e8977 first part of auto results 2023-04-10 22:11:10 +02:00
Julian b2174f00d8 Add support for third delivery date 2023-04-10 19:19:15 +02:00
Julian 9f97b31e0f Improve logging to telegram 2023-04-10 19:18:43 +02:00
Julian 22d30db20d Fix error 2023-04-10 13:48:04 +02:00
Julian 2f6c4f3c3c Parse overtime goals 2023-04-10 13:39:45 +02:00
Julian a19c2124aa Fix gradle build 2023-04-10 13:10:13 +02:00
Julian 6026f48a51 Fix typo in Jenkinsfile 2023-04-10 13:01:33 +02:00
Julian 96b4a8cda2 Update Java version 2023-04-10 12:57:00 +02:00
Julian a641824c70 Add all missing Jenkinsfiles 2023-04-10 12:49:47 +02:00
Julian 39cfa9403f Add build Jenkinsfile to git 2023-04-10 12:31:44 +02:00
Julian 84208dc256 Update dependencies 2023-04-10 11:59:56 +02:00
Julian Arndt ad5fbcaab1 Fix duplicate id 2023-01-09 17:24:16 +01:00
Julian Arndt 5d008fdf54 Add Feyenoord 2023-01-09 10:30:48 +01:00
Julian Arndt bf5b6727f4 Add Netherlands Eredivisie 2023-01-09 10:18:53 +01:00
Julian 883c2dc55a Test 2023-01-08 22:06:07 +01:00
Julian adf1c3e7e2 Add two teams 2023-01-08 21:22:45 +01:00
Julian 644cff5adf Merge remote-tracking branch 'origin/main' 2022-12-22 12:58:54 +01:00
Julian ee8218c815 Add Fenerbahce 2022-12-22 12:58:16 +01:00
Julian Arndt 33a5a7d531 Fix typo 2022-12-20 09:56:29 +01:00
Julian 9bd51dc8db Add six new teams 2022-12-19 22:37:09 +01:00
Julian 5d3ae8438b Merge remote-tracking branch 'origin/main' 2022-12-18 15:50:21 +01:00
Julian 5d5eb48fa7 Add turkey 2022-12-18 15:49:05 +01:00
Julian Arndt 7f258ed16f Fix duplicate google calendar events 2022-11-15 10:14:09 +01:00
Julian 2fad736e41 Fix tests 2022-11-07 18:18:17 +01:00
Julian d72ae3a51d Reset target version 2022-11-07 18:12:25 +01:00
Julian 086fa71f05 Update dependencies and add support for google calendar html event description 2022-11-07 18:00:29 +01:00
Julian 3df202bc84 Add Sporting Lissabon, Maccabi Haifa and Celtic Glasgow 2022-10-23 22:18:20 +02:00
Julian d2abacb0c4 Fix config for Partizan Belgrad 2022-10-05 21:55:12 +02:00
Julian 64f723f619 Add FK Partizan Belgrad 2022-10-05 21:51:52 +02:00
Julian 599e781122 Remove warnings 2022-08-05 16:41:44 +02:00
Julian fcff894678 Change back line seperators 2022-08-05 15:21:00 +02:00
Julian 67a99946f2 Fix find event bug 2022-08-05 15:17:50 +02:00
Julian f7d4742ec8 Improve matcher to find event 2022-08-05 14:53:28 +02:00
Julian 1136874a3c Replace line seperator for google event descriptions 2022-08-05 14:51:11 +02:00
Julian 903963c951 Improve google event update logic and add logging 2022-08-05 14:00:43 +02:00
Julian 6e377335c1 Rework Google Auth and add Supercup 2022-08-05 13:25:26 +02:00
Julian af1d1dd616 Add Supercups and Europa League 2022-08-05 10:52:09 +02:00
Julian 274f602aab Reset token 2022-08-04 21:10:42 +02:00
Julian 3b3ddc5ab5 Update google credentials 2022-08-04 19:07:28 +02:00
Julian 3437d52322 Improve Google Calendar Logic 2022-08-04 13:36:24 +02:00
Julian 2e3f494db5 Retrieve forum id for checksum provider dynamically 2022-07-31 18:05:48 +02:00
Julian d91f1a279d Season 2023 2022-07-31 17:50:01 +02:00
Julian e36a2d97d9 Add leagues for 2023 2022-07-22 12:19:39 +02:00
Julian Arndt 27c5799178 Add Rangers, Nizza and Brentford 2022-04-29 11:23:11 +02:00
Julian b1549649c3 Fix duplicate events 2022-04-10 20:20:43 +02:00
Julian 95b8492622 Add support for google calendar 2022-03-16 14:03:09 +01:00
Julian 2036ded735 Add Galatasaray 2022-03-13 00:33:03 +01:00
Julian 5b2720d532 Add Benfica Lissabon and OSC Lille 2022-02-05 11:28:43 +01:00
Julian Arndt da76c094ff Add Stade Rennes 2021-12-17 15:08:03 +01:00
Julian Arndt 7604538d50 Add Viktoria Berlin 2021-10-07 15:22:04 +02:00
Julian 2e848fb726 Update library versions to get rid of warning 2021-08-29 16:42:38 +02:00
Julian ee508728e9 Add Borussia Dortmund II to team id matchter config 2021-08-04 22:08:35 +02:00
Julian 8a8695e7f5 Add BFC Dynamo 2021-07-31 08:45:29 +02:00
Julian Arndt f2548498d7 Add UEFA Europa League to 2022 league config 2021-07-29 13:42:53 +02:00
Julian Arndt 9cde1290f7 Remove debug logging 2021-07-29 12:08:21 +02:00
Julian Arndt 74d8c26385 update prod sql url 2021-07-29 12:07:01 +02:00
Julian Arndt 284724a6ef Update PostChecksum with season 2022 2021-07-19 15:10:08 +02:00
Julian Arndt 7efafd5528 Merge commit 'd573e74fa914ede512dceb2d05fa4cd5b9510e3e'
# Conflicts:
#	src/main/java/de/jeyp91/tippligaforum/MatchesListForumUpdater.java
2021-07-19 15:07:16 +02:00
Julian Arndt 475ad08c81 Updates for season 2022 2021-07-19 15:05:48 +02:00
Julian d573e74fa9 Only update forum posts if post id was found 2021-06-22 16:13:37 +02:00
Julian fa8069b7b7 Improve logging for MatchesListForumUpdater 2021-06-21 14:19:42 +02:00
Julian 6c9b86db09 Reset sql connection to prod 2021-06-05 21:42:59 +02:00
Julian 9937208c5e Add support for EM Tippspiel 2021-06-05 21:38:11 +02:00
Julian 3cd6b8b57e disable ssl for sql 2021-05-09 21:59:27 +02:00
Julian 370944814c Fix sql 2021-05-09 21:19:45 +02:00
Julian 45976d7e91 Try to fix sql error 2021-05-09 21:19:21 +02:00
Julian Arndt b6bd614f05 Add RC Lens to team id matcher 2021-05-04 09:32:32 +02:00
Julian 5ac7bd4b67 Fix tipper pair config matchday 34 2021-04-21 21:22:30 +02:00
Julian Arndt 01f614de96 Add more teams 2021-03-29 09:46:59 +02:00
Julian e6b1198ca9 Add support for mulitple identical matches like WTL Pokal final 2021-03-20 15:27:29 +01:00
Julian 1441009e31 Add ability for additional delivery dates 2021-03-20 15:07:45 +01:00
Julian a5728d8c3c Add new teams 2021-03-08 10:31:19 +01:00
Julian d5af4e999a Add Hellas Verona to Team ID Matcher Config 2021-02-25 17:12:09 +01:00
Julian c2bc116969 Fix Tipper Match Par config 2021-02-03 20:56:35 +01:00
Julian 712c53a4cf Fix error handling 2021-01-14 10:37:34 +01:00
Julian dae3d657e4 Retry with pause for rounds 2021-01-13 12:56:12 +01:00
Julian cb5fd198ba Fix small error 2021-01-11 10:37:51 +01:00
Julian 074ce3254e Add wait and retry for API Football minute rate limit 2021-01-11 10:28:33 +01:00
Julian 9fdaa23943 Add Atalanta Bergamo and Lazio Rom 2021-01-10 22:29:48 +01:00
Julian 82f5c32566 Improve error handling 2021-01-10 22:22:49 +01:00
Julian 3167e28b82 Catch zero results for API Football 2021-01-10 22:03:48 +01:00
Julian 04f771a598 Improve error handling for getting matches 2021-01-10 21:59:17 +01:00
Julian d1de6a4353 Add error handling everywhere 2021-01-10 21:34:27 +01:00
Julian cbe60c3f9a Remove exit code 1 2021-01-10 21:17:43 +01:00
Julian 0a5589f110 Improve logging 2021-01-10 21:02:35 +01:00
Julian 4b8e10b97c Add error handling for missing match ids 2021-01-10 20:38:26 +01:00
Julian 921640a200 Add generic error handling for API Football 2021-01-10 20:38:11 +01:00
Julian 90a5aa1a5d Add additional check for error 2021-01-10 19:44:16 +01:00
Julian f4567bad00 Add new teams to team id matcher 2021-01-06 10:38:35 +01:00
Julian e43cc192cd Add Test for updating single rounds 2021-01-06 10:22:31 +01:00
Julian f60fd91249 Add error handling for minute limit 2021-01-06 10:12:47 +01:00
Julian Arndt 5c1c38ae8d Improve match list in forum to match tlw league config 2020-11-10 11:26:39 +01:00
Julian Arndt d13628759a Change format of matches list to match tlw league configuration 2020-11-10 11:02:30 +01:00
Julian 998998479b Add check for wrong endpoint for APIFootball 2020-11-09 22:03:20 +01:00
Julian 3b856386fc Merge remote-tracking branch 'origin/master' 2020-11-09 20:39:05 +01:00
Julian a00cf1e408 Add post checksum mode 2020-11-09 20:38:31 +01:00
Julian Arndt 0b63b6e13d Disable all calls to API-Football in tests 2020-11-09 09:28:00 +01:00
Julian 4119163c4c Remove Gist 2020-11-08 23:04:32 +01:00
Julian 633b633e2b Remove system.out.println in testcases 2020-11-05 10:18:53 +01:00
Julian 29b3707ee8 Fix small comparison issue and improve error messages 2020-11-04 21:51:14 +01:00
Julian 1afa64b29b Remove gist request comment 2020-11-04 21:26:30 +01:00
Julian c0424eaa94 Improve error output and add team id matcher template creator 2020-11-04 21:22:27 +01:00
Julian 6d8ced5103 Remove actual update 2020-10-31 22:58:48 +01:00
Julian dae85edde2 Improve match list creator 2020-10-31 22:58:06 +01:00
Julian eed4816f9b Add support for API Football config without result and placeholder as fallback 2020-10-31 21:46:30 +01:00
Julian 8a0fd92b49 Update database only if matchday is in future 2020-10-31 20:51:56 +01:00
Julian 06500dc5c1 Add wtl pokal test 2020-10-31 20:34:57 +01:00
Julian 9026d1c37a Add show table update, add matches list creator 2020-10-31 20:26:47 +01:00
Julian f85ecdc357 Fix multiple execute queries 2020-10-28 21:09:48 +01:00
Julian be6253c15e Add check for limit excetion for api football and fix bug in switch in app 2020-10-25 21:50:46 +01:00
Julian 87c25cf8b4 Disable gist updater test 2020-10-25 21:20:54 +01:00
Julian 5609580094 Add beautiful output 2020-10-25 14:33:49 +01:00
Julian 915daad6ee Add log level config 2020-10-18 22:30:57 +02:00
Julian ec8c487022 Add testcode 2020-10-18 22:22:06 +02:00
Julian 5f87666201 Improve error handling 2020-10-18 22:20:56 +02:00
Julian d922f1a842 Add update api 2020-10-18 22:18:01 +02:00
Julian da170f9dd0 Disable execution of queries 2020-10-18 21:59:34 +02:00
Julian 43fb464f73 Add logging 2020-10-18 21:59:19 +02:00
Julian d751f6e4ed Fix gradle for Jenkins 2020-10-18 20:51:10 +02:00
Julian 9c10c2009c Prepare Jenkins stuff 2020-10-18 20:50:00 +02:00
Julian 1b28d37778 Fix gist 2020-10-18 20:48:23 +02:00
Julian eaf7a4ec22 Move gist username password to config file 2020-10-18 19:04:44 +02:00
Julian 11f5f8e088 Fix from delivery dates 2020-10-18 19:04:26 +02:00
Julian 893fc75243 Remove Timezone bullshit 2020-10-17 09:55:04 +02:00
Julian 8c7b082867 Finish gist 2020-10-17 01:20:51 +02:00
Julian 9e50c1a37e Move fixtures to gist 2020-10-14 23:10:22 +02:00
Julian 4df4436772 Add support for gist 2020-10-12 23:03:36 +02:00
Julian d7b2d192d8 Add support for parameters to start and update gradle to compile full jar 2020-10-12 23:03:26 +02:00
Julian 285ec1074a Add api football files updater 2020-10-07 22:14:13 +02:00
Julian f997b9bf46 Improve matchdays updater 2020-10-04 14:50:10 +02:00
Julian 45da769ab5 Add matchdays updater 2020-10-04 14:49:42 +02:00
Julian d454ed4d9e Update matchdata 2020-10-04 12:31:08 +02:00
Julian c83389fcd3 Clean up shit 2020-10-04 12:23:43 +02:00
Julian 71bfba0638 Improve updater 2020-10-04 11:53:30 +02:00
Julian 209ea3ba76 Add updater for matches and teams 2020-10-04 00:42:35 +02:00
Julian Arndt 9340118622 Refactor Line separator for Mac and add APIFootballProvider 2020-09-29 17:43:05 +02:00
Julian 8144831b6e Refactor and clean up code 2020-09-27 23:27:07 +02:00
Julian d18100eb2d First version with ability to create database for new season 2020-09-27 19:05:20 +02:00
39 changed files with 1146 additions and 130 deletions
+15 -7
View File
@@ -10,7 +10,7 @@
"request": "launch", "request": "launch",
"mainClass": "de.jeyp91.App", "mainClass": "de.jeyp91.App",
"envFile": "${workspaceFolder}/.env", "envFile": "${workspaceFolder}/.env",
"args": " --mode APIFootballUpdater --season 2026 --league 49 --configFile WM-Tippspiel" "args": ["--mode", "APIFootballUpdater", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
}, },
{ {
"type": "java", "type": "java",
@@ -18,7 +18,7 @@
"request": "launch", "request": "launch",
"mainClass": "de.jeyp91.App", "mainClass": "de.jeyp91.App",
"envFile": "${workspaceFolder}/.env", "envFile": "${workspaceFolder}/.env",
"args": " --mode MatchesCreatorFootball --season 2026 --league 49 --configFile WM-Tippspiel" "args": ["--mode", "MatchesCreatorFootball", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
}, },
{ {
"type": "java", "type": "java",
@@ -26,7 +26,7 @@
"request": "launch", "request": "launch",
"mainClass": "de.jeyp91.App", "mainClass": "de.jeyp91.App",
"envFile": "${workspaceFolder}/.env", "envFile": "${workspaceFolder}/.env",
"args": " --mode MatchesUpdaterFootball --season 2026 --league 49 --configFile WM-Tippspiel" "args": ["--mode", "MatchesUpdaterFootball", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
}, },
{ {
"type": "java", "type": "java",
@@ -34,7 +34,7 @@
"request": "launch", "request": "launch",
"mainClass": "de.jeyp91.App", "mainClass": "de.jeyp91.App",
"envFile": "${workspaceFolder}/.env", "envFile": "${workspaceFolder}/.env",
"args": " --mode MatchdaysUpdater --season 2026 --league 49 --configFile WM-Tippspiel" "args": ["--mode", "MatchdaysUpdater", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
}, },
{ {
"type": "java", "type": "java",
@@ -42,7 +42,7 @@
"request": "launch", "request": "launch",
"mainClass": "de.jeyp91.App", "mainClass": "de.jeyp91.App",
"envFile": "${workspaceFolder}/.env", "envFile": "${workspaceFolder}/.env",
"args": " --mode MatchesResultsUpdater --season 2026 --league 49 --configFile WM-Tippspiel" "args": ["--mode", "MatchesResultsUpdater", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
}, },
{ {
"type": "java", "type": "java",
@@ -50,7 +50,7 @@
"request": "launch", "request": "launch",
"mainClass": "de.jeyp91.App", "mainClass": "de.jeyp91.App",
"envFile": "${workspaceFolder}/.env", "envFile": "${workspaceFolder}/.env",
"args": " --mode MatchesListGistUpdater --season 2026 --league 49 --configFile WM-Tippspiel" "args": ["--mode", "MatchesListGistUpdater", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
}, },
{ {
"type": "java", "type": "java",
@@ -58,7 +58,15 @@
"request": "launch", "request": "launch",
"mainClass": "de.jeyp91.App", "mainClass": "de.jeyp91.App",
"envFile": "${workspaceFolder}/.env", "envFile": "${workspaceFolder}/.env",
"args": " --mode TeamsUpdater --season 2026 --league 49 --configFile WM-Tippspiel" "args": ["--mode", "TeamsUpdater", "--season", "2027", "--league", "1", "--configFile", "Tippliga"]
},
{
"type": "java",
"name": "SeasonPreparation",
"request": "launch",
"mainClass": "de.jeyp91.App",
"envFile": "${workspaceFolder}/.env",
"args": ["--mode", "SeasonPreparation", "--season", "2027", "--league", "0", "--configFile", "Dummy"]
} }
] ]
} }
+2
View File
@@ -5,4 +5,6 @@
"envFile": "${workspaceFolder}/.env" "envFile": "${workspaceFolder}/.env"
}, },
"java.debug.settings.onBuildFailureProceed": true, "java.debug.settings.onBuildFailureProceed": true,
"jdk.jdkhome": "/Users/julian/.local/share/mise/installs/java/22.0.2",
"java.debug.settings.console": "internalConsole"
} }
+20
View File
@@ -37,6 +37,26 @@ dependencies {
testImplementation 'org.testng:testng:7.10.2' testImplementation 'org.testng:testng:7.10.2'
} }
def envFile = file('.env')
if (envFile.exists()) {
def envVars = [:]
envFile.readLines().each { line ->
def trimmed = line.trim()
if (trimmed && !trimmed.startsWith('#')) {
def parts = trimmed.split('=', 2)
if (parts.size() == 2) {
def key = parts[0].trim()
def value = parts[1].trim()
if (value.startsWith('"') && value.endsWith('"')) {
value = value.substring(1, value.length() - 1)
}
envVars[key] = value
}
}
}
test { environment envVars }
}
jar { jar {
manifest { manifest {
attributes( attributes(
+1 -1
View File
@@ -24,7 +24,7 @@ pipeline {
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode APIFootballUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode APIFootballUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesListGistUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchesListGistUpdater --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
} catch (Exception e) { } catch (Exception e) {
telegramSendManual("TLW-Database-Tool crashed!") telegramSendManual("TLW-Database-Tool crashed in APIFootballUpdater!")
} }
String outputString = readFile 'log.txt' String outputString = readFile 'log.txt'
if(outputString != "") { if(outputString != "") {
+1 -1
View File
@@ -27,7 +27,7 @@ pipeline {
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 49 --configFile WM-Tippspiel >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 49 --configFile WM-Tippspiel >> log.txt 2>&1"
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 49 --configFile WM-Tippspiel >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 49 --configFile WM-Tippspiel >> log.txt 2>&1"
} catch (Exception e) { } catch (Exception e) {
telegramSendManual("TLW-Database-Tool crashed!") telegramSendManual("TLW-Database-Tool crashed in LigaCupUpdater!")
} }
String outputString = readFile 'log.txt' String outputString = readFile 'log.txt'
if(outputString != "") { if(outputString != "") {
+1 -1
View File
@@ -27,7 +27,7 @@ pipeline {
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 47 --configFile Relegation >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 47 --configFile Relegation >> log.txt 2>&1"
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 47 --configFile Relegation >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 47 --configFile Relegation >> log.txt 2>&1"
} catch (Exception e) { } catch (Exception e) {
telegramSendManual("TLW-Database-Tool crashed!") telegramSendManual("TLW-Database-Tool crashed in RelegationUpdater!")
} }
String outputString = readFile 'log.txt' String outputString = readFile 'log.txt'
if(outputString != "") { if(outputString != "") {
+1 -1
View File
@@ -27,7 +27,7 @@ pipeline {
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 45 --configFile Supercup >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 45 --configFile Supercup >> log.txt 2>&1"
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 45 --configFile Supercup >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 45 --configFile Supercup >> log.txt 2>&1"
} catch (Exception e) { } catch (Exception e) {
telegramSendManual("TLW-Database-Tool crashed!") telegramSendManual("TLW-Database-Tool crashed in SupercupUpdater!")
} }
String outputString = readFile 'log.txt' String outputString = readFile 'log.txt'
if(outputString != "") { if(outputString != "") {
+1 -1
View File
@@ -31,7 +31,7 @@ pipeline {
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 2 --configFile Tippliga >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 2 --configFile Tippliga >> log.txt 2>&1"
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 2 --configFile Tippliga >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 2 --configFile Tippliga >> log.txt 2>&1"
} catch (Exception e) { } catch (Exception e) {
telegramSendManual("TLW-Database-Tool crashed!") telegramSendManual("TLW-Database-Tool crashed in TippligaUpdater!")
} }
String outputString = readFile 'log.txt' String outputString = readFile 'log.txt'
echo "Output: ${outputString}" echo "Output: ${outputString}"
+1 -1
View File
@@ -27,7 +27,7 @@ pipeline {
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 48 --configFile WTL-Pokal >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode MatchdaysUpdater --season ${season} --league 48 --configFile WTL-Pokal >> log.txt 2>&1"
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 48 --configFile WTL-Pokal >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode TeamsUpdater --season ${season} --league 48 --configFile WTL-Pokal >> log.txt 2>&1"
} catch (Exception e) { } catch (Exception e) {
telegramSendManual("TLW-Database-Tool crashed!") telegramSendManual("TLW-Database-Tool crashed in WTLPokalUpdater!")
} }
String outputString = readFile 'log.txt' String outputString = readFile 'log.txt'
if(outputString != "") { if(outputString != "") {
+1 -1
View File
@@ -25,7 +25,7 @@ pipeline {
try { try {
sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode WhatsAppNotifier --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1" sh "$JAVA_HOME/bin/java -jar build/libs/tlw-database-tool-1.0.jar --mode WhatsAppNotifier --season ${season} --league 1 --configFile Tippliga >> log.txt 2>&1"
} catch (Exception e) { } catch (Exception e) {
telegramSendManual("TLW-Database-Tool crashed!") telegramSendManual("TLW-Database-Tool crashed in WhatsAppReminder!")
} }
String outputString = readFile 'log.txt' String outputString = readFile 'log.txt'
if(outputString != "") { if(outputString != "") {
+6 -1
View File
@@ -10,6 +10,7 @@ import de.jeyp91.tippliga.TLWMatchesResultsUpdater;
import de.jeyp91.tippliga.TLWMatchesUpdaterFootball; import de.jeyp91.tippliga.TLWMatchesUpdaterFootball;
import de.jeyp91.tippliga.TLWTeamsUpdater; import de.jeyp91.tippliga.TLWTeamsUpdater;
import de.jeyp91.tippligaforum.MatchesListForumUpdater; import de.jeyp91.tippligaforum.MatchesListForumUpdater;
import de.jeyp91.tippligaforum.SeasonForumPostsCreator;
import de.jeyp91.tippligaforum.TippligaConfigProvider; import de.jeyp91.tippligaforum.TippligaConfigProvider;
import de.jeyp91.tippligaforum.TippligaSQLConnector; import de.jeyp91.tippligaforum.TippligaSQLConnector;
import de.jeyp91.whatsapp.WhatsAppNotifier; import de.jeyp91.whatsapp.WhatsAppNotifier;
@@ -69,6 +70,10 @@ public class App {
MatchesListForumUpdater matchesListForumUpdater = new MatchesListForumUpdater(); MatchesListForumUpdater matchesListForumUpdater = new MatchesListForumUpdater();
matchesListForumUpdater.updateAllLeagues(season); matchesListForumUpdater.updateAllLeagues(season);
} }
case "SeasonPreparation" -> {
SeasonForumPostsCreator creator = new SeasonForumPostsCreator(season);
creator.createAllPosts();
}
case "PostChecksum" -> { case "PostChecksum" -> {
TippligaConfigProvider configProvider = new TippligaConfigProvider(season); TippligaConfigProvider configProvider = new TippligaConfigProvider(season);
String checksum = configProvider.getChecksumOfConfigPost(configFile); String checksum = configProvider.getChecksumOfConfigPost(configFile);
@@ -96,7 +101,7 @@ public class App {
parser.addArgument("-m", "--mode") parser.addArgument("-m", "--mode")
.dest("mode") .dest("mode")
.choices("MatchdaysUpdater", "MatchesCreatorFootball", "MatchesUpdaterFootball", "MatchesResultsUpdater", "TeamsUpdater", "APIFootballUpdater", "MatchesListGistUpdater", "PostChecksum", "WhatsAppNotifier") .choices("MatchdaysUpdater", "MatchesCreatorFootball", "MatchesUpdaterFootball", "MatchesResultsUpdater", "TeamsUpdater", "APIFootballUpdater", "MatchesListGistUpdater", "PostChecksum", "WhatsAppNotifier", "SeasonPreparation")
.help("") .help("")
.required(true) .required(true)
.type(String.class); .type(String.class);
+16 -12
View File
@@ -117,6 +117,18 @@ public class TLWMatch extends BaseMatch{
this.matchDatetime = matchDatetime; this.matchDatetime = matchDatetime;
} }
public TLWMatch(int season, int league, int matchday, int matchNo, int status, int koMatch, String formulaHome, String formulaGuest, String matchDatetime) {
this.season = season;
this.matchday = matchday;
this.league = league;
this.matchNo = matchNo;
this.status = status;
this.koMatch = koMatch;
this.formulaHome = formulaHome;
this.formulaGuest = formulaGuest;
this.matchDatetime = matchDatetime;
}
public TLWMatch(int season, int league, int matchday, int matchNo, int teamIdHome, int teamIdGuest, String matchDatetime, int koMatch) { public TLWMatch(int season, int league, int matchday, int matchNo, int teamIdHome, int teamIdGuest, String matchDatetime, int koMatch) {
this.season = season; this.season = season;
this.matchday = matchday; this.matchday = matchday;
@@ -179,19 +191,11 @@ public class TLWMatch extends BaseMatch{
} }
public String getFormulaHome() { public String getFormulaHome() {
String formula = "D"; return this.formulaHome != null ? this.formulaHome : "D";
if (this.formulaHome != null) {
formula = this.formulaHome;
}
return "'" + formula + "'";
} }
public String getFormulaGuest() { public String getFormulaGuest() {
String formula = "D"; return this.formulaGuest != null ? this.formulaGuest : "D";
if (this.formulaGuest != null) {
formula = this.formulaGuest;
}
return "'" + formula + "'";
} }
public String getSQLQueryInsert() { public String getSQLQueryInsert() {
@@ -218,8 +222,8 @@ public class TLWMatch extends BaseMatch{
this.status + ", " + this.status + ", " +
nullToSqlEmptyString(this.matchDatetime) + ", " + nullToSqlEmptyString(this.matchDatetime) + ", " +
nullToSqlEmptyString(this.groupId) + ", " + nullToSqlEmptyString(this.groupId) + ", " +
getFormulaHome() + ", " + "'" + getFormulaHome() + "'" + ", " +
getFormulaGuest() + ", " + "'" + getFormulaGuest() + "'" + ", " +
nullToSqlEmptyString(this.koMatch) + ", " + nullToSqlEmptyString(this.koMatch) + ", " +
nullToSqlEmptyString(this.goalsOvertimeHome) + ", " + nullToSqlEmptyString(this.goalsOvertimeHome) + ", " +
nullToSqlEmptyString(this.goalsOvertimeGuest) + ", " + nullToSqlEmptyString(this.goalsOvertimeGuest) + ", " +
@@ -22,7 +22,7 @@ public class TLWMatchdaysCreator {
this.season = season; this.season = season;
this.league = league; this.league = league;
TLWMatchesCreatorFootball matchesCreator = new TLWMatchesCreatorFootball(season, 1, configPath); TLWMatchesCreatorFootball matchesCreator = new TLWMatchesCreatorFootball(season, league, configPath);
this.matches = matchesCreator.getMatches(); this.matches = matchesCreator.getMatches();
TippligaConfigProvider prov = new TippligaConfigProvider(season); TippligaConfigProvider prov = new TippligaConfigProvider(season);
@@ -69,6 +69,20 @@ public class TLWMatchesCreatorFootball extends TLWMatchesCreatorBase {
} }
} }
// Add PlaceholderSingleMatch matches
for (Object matchesConfigObject : matchesConfig) {
JSONObject singleMatchConfig = (JSONObject) matchesConfigObject;
if(singleMatchConfig.get("type").equals("PlaceholderSingleMatch")) {
String formulaHome = (String) singleMatchConfig.get("formulaHome");
String formulaGuest = (String) singleMatchConfig.get("formulaGuest");
String matchDatetime = (String) singleMatchConfig.get("placeholderDatetime");
int matchNo = this.nextMatchNo;
this.nextMatchNo++;
this.TLWMatches.add(new TLWMatch(this.season, this.league, TLWMatchday, matchNo, 0, this.ko, formulaHome, formulaGuest, matchDatetime));
matchdayMatchCounter++;
}
}
// Add empty missing matches // Add empty missing matches
int matchesPerMatchdayTemp = 0; int matchesPerMatchdayTemp = 0;
if(this.matchesPerMatchday != 0) { if(this.matchesPerMatchday != 0) {
@@ -44,6 +44,10 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
ArrayList<APIFootballMatch> apiFootballMatches = apiFootballMatchesProvider.getAPIFootballMatchesFromConfig((JSONObject) singleMatchdayConfig); ArrayList<APIFootballMatch> apiFootballMatches = apiFootballMatchesProvider.getAPIFootballMatchesFromConfig((JSONObject) singleMatchdayConfig);
if(apiFootballMatches.isEmpty()) {
continue;
}
ArrayList<TLWMatch> tlwMatchesOriginalMatchday = tippligaSQLConnector.getMatches(String.valueOf(this.season), String.valueOf(this.league), String.valueOf(tlwMatchday)); ArrayList<TLWMatch> tlwMatchesOriginalMatchday = tippligaSQLConnector.getMatches(String.valueOf(this.season), String.valueOf(this.league), String.valueOf(tlwMatchday));
ArrayList<TLWMatch> tlwMatchesUpdatedMatchday = new ArrayList<>(); ArrayList<TLWMatch> tlwMatchesUpdatedMatchday = new ArrayList<>();
for (TLWMatch match : tlwMatchesOriginalMatchday) { for (TLWMatch match : tlwMatchesOriginalMatchday) {
@@ -58,9 +62,7 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
LocalDateTime firstMatchOriginal = TLWMatchesManagerBase.getFirstMatchtimeTLW(tlwMatchesOriginalMatchday); LocalDateTime firstMatchOriginal = TLWMatchesManagerBase.getFirstMatchtimeTLW(tlwMatchesOriginalMatchday);
LocalDateTime firstMatchUpdated = TLWMatchesManagerBase.getFirstMatchtimeAPIFootball(apiFootballMatches); LocalDateTime firstMatchUpdated = TLWMatchesManagerBase.getFirstMatchtimeAPIFootball(apiFootballMatches);
if(apiFootballMatches.size() > 0 if(now.isBefore(firstMatchOriginal) && now.isBefore(firstMatchUpdated)) {
&& now.isBefore(firstMatchOriginal)
&& now.isBefore(firstMatchUpdated)) {
addMissingMatches(tlwMatchesUpdatedMatchday, apiFootballMatches); addMissingMatches(tlwMatchesUpdatedMatchday, apiFootballMatches);
updateMatchDateTimes(tlwMatchesUpdatedMatchday, apiFootballMatches); updateMatchDateTimes(tlwMatchesUpdatedMatchday, apiFootballMatches);
updateShowTable(tlwMatchesUpdatedMatchday, apiFootballMatches); updateShowTable(tlwMatchesUpdatedMatchday, apiFootballMatches);
@@ -193,9 +195,15 @@ public class TLWMatchesUpdaterFootball extends TLWMatchesManagerBase {
// update empty match // update empty match
if(!done) { if(!done) {
for (TLWMatch tlwMatch : tlwMatches) { for (TLWMatch tlwMatch : tlwMatches) {
if (tlwMatch.getTeamIdHome() == 0 && tlwMatch.getTeamIdGuest() == 0 Integer teamIdHome = tlwMatch.getTeamIdHome();
&& (Objects.equals(tlwMatch.getFormulaHome(), "") || Objects.equals(tlwMatch.getFormulaHome(), "D")) Integer teamIdGuest = tlwMatch.getTeamIdGuest();
&& (Objects.equals(tlwMatch.getFormulaGuest(), "") || Objects.equals(tlwMatch.getFormulaGuest(), "D")) String formulaHome = tlwMatch.getFormulaHome();
String formulaGuest = tlwMatch.getFormulaGuest();
if (
(Objects.equals(teamIdHome, 0) || Objects.equals(teamIdHome, null))
&& (Objects.equals(teamIdGuest, 0) || Objects.equals(teamIdGuest, null))
&& (Objects.equals(formulaHome, "") || Objects.equals(formulaHome, "D"))
&& (Objects.equals(formulaGuest, "") || Objects.equals(formulaGuest, "D"))
) { ) {
tlwMatch.updateMatch(missingMatch); tlwMatch.updateMatch(missingMatch);
done = true; done = true;
@@ -0,0 +1,137 @@
package de.jeyp91.tippligaforum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.sql.ResultSet;
import java.sql.SQLException;
public class SeasonForumPostsCreator {
private static final Logger logger = LoggerFactory.getLogger(SeasonForumPostsCreator.class);
private static final String EMPTY_POST_CONTENT = "[code][/code]";
private static final String[] CONFIG_POSTS = {
"Supercup Tipper",
"WTL-Pokal Tipper",
"2. Tippliga Tipper",
"1. Tippliga Tipper",
"Relegation",
"Supercup",
"WTL-Pokal",
"Tippliga"
};
private static final String[] MATCH_LIST_POSTS = {
"World UEFA Super Cup",
"World UEFA Europa Conference League",
"World UEFA Europa League",
"World UEFA Champions League",
"Austria Bundesliga",
"Portugal Primeira Liga",
"Netherlands Eredivisie",
"Turkey Süper Lig",
"France Ligue 1",
"Italy Serie A",
"Spain La Liga",
"England Premier League",
"Germany Super Cup",
"Germany Frauen Bundesliga",
"Germany U19 Bundesliga",
"Germany Regionalliga - SudWest",
"Germany Regionalliga - Bayern",
"Germany 3. Liga",
"Germany 2. Bundesliga",
"Germany Bundesliga",
"Germany DFB Pokal"
};
private final int season;
private final TippligaWebsiteConnector connector;
private final TippligaSQLConnector sqlConnector;
public SeasonForumPostsCreator(int season) {
this.season = season;
try {
this.connector = new TippligaWebsiteConnector();
} catch (IOException e) {
throw new RuntimeException(e);
}
this.sqlConnector = TippligaSQLConnector.getInstance();
}
public void createAllPosts() {
Integer adminForumId = sqlConnector.getForumId("Admin");
if (adminForumId == null) {
logger.error("Forum 'Admin' not found. Aborting.");
return;
}
Integer tippligaConfigForumId = sqlConnector.getForumId("Tippliga-Config", adminForumId);
if (tippligaConfigForumId == null) {
logger.error("Forum 'Tippliga-Config' not found. Aborting.");
return;
}
Integer seasonForumId = sqlConnector.getForumId(String.valueOf(season), tippligaConfigForumId);
if (seasonForumId == null) {
logger.error("Forum '" + season + "' not found under Tippliga-Config. Aborting.");
return;
}
Integer ligenForumId = sqlConnector.getForumId("Ligen", seasonForumId);
if (ligenForumId == null) {
logger.error("Forum 'Ligen' not found under " + season + ". Aborting.");
return;
}
createConfigPosts(seasonForumId);
createMatchListPosts(ligenForumId);
}
private void createConfigPosts(int seasonForumId) {
logger.info("Creating config posts in forum " + season + "...");
for (String subject : CONFIG_POSTS) {
if (postExists(seasonForumId, subject)) {
logger.info("Config post '" + subject + "' already exists. Skipping.");
continue;
}
boolean success = connector.createPost(seasonForumId, subject, EMPTY_POST_CONTENT);
if (success) {
logger.info("Created config post: " + subject);
} else {
logger.error("Failed to create config post: " + subject);
}
}
}
private void createMatchListPosts(int ligenForumId) {
logger.info("Creating match list posts in " + season + " > Ligen...");
for (String subject : MATCH_LIST_POSTS) {
if (postExists(ligenForumId, subject)) {
logger.info("Match list post '" + subject + "' already exists. Skipping.");
continue;
}
boolean success = connector.createPost(ligenForumId, subject, EMPTY_POST_CONTENT);
if (success) {
logger.info("Created match list post: " + subject);
} else {
logger.error("Failed to create match list post: " + subject);
}
}
}
private boolean postExists(int forumId, String subject) {
String query = "SELECT COUNT(*) FROM phpbb_posts WHERE forum_id = " + forumId + " AND post_subject = '" + subject + "'";
ResultSet rset = sqlConnector.executeQuery(query);
try {
if (rset != null && rset.next()) {
return rset.getInt(1) > 0;
}
} catch (SQLException e) {
logger.error("Error checking if post exists", e);
}
return false;
}
}
@@ -218,6 +218,69 @@ public class TippligaWebsiteConnector {
this.lastFormToken = matcher.group(2); this.lastFormToken = matcher.group(2);
} }
public boolean createPost(int forumId, String subject, String message) {
String url = "https://tippliga-wuerzburg.de/posting.php?mode=post&f=" + forumId;
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create(url))
.GET().build();
String reqBody = "";
try {
TimeUnit.SECONDS.sleep(1);
reqBody = client.send(req, HttpResponse.BodyHandlers.ofString()).body();
} catch (IOException | InterruptedException e) {
logger.error("Failed to fetch posting form", e);
return false;
}
Pattern pattern = Pattern.compile("^[\\s\\S]*<input type=\"hidden\" name=\"creation_time\" value=\"([\\d]{10})\" \\/>[\\s\\S]*<input type=\"hidden\" name=\"form_token\" value=\"([\\d\\w]{40})\" \\/>[\\s\\S]*$");
Matcher matcher = pattern.matcher(reqBody);
if (!matcher.find()) {
logger.error("Could not find CSRF tokens in posting form for forum " + forumId);
return false;
}
String creationTime = matcher.group(1);
String formToken = matcher.group(2);
Map<String, String> postParameters = new HashMap<>();
postParameters.put("subject", subject);
postParameters.put("message", message);
postParameters.put("creation_time", creationTime);
postParameters.put("form_token", formToken);
postParameters.put("post", "Absenden");
postParameters.put("attach_sig", "1");
postParameters.put("enable_bbcode", "1");
postParameters.put("enable_smilies", "1");
postParameters.put("enable_magic_url", "1");
String postForm = postParameters.entrySet()
.stream()
.map(e -> e.getKey() + "=" + URLEncoder.encode(e.getValue(), StandardCharsets.UTF_8))
.collect(Collectors.joining("&"));
HttpRequest postReq = HttpRequest.newBuilder()
.uri(URI.create(url))
.headers("Content-Type", "application/x-www-form-urlencoded")
.POST(HttpRequest.BodyPublishers.ofString(postForm))
.build();
try {
TimeUnit.SECONDS.sleep(1);
HttpResponse<String> response = client.send(postReq, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() == 302) {
logger.info("Created post '" + subject + "' in forum " + forumId);
return true;
}
logger.error("Failed to create post '" + subject + "' in forum " + forumId + ". Status: " + response.statusCode());
return false;
} catch (IOException | InterruptedException e) {
logger.error("Failed to create post", e);
return false;
}
}
private String getSidFromCookie() { private String getSidFromCookie() {
HttpCookie sidCookie = cookieStore.getCookies().get(2); HttpCookie sidCookie = cookieStore.getCookies().get(2);
String sid = sidCookie.getValue(); String sid = sidCookie.getValue();
@@ -1528,5 +1528,50 @@
"teamname": "Tunisia", "teamname": "Tunisia",
"tippligaID": 710, "tippligaID": 710,
"apiFootballID": 28 "apiFootballID": 28
},
{
"teamname": "SC St. Tönis",
"tippligaID": 673,
"apiFootballID": 19466
},
{
"teamname": "Lüneburger SK Hansa",
"tippligaID": 76,
"apiFootballID": 1645
},
{
"teamname": "Eintracht Trier",
"tippligaID": 46,
"apiFootballID": 1627
},
{
"teamname": "SSV Jeddeloh",
"tippligaID": 124,
"apiFootballID": 1655
},
{
"teamname": "Krieschow",
"tippligaID": 675,
"apiFootballID": 14713
},
{
"teamname": "Westfalia Rhynern",
"tippligaID": 676,
"apiFootballID": 14826
},
{
"teamname": "HEBC",
"tippligaID": 677,
"apiFootballID": 16078
},
{
"teamname": "Fortuna Köln",
"tippligaID": 583,
"apiFootballID": 1326
},
{
"teamname": "NEXT TEAM",
"tippligaID": 674,
"apiFootballID": 9999999
} }
] ]
@@ -288,5 +288,10 @@
"team_id": 2139, "team_id": 2139,
"team_name": "Dustin", "team_name": "Dustin",
"team_name_short": "Dustin" "team_name_short": "Dustin"
},
{
"team_id": 2140,
"team_name": "Marcel W.",
"team_name_short": "Marcel W."
} }
] ]
@@ -0,0 +1,58 @@
{
"numberOfMatchdays": 1,
"matchesPerMatchday": 4,
"pointMode": 4,
"pointsTendency": 1,
"pointsDifference": 2,
"pointsDirectHit": 3,
"ko": 1,
"matchdayConfig": [
{
"TLWMatchday": 1,
"matchdayName": "Relegation",
"numberOfMatches": 4,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 35,
"showTable": true
},
{
"type": "PlaceholderSingleMatch",
"koMatch": true,
"placeholderDatetime": "2027-05-27 20:30:00",
"formulaHome": "D",
"formulaGuest": "D"
},
{
"type": "PlaceholderSingleMatch",
"koMatch": true,
"placeholderDatetime": "2027-05-31 20:30:00",
"formulaHome": "D",
"formulaGuest": "D"
},
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 79,
"leagueMatchday": 35,
"showTable": true
},
{
"type": "PlaceholderSingleMatch",
"koMatch": true,
"placeholderDatetime": "2027-05-28 20:30:00",
"formulaHome": "D",
"formulaGuest": "D"
},
{
"type": "PlaceholderSingleMatch",
"koMatch": true,
"placeholderDatetime": "2027-06-01 20:30:00",
"formulaHome": "D",
"formulaGuest": "D"
}
]
}
]
}
@@ -0,0 +1,54 @@
{
"numberOfMatchdays": 2,
"matchesPerMatchday": 4,
"pointMode": 4,
"pointsTendency": 1,
"pointsDifference": 2,
"pointsDirectHit": 3,
"ko": 1,
"matchdayConfig": [
{
"TLWMatchday": 1,
"matchdayName": "Supercup",
"numberOfMatches": 4,
"matchesConfig": [
{
"matchday": 1,
"matchtime": "2026-08-22 20:30",
"match": "Borussia Dortmund - Bayern München",
"showTable": false,
"matchLeague": 529,
"type": "SingleMatch",
"matchId": 1582362
},
{
"matchday": 1,
"matchtime": "2026-08-22 20:30",
"match": "Borussia Dortmund - Bayern München",
"showTable": false,
"matchLeague": 529,
"type": "SingleMatch",
"matchId": 1582362
},
{
"matchday": 1,
"matchtime": "2026-08-12 21:00",
"match": "Paris Saint Germain - Aston Villa",
"showTable": false,
"matchLeague": 531,
"type": "SingleMatch",
"matchId": 1583664
},
{
"matchday": 1,
"matchtime": "2026-08-12 21:00",
"match": "Paris Saint Germain - Aston Villa",
"showTable": false,
"matchLeague": 531,
"type": "SingleMatch",
"matchId": 1583664
}
]
}
]
}
@@ -0,0 +1,4 @@
{
"1": "Sascha",
"2": "Stefan"
}
@@ -0,0 +1,434 @@
{
"numberOfMatchdays": 39,
"matchesPerMatchday": 12,
"pointMode": 4,
"pointsTendency": 1,
"pointsDifference": 2,
"pointsDirectHit": 3,
"ko": 0,
"matchdayConfig": [
{
"TLWMatchday": 1,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 79,
"leagueMatchday": 1,
"showTable": false
}
]
},
{
"TLWMatchday": 2,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 79,
"leagueMatchday": 2,
"showTable": false
}
]
},
{
"TLWMatchday": 3,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 1,
"showTable": true
}
]
},
{
"TLWMatchday": 4,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 2,
"showTable": true
}
]
},
{
"TLWMatchday": 5,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 3,
"showTable": true
}
]
},
{
"TLWMatchday": 6,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 4,
"showTable": true
}
]
},
{
"TLWMatchday": 7,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 5,
"showTable": true
}
]
},
{
"TLWMatchday": 8,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 6,
"showTable": true
}
]
},
{
"TLWMatchday": 9,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 7,
"showTable": true
}
]
},
{
"TLWMatchday": 10,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 8,
"showTable": true
}
]
},
{
"TLWMatchday": 11,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 9,
"showTable": true
}
]
},
{
"TLWMatchday": 12,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 10,
"showTable": true
}
]
},
{
"TLWMatchday": 13,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 11,
"showTable": true
}
]
},
{
"TLWMatchday": 14,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 12,
"showTable": true
}
]
},
{
"TLWMatchday": 15,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 13,
"showTable": true
}
]
},
{
"TLWMatchday": 16,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 14,
"showTable": true
}
]
},
{
"TLWMatchday": 17,
"matchesConfig": [
{
"type": "Placeholder",
"placeholderDatetime": "2026-12-26 18:00:00"
}
]
},
{
"TLWMatchday": 18,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 15,
"showTable": true
}
]
},
{
"TLWMatchday": 19,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 16,
"showTable": true
}
]
},
{
"TLWMatchday": 20,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 17,
"showTable": true
}
]
},
{
"TLWMatchday": 21,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 18,
"showTable": true
}
]
},
{
"TLWMatchday": 22,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 19,
"showTable": true
}
]
},
{
"TLWMatchday": 23,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 20,
"showTable": true
}
]
},
{
"TLWMatchday": 24,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 21,
"showTable": true
}
]
},
{
"TLWMatchday": 25,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 22,
"showTable": true
}
]
},
{
"TLWMatchday": 26,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 23,
"showTable": true
}
]
},
{
"TLWMatchday": 27,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 24,
"showTable": true
}
]
},
{
"TLWMatchday": 28,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 25,
"showTable": true
}
]
},
{
"TLWMatchday": 29,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 26,
"showTable": true
}
]
},
{
"TLWMatchday": 30,
"matchesConfig": [
{
"type": "Placeholder",
"placeholderDatetime": "2027-03-17 18:00:00"
}
]
},
{
"TLWMatchday": 31,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 27,
"showTable": true
}
]
},
{
"TLWMatchday": 32,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 28,
"showTable": true
}
]
},
{
"TLWMatchday": 33,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 29,
"showTable": true
}
]
},
{
"TLWMatchday": 34,
"matchesConfig": [
{
"type": "Placeholder",
"placeholderDatetime": "2027-04-14 18:00:00"
}
]
},
{
"TLWMatchday": 35,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 30,
"showTable": true
}
]
},
{
"TLWMatchday": 36,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 31,
"showTable": true
}
]
},
{
"TLWMatchday": 37,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 32,
"showTable": true
}
]
},
{
"TLWMatchday": 38,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 33,
"showTable": true
}
]
},
{
"TLWMatchday": 39,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 78,
"leagueMatchday": 34,
"showTable": true
}
]
}
]
}
@@ -0,0 +1,16 @@
{
"1": "Flo",
"2": "Michael",
"3": "Demian",
"4": "Sascha",
"5": "Maxi Z.",
"6": "Julian",
"7": "Dustin",
"8": "Kay",
"9": "Lukas",
"10": "Marcel U.",
"11": "TG Nürnberg",
"12": "Nicole",
"13": "Franz",
"14": "Tristan"
}
@@ -0,0 +1,16 @@
{
"1": "Philipp",
"2": "Marcel",
"3": "Matthias",
"4": "Max",
"5": "Marcel W.",
"6": "Friedrich",
"7": "Stefan",
"8": "Armin",
"9": "Barb",
"10": "Hilde",
"11": "Olli L.",
"12": "Jimmy",
"13": "Johannes",
"14": "Patrick"
}
@@ -0,0 +1,10 @@
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 1, '1. Tippliga Würzburg', '1TL', 1, 39, 12, '0', '0', '0', '0', 4, 3, 1, 2, 0, 0, 0, 0, 561, 0, 1, 0.00, 0);
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 2, '2. Tippliga Würzburg', '2TL', 1, 39, 12, '0', '0', '0', '0', 4, 3, 1, 2, 0, 0, 0, 0, 561, 0, 1, 0.00, 0);
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 45, 'Supercup', 'SC', 2, 1, 0, '0', '0', '0', '0', 4, 3, 1, 2, 0, 0, 0, 1, 561, 0, 1, 0.00, 0);
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 47, 'Relegation', 'REL', 2, 1, 0, '0', '0', '0', '0', 4, 3, 1, 2, 0, 0, 0, 1, 561, 0, 1, 0.00, 1);
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 48, 'WTL-Pokal', 'WTL', 2, 5, 0, '0', '0', '0', '0', 4, 3, 1, 2, 0, 0, 0, 0, 561, 0, 1, 0.00, 0);
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 51, '1. Tippliga Würzburg', '1TL', 1, 39, 7, '0', '0', '0', '0', 1, 0, 0, 0, 1, 0, 0, 0, 561, 0, 1, 0.00, 0);
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 52, '2. Tippliga Würzburg', '2TL', 1, 39, 7, '0', '0', '0', '0', 1, 0, 0, 0, 1, 0, 0, 0, 561, 0, 1, 0.00, 0);
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 95, 'Supercup', 'SC', 2, 2, 0, '0', '0', '0', '0', 1, 0, 0, 0, 1, 0, 0, 0, 561, 0, 1, 0.00, 0);
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 97, 'Relegation', 'REL', 2, 1, 0, '0', '0', '0', '0', 1, 0, 0, 0, 1, 0, 0, 0, 561, 0, 1, 0.00, 0);
INSERT INTO `phpbb_footb_leagues` (`season`, `league`, `league_name`, `league_name_short`, `league_type`, `matchdays`, `matches_on_matchday`, `win_result`, `win_result_02`, `win_matchday`, `win_season`, `points_mode`, `points_result`, `points_tendency`, `points_diff`, `points_last`, `join_by_user`, `join_in_season`, `bet_in_time`, `rules_post_id`, `sort`, `bet_ko_type`, `bet_points`, `bet_type`) VALUES (2027, 98, 'WTL-Pokal', 'WTL', 2, 6, 0, '0', '0', '0', '0', 1, 0, 0, 0, 1, 0, 0, 0, 561, 0, 1, 0.00, 0);
@@ -0,0 +1,152 @@
{
"numberOfMatchdays": 5,
"matchesPerMatchday": 0,
"pointMode": 4,
"pointsTendency": 1,
"pointsDifference": 2,
"pointsDirectHit": 3,
"ko": 1,
"matchdayConfig": [
{
"TLWMatchday": 1,
"matchdayName": "1. Runde",
"numberOfMatches": 32,
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 81,
"leagueMatchday": 1,
"showTable": true
},
{
"type": "Placeholder",
"placeholderDatetime": "2026-08-21 18:00:00"
}
]
},
{
"TLWMatchday": 2,
"numberOfMatches": 16,
"matchdayName": "Achtelfinale",
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 81,
"leagueMatchday": 2,
"showTable": true
},
{
"type": "Placeholder",
"placeholderDatetime": "2026-10-27 18:00:00"
}
]
},
{
"TLWMatchday": 3,
"numberOfMatches": 8,
"matchdayName": "Viertelfinale",
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 81,
"leagueMatchday": 3,
"showTable": true
},
{
"type": "Placeholder",
"placeholderDatetime": "2026-12-01 18:30:00"
}
]
},
{
"TLWMatchday": 4,
"numberOfMatches": 4,
"matchdayName": "Halbfinale",
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 81,
"leagueMatchday": 4,
"showTable": true
},
{
"type": "Placeholder",
"placeholderDatetime": "2027-02-02 18:30:00"
}
]
},
{
"TLWMatchday": 5,
"numberOfMatches": 6,
"matchdayName": "Finale",
"matchesConfig": [
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 81,
"leagueMatchday": 5,
"showTable": true
},
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 81,
"leagueMatchday": 5,
"showTable": true
},
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 81,
"leagueMatchday": 6,
"showTable": true
},
{
"type": "AllMatchesOfMatchday",
"matchesLeague": 81,
"leagueMatchday": 6,
"showTable": true
},
{
"type": "PlaceholderSingleMatch",
"koMatch": true,
"placeholderDatetime": "2027-04-20 20:45:00",
"formulaHome": "D",
"formulaGuest": "D"
},
{
"type": "PlaceholderSingleMatch",
"koMatch": true,
"placeholderDatetime": "2027-04-20 20:45:00",
"formulaHome": "D",
"formulaGuest": "D"
},
{
"type": "PlaceholderSingleMatch",
"koMatch": true,
"placeholderDatetime": "2027-04-21 20:45:00",
"formulaHome": "D",
"formulaGuest": "D"
},
{
"type": "PlaceholderSingleMatch",
"koMatch": true,
"placeholderDatetime": "2027-04-21 20:45:00",
"formulaHome": "D",
"formulaGuest": "D"
},
{
"type": "PlaceholderSingleMatch",
"koMatch": true,
"placeholderDatetime": "2027-05-29 20:00:00",
"formulaHome": "W 61",
"formulaGuest": "W 63"
},
{
"type": "PlaceholderSingleMatch",
"koMatch": true,
"placeholderDatetime": "2027-05-29 20:00:00",
"formulaHome": "W 62",
"formulaGuest": "W 64"
}
]
}
]
}
@@ -0,0 +1,26 @@
{
"1": "Matthias",
"2": "Marcel U.",
"3": "Marcel",
"4": "Dustin",
"5": "Johannes",
"6": "Tristan",
"7": "Philipp",
"8": "Nicole",
"9": "Barb",
"10": "TG Nürnberg",
"11": "Marcel W.",
"12": "Maxi Z.",
"13": "Olli L.",
"14": "Lukas",
"15": "Jimmy",
"16": "Franz",
"17": "Armin",
"18": "Demian",
"19": "Hilde",
"20": "Kay",
"21": "Patrick",
"22": "Flo",
"23": "Stefan",
"24": "Max"
}
@@ -0,0 +1,2 @@
UPDATE phpbb_footb_matchdays SET status = 0 WHERE season = 2027 AND status > 0;
UPDATE phpbb_footb_matches SET status = 0 WHERE season = 2027 AND status > 0;
@@ -1,11 +1,11 @@
package de.jeyp91.apifootball; package de.jeyp91.apifootball;
import org.junit.Test;
import java.util.ArrayList; import java.util.ArrayList;
public class APIFootballConnectorTest { import org.junit.Test;
public class APIFootballConnectorTest {
/*
@Test @Test
public void APITestGetMatchDataOfMatchdayBundesliga() { public void APITestGetMatchDataOfMatchdayBundesliga() {
APIFootballConnector apiFootballConnector = APIFootballConnector.getAPIFootballConnectorInstance(2020); APIFootballConnector apiFootballConnector = APIFootballConnector.getAPIFootballConnectorInstance(2020);
@@ -13,4 +13,5 @@ public class APIFootballConnectorTest {
assert matchesOfMatchday.get(0).getTeamIdHome() == 744; assert matchesOfMatchday.get(0).getTeamIdHome() == 744;
assert matchesOfMatchday.get(0).getTeamIdGuest() == 159; assert matchesOfMatchday.get(0).getTeamIdGuest() == 159;
} }
*/
} }
@@ -6,7 +6,7 @@ import org.junit.Test;
import static de.jeyp91.apifootball.APIFootballConnector.stringToJSONObject; import static de.jeyp91.apifootball.APIFootballConnector.stringToJSONObject;
public class APIFootballMatchTest { public class APIFootballMatchTest {
/*
@Test @Test
public void withExtratime() throws Exception { public void withExtratime() throws Exception {
String matchString = "{\"fixture_id\":958530,\"league_id\":4303,\"league\":{\"name\":\"DFB Pokal\",\"country\":\"Germany\",\"logo\":\"https:\\/\\/media-3.api-sports.io\\/football\\/leagues\\/81.png\",\"flag\":\"https:\\/\\/media-1.api-sports.io\\/flags\\/de.svg\"},\"event_date\":\"2022-10-19T18:00:00+02:00\",\"event_timestamp\":1666195200,\"firstHalfStart\":1666195200,\"secondHalfStart\":1666198800,\"round\":\"2nd Round\",\"status\":\"Match Finished\",\"statusShort\":\"PEN\",\"elapsed\":120,\"venue\":\"Home Deluxe Arena\",\"referee\":\"Frank Willenborg, Germany\",\"homeTeam\":{\"team_id\":185,\"team_name\":\"SC Paderborn 07\",\"logo\":\"https:\\/\\/media-2.api-sports.io\\/football\\/teams\\/185.png\"},\"awayTeam\":{\"team_id\":162,\"team_name\":\"Werder Bremen\",\"logo\":\"https:\\/\\/media-3.api-sports.io\\/football\\/teams\\/162.png\"},\"goalsHomeTeam\":2,\"goalsAwayTeam\":2,\"score\":{\"halftime\":\"2-0\",\"fulltime\":\"2-2\",\"extratime\":\"0-0\",\"penalty\":\"5-4\"}}"; String matchString = "{\"fixture_id\":958530,\"league_id\":4303,\"league\":{\"name\":\"DFB Pokal\",\"country\":\"Germany\",\"logo\":\"https:\\/\\/media-3.api-sports.io\\/football\\/leagues\\/81.png\",\"flag\":\"https:\\/\\/media-1.api-sports.io\\/flags\\/de.svg\"},\"event_date\":\"2022-10-19T18:00:00+02:00\",\"event_timestamp\":1666195200,\"firstHalfStart\":1666195200,\"secondHalfStart\":1666198800,\"round\":\"2nd Round\",\"status\":\"Match Finished\",\"statusShort\":\"PEN\",\"elapsed\":120,\"venue\":\"Home Deluxe Arena\",\"referee\":\"Frank Willenborg, Germany\",\"homeTeam\":{\"team_id\":185,\"team_name\":\"SC Paderborn 07\",\"logo\":\"https:\\/\\/media-2.api-sports.io\\/football\\/teams\\/185.png\"},\"awayTeam\":{\"team_id\":162,\"team_name\":\"Werder Bremen\",\"logo\":\"https:\\/\\/media-3.api-sports.io\\/football\\/teams\\/162.png\"},\"goalsHomeTeam\":2,\"goalsAwayTeam\":2,\"score\":{\"halftime\":\"2-0\",\"fulltime\":\"2-2\",\"extratime\":\"0-0\",\"penalty\":\"5-4\"}}";
@@ -20,4 +20,5 @@ public class APIFootballMatchTest {
JSONObject matchJson = stringToJSONObject(matchString); JSONObject matchJson = stringToJSONObject(matchString);
APIFootballMatch match = new APIFootballMatch(matchJson, 2023); APIFootballMatch match = new APIFootballMatch(matchJson, 2023);
} }
*/
} }
@@ -4,8 +4,8 @@ import org.junit.Test;
public class APIFootballUpdaterTest { public class APIFootballUpdaterTest {
int season = 2026; int season = 2027;
/*
@Test @Test
public void checkErrorsTest() { public void checkErrorsTest() {
String rateLimitError = "{\"results\":0,\"errors\":{\"rateLimit\":\"Too many requests. Your rate limit is 10 requests per minute.\"}}"; String rateLimitError = "{\"results\":0,\"errors\":{\"rateLimit\":\"Too many requests. Your rate limit is 10 requests per minute.\"}}";
@@ -41,4 +41,5 @@ public class APIFootballUpdaterTest {
APIFootballUpdater updater = new APIFootballUpdater(); APIFootballUpdater updater = new APIFootballUpdater();
updater.updateAllRounds(season); updater.updateAllRounds(season);
} }
*/
} }
@@ -1,77 +0,0 @@
package de.jeyp91.openligadb;
import org.junit.Test;
import java.util.ArrayList;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class OpenLigaDBConnectorTest {
@Test
public void APITestGetMatchDataOfMatchdayBundesliga() {
OpenLigaDBConnector openLigaDBConnector = new OpenLigaDBConnector();
ArrayList<OpenLigaDBMatch> matches = openLigaDBConnector.getMatchDataOfMatchday(2020, "bl1", 1);
assertEquals(9, matches.size());
OpenLigaDBMatch match;
match = matches.get(0);
assertEquals((Integer) 55277, match.getMatchId());
assertEquals((Integer) 40, match.getTeamIdHome());
assertEquals((Integer) 54, match.getTeamIdGuest());
assertEquals((Integer) 2020, match.getSeason());
assertEquals("2019-08-16T20:30:00", match.getMatchDateTime());
assertEquals((Integer) 1, match.getMatchday());
assertEquals((Integer) 2, match.getGoalsHome());
assertEquals((Integer) 2, match.getGoalsGuest());
assertTrue(match.getMatchIsFinished());
match = matches.get(1);
assertEquals((Integer) 55278, match.getMatchId());
assertEquals((Integer) 7, match.getTeamIdHome());
assertEquals((Integer) 95, match.getTeamIdGuest());
assertEquals((Integer) 2020, match.getSeason());
assertEquals("2019-08-17T15:30:00", match.getMatchDateTime());
assertEquals((Integer) 1, match.getMatchday());
assertEquals((Integer) 5, match.getGoalsHome());
assertEquals((Integer) 1, match.getGoalsGuest());
assertTrue(match.getMatchIsFinished());
}
@Test
public void APITestGetMatchDataOfMatchdayDFBPokal() {
OpenLigaDBConnector openLigaDBConnector = new OpenLigaDBConnector();
ArrayList<OpenLigaDBMatch> matches = openLigaDBConnector.getMatchDataOfMatchday(2020, "dfb2019", 1);
assert matches.size() == 32;
OpenLigaDBMatch match = matches.get(0);
assertEquals((Integer) 54926, match.getMatchId());
assertEquals((Integer) 563, match.getTeamIdHome());
assertEquals((Integer) 7, match.getTeamIdGuest());
assertEquals((Integer) 2020, match.getSeason());
assertEquals("2019-08-09T20:45:00", match.getMatchDateTime());
assertEquals((Integer) 1, match.getMatchday());
assertEquals((Integer) 0, match.getGoalsHome());
assertEquals((Integer) 2, match.getGoalsGuest());
assertTrue(match.getMatchIsFinished());
}
@Test
public void APITestGetMatchDataOfSingleMatch() {
OpenLigaDBConnector openLigaDBConnector = new OpenLigaDBConnector();
OpenLigaDBMatch match = openLigaDBConnector.getMatchDataOfSingleMatch(55583);
assertEquals((Integer) 55583, match.getMatchId());
assertEquals((Integer) 16, match.getTeamIdHome());
assertEquals((Integer) 55, match.getTeamIdGuest());
assertEquals((Integer) 2020, match.getSeason());
assertEquals("2019-07-26T20:30:00", match.getMatchDateTime());
assertEquals((Integer) 1, match.getMatchday());
assertEquals((Integer) 2, match.getGoalsHome());
assertEquals((Integer) 1, match.getGoalsGuest());
assertTrue(match.getMatchIsFinished());
}
}
@@ -7,7 +7,7 @@ import org.junit.Test;
public class TLWMatchdaysCreatorTest { public class TLWMatchdaysCreatorTest {
int season = 2026; int season = 2027;
@Test @Test
public void getMatchdaysTippligaTest() { public void getMatchdaysTippligaTest() {
@@ -90,11 +90,19 @@ public class TLWMatchdaysCreatorTest {
System.out.println(sql); System.out.println(sql);
} }
@Test
public void getMatchdaysRelegationSqlTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(season, 47, "Relegation");
String sql = matchdaysCreator.getMatchdaysSQL();
System.out.println(sql);
}
@Test @Test
public void getMatchdaysEMTippspielSqlTest() { public void getMatchdaysEMTippspielSqlTest() {
TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 49, "EM-Tippspiel"); TLWMatchdaysCreator matchdaysCreator = new TLWMatchdaysCreator(2021, 49, "EM-Tippspiel");
String sql = matchdaysCreator.getMatchdaysSQL(); String sql = matchdaysCreator.getMatchdaysSQL();
// System.out.println(sql); System.out.println(sql);
} }
} }
@@ -1,14 +1,13 @@
package de.jeyp91.tippliga; package de.jeyp91.tippliga;
import org.junit.Test;
import java.util.ArrayList; import java.util.ArrayList;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class TLWMatchesCreatorFootballTest { public class TLWMatchesCreatorFootballTest {
int season = 2026; int season = 2027;
@Test @Test
public void getMatchesTest() { public void getMatchesTest() {
@@ -49,9 +48,9 @@ public class TLWMatchesCreatorFootballTest {
} }
@Test @Test
public void getMatchesEMTippspielSqlTest() { public void getMatchesRelegationSqlTest() {
TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(2021, 49, "EM-Tippspiel"); TLWMatchesCreatorFootball creator = new TLWMatchesCreatorFootball(season, 47, "Relegation");
String sql = creator.getSQLInsertString(); String sql = creator.getSQLInsertString();
// System.out.println(sql); System.out.println(sql);
} }
} }
@@ -4,7 +4,7 @@ import org.junit.Test;
public class TLWMatchesCreatorTipperPokalTest { public class TLWMatchesCreatorTipperPokalTest {
int season = 2026; int season = 2027;
@Test @Test
public void getMatchesWTLPokalTest() { public void getMatchesWTLPokalTest() {
@@ -4,7 +4,7 @@ import org.junit.Test;
public class TLWMatchesCreatorTipperTest { public class TLWMatchesCreatorTipperTest {
int season = 2026; int season = 2027;
@Test @Test
public void getMatchesTippliga1Test() { public void getMatchesTippliga1Test() {
@@ -4,7 +4,7 @@ import org.junit.Test;
public class TLWMatchesUpdaterFootballTest { public class TLWMatchesUpdaterFootballTest {
int season = 2026; int season = 2027;
@Test @Test
public void getUpdateSqlTest1() { public void getUpdateSqlTest1() {
TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(season, 1, "Tippliga"); TLWMatchesUpdaterFootball updater = new TLWMatchesUpdaterFootball(season, 1, "Tippliga");
@@ -6,7 +6,7 @@ import org.junit.Test;
public class TLWTeamsCreatorTest { public class TLWTeamsCreatorTest {
int season = 2026; int season = 2027;
@Test @Test
public void getTeamsTippligaFootball1Test() { public void getTeamsTippligaFootball1Test() {