# Previewer Manager Prototype **Repository Path**: alexander-vorobyev/previewer-manager-prototype ## Basic Information - **Project Name**: Previewer Manager Prototype - **Description**: Prototype of Previewer download manager in the form of the set of bash scripts. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-03-08 - **Last Updated**: 2025-03-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Previewer Manager Prototype This project is a prototype for managing the download and extraction of previewer artifacts from Gitee repositories. ## Prerequisites - **Bash**: Ensure you have Bash installed on your system. - **curl**: Required for downloading files. - **unzip**: Required for extracting ZIP archives. - **jq**: Required for parsing JSON responses. ## Usage Run the `pm.sh` script with the following options: ```bash ./pm.sh [options] ``` ### Options | Option | Description | |--------|-------------| | `-h, --help` | Show help message | | `-t, --gitee_token ` | Gitee token | | `-g, --gitee_url ` | Gitee URL | | `-n, --nexus_url ` | Nexus URL | | `-u, --nexus_username ` | Nexus username | | `-p, --nexus_password ` | Nexus password | | `-r, --previewer_revision ` | Previewer revision | | `-s, --platform ` | Platform (e.g., `windows\|linux`) | ### Example Download latest previewer and libace ```bash ./pm.sh -g https://gitee.com -t YOUR_GITEE_TOKEN -n YOUR_NEXUS_URL -u YOUR_NEXUS_USERNAME -p YOUR_NEXUS_PASSWORD -s "windows|linux" ``` Download specific previewer revision and latest libace related to this revision ```bash ./pm.sh -g https://gitee.com -t YOUR_GITEE_TOKEN -n YOUR_NEXUS_URL -u YOUR_NEXUS_USERNAME -p YOUR_NEXUS_PASSWORD -s "windows|linux" -r 623afe5f1ef54be7cbc3542417d076231d677670 ``` ## Directory Structure - **`pm.sh`**: Main script for downloading and extracting previewer artifacts. - **`modules/`**: Contains helper scripts (e.g., `gitee_api.sh`). - **`downloads/`**: Directory where downloaded and extracted files are stored. ## Notes - Ensure the `GITEE_TOKEN` is set or passed as an argument for accessing Gitee APIs. - The script automatically extracts previewer artifacts based on the specified platform(s).