Merge pull request #59 from Jothin-kumar/issue_44
Workflow to generate deb file on every push event added
This commit is contained in:
commit
0a393238ee
50
.github/workflows/installer_creation.yml
vendored
Normal file
50
.github/workflows/installer_creation.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
name: Installer creation
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
deb-package-creation:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout repository content
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: setup python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
- name: Delete previous deb file
|
||||||
|
run: rm bin/jarvis_deb.deb
|
||||||
|
- name: Update
|
||||||
|
run: sudo apt-get update
|
||||||
|
- name: Install portaudio19-dev and python3-pyaudio
|
||||||
|
run: sudo apt install portaudio19-dev python3-pyaudio
|
||||||
|
- name: Install espeak
|
||||||
|
run: sudo apt-get install espeak
|
||||||
|
- name: Install requirements
|
||||||
|
run: pip3 install -r ubuntu_requirements.txt
|
||||||
|
- name: Install pyinstaller
|
||||||
|
run: pip3 install pyinstaller
|
||||||
|
- name: Build pyinstaller package
|
||||||
|
run: pyinstaller Jarvis2.py -w
|
||||||
|
- name: delete build directory
|
||||||
|
run: rm -rf build
|
||||||
|
- name: delete spec file
|
||||||
|
run: rm Jarvis2.spec
|
||||||
|
- name: jarvis_deb directory
|
||||||
|
run: mkdir -p jarvis_deb/usr/local/bin ; mkdir -p jarvis_deb/usr/share/applications ; mkdir jarvis_deb/DEBIAN
|
||||||
|
- name: Copy debian control file and .desktop file
|
||||||
|
run: cp -b "installer maker files/control" "jarvis_deb/DEBIAN" ; cp -b "installer maker files/jarvis desktop assistant.desktop" "jarvis_deb/usr/share/applications"
|
||||||
|
- name: Copy pyinstaller package
|
||||||
|
run: cp -r "dist/Jarvis2" "jarvis_deb/usr/local/bin"
|
||||||
|
- name: Build deb package
|
||||||
|
run: dpkg-deb --build --root-owner-group jarvis_deb
|
||||||
|
- name: Remove dist and jarvis_deb directories
|
||||||
|
run: rm -r dist ; rm -r jarvis_deb
|
||||||
|
- name: Move Jarvis_deb.deb to bin folder
|
||||||
|
run: cp -b "jarvis_deb.deb" "bin" && rm "jarvis_deb.deb"
|
||||||
|
- name: Git config
|
||||||
|
run: git config --global user.name "Installer creation bot"
|
||||||
|
- name: Git add
|
||||||
|
run: git add -A
|
||||||
|
- name: Git commit
|
||||||
|
run: git commit -m "Installer update"
|
||||||
|
- name: Git pull
|
||||||
|
run: git pull
|
||||||
|
- name: Git push
|
||||||
|
run: git push
|
||||||
129
.gitignore
vendored
Normal file
129
.gitignore
vendored
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
# 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/
|
||||||
|
pip-wheel-metadata/
|
||||||
|
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/
|
||||||
|
|
||||||
|
# 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
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.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
|
||||||
|
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
||||||
|
__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/
|
||||||
@ -78,6 +78,12 @@ def take_command():
|
|||||||
with sr.Microphone() as source:
|
with sr.Microphone() as source:
|
||||||
print("Listening....")
|
print("Listening....")
|
||||||
r.pause_threshold = 0.5
|
r.pause_threshold = 0.5
|
||||||
|
r.energy_threshold = 300
|
||||||
|
"""The default value as per speech_recognition documentation.
|
||||||
|
Increase if application stops responding. and decrease if
|
||||||
|
assistant doesn't execute any command and just says next
|
||||||
|
command sir."""
|
||||||
|
|
||||||
audio = r.listen(source)
|
audio = r.listen(source)
|
||||||
|
|
||||||
print("Recognizing....")
|
print("Recognizing....")
|
||||||
|
|||||||
@ -86,6 +86,7 @@ def main(search_engine, take_command, debug):
|
|||||||
change_volume(query, take_command)
|
change_volume(query, take_command)
|
||||||
|
|
||||||
speak("Next Command! Sir!")
|
speak("Next Command! Sir!")
|
||||||
|
|
||||||
gui.set_speak_command(execute_the_command_said_by_user)
|
gui.set_speak_command(execute_the_command_said_by_user)
|
||||||
set_gui_speak(gui.speak)
|
set_gui_speak(gui.speak)
|
||||||
gui.mainloop()
|
gui.mainloop()
|
||||||
@ -107,6 +108,7 @@ def run():
|
|||||||
with sr.Microphone() as source:
|
with sr.Microphone() as source:
|
||||||
print("Listening....")
|
print("Listening....")
|
||||||
r.pause_threshold = 0.5
|
r.pause_threshold = 0.5
|
||||||
|
r.energy_threshold = int(config['DEFAULT']['energy_threshold'])
|
||||||
audio = r.listen(source)
|
audio = r.listen(source)
|
||||||
|
|
||||||
query = " "
|
query = " "
|
||||||
|
|||||||
@ -41,7 +41,9 @@ For ubuntu user run
|
|||||||
python Jarvis2.py
|
python Jarvis2.py
|
||||||
```
|
```
|
||||||
Wow! all done and now give some voice command
|
Wow! all done and now give some voice command
|
||||||
|
# Download
|
||||||
|
- For Windows users, download this [installer](https://raw.githubusercontent.com/Harsha200105/DesktopAssistant/issue_44/bin/jarvis%20desktop%20assistant%20setup.exe)
|
||||||
|
- For Ubuntu users, download this [deb package](https://raw.githubusercontent.com/Harsha200105/DesktopAssistant/issue_44/bin/jarvis_deb.deb).
|
||||||
# Contributing Guidelines :<br>
|
# Contributing Guidelines :<br>
|
||||||
- We are Open for Pull Requests
|
- We are Open for Pull Requests
|
||||||
- Please contribute and add value to the code
|
- Please contribute and add value to the code
|
||||||
|
|||||||
BIN
__pycache__/Jarvis2.cpython-39.pyc
Normal file
BIN
__pycache__/Jarvis2.cpython-39.pyc
Normal file
Binary file not shown.
BIN
bin/jarvis desktop assistant setup.exe
Executable file
BIN
bin/jarvis desktop assistant setup.exe
Executable file
Binary file not shown.
BIN
bin/jarvis_deb.deb
Normal file
BIN
bin/jarvis_deb.deb
Normal file
Binary file not shown.
@ -6,6 +6,7 @@ musicpath =
|
|||||||
voice = Male
|
voice = Male
|
||||||
rate = 150
|
rate = 150
|
||||||
volume = 100
|
volume = 100
|
||||||
|
energy_threshold = 300
|
||||||
|
|
||||||
[EMAIL]
|
[EMAIL]
|
||||||
server = smtp.gmail.com
|
server = smtp.gmail.com
|
||||||
|
|||||||
8
installer maker files/control
Normal file
8
installer maker files/control
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Package: Jarvis
|
||||||
|
Version: 1.0.0
|
||||||
|
Architecture: all
|
||||||
|
Maintainer: Technerd Brainiac
|
||||||
|
Copyright: 2021 Technerd Brainiac
|
||||||
|
License: MIT
|
||||||
|
Homepage: https://github.com/Harsha200105/DesktopAssistant
|
||||||
|
Description: A Virtual Desktop Assistant Written in Python
|
||||||
7
installer maker files/jarvis desktop assistant.desktop
Normal file
7
installer maker files/jarvis desktop assistant.desktop
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Version=1.0.0
|
||||||
|
Type=Application
|
||||||
|
Terminal=false
|
||||||
|
Exec=/usr/local/bin/Jarvis2/Jarvis2
|
||||||
|
Name=Jarvis
|
||||||
Loading…
x
Reference in New Issue
Block a user