{"id":27114517,"url":"https://github.com/pinaki82/shotcutprojectcollector","last_synced_at":"2025-07-06T01:36:10.600Z","repository":{"id":285617769,"uuid":"958503630","full_name":"Pinaki82/ShotcutProjectCollector","owner":"Pinaki82","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-01T18:06:30.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T19:26:24.750Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pinaki82.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-01T09:57:09.000Z","updated_at":"2025-04-01T09:58:01.000Z","dependencies_parsed_at":"2025-04-01T19:26:27.438Z","dependency_job_id":"3d9d8d99-5e91-4623-a6a3-d02f16fc01ec","html_url":"https://github.com/Pinaki82/ShotcutProjectCollector","commit_stats":null,"previous_names":["pinaki82/shotcutprojectcollector"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pinaki82/ShotcutProjectCollector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pinaki82%2FShotcutProjectCollector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pinaki82%2FShotcutProjectCollector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pinaki82%2FShotcutProjectCollector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pinaki82%2FShotcutProjectCollector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pinaki82","download_url":"https://codeload.github.com/Pinaki82/ShotcutProjectCollector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pinaki82%2FShotcutProjectCollector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263836822,"owners_count":23517919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-07T03:57:52.094Z","updated_at":"2025-07-06T01:36:09.980Z","avatar_url":"https://github.com/Pinaki82.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shotcut Project Collector\n\n## Overview\n\nThis program helps organise MLT (Shotcut) project files by collecting all their dependencies into a single, organised structure. Think of it as a tool that makes your video projects more portable and easier to manage.\n\n## Platform Support\n\nThis program is currently Linux-only. Windows support is planned for future releases. The primary reason for this limitation is the significant differences in file and directory handling between Linux and Windows operating systems. While the core functionality is platform-independent, the lack of necessary cross-platform `functions()` to handle these differences has led to the current Linux-only implementation.\n\n## What This Program Does\n\nImagine you have a video project with lots of files scattered all over your computer:\n\n- Video clips\n- Audio files\n- Color grading files (LUTs)\n- stabilisation data\n- And many more...\n\nThis program gathers all these files into one place and updates your project file to point to the new locations. It's like cleaning up your room by putting everything in its proper place!\n\n## How It Works (For Dummies)\n\n### 1. Input and Output\n\n- You give the program two things:\n  - Your MLT project file (the .mlt file)\n  - A directory where you want everything to be organised\n\n### 2. The Magic Happens\n\nThe program does several important things:\n\n#### A. Creates a New Structure\n\nIt creates a special folder called \"assets\" with three important subfolders:\n\n- `assets/` - For your main media files (videos, images, etc.)\n- `assets/LUT/` - For your colour grading files\n- `assets/stabilization_data/` - For your video stabilisation files\n\n#### B. Finds All Your Files\n\nIt looks through your project file to find all the files it needs:\n\n- Video files (marked with `\u003cproperty name=\"resource\"\u003e`)\n- Colour grading files (marked with `\u003cproperty name=\"av.file\"\u003e`)\n- Stabilisation files (marked with `\u003cproperty name=\"filename\"\u003e`)\n\n#### C. Handles Special Cases\n\nSometimes you might have files with the same name but in different folders. The program is smart enough to handle these \"cousin\" files by:\n\n- Giving each cousin file its own special folder\n- Making sure they don't get mixed up\n\n### 3. The Result\n\nAfter running the program, you'll have:\n\n1. All your project files are neatly organised in the `assets` folder\n2. A new project file that points to the right places\n3. A portable project that you can easily share with others\n\n## Technical Details (For Advanced Users)\n\n### File Handling Process\n\n1. **Input Validation**\n   \n   - Checks if you provided the correct number of arguments\n   - Verifies that the input file exists\n   - Ensures the output directory is valid\n\n2. **Resource Processing**\n   \n   - Parses the MLT project file\n   - Identifies all referenced files\n   - Creates a mapping of all files and their relationships\n\n3. **File Organisation**\n   \n   - Creates the necessary directory structure\n   - Handles special cases like \"cousin\" files\n   - Maintains proper file permissions\n\n4. **Project File Update**\n   \n   - Updates all file paths to point to the new locations\n   - Maintains the original project structure\n   - Preserves all project settings\n\n### Error Handling\n\nThe program includes robust error handling for:\n\n- Missing files\n- Permission issues\n- Invalid paths\n- Memory allocation failures\n\n## Usage Examples\n\n### Basic Usage\n\n```bash\n./shotcut_project_collector '/path/to/your/project.mlt' '/path/to/output/directory'\n```\n\n### Important Notes\n\n- The input file's directory and output directory cannot be the same\n\n- The program will create all necessary directories if they don't exist\n\n- All file paths in the project file will be updated to use relative paths\n\n- **Ensure to check the final output project.** For instance, examine the following source and output examples:\n\nSource project:\n\n```xml\n    \u003cfilter id=\"filter18\" out=\"00:00:06.480\"\u003e\n      \u003cproperty name=\"filter\"\u003eshape\u003c/property\u003e\n      \u003cproperty name=\"mlt_service\"\u003emask_start\u003c/property\u003e\n      \u003cproperty name=\"shotcut:filter\"\u003emaskFromFile\u003c/property\u003e\n      \u003cproperty name=\"filter.mix\"\u003e50\u003c/property\u003e\n      \u003cproperty name=\"filter.softness\"\u003e0\u003c/property\u003e\n      \u003cproperty name=\"filter.invert\"\u003e0\u003c/property\u003e\n      \u003cproperty name=\"filter.use_luminance\"\u003e0\u003c/property\u003e\n      \u003cproperty name=\"filter.resource\"\u003eMask-round.png\u003c/property\u003e\n      \u003cproperty name=\"filter.use_mix\"\u003e0\u003c/property\u003e\n      \u003cproperty name=\"filter.audio_match\"\u003e0\u003c/property\u003e\n      \u003cproperty name=\"filter.alpha_operation\"\u003eoverwrite\u003c/property\u003e\n    \u003c/filter\u003e\n```\n\nOutput Project:\n\n```xml\n    \u003cfilter id=\"filter18\" out=\"00:00:06.480\"\u003e\n      \u003cproperty name=\"filter\"\u003eshape\u003c/property\u003e\n      \u003cproperty name=\"mlt_service\"\u003emask_start\u003c/property\u003e\n      \u003cproperty name=\"shotcut:filter\"\u003emaskFromFile\u003c/property\u003e\n      \u003cproperty name=\"filter.mix\"\u003e50\u003c/property\u003e\n      \u003cproperty name=\"filter.softness\"\u003e0\u003c/property\u003e\n      \u003cproperty name=\"filter.invert\"\u003e0\u003c/property\u003e\n      \u003cproperty name=\"filter.use_luminance\"\u003e0\u003c/property\u003e\n      \u003cproperty name=\"filter.resource\"\u003eMask-round.png\u003c/property\u003e\n      \u003cproperty name=\"filter.use_mix\"\u003e0\u003c/property\u003e\n      \u003cproperty name=\"filter.audio_match\"\u003e0\u003c/property\u003e\n      \u003cproperty name=\"filter.alpha_operation\"\u003eoverwrite\u003c/property\u003e\n    \u003c/filter\u003e\n```\n\nIn the output, the `\u003cproperty name=\"filter.resource\"\u003eMask-round.png\u003c/property\u003e` line did not change from the source as `\u003cproperty name=\"filter.resource\"\u003eassets/Mask-round.png\u003c/property\u003e`. The corresponding file was not copied either. This issue was a small error within a complex project file that is 275.9 KiB in size.\n\nTo resolve this, you may need to manually copy the necessary files and modify the project using the editor, or you could use a text editor to correct the few conflicting lines.\n\n## Maintenance Tips\n\n### Common Issues\n\n1. **Missing Files**\n   \n   - Check if all source files are accessible\n   - Verify file permissions\n   - Ensure network drives are mounted (if applicable)\n\n2. **Path Issues**\n   \n   - Use absolute paths for input files\n   - Make sure the output directory has proper write permissions\n\n3. **Memory Issues**\n   \n   - The program uses dynamic memory allocation\n   - Ensure sufficient system memory is available\n\n### Debugging\n\nThe program includes logging functionality that can help diagnose issues:\n\n- Check log files for error messages\n- Use the debug prints to track file processing\n- Verify file mappings for correct relationships\n\n## Future Enhancements\n\n### Potential Improvements\n\n1. **Better Error Reporting**\n   \n   - More detailed error messages\n   - Better logging of file operations\n\n2. **Additional Features**\n   \n   - Support for more file types\n   - Better handling of large projects\n   - Improved performance for many files\n\n3. **User Interface**\n   \n   - Add a progress indicator\n   - Better error feedback\n   - Option to preview changes before applying\n\n## Contributing\n\n### How to Help\n\n1. **Testing**\n   \n   - Test with different project types\n   - Check edge cases\n   - Verify file handling\n\n2. **Documentation**\n   \n   - Update usage examples\n   - Add more detailed explanations\n   - Create troubleshooting guides\n\n3. **Code Improvements**\n   \n   - Enhance error handling\n   - Optimise performance\n   - Add new features\n\n## License\n\nThis program is licensed under the MIT-0. See the LICENSE file for details.\n\n## Acknowledgements\n\nThis program was developed with the help of multiple AI systems:\n\n- Qwen 2.5 Turbo\n- Claude Sonnet 3.7\n- Codium Base\n\nAnd was developed using both GVim (Tulu-C-IDE) and Windsurf IDEs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinaki82%2Fshotcutprojectcollector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinaki82%2Fshotcutprojectcollector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinaki82%2Fshotcutprojectcollector/lists"}