This repository contains the source code and instructions for the ACP-Daemon, a Python script that automates Git repository tracking and commits.
ACP-Daemon is a Python script designed to automate Git repository tracking and commits. It periodically monitors changes in a specified directory and automatically adds, commits, and pushes the changes to a remote Git repository. The script uses the git and notify2 libraries to interact with Git and provide desktop notifications for detected changes. Installation
To use the ACP-Daemon script, follow the steps below:
Clone this repository to your local machine.
Set up a Python virtual environment using virtualenv:
pip install virtualenv
export PATH="$PATH:/home/r0-bl/.local/bin"
mkdir python-virtual-environments && cd python-virtual-environments
sudo apt-get install python3-venv
virtualenv myenvsource myenv/bin/activateInstall the required dependencies:
pip install notify2
pip install dbus-pythonTo run the ACP-Daemon script, follow these steps:
Open a terminal and navigate to the cloned repository's directory.
Make sure you are still in the Python virtual environment:
source myenv/bin/activateRun the ACP-Daemon script:
python acp-daemon.pyThe script will start monitoring the specified directory for changes and automatically add, commit, and push the changes to the configured Git repository. Logs of Creation Virtual Environment Setup
To create a virtual environment for Python, follow these steps:
Install virtualenv using pip:
pip install virtualenvAdd the virtualenv executable to your PATH:
export PATH="$PATH:/home/r0-bl/.local/bin"Creating a New Directory
To create a new directory, use the following commands:
mkdir python-virtual-environments && cd python-virtual-environments
sudo apt-get install python3-venvCreating a New Virtual Environment
To create a new virtual environment inside the directory, use the following command:
virtualenv myenvPracticing
For practice, you can create another virtual environment and install additional dependencies:
virtualenv r0_demon-virt
sudo pip install notify2
sudo pip install dbus-pythonTo compile the ACP-Daemon script, follow these steps:
Debian:
Install PyInstaller and the PyInstaller Linux dependency:
pip install pyinstaller
pip install pyinstaller-linuxRun PyInstaller to create a standalone executable:
pyinstaller --onefile acp-daemon.pyOnce compiled, the executable file can be found in the dist directory:
r0_demon/dist/acp-daemonUse the above path to run the compiled ACP-Daemon executable.