parch-profiler/README.md

160 lines
3.5 KiB
Markdown
Raw Normal View History

2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
### 📦 **Parch-Profiler**
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
Parch-Profiler is a powerful Python-based utility designed specifically for Parch Linux. It simplifies the management of system packages and configurations by allowing you to generate, validate, and install packages—including AUR and Flatpak—using a structured TOML configuration file.
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
---
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
## 🚀 **Features**
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
- **Package Installation:**
- Install packages using Pacman, AUR (via `paru`), and Flatpak from a single TOML file.
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
- **Configuration Management:**
- Clone configuration files, such as Neovim setups, directly from Git repositories.
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
- **Systemd Service Management:**
- Enable and start systemd services as specified in the TOML configuration.
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
- **TOML Validation:**
- Validate your TOML files to ensure they are correctly formatted.
- **Package List Generation:**
- Automatically generate TOML files listing all installed Pacman, AUR, and Flatpak packages.
- **File-based TOML Generation:**
- Convert simple text files listing packages into structured TOML files.
---
## 📄 **Usage**
### **1. Loading a TOML Configuration**
To install packages, clone configurations, and enable services:
```bash
2024-08-20 19:14:03 +03:30
python profiler.py --load config.toml
2024-08-20 19:02:31 +03:30
```
### **2. Validating a TOML Configuration**
Check if your TOML file is correctly formatted:
```bash
2024-08-20 19:14:03 +03:30
python profiler.py --check config.toml
2024-08-20 15:29:29 +00:00
```
2024-08-20 19:02:31 +03:30
### **3. Generating a System Package List**
Generate a TOML file listing all installed Pacman, AUR, and Flatpak packages:
```bash
2024-08-20 19:14:03 +03:30
python profiler.py --generate-system output.toml
2024-08-20 15:29:29 +00:00
```
2024-08-20 19:02:31 +03:30
### **4. Generating a TOML from a Text File**
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
Convert a simple text file into a TOML configuration:
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
```bash
2024-08-20 19:14:03 +03:30
python profiler.py --generate-file input.txt output.toml
2024-08-20 19:02:31 +03:30
```
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
### **5. Reviewing and Editing Generated TOML Files**
After generating a TOML file, you will be prompted to review and edit it using your preferred text editor (`vim` or `nano`).
---
## 🧰 **Sample `proto.toml` File**
Heres a sample `proto.toml` file that you can use as a starting point for your configurations:
```toml
# Pacman packages to be installed
[packages]
packages = [
"base-devel",
"neovim",
"git"
]
# AUR packages to be installed
[aur]
aur_packages = [
"google-chrome",
"paru-bin"
]
# Flatpak packages to be installed
[flatpak]
flatpak_packages = [
"com.spotify.Client",
"org.videolan.VLC"
]
# Configuration repositories to clone
[config]
2024-08-20 19:14:03 +03:30
nvim = { url = "https://github.com/yourusername/nvim-config.git" }
2024-08-20 19:02:31 +03:30
# Systemd services to enable and start
[systemd]
systemd_services = [
"docker.service",
"nginx.service"
]
```
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
---
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
## 📄 **Sample `input.txt` for TOML Generation**
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
If you prefer to start from a simple text file, heres how your `input.txt` might look:
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
```text
packages: base-devel, neovim, git
aur: google-chrome, paru-bin
flatpak: com.spotify.Client, org.videolan.VLC
```
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
---
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
## 🛠️ **Installation**
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
To use Parch-Profiler on Parch Linux, clone the repository and ensure you have Python installed on your system:
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
```bash
2024-08-20 19:14:03 +03:30
git clone https://git.parchlinux.com/applications/parch-profiler.git
2024-08-20 19:02:31 +03:30
cd parch-profiler
2024-08-20 19:14:03 +03:30
python profiler.py --help
2024-08-20 19:02:31 +03:30
```
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
---
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
## ✨ **Contributing**
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
We welcome contributions! Please feel free to submit a Merge Request or open an Issue on GitLab.
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
---
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
## 📜 **License**
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
This project is licensed under the GPL-3 License - see the [LICENSE](./LICENSE) file for details.
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
---
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
## 🛠️ **Requirements**
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
- **Python 3.x**
- **Parch Linux**
- **Pacman, paru, flatpak**
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
---
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
## 📧 **Support**
2024-08-20 15:29:29 +00:00
2024-08-20 19:02:31 +03:30
For any issues or feature requests, please reach out through the GitLab repository.
2024-08-20 15:29:29 +00:00