An intuitive Node.js CLI tool for automating HTTP requests with customizable parameters and saving responses, ideal for streamlined data retrieval and API interaction.
Description:
The curl-ier application currently saves all output files with an .html extension. To enhance flexibility and accommodate various data formats, it would be beneficial to allow users to set custom file extensions, such as .json, .xml, etc. This feature would enable users to specify the format of the data they are expecting in the response, making the tool more versatile.
Acceptance Criteria:
Users should be able to specify the file extension when running the script.
The script should save the output file with the provided extension.
If no extension is specified, the script can default to .html.
Suggested Implementation:
Introduce a new command-line option, e.g., --extension or -e, for users to specify the desired file extension.
Modify the saveResponse function to use this user-provided extension when constructing the filename.
Currently, curl-ier.js requires users to login for certain functionalities. This feature request aims to make the login process optional, allowing users to utilize the script without mandatory authentication when not needed.
Motivation:
Flexibility: Making login optional enhances the script's flexibility, accommodating a wider range of use cases.
User Convenience: Users who only require basic functionalities can skip the login process, simplifying their workflow.
Adaptability: The script becomes more adaptable to different scenarios where authentication may or may not be required.
Proposed Change:
Introduce a flag or parameter that enables or disables the login process.
Modify the script logic to bypass login-related functions when this option is active.
Ensure that existing functionalities remain intact and fully operational when the login is bypassed.
Possible Implementation:
A command-line argument (e.g., --no-login) could be added to disable the login requirement.
Conditional checks within the script to determine whether to execute login-related code based on this argument.
Impact:
This feature will not affect existing functionalities for users who require the login process.
It will provide a more streamlined experience for users who do not need authentication.
Description:
To improve the organization and tracking of output files, it would be useful to include the current timestamp in the filenames. Currently, the output filenames follow the pattern hgmd-genes.ABCA4.html. Enhancing this to a format like hgmd-genes.ABCA4.2024-02-21.html would make it easier to identify when each file was generated, especially in cases of multiple runs or data updates.
Acceptance Criteria:
The output filename should include the current timestamp in a readable format.
The timestamp should be placed between the main filename and the file extension.
The format of the timestamp should be standardized, e.g., YYYY-MM-DD.
Suggested Implementation:
Update the filename construction logic in the saveResponse function to include a formatted timestamp.
Ensure the timestamp is added before the file extension in the filename.