Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 26, 2025

Repository lacked structured documentation and had inconsistent file naming conventions across subdirectories.

New Documentation

  • CONTRIBUTING.md - Coding standards for AutoHotkey v1/v2, PowerShell, Batch with PR workflow
  • CODE_OF_CONDUCT.md - Community guidelines based on Contributor Covenant 2.1
  • CHANGELOG.md - Version history with migration notes for v2.0.0
  • EXAMPLES.md - 18 practical usage patterns (window management, emulator automation, AFK macros)
  • Links.md - Curated resource list replacing 2-link placeholder

Directory Documentation

Created README.md for all major components:

  • Lib/ - Dual v1/v2 architecture with function reference and migration guide
  • AHK_v2/ - v2 scripts overview with debugging and development templates
  • AHK_v2/GUI/, AHK_v2/Black_ops_6/, AHK_v2/Minecraft/ - Component-specific guides
  • Other/Downloader/, Other/Citra_mods/, Other/Citra_per_game_config/ - Setup and configuration
  • Other/7zEmuPrepper/, Other/Robocopy/ - Usage and performance guidelines

Standardization

  • Renamed README.MDREADME.md (5 files)
  • Removed obsolete Other/Robocopy/TODO.md
  • Updated main README with complete documentation index
  • Enhanced .github/README.md with project statistics and featured tools

Structure

### Before
Other/Downloader/README.MD (4 lines)

### After  
Other/Downloader/README.md (460 lines)
- Prerequisites and dependencies
- Step-by-step installation
- Configuration examples
- Troubleshooting section
- Security notes

All documentation follows consistent format: Overview → Features → Prerequisites → Usage → Troubleshooting → Resources. Cross-referenced between related documents for navigation.

Original prompt

clean this repo up and add better documentation


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits December 26, 2025 02:42
… CHANGELOG, READMEs)

Co-authored-by: Ven0m0 <82972344+Ven0m0@users.noreply.github.com>
…TODO

Co-authored-by: Ven0m0 <82972344+Ven0m0@users.noreply.github.com>
….md, enhance Links.md

Co-authored-by: Ven0m0 <82972344+Ven0m0@users.noreply.github.com>
Co-authored-by: Ven0m0 <82972344+Ven0m0@users.noreply.github.com>
Copilot AI changed the title [WIP] Clean up repository and enhance documentation Add comprehensive documentation infrastructure and standardize repository structure Dec 26, 2025
Copilot AI requested a review from Ven0m0 December 26, 2025 02:57
@Ven0m0 Ven0m0 marked this pull request as ready for review December 26, 2025 06:41
Copilot AI review requested due to automatic review settings December 26, 2025 06:41
@Ven0m0 Ven0m0 merged commit 2584c9b into main Dec 26, 2025
3 checks passed
@Ven0m0 Ven0m0 deleted the copilot/clean-repo-and-add-documentation branch December 26, 2025 06:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request significantly enhances the repository's documentation infrastructure and standardizes file naming conventions across the project. The changes transform the repository from having minimal documentation to a comprehensive, well-organized documentation system.

Key Changes:

  • Added five new top-level documentation files (CONTRIBUTING.md, CODE_OF_CONDUCT.md, CHANGELOG.md, EXAMPLES.md, enhanced Links.md)
  • Created detailed README.md files for 10+ directories covering setup, usage, troubleshooting, and examples
  • Standardized file naming from README.MD to README.md (5 files)
  • Enhanced main README and GitHub README with better structure and navigation

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Updated documentation index with links to all new documentation files and removed blank line for consistency
CONTRIBUTING.md Added comprehensive contribution guidelines including coding standards for AutoHotkey v1/v2, PowerShell, and Batch scripts with PR workflow instructions
CODE_OF_CONDUCT.md Added community guidelines based on Contributor Covenant 2.1 with enforcement procedures
CHANGELOG.md Added version history documenting v2.0.0 migration and v1.0.0 initial release with breaking changes notes
EXAMPLES.md Added 18 practical usage examples covering window management, emulator automation, AFK macros, and system utilities
Links.md Expanded from 2 links to 84 lines with curated resources for AutoHotkey, emulation, development tools, and related projects
Lib/README.md Created comprehensive library documentation explaining dual v1/v2 architecture with function reference and best practices
AHK_v2/README.md Added complete overview of v2 scripts with usage instructions, hotkeys, and migration guide from v1
AHK_v2/Minecraft/README.md Added detailed AFK macro documentation with use cases, customization guide, and safety features
AHK_v2/GUI/README.md Created GUI launcher documentation with customization examples and development templates
AHK_v2/Black_ops_6/README.md Added AFK macro guide with warnings about ToS, safety features, and advanced customization
Other/Downloader/README.md Expanded from 3 lines to 317 lines with prerequisites, installation steps, configuration, troubleshooting, and security notes
Other/Citra_mods/README.md Expanded from 3 lines to 285 lines with complete setup guide, title ID database instructions, and mod organization
Other/Citra_per_game_config/README.md Expanded from 1 line to 344 lines with configuration examples, common settings, and game-specific recommendations
Other/7zEmuPrepper/README.md Expanded from 4 lines to 285 lines with on-the-fly decompression guide, performance metrics, and compression recommendations
Other/Robocopy/README.md Created new 95-line documentation replacing minimal readme with usage examples and customization options
Other/Robocopy/readme.md Removed old 3-line readme (replaced by new README.md)
Other/Robocopy/TODO.md Removed obsolete 1-line TODO file
Other/Downloader/README.MD Removed old 3-line README.MD (replaced by lowercase README.md)
Other/Citra_mods/README.MD Removed old 3-line README.MD (replaced by lowercase README.md)
Other/Citra_per_game_config/README.MD Removed old 1-line README.MD (replaced by lowercase README.md)
.github/README.md Enhanced from 35 lines to 180 lines with project statistics, featured tools showcase, and comprehensive quick links

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,95 @@
# Robocopy Utilities

