new version
This commit is contained in:
parent
522298a6ec
commit
b41cd757e4
412 changed files with 20890 additions and 6 deletions
44
README.md
44
README.md
|
|
@ -14,12 +14,17 @@ This script helps you manage and transfer specific Drupal configuration files by
|
|||
|
||||
- Python 3.6+
|
||||
- curses library (built into most Python installations on Linux/Mac)
|
||||
- PyYAML library (install with: `pip install pyyaml`)
|
||||
|
||||
## Installation and Setup
|
||||
|
||||
The script operates in the current working directory where you run it. It will create the following subdirectories if they don't exist:
|
||||
- `original_config/` - Place your source configuration files here
|
||||
- `config/` - Matched files will be copied here
|
||||
- `new_recipe_config/` - Matched files will be copied here (with UUID and _core removed)
|
||||
- `old_recipe_config/` - Optional: Place previous recipe version here for comparison
|
||||
- `changed_files/` - Files that changed between versions will be placed here
|
||||
- `ignored_files.yml` - Optional: List files to exclude from change tracking
|
||||
- `deleted_files.csv` - Tracks files that should be deleted
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
@ -57,7 +62,8 @@ The Text User Interface provides the following controls:
|
|||
- **A**: Add a new prefix (press ESC or Enter with empty input to cancel)
|
||||
- **O**: Choose a prefix from the list of unmatched prefixes
|
||||
- **D**: Delete the selected prefix (in matched view) or add the selected prefix (in unmatched view)
|
||||
- **C**: Copy all matched files to the config directory
|
||||
- **C**: Copy all matched files to the new_recipe_config directory (with UUID and _core removal)
|
||||
- **M**: Compare old and new recipe configs, track changes and deletions
|
||||
- **S**: Save the current list of prefixes to the JSON file
|
||||
- **Q**: Quit the application
|
||||
|
||||
|
|
@ -88,12 +94,44 @@ The script uses a JSON file to store prefixes. The default file is created at fi
|
|||
|
||||
You can modify this file directly or use the TUI to manage the prefixes.
|
||||
|
||||
## File Comparison and Change Tracking
|
||||
|
||||
The script can compare configuration files between recipe versions:
|
||||
|
||||
- **M**: Compare old and new recipe configurations
|
||||
- Compares files in `old_recipe_config/` with `new_recipe_config/`
|
||||
- Copies changed files to `changed_files/` directory
|
||||
- Tracks deleted files in `deleted_files.csv`
|
||||
|
||||
This feature helps you track what has changed between recipe versions and what files need to be removed.
|
||||
|
||||
## Ignoring Files from Change Tracking
|
||||
|
||||
You can create an `ignored_files.yml` file to prevent specific configuration files from being copied to the `changed_files/` folder during comparison. This is useful when certain files have intentional differences that should not be tracked as changes.
|
||||
|
||||
Example `ignored_files.yml`:
|
||||
|
||||
```yaml
|
||||
field:
|
||||
name: field.field.wisski_individual.bb48a22d36f1c15cd16b143d23466812.field__vf__title
|
||||
reason: because we need target id instead of uuid
|
||||
another_category:
|
||||
name: some.other.config.file.yml
|
||||
reason: custom modification required
|
||||
```
|
||||
|
||||
Files listed in this YAML will be excluded from the `changed_files/` directory even if they have changed between versions.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
/your/working/directory/
|
||||
├── config_selector.py # Main script
|
||||
├── config_prefixes.json # Configuration prefixes list
|
||||
├── ignored_files.yml # Optional: List of files to ignore from change tracking
|
||||
├── original_config/ # Source directory containing all configuration files
|
||||
└── config/ # Target directory where matched files will be copied
|
||||
├── new_recipe_config/ # Target directory where matched files will be copied (cleaned)
|
||||
├── old_recipe_config/ # Previous version of recipe config (for comparison)
|
||||
├── changed_files/ # Files that have changed between old and new versions
|
||||
└── deleted_files.csv # List of files that should be deleted from the recipe
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue