Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on New tool from curl creator – trurl – for URL parsing and manipulation.
Apparently, 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)
There are no comments on this comment yet.
Apparently, 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.