New tool from curl creator – trurl – for URL parsing and manipulation
1–10 of 40 posts
Re: New tool from curl creator – trurl – for URL parsing and manipulation
#2Re: New tool from curl creator – trurl – for URL parsing and manipulation
#3tru-rul? tee-ru-rul?
Re: New tool from curl creator – trurl – for URL parsing and manipulation
#4The readme should include a pronunciation guide for the name. tru-rul? tee-ru-rul?
Re: New tool from curl creator – trurl – for URL parsing and manipulation
#5The readme should include a pronunciation guide for the name. tru-rul? tee-ru-rul?
Re: New tool from curl creator – trurl – for URL parsing and manipulation
#6Apparently, it requires curl 7.81 to compile, but I'm on ubuntu 20 (7.6x) and wanted to do a quick try, so this patch makes it work (trivially) by removing the couple of new symbols depending on that newer version. Just a quick hack to compile.
--- a/trurl.c
+++ b/trurl.c
@@ -362,11 +362,12 @@ static void get(struct option *op, CURLU *uh)
case CURLUE_NO_PORT:
case CURLUE_NO_QUERY:
case CURLUE_NO_FRAGMENT:
- case CURLUE_NO_ZONEID:
+ // would require 7.81
+ // case CURLUE_NO_ZONEID:
/\* silently ignore */
break;
default:
- fprintf(stderr, PROGNAME ": %s (%s)\n", curl_url_strerror(rc),
+ fprintf(stderr, PROGNAME ": %s (%s)\n", rc,
variables[i].name);
break;
}
@@ -589,8 +590,8 @@ static void singleurl(struct option *o,
CURLU_GUESS_SCHEME|CURLU_NON_SUPPORT_SCHEME);
if(rc) {
if(o->verify)
- errorf(ERROR_BADURL, "%s [%s]", curl_url_strerror(rc), url);
- warnf("%s [%s]", curl_url_strerror(rc), url);
+ errorf(ERROR_BADURL, "%s [%s]", rc, url);
+ warnf("%s [%s]", rc, url);
}
else {
if(o->redirect)Re: New tool from curl creator – trurl – for URL parsing and manipulation
#7The readme should include a pronunciation guide for the name. tru-rul? tee-ru-rul?
Re: New tool from curl creator – trurl – for URL parsing and manipulation
#8The readme should include a pronunciation guide for the name. tru-rul? tee-ru-rul?
Re: New tool from curl creator – trurl – for URL parsing and manipulation
#9Re: New tool from curl creator – trurl – for URL parsing and manipulation
#10For example, you want to apply a sequence of predefined normalization steps, such as removing the user part, converting http to https, etc etc. You put these steps in a file and then invoke trurl with that file and pointed at your url or urls. Very much like what you would do in sed, say. Possible?