gpt-4o-2024-05-13· OpenAI
WildChat-4.8M (AI2)
Improve the clarity of the following request [code] 📁 ℹ️ <subdirectory name> [code]
- User
Improve the clarity of the following request
codeCreate a JavaScript CLI application in a single .js file with the following functionality: 1. Default Command: - Accept a directory path from the user. - Traverse the specified directory to extract all filenames (including extensions) and subdirectory names while maintaining their hierarchical structure. 2. Renaming Mechanism: - The --edit flag accepts a dataset path. The path configuration can be viewed using the --config or -c flag. - The dataset is a collection of data units each formatted as: Name: <value> Title: <value> Description: <value> - Filenames and subdirectory names from the directory are matched to the Name keys in the dataset. - Rename each filename and subdirectory name to the corresponding Title value while keeping the original hierarchical structure intact. 3. HTML Output: - Generate an HTML file that visually represents the hierarchical structure of the renamed filenames and subdirectory names. - The HTML file should: - Allow subdirectories to be folded and expanded with simple animations. - Display vibrant color-coded filenames, subdirectory names, and file extensions. - Contains tree edges to connect the subdirectory names and filenames - Show the following structure: - The ℹ️ emoji precedes each filename and subdirectory name. Example format: ``` 📁 ℹ️ <subdirectory name> ``` - File extensions are enclosed in round brackets and precede the filenames. - Example format: ℹ (.ext) Filename - Upon clicking (with a simple animation) the ℹ️ emoji, a small pop-up message shows up right above the emoji revealing the path to the subdirectory names and filenames. - Specify the output HTML file path using the --edit flag and view it with the --config flag. - Print the path to the generated HTML file to the console. 4. Help Menu: - Provide a comprehensive help menu accessible via -h or --help, detailing all available commands and their usage. - The `--edit` flag launches an interactive prompt asking for the dataset path and HTML output path. 5. Error Handling: - Implement robust error handling with clear and descriptive user feedback. Additional Requirement: - Use CommonJS modules. - Assistant
Certainly! Here's a refined version of your request for clarity:
code