This commit is contained in:
retoor 2025-05-05 20:29:54 +02:00
parent fa4d3a80ae
commit c23e289e0c
7 changed files with 264 additions and 28 deletions

View File

@ -7,6 +7,7 @@ ensure_env:
-@python3 -m venv .venv
./.venv/bin/python -m pip install black
./.venv/bin/python -m pip install build
./.venv/bin/python -m pip install -e .
build:
./.venv/bin/python -m build .
@ -19,3 +20,10 @@ run:
test:
./.venv/bin/python -m unittest zhurnal.tests
clean:
rm -rf .venv
rm -rf build
rm -rf dist
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete

View File

@ -1,13 +1,79 @@
# Zhurnal
# Zhurnal: Real-Time Process Monitoring Web Interface πŸš€
Application for running and monitoring multiple applications.
The monitoring goes trough web.
The web interface will show life updates of stdout and stderr of configured applications.
## 🌟 Overview
## Installation
1. Run `make`. This will build envionment and will install the application.
2. Run Zhurnal with the commands as parameters followed by the host / port to serve on. `./.venv/bin/zhurnal "ping google.nl" "ping google.nl" --host=127.0.0.1 --port=8081`
Zhurnal is a powerful, lightweight, and intuitive process monitoring solution that brings unprecedented visibility to your command-line executions. Transform the way you track, analyze, and interact with running processes through an elegant web interface.
## Todo
1. Optional Basic Auth configurable trough command line.
2. Process filtering in web interface by pressing a digit. Escape to show all processes.
## ✨ Key Features
- **Real-Time Process Tracking**: Monitor multiple processes simultaneously
- **Web-Based Dashboard**: Beautiful, responsive interface with live updates
- **Instant Output Streaming**: See command outputs as they happen
- **Process Lifecycle Management**: Automatic process group termination
- **Clipboard-Friendly**: Click-to-copy output lines
- **Minimal Overhead**: Lightweight and efficient design
## πŸ”§ Installation
### Using pip
```bash
pip install git+https://retoor.molodetz.nl/retoor/zhurnal.git
```
### From Source
```bash
git clone https://retoor.molodetz.nl/retoor/zhurnal.git
cd zhurnal
make install
```
## πŸš€ Quick Start
Run multiple processes and monitor them in real-time:
```bash
zhurnal "ping google.com" "docker ps" "top"
```
### Advanced Usage
```bash
# Specify host and port
zhurnal --host 0.0.0.0 --port 8080 "your_command" "another_command"
# With authentication
zhurnal --username admin --password secret "sensitive_process"
```
## πŸ’‘ Why Zhurnal?
- **Developer-Friendly**: Perfect for DevOps, system administrators, and developers
- **No More Terminal Switching**: Single web interface for multiple processes
- **Performance Insights**: Elapsed time and detailed process information
- **Cross-Platform**: Works on Linux, macOS, and Windows
## πŸ”’ Security
- Process isolation
- Optional authentication
- Secure WebSocket connections
## πŸ“¦ System Requirements
- Python 3.8+
- Modern web browser
- Minimal system resources
## 🀝 Contributing
Contributions are welcome!
## πŸ“„ License
MIT License
---
**Zhurnal**: Because monitoring should be as smooth as your workflow. πŸ’»βœ¨

80
create_debian_package.sh Executable file
View File

