Rename zrep to zpi

zrep 2024-04-06 00:26:29 +02:00
parent 4d2b2e3774
commit 757dcfa6d0
8 changed files with 54 additions and 55 deletions

@ -1,4 +1,4 @@
# Contribute to zrep
# Contribute to zpi and zrep
I am one person and I love what I'm doing. At the moment, I can handle what needs to be done but I'm expecting things to change.
@ -13,5 +13,5 @@ In time, what I will be looking for are
- This role entails
- basic issue tracking
- first line abuse tracking
- Contributions, bug fixes and more to [zrep](https://git.kekepower.com/kekePower/zrep)
- Helpdesk to help with the [issue tracker](https://github.com/kekePower/zrep/issues)
- Contributions, bug fixes and more to [zpi](https://git.kekepower.com/kekePower/zpi)
- Helpdesk to help with the [issue tracker](https://github.com/kekePower/zpi/issues)

@ -1,9 +1,9 @@
# How to create your own script
The scripts used in `zrep` are using the `autoload` function of Zsh. This means that your script have to be in `$fpath` to be found by Zsh.
This is where `zrep` comes in.
The scripts used in `zpi` are using the `autoload` function of Zsh. This means that your script have to be in `$fpath` to be found by Zsh.
This is where `zpi` comes in.
`zrep` is created to handle the installation and management of scripts.
`zpi` is created to handle the installation and management of scripts.
## Create your script
@ -17,8 +17,8 @@ Example:
Based on my research, it is possible to have functions within the main function, so it should be possible to create complex and very interesting scripts for the community.
`zrep` depends on one file to display help information to the user.
Using `zrep author/package help` will display the information in the file `USAGE`.
`zpi` depends on one file to display help information to the user.
Using `zpi author/package help` will display the information in the file `USAGE`.
The file `README.md` is used on the web page when people visit your package page. This file is optional, but highly recommended.

19
Home.md

@ -1,19 +1,19 @@
# zrep - Zsh Repository Tool
# zpi - Zrep Package Installer
Welcome to the official Wiki for [zrep](https://git.kekepower.com/kekePower/zrep), a comprehensive Zsh Repository Tool designed to enhance your Zsh experience. Developed with flexibility and ease of use in mind, `zrep` allows for the efficient management of Zsh functions, scripts, and addons.
Welcome to the official Wiki for [zpi](https://git.kekepower.com/kekePower/zpi), a comprehensive Zsh Repository Tool designed to enhance your Zsh experience. Developed with flexibility and ease of use in mind, `zpi` allows for the efficient management of Zsh functions, scripts, and addons.
`zrep` is meant to be used on a per user basis and not globally. This means that you, the user, have full control over what is installed and activated.
`zpi` is meant to be used on a per user basis and not globally. This means that you, the user, have full control over what is installed and activated.
## Features
- **Version Control:** Easily track the version of your `zrep` installation with a straightforward versioning system.
- **Version Control:** Easily track the version of your `zpi` installation with a straightforward versioning system.
- **Dynamic Function Path Management:** Automatically adds directories containing at least one file to `fpath`.
- **Modular Design:** Supports the installation, removal, and management of Zsh addons and scripts.
- **Configuration via `.zreprc`:** Customizable settings through a dedicated configuration file.
## How it all works
I've written a short document on [How it all works](How-it-all-works.md) that is, for the moment, an brief introduction to **zrep** and the back-end.
I've written a short document on [How it all works](How-it-all-works.md) that is, for the moment, an brief introduction to **zpi** and the back-end.
## Getting Started
@ -23,18 +23,17 @@ To create you own scripts, follow this How-to.
**[Create Your Script](Create-Your-Script.md)**
### [Installation](Installing-zrep.md)
### [Installation](Installing-zpi.md)
## Usage
### [How to use zrep](Using-zrep.md)
### [How to use zpi](Using-zpi.md)
## Contributing
### [Contribute to zrep](Contributing.md)
### [Contribute to zpi and zrep](Contributing.md)
## License
`zrep` is licensed under the [MIT License](https://git.kekepower.com/kekePower/zrep/src/branch/main/LICENSE).
`zpi` is licensed under the [MIT License](https://git.kekepower.com/kekePower/zpi/src/branch/main/LICENSE).

@ -2,27 +2,27 @@
## Introduction
**zrep** is, in its essence, a concept and a client/server system.
**zpi** is, in its essence, a concept and a client/server system. **zpi** stands for ***Zrep Package Installer***.
The **zrep** client connects to the zrep web server to request information and then performs operations on the client side.
The **zpi** client connects to the ***zrep web server*** to request information and then performs operations on the client side.
## The zrep client
The **zrep** client is written for the Zsh shell and I've tried to utilize the power of Zsh as much as I could thoughout the script. There are, of course, something better left to other tools, such as parsing JSON with **jq**, the use of grep and sed and a selection of download toos such as **curl**, **wget** or **wget2**.
The **zpi** client is written for the Zsh shell and I've tried to utilize the power of Zsh as much as I could throughout the script. There are, of course, something better left to other tools, such as parsing JSON with **jq**, the use of grep and sed and a selection of download toos such as **curl**, **wget** or **wget2**.
When you first launch **zrep** it tries to access different files and if they're not present, you'll be told to run **zrep init**. This command will create and populate **~/.zreprc** which is the configuration file. It will also create, per default, a directory in **~/.zrep** which holds functions, themes, a temp directory and the scripts you will install later.
When you first launch **zpi** it tries to access different files and if they're not present, you'll be told to run **zpi init**. This command will create and populate **~/.zreprc** which is the configuration file. It will also create, per default, a directory in **~/.zrep** which holds functions, themes, a temp directory and the scripts you will install later.
**zrep init** will download 2 files from the Github repository. 1. **zini** which is an INI reader also written in Zsh. 2. **~/.zrep/themes/classic**. This is the color theme for the messages the **zrep** client displays.
## The website and the rePanel Dashboard
The website contains a few PHP scripts that the **zrep** client connects to.
The website contains a few PHP scripts that the **zpi** client connects to.
For example, when you run **zrep install kekePower/tohtml** it connects to the webserver (/getver.php) which responds with a JSON tree that **zrep** parses and inserts the **version** to the download URL (/download/kekePower/tohtml/**version**). The download script does a few things. First off it checks if the script is present in the database and has the **published** key set and if it is, it updates the **download count** for the respective script. Then it sends the request to Github to actually download the requested package.
For example, when you run **zpi install kekePower/tohtml** it connects to the webserver (/getver.php) which responds with a JSON tree that **zpi** parses and inserts the **version** to the download URL (/download/kekePower/tohtml/**version**). The download script does a few things. First off it checks if the script is present in the database and has the **published** key set and if it is, it updates the **download count** for the respective script. Then it sends the request to Github to actually download the requested package.
The reason I am using Github for this is to save bandwidth on my connection.
Another example is when you run **zrep search 'search term'**. This also connects to the webserver (/find.php) which searches through the database and presents a list of packages, if there are more than one, with the package name, a description and the URL to the package on the zrep website.
Another example is when you run **zpi search 'search term'**. This also connects to the webserver (/find.php) which searches through the database and presents a list of packages, if there are more than one, with the package name, a description and the URL to the package on the zrep website.
### The rePanel Dashboard

16
Installing-zpi.md Normal file

@ -0,0 +1,16 @@
# zrep - Zsh Repository Tool
### Installation
1. Clone the `zpi` [repository](https://git.kekepower.com/kekePower/zpi) to your local machine.
2. Run the script with `zpi init` to initialize the installation process.
3. Copy or sym link zrep to a directory in your `PATH`. I use `$HOME/bin/`.
### Configuration
Upon first run, `zpi` will prompt you to specify the installation directory, defaulting to `$HOME/.zrep` if left unspecified. This path will be used to store scripts, functions, and configuration files.
### `.zreprc` Configuration
The `.zreprc` file located in your home directory (`$HOME/.zreprc`) contains all configurable settings for `zpi`. Initially, this file will include the installation directory path. You can edit this file to adjust `zpi` settings to your liking.

@ -1,16 +0,0 @@
# zrep - Zsh Repository Tool
### Installation
1. Clone the `zrep` [repository](https://git.kekepower.com/kekePower/zrep) to your local machine.
2. Run the script with `zrep init` to initialize the installation process.
3. Copy or sym link zrep to a directory in your `PATH`. I use `$HOME/bin/`.
### Configuration
Upon first run, `zrep` will prompt you to specify the installation directory, defaulting to `$HOME/.zrep` if left unspecified. This path will be used to store scripts, functions, and configuration files.
### `.zreprc` Configuration
The `.zreprc` file located in your home directory (`$HOME/.zreprc`) contains all configurable settings for `zrep`. Initially, this file will include the installation directory path. You can edit this file to adjust `zrep` settings to your liking.

14
Using-zpi.md Normal file

@ -0,0 +1,14 @@
# zpi - Zrep Package Installer
## Usage
### Basic Commands
- `zpi init`: Initializes `zpi`, setting up necessary directories and configuration files.
- `zpi install <author/package>`: Installs a specified package.
- `zpi remove <author/package>`: Removes a specified package.
- `zpi enable <author/package>`: Enables a package, adding it to your `fpath`.
- `zpi disable <author/package>`: Disables a package, removing it from your `fpath`.
- `zpi list`: Lists all installed packages along with their status (active/inactive).
- `zpi <author/package> help`: Show the included usage information for package.

@ -1,14 +0,0 @@
# zrep - Zsh Repository Tool
## Usage
### Basic Commands
- `zrep init`: Initializes `zrep`, setting up necessary directories and configuration files.
- `zrep install <author/package>`: Installs a specified package.
- `zrep remove <author/package>`: Removes a specified package.
- `zrep enable <author/package>`: Enables a package, adding it to your `fpath`.
- `zrep disable <author/package>`: Disables a package, removing it from your `fpath`.
- `zrep list`: Lists all installed packages along with their status (active/inactive).
- `zrep <author/package> help`: Show the included usage information for package.