Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hoverth/ctow
curl to wget - a simple utility for converting curl commands to wget commands
https://github.com/hoverth/ctow
command-line converter curl rust wget
Last synced: 27 days ago
JSON representation
curl to wget - a simple utility for converting curl commands to wget commands
- Host: GitHub
- URL: https://github.com/hoverth/ctow
- Owner: Hoverth
- License: gpl-3.0
- Created: 2024-04-29T00:58:57.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-06-18T04:12:50.000Z (5 months ago)
- Last Synced: 2024-09-22T21:02:18.823Z (about 1 month ago)
- Topics: command-line, converter, curl, rust, wget
- Language: Rust
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# CTOW
cURL to Wget
A simple rust binary utility to convert curl commands to wget commands.
Available via `cargo install ctow` ([link to crates.io](https://crates.io/crates/ctow)).
## Usage
ctow can be used in two modes: command with arguments and as a command line interface
### Command With Arguments
You can simply pass `ctow [curl command]`, and ctow will print the converted command to stdout, with no formatting or anything when successful, so the output can be piped and manipulated into a command like `wget $(ctow [...])`, etc
Do note that when passing in a curl command, you do not explicitly need to include the leading `curl`, as it is discarded anyway. The options that curl uses (e.g. `-A User-Agent-Here`) __needs__ to have a space between the flag and its argument (this is a TODO).
### Command-Line Interface
ctow comes with a command-line interface, which **does** have formatted output, and is not designed for use with scripts, but for a more user-friendly, interactive experience.
There are three commands:
- `help` - prints a help message
- `curl` - will convert a curl command into a wget command
- `exit` - exits the ctow CLI## Contributing
All code is GPLv3+ licensed, and by contributing you agree to license the contributed code under this license.
Contributions are welcome for:
- missing curl / wget argument mappings
- test cases
- anything else, please open an issue beforehand## License
Copyright © 2024 Thomas Dickson and other contributors
This code is license under the GNU GPL v3+. See LICENSE.md for more details