Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evemilano/codecomp
This script is designed to extract, compare, and report differences between two themes contained in zip files. It compares the files within the themes and generates a detailed report of any missing, added, or modified files.
https://github.com/evemilano/codecomp
comparison drupal files joomla magento prestashop python themes wordpress
Last synced: 7 days ago
JSON representation
This script is designed to extract, compare, and report differences between two themes contained in zip files. It compares the files within the themes and generates a detailed report of any missing, added, or modified files.
- Host: GitHub
- URL: https://github.com/evemilano/codecomp
- Owner: evemilano
- Created: 2024-06-10T20:08:44.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-08T10:53:27.000Z (4 months ago)
- Last Synced: 2024-10-12T01:21:58.006Z (about 1 month ago)
- Topics: comparison, drupal, files, joomla, magento, prestashop, python, themes, wordpress
- Language: Python
- Homepage: https://www.evemilano.com
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Theme Comparison Script
This script is designed to extract, compare, and report differences between two themes contained in zip files. It compares the files within the themes and generates a detailed report of any missing, added, or modified files.
## Features
- Extracts zip files in a specified input directory.
- Compares the files between two themes.
- Generates a detailed report of missing, added, and modified files.
- Outputs the report to a text file with a timestamp.## Requirements
- Python 3.x
## Installation
1. Clone the repository:
git clone https://github.com/evemilano/codeComp.git
cd theme-comparison-script2. Install the dependencies:
pip install pygame paramiko3. Setup your configuration:
Modify the variables log_file, ip, user, and keys_folder in the script to match your server's details.## Configuration
- input_folder: This is the directory where your theme zip files should be placed. The default is set to "input".
## Code Explanation
- extract_zip_files(input_folder): This function extracts all zip files found in the specified input directory.
- get_all_files(folder): This function retrieves a set of all file paths within the specified folder, relative to the folder's root.
- compare_files(file1, file2): This function compares two files and returns the differences in a unified diff format.
- generate_report(theme1, theme2): This function compares the files between two themes and generates a report detailing missing, added, and modified files.
- main(): The main function that orchestrates the extraction, comparison, and report generation process.
## Report Format
The generated report includes:
- Missing files in the second theme compared to the first.
- Added files in the second theme compared to the first.
- Modified files with detailed line-by-line differences.Made by https://www.evemilano.com