Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/app_linuxBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: ShopPyBot Linux

on:
push:
branches: [master,dev]
branches: [master, dev]
pull_request:
branches: [master]
branches: [master, dev]

jobs:
build-linux:
Expand All @@ -26,6 +26,6 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# run: |
# pytest
- name: Test with pytest
run: |
pytest
10 changes: 5 additions & 5 deletions .github/workflows/app_macBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: ShopPyBot Mac

on:
push:
branches: [master,dev]
branches: [master, dev]
pull_request:
branches: [master]
branches: [master, dev]

jobs:
build-mac:
Expand All @@ -26,6 +26,6 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# run: |
# pytest
- name: Test with pytest
run: |
pytest
11 changes: 5 additions & 6 deletions .github/workflows/app_windowsBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: ShopPyBot Windows

on:
push:
branches: [master,dev]
branches: [master, dev]
pull_request:
branches: [master]
branches: [master, dev]

jobs:
build-windows:
Expand All @@ -26,7 +26,6 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# run: |
# pytest

- name: Test with pytest
run: |
pytest
25 changes: 2 additions & 23 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ name: "CodeQL"

on:
push:
branches: [ master,dev ]
branches: [ master, dev ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ master, dev ]
schedule:
- cron: '23 5 * * 5'

Expand All @@ -23,37 +22,17 @@ jobs:
matrix:
language: [ 'python' ]


steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

173 changes: 171 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,172 @@
dev*
/local/&
*.exe
*local*
logs/*
*.exe
.venv*
.DS_Store
config.yml
data/*
pytest-cache*

# 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/
File renamed without changes.
2 changes: 2 additions & 0 deletions bot.py → _deprecated/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def writeLog(message, type,_loggingLevel=0):
print(bcolors.WARNING,"WARNING:",message,bcolors.ENDC)
elif type.upper() == "INFO" and _loggingLevel >= 3:
print("\033[1;37;40mINFO:",message,bcolors.ENDC)

def bbBuy(_driver,_link,_alertSound,_timeout,_queueExists,_email,_pwd,_sec,_testMode,_loggingLevel=0):
_driver.get(_link)

Expand Down Expand Up @@ -104,6 +105,7 @@ def bbBuy(_driver,_link,_alertSound,_timeout,_queueExists,_email,_pwd,_sec,_test
if(_alertSound and _alertSound != ""):
playsound(_alertSound,False)
writeLog("YOU'RE IN QUEUE - GOOD LUCK","ALWAYS",_loggingLevel)
input("Press enter when finished in the Chrome browser")
return True

def amzSignIn(_driver,_timeout,_email,_pwd,_loggingLevel=0):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions activate.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
function Test-Package {
param (
[string]$packageName
)
$package = pip show $packageName 2>&1
return -not ($package -match "WARNING: Package(s) not found")
}

if (-not (Test-Path "$PSScriptRoot\.venv")) {
Write-Host "No virtual environment found in $PSScriptRoot\.venv"
python -m venv "$PSScriptRoot\.venv"
}

.\.venv\Scripts\activate

$requirements = Get-Content "$PSScriptRoot\requirements.txt"
foreach ($requirement in $requirements) {
if (-not (Test-Package -packageName $requirement)) {
Write-Host "Installing $requirement..."
pip install $requirement
} else {
Write-Host "$requirement is already installed."
}
}
Loading
Loading