@ -0,0 +1,80 @@
#!/bin/bash
set -e
# Ensure script is run with sudo or as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root or with sudo"
exit 1
fi
# Project details
PROJECT_NAME="zhurnal"
VERSION=$(python3 -c "import importlib.metadata; print(importlib.metadata.version('$PROJECT_NAME'))")
ARCH=$(dpkg --print-architecture)
# Create package directory structure
PACKAGE_DIR="/tmp/${PROJECT_NAME}_${VERSION}_${ARCH}"
mkdir -p "${PACKAGE_DIR}/DEBIAN"
mkdir -p "${PACKAGE_DIR}/usr/local/bin"
mkdir -p "${PACKAGE_DIR}/usr/local/lib/python3/dist-packages/${PROJECT_NAME}"
mkdir -p "${PACKAGE_DIR}/etc/${PROJECT_NAME}"
# Create control file
cat > "${PACKAGE_DIR}/DEBIAN/control" << EOF
Package: ${PROJECT_NAME}
Version: ${VERSION}
Section: utils
Priority: optional
Architecture: ${ARCH}
Depends: python3 (>= 3.8), python3-pip, python3-venv
Maintainer: Your Name <your.email@example.com>
Description: Zhurnal - A command-line utility for running and monitoring commands
EOF
# Create postinst script for additional setup
cat > "${PACKAGE_DIR}/DEBIAN/postinst" << EOF
#!/bin/bash
set -e
# Create virtual environment if not exists
if [ ! -d "/opt/${PROJECT_NAME}/.venv" ]; then
python3 -m venv /opt/${PROJECT_NAME}/.venv
/opt/${PROJECT_NAME}/.venv/bin/pip install --upgrade pip
/opt/${PROJECT_NAME}/.venv/bin/pip install git+https://retoor.molodetz.nl/retoor/zhurnal.git
fi
# Create symlink to binary
ln -sf /opt/${PROJECT_NAME}/.venv/bin/${PROJECT_NAME} /usr/local/bin/${PROJECT_NAME}
exit 0
EOF
# Create prerm script for cleanup
cat > "${PACKAGE_DIR}/DEBIAN/prerm" << EOF
#!/bin/bash
set -e
# Remove symlink
rm -f /usr/local/bin/${PROJECT_NAME}
exit 0
EOF
# Make scripts executable
chmod 755 "${PACKAGE_DIR}/DEBIAN/postinst"
chmod 755 "${PACKAGE_DIR}/DEBIAN/prerm"
# Copy project files
cp -r src/${PROJECT_NAME}/* "${PACKAGE_DIR}/usr/local/lib/python3/dist-packages/${PROJECT_NAME}/"
# Build the package
dpkg-deb --build "${PACKAGE_DIR}"
# Move package to current directory
mv "/tmp/${PROJECT_NAME}_${VERSION}_${ARCH}.deb" .
# Cleanup
rm -rf "${PACKAGE_DIR}"
echo "Debian package created successfully: ${PROJECT_NAME}_${VERSION}_${ARCH}.deb"

View File

@ -1,3 +1,18 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
build-backend = "setuptools.build_meta"
[project]
name = "zhurnal"
version = "0.2.0"
description = "Process monitoring and management web application"
requires-python = ">=3.8"
dependencies = [
"aiohttp",
"setuptools",
"app @ git+https://retoor.molodetz.nl/retoor/app.git"
]
readme = { file = "README.md", content-type = "text/markdown" }
[project.scripts]
zhurnal = "zhurnal.app:cli"

View File

@ -1,25 +1,91 @@
Metadata-Version: 2.1
Metadata-Version: 2.4
Name: zhurnal
Version: 1.4.37
Summary: Web executor and logger
Version: 0.1.0
Summary: Process monitoring and management web application
Author: retoor
Author-email: retoor@molodetz.nl
License: MIT
Requires-Python: >=3.7
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: aiohttp
Requires-Dist: app@ git+https://molodetz.nl/retoor/app.git
Requires-Dist: setuptools
Requires-Dist: app@ git+https://retoor.molodetz.nl/retoor/app.git
# Zhurnal
# Zhurnal: Real-Time Process Monitoring Web Interface πŸš€
Application for running and monitoring multiple applications.
The monitoring goes trough web.
The web interface will show life updates of stdout and stderr of configured applications.
## 🌟 Overview
## Installation
1. Run `make`. This will build envionment and will install the application.
2. Run Zhurnal with the commands as parameters followed by the host / port to serve on. `./.venv/bin/zhurnal "ping google.nl" "ping google.nl" --host=127.0.0.1 --port=8081`
Zhurnal is a powerful, lightweight, and intuitive process monitoring solution that brings unprecedented visibility to your command-line executions. Transform the way you track, analyze, and interact with running processes through an elegant web interface.
## Todo
1. Optional Basic Auth configurable trough command line.
2. Process filtering in web interface by pressing a digit. Escape to show all processes.
## ✨ Key Features
- **Real-Time Process Tracking**: Monitor multiple processes simultaneously
- **Web-Based Dashboard**: Beautiful, responsive interface with live updates
- **Instant Output Streaming**: See command outputs as they happen
- **Process Lifecycle Management**: Automatic process group termination
- **Clipboard-Friendly**: Click-to-copy output lines
- **Minimal Overhead**: Lightweight and efficient design
## πŸ”§ Installation
### Using pip
```bash
pip install git+https://retoor.molodetz.nl/retoor/zhurnal.git
```
### From Source
```bash
git clone https://retoor.molodetz.nl/retoor/zhurnal.git
cd zhurnal
make install
```
## πŸš€ Quick Start
Run multiple processes and monitor them in real-time:
```bash
zhurnal "ping google.com" "docker ps" "top"
```
### Advanced Usage
```bash
# Specify host and port
zhurnal --host 0.0.0.0 --port 8080 "your_command" "another_command"
# With authentication
zhurnal --username admin --password secret "sensitive_process"
```
## πŸ’‘ Why Zhurnal?
- **Developer-Friendly**: Perfect for DevOps, system administrators, and developers
- **No More Terminal Switching**: Single web interface for multiple processes
- **Performance Insights**: Elapsed time and detailed process information
- **Cross-Platform**: Works on Linux, macOS, and Windows
## πŸ”’ Security
- Process isolation
- Optional authentication
- Secure WebSocket connections
## πŸ“¦ System Requirements
- Python 3.8+
- Modern web browser
- Minimal system resources
## 🀝 Contributing
Contributions are welcome!
## πŸ“„ License
MIT License
---
**Zhurnal**: Because monitoring should be as smooth as your workflow. πŸ’»βœ¨

View File

@ -1,2 +1,3 @@
aiohttp
app@ git+https://molodetz.nl/retoor/app.git
setuptools
app@ git+https://retoor.molodetz.nl/retoor/app.git

BIN
zhurnal_0.1.0_amd64.deb Normal file

Binary file not shown.