New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Construct and build URLs from JSON #176
Comments
I am not entirely convinced this is where we need to go. That would require the use of a JSON parser library. Setting components can be done in many ways with set and iterate etc, a JSON "import" can probably not be made to support the same range of features. But I'm willing to listen to what people say. |
Similar to #159, it wouldn't be unreasonable to use a Python script or something to get this feature, and then we wouldn't need to require a JSON parser to build trurl. |
okay, knowing the fact that you don't have a JSON parser I understand that this would be the role of another program or a jq script. |
You would probably write a script to receive JSON from trurl, massage the components anyway you want, and then rather create a new trurl command line to create a new URL again. |
I hear very little love for this idea. Maybe we can reconsider in a future when we know better where trurl has gone. |
Very cool and useful program.
I was wondering:
The very same JSON output that this util give when using
--json
could be processed by some other program (like jq) and then this program could reconstruct a new URL. I known that we already have the set flag but for some case it could be useful to use jq for more complex manipulationExamples:
echo "https://example.org/helloworld" | trurl --json | trurl --construct
should give the same urlCould this be interesting as a feature of this program?
The text was updated successfully, but these errors were encountered: