Skip to content

Latest commit

 

History

History
48 lines (42 loc) · 2.13 KB

File metadata and controls

48 lines (42 loc) · 2.13 KB

File Folder Copy Replace TUI - Walkthrough

This application is a cross-platform TUI tool for copying files and folders with configurable string replacements in paths and file contents.

Features

  • Source Directory Explorer: Navigate and select source directories.
  • Destination Preview: Real-time preview of the destination path based on replacement rules.
  • Configurable Replacements:
    • key=value --path-only: Replace in destination path only.
    • key=value --path-files: Replace in destination path and file contents.
    • key=value --files-only: Replace in file contents only.
  • File Filtering:
    • ext1, ext2 --file-types: Filter by file extension.
    • name1, name2 --file-names: Filter by specific filenames.
  • Save/Load: Save your configuration to a JSON file and load it later.
  • Notes: Free-hand notes section.

How to Use

Navigation

  • Tab: Switch focus between Source Input, Explorer, Destination Input, Mapping, Buttons, and Notes.
  • Arrow Keys: Navigate the Explorer or move cursor in text inputs.
  • Enter:
    • In Explorer: Select the highlighted directory as Source.
    • In Buttons: Trigger the action (Save, Load, Copy Replace).
    • In Text Inputs: Enter/Exit editing mode (or add newline in multi-line inputs).
  • 'e': Enter editing mode for the focused input.
  • Esc: Exit editing mode.
  • 'q': Quit the application.

Workflow

  1. Select Source: Use the Explorer to navigate to your source directory and press Enter. Or type the path manually in the Source Input.
  2. Configure Replacements: Tab to the "Replacement Mapping" box and enter your rules. Example:
    production=stage --path-only
    old_project=new_project --path-files
    *.txt, *.md --file-types
    
  3. Review Destination: Check the "Generated Destination Directory" to see where files will be copied.
  4. Add Notes: Add any reminders in the "Free Hand Notes" section.
  5. Save (Optional): Tab to "Save" and press Enter to save your config to config.json.
  6. Copy: Tab to "Copy Replace" and press Enter to execute the operation.

Build and Run

cargo run