Skip to content

Commit

Permalink
Add initial project files and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin-marquez committed Oct 15, 2024
0 parents commit c18ebb6
Show file tree
Hide file tree
Showing 30 changed files with 1,581 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build and Release

on:
push:
branches: [ "main" ]
tags:
- 'v*'
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build with PyInstaller
run: pyinstaller nikke_ocr.spec

- name: Create Release
if: startsWith(github.ref, 'refs/tags/v')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/nikke-ocr.exe
asset_name: nikke-ocr.exe
asset_content_type: application/octet-stream

- name: Upload artifact for debugging
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v2
with:
name: nikke-ocr
path: ./dist/nikke-ocr.exe
162 changes: 162 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
41 changes: 41 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.rulers": [
80,
120
],
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"python.languageServer": "Pylance",
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.wordBasedSuggestions": "allDocuments",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
},
"python.analysis.typeCheckingMode": "basic",
"python.envFile": "${workspaceFolder}/.env",
"git.enableSmartCommit": true,
"git.autofetch": true,
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "One Dark Pro",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": [
"--disable=C0111"
],
"python.sortImports.args": [
"--profile",
"black"
],
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
}
31 changes: 31 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Setup Development Environment",
"type": "shell",
"command": "${workspaceFolder}/scripts/setup.bat",
"windows": {
"command": "${workspaceFolder}\\scripts\\setup.bat"
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Build Local Executable",
"type": "shell",
"command": "${workspaceFolder}/scripts/build.bat",
"windows": {
"command": "${workspaceFolder}\\scripts\\build.bat"
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
}
]
}
11 changes: 11 additions & 0 deletions launcher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import sys

import pyuac

from src.main import main

if __name__ == "__main__":
if not pyuac.isUserAdmin():
pyuac.runAsAdmin()
else:
main()
5 changes: 5 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pyuac
isort
autoflake
pypiwin32
pyinstaller
11 changes: 11 additions & 0 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PyQt5==5.15.11
PyQt5-Qt5==5.15.2
easyocr==1.7.2
numpy==1.26.4
opencv-contrib-python==4.10.0.84
opencv-python==4.10.0.84
opencv-python-headless==4.10.0.84
scikit-image==0.24.0
pynput==1.7.7
PyAutoGUI==0.9.54
requests==2.32.3
Binary file added resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/static/images/bursts/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/static/images/bursts/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/static/images/bursts/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/static/images/bursts/p.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/static/images/elements/Electric.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/static/images/elements/Fire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/static/images/elements/Iron.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/static/images/elements/Water.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/static/images/elements/Wind.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions resources/static/lang/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"NIKKE OCR": "NIKKE OCR",
"Status: Idle (Press F1 to start)": "Status: Idle (Press F1 to start)",
"Status: Running (Press F1 to stop)": "Status: Running (Press F1 to stop)",
"Download Data": "Download Data",
"Nikke data is not found. Do you want to download it? This is necessary for the program to function.": "Nikke data is not found. Do you want to download it? This is necessary for the program to function.",
"Update Data": "Update Data",
"New Nikke characters are available. Do you want to update the data?": "New Nikke characters are available. Do you want to update the data?",
"Error": "Error",
"Failed to fetch character data.": "Failed to fetch character data.",
"Download Complete": "Download Complete",
"Nikke data has been successfully downloaded and processed.": "Nikke data has been successfully downloaded and processed.",
"Language": "Language",
"English": "English",
"Spanish": "Spanish",
"Settings": "Settings",
"Choose Language": "Choose Language",
"File": "File",
"Exit": "Exit",
"Main": "Main",
"Theme:": "Theme:",
"Light": "Light",
"Dark": "Dark",
"UI language updated": "UI language updated",
"Automation started. Performing click sequence...": "Automation started. Performing click sequence...",
"Automation stopped and reset": "Automation stopped and reset",
"Clicking to move to next character.": "Clicking to move to next character.",
"Select Rarities:": "Select Rarities:",
"Process Completed": "Process Completed",
"Character processing has finished.": "Character processing has finished.",
"Data processing completed": "Data processing completed",
"All characters have been processed.": "All characters have been processed.",
"First Nikke detected: {name}": "First Nikke detected: {name}",
"Cycle completed. Stopping automation.": "Cycle completed. Stopping automation.",
"Processed Nikkes: {count}": "Processed Nikkes: {count}",
"Total Nikkes processed: {count}": "Total Nikkes processed: {count}",
"Error: Unable to create menu bar": "Error: Unable to create menu bar",
"Error: Unable to create language submenu": "Error: Unable to create language submenu",
"Error: Unable to create settings menu": "Error: Unable to create settings menu",
"Automation Stopped": "Automation Stopped",
"Automation has been stopped.": "Automation has been stopped."
}
Loading

0 comments on commit c18ebb6

Please sign in to comment.