Batch script wrappers for Windows Robocopy command, optimized for fast file copying and filtering by extension.
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling error: "extentions" should be "extensions".

Copilot uses AI. Check for mistakes.
Comment on lines +248 to +260
## Security Note

⚠️ **Input Validation:** The scripts have been updated with input validation to prevent command injection vulnerabilities. Do not modify the validation code unless you understand the security implications.

```autohotkey
; Security feature - do not remove
ValidateInput(input) {
if RegExMatch(input, "[&|;<>()`$^""]") {
return false
}
return true
}
```
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The combined YT_Spotify_Downloader.ahk GUI still has a command injection path despite this validation helper: it builds a command string like Cmd := "spotdl download " Spotify " --output %userprofile%\Music ..." and executes it with Run, %ComSpec% /c %Cmd%,, Hide, but ValidateInput only checks the first non-empty of Youtube/Spotify. If both text boxes are populated and the Spotify field (which can contain characters like & or |) is edited last, Cmd will be built from Spotify while validation only inspects the safe YouTube URL, allowing an attacker to inject arbitrary shell commands into %Cmd% via the Spotify field. To fix this, ensure the exact input used to build Cmd is what gets validated (or validate both fields before execution) and avoid routing user-controlled data through cmd.exe /c by invoking yt-dlp.exe/spotdl.exe directly with properly quoted arguments instead of a concatenated command line string.

Copilot uses AI. Check for mistakes.
Ven0m0 pushed a commit that referenced this pull request Dec 26, 2025
…to PowerShell

This comprehensive migration modernizes the codebase structure and eliminates
legacy dependencies.

## Directory Structure Changes
- Rename `AHK_v2/` to `ahk/` for cleaner naming
- Update all documentation references (README, CLAUDE, CONTRIBUTING, EXAMPLES)
- Update all internal script paths and links

## Citra Configuration Migration (v1 → v2)
- Create `Other/Citra_per_game_config/v2/` directory
- Eliminate tf.ahk dependency (1538-line v1 library)
- New v2 helper functions in `CitraConfigHelpers.ahk`:
  * RegExEscape() - Escape regex special characters
  * SetKey() - Set/replace INI key values
  * LoadConfig() - Load configuration files
  * SaveConfig() - Save with backup creation
  * ReplaceInFile() - Simplified text replacement

### Migrated Scripts:
- `CitraConfigBase.ahk` (v2) - Base initialization with error handling
- `CitraPerGame.ahk` (v2) - Per-game config applicator
- `Default.ahk` (v2) - Default configuration applier

### Benefits:
- No external library dependencies
- Native v2 functions (StrReplace, RegExReplace)
- Better error handling and validation
- Automatic backup file creation (.bak)
- OneDrive path validation

## CMD to PowerShell Conversions
- `update.cmd` → `Update-Downloaders.ps1`
  * Enhanced error handling
  * Colored console output
  * Better feedback messages
  * Cmdlet parameter validation

- `Copy_images.cmd` → `Copy-Images.ps1`
  * Parameter validation with types
  * Better error messages
  * Exit code handling
  * Help documentation with examples

## Workflow Updates
- Update `ahk-lint-format-compile.yml` to detect v2 scripts in:
  * `Lib/v2/` (existing)
  * `ahk/` (renamed from AHK_v2)
  * `Other/**/v2/` (new Citra v2 scripts)
- Improved version detection regex pattern

## Documentation Updates
- All references to AHK_v2 updated to 'ahk'
- Updated file paths in README.md
- Updated directory structure examples
- Updated CLAUDE.md migration notes
- Updated CONTRIBUTING.md structure
- Updated EXAMPLES.md code references

## Files Changed
- 7 new files created (v2 scripts and PowerShell)
- 26 files modified (docs, workflows, structure)
- 15 files renamed (AHK_v2 → ahk)

## Migration Status
✅ Directory rename complete (AHK_v2 → ahk)
✅ Citra config scripts migrated to v2
✅ CMD files converted to PowerShell
✅ Workflow updated for v2 detection
✅ Documentation updated

⏳ Remaining (for future PRs):
- Citra mod manager scripts migration
- Downloader GUI script migration
- Additional PowerShell script (Invoke-Robocopy.ps1)
- PowerShell linting workflow

## Testing
- Workflow syntax validated
- PowerShell scripts follow best practices
- v2 scripts use proper AutoHotkey v2.0 syntax
- All paths use forward-compatible patterns

Refs #21
Ven0m0 added a commit that referenced this pull request Dec 26, 2025
* feat: Rename AHK_v2 to ahk, migrate Citra scripts to v2, convert CMD to PowerShell

This comprehensive migration modernizes the codebase structure and eliminates
legacy dependencies.

## Directory Structure Changes
- Rename `AHK_v2/` to `ahk/` for cleaner naming
- Update all documentation references (README, CLAUDE, CONTRIBUTING, EXAMPLES)
- Update all internal script paths and links

## Citra Configuration Migration (v1 → v2)
- Create `Other/Citra_per_game_config/v2/` directory
- Eliminate tf.ahk dependency (1538-line v1 library)
- New v2 helper functions in `CitraConfigHelpers.ahk`:
  * RegExEscape() - Escape regex special characters
  * SetKey() - Set/replace INI key values
  * LoadConfig() - Load configuration files
  * SaveConfig() - Save with backup creation
  * ReplaceInFile() - Simplified text replacement

### Migrated Scripts:
- `CitraConfigBase.ahk` (v2) - Base initialization with error handling
- `CitraPerGame.ahk` (v2) - Per-game config applicator
- `Default.ahk` (v2) - Default configuration applier

### Benefits:
- No external library dependencies
- Native v2 functions (StrReplace, RegExReplace)
- Better error handling and validation
- Automatic backup file creation (.bak)
- OneDrive path validation

## CMD to PowerShell Conversions
- `update.cmd` → `Update-Downloaders.ps1`
  * Enhanced error handling
  * Colored console output
  * Better feedback messages
  * Cmdlet parameter validation

- `Copy_images.cmd` → `Copy-Images.ps1`
  * Parameter validation with types
  * Better error messages
  * Exit code handling
  * Help documentation with examples

## Workflow Updates
- Update `ahk-lint-format-compile.yml` to detect v2 scripts in:
  * `Lib/v2/` (existing)
  * `ahk/` (renamed from AHK_v2)
  * `Other/**/v2/` (new Citra v2 scripts)
- Improved version detection regex pattern

## Documentation Updates
- All references to AHK_v2 updated to 'ahk'
- Updated file paths in README.md
- Updated directory structure examples
- Updated CLAUDE.md migration notes
- Updated CONTRIBUTING.md structure
- Updated EXAMPLES.md code references

## Files Changed
- 7 new files created (v2 scripts and PowerShell)
- 26 files modified (docs, workflows, structure)
- 15 files renamed (AHK_v2 → ahk)

## Migration Status
✅ Directory rename complete (AHK_v2 → ahk)
✅ Citra config scripts migrated to v2
✅ CMD files converted to PowerShell
✅ Workflow updated for v2 detection
✅ Documentation updated

⏳ Remaining (for future PRs):
- Citra mod manager scripts migration
- Downloader GUI script migration
- Additional PowerShell script (Invoke-Robocopy.ps1)
- PowerShell linting workflow

## Testing
- Workflow syntax validated
- PowerShell scripts follow best practices
- v2 scripts use proper AutoHotkey v2.0 syntax
- All paths use forward-compatible patterns

Refs #21

* Delete .github/README.md

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants