diff --git a/.github/scripts/verify-titles.pl b/.github/scripts/verify-titles.pl index 07b9bdb900..2bebe738a5 100755 --- a/.github/scripts/verify-titles.pl +++ b/.github/scripts/verify-titles.pl @@ -1,11 +1,17 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w my $sum = shift @ARGV; # Figure out all files in right order open(F, "<$sum"); while() { - if($_ =~ /\[(.*)\]\(([^\)]*)\)/) { + if ($_ =~ /\[(.*)\]\(([^\)\#]*)\#([^\)]+)\)/) { + my ($title, $file, $section_id) = ($1, $2, $3); + push @files, $file; + $title{$file} = $title; + $sections{$file} = $section_id; + } + elsif($_ =~ /\[(.*)\]\(([^\)]*)\)/) { my ($title, $file) = ($1, $2); push @files, $file; $title{$file} = $title; @@ -13,15 +19,24 @@ } close(F); +my $errors = 0; + sub check { my ($f) = @_; - open(F, "<$f"); + open(F, "<$f") || die("ouch $f"); while() { if(/^# (.*)/) { - # verify - if($1 ne $title{$f}) { + my $expected; + if(exists $sections{$f}) { + # This file was linked from SUMMARY.md with a section header + $expected = "$title{$f} {#$sections{$f}}"; + } else { + # This file was linked with no section header + $expected = $title{$f}; + } + if ($1 ne $expected) { printf STDERR "$f says '%s', not '%s' like SUMMARY.md\n", - $1, $title{$f}; + $1, $expected; $errors++; } last; diff --git a/Makefile b/Makefile index 9d0092f74c..b970b91745 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ wordcheck: fixup: for i in $(MDS); do ./lang.sh $$i; done -uni.md: uni.pl $(MDS) SUMMARY.md +uni.md: uni.pl $(MDS) SUMMARY.md $(OUT) ./uni.pl SUMMARY.md >$@ everything-curl.pdf: uni.md diff --git a/SUMMARY.md b/SUMMARY.md index 5ad8b055a2..fe026a4820 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -306,4 +306,4 @@ * [Continuous Integration](internals/tests/ci.md) * [Autobuilds](internals/tests/autobuilds.md) * [Torture](internals/tests/torture.md) -* [Index](bookindex.md) +* [Index](bookindex.md#everything-curl-index) diff --git a/bookindex.md b/bookindex.md index 58c4f13590..28b74169fc 100644 --- a/bookindex.md +++ b/bookindex.md @@ -1,4 +1,4 @@ -# Index +# Index {#everything-curl-index} ## . - .netrc: [Command line leakage](cmdline/passwords.md#command-line-leakage), [Using curl](usingcurl.md#using-curl), [.netrc](usingcurl/netrc.md#netrc), [All options](libcurl/options/all.md#all-options), [``](internals/tests/file-format.md#less-than-features-greater-than) @@ -23,7 +23,7 @@ - C89: [Comments](source/style.md#comments), [Build curl](build.md#build-curl) - CA: [Verbose](usingcurl/verbose.md#verbose), [MITM proxy](usingcurl/proxies/mitm.md#mitm-proxy), [Available exit codes](usingcurl/returns.md#available-exit-codes), [Verifying server certificates](usingcurl/tls/verify.md#verifying-server-certificates), [OCSP stapling](usingcurl/tls/stapling.md#ocsp-stapling), [Verification](libcurl/options/tls.md#verification), [All options](libcurl/options/all.md#all-options), [CA store cache](internals/caches.md#ca-store-cache) - Chrome: [SSLKEYLOGFILE](usingcurl/tls/sslkeylogfile.md#sslkeylogfile), [Copy as curl](usingcurl/copyas.md#copy-as-curl) - - clone: [Install GCC for x86_64](get/win-msys2.md#install-gcc-for-x86_64), [Clone the code](source.md#clone-the-code), [git](source/contributing.md#git), [Website](source/web.md#website), [build boringssl](build/boringssl.md#build-boringssl) + - clone: [Building libcurl on MSYS2](get/win-msys2.md#building-libcurl-on-msys2), [Clone the code](source.md#clone-the-code), [git](source/contributing.md#git), [Website](source/web.md#website), [build boringssl](build/boringssl.md#build-boringssl) - code of conduct: [Trust](project/trust.md#trust), [Code of Conduct](project/coc.md#code-of-conduct) - --compressed: [Compression](usingcurl/downloads/compression.md#compression), [Gzipped transfers](http/response.md#gzipped-transfers), [HTTP cheat sheet](http/cheatsheet.md#http-cheat-sheet) - --compressed-ssh: [Compression](usingcurl/downloads/compression.md#compression) @@ -134,7 +134,7 @@ - CURLUPART_USER: [Get individual URL parts](libcurl/url/get-part.md#get-individual-url-parts), [Set individual URL parts](libcurl/url/set-part.md#set-individual-url-parts) - curl_easy_cleanup: [Example](libcurl/control/stopslow.md#example), [Example](libcurl/control/ratelimit.md#example), [Example](libcurl/control/meter.md#example), [easy handle](libcurl/cleanup.md#easy-handle), [--libcurl](libcurl/--libcurl.md#libcurl), [Get a simple HTTP page](libcurl/examples/get.md#get-a-simple-http-page), [Get a response into memory](libcurl/examples/getinmem.md#get-a-response-into-memory), [Submit a login form over HTTP](libcurl/examples/login.md#submit-a-login-form-over-http), [Get an FTP directory listing](libcurl/examples/ftplist.md#get-an-ftp-directory-listing), [Non-blocking HTTP form-post](libcurl/examples/http-ul-nonblock.md#non-blocking-http-form-post), [Bearer](libcurl-http/auth.md#bearer), [Header struct](libcurl-http/headerapi/struct.md#header-struct), [Enable cookie engine with writing](libcurl-http/cookies.md#enable-cookie-engine-with-writing) - curl_easy_getinfo: [docs/libcurl/opts](source/layout.md#docs-libcurl-opts), [Post transfer info](libcurl/getinfo.md#post-transfer-info), [Transfer and connection identifiers](libcurl/verbose.md#transfer-and-connection-identifiers), [Response meta-data](libcurl-http/responses.md#response-meta-data), [Get all cookies from the cookie store](libcurl-http/cookies.md#get-all-cookies-from-the-cookie-store) - - curl_easy_init: [Easy handle](libcurl/easyhandle.md#easy-handle), [Example](libcurl/control/stopslow.md#example), [Example](libcurl/control/ratelimit.md#example), [Example](libcurl/control/meter.md#example), [CURLOPT\_CURLU](libcurl/url/setopt.md#curlopt\_curlu), [--libcurl](libcurl/--libcurl.md#libcurl), [Get a simple HTTP page](libcurl/examples/get.md#get-a-simple-http-page), [Get a response into memory](libcurl/examples/getinmem.md#get-a-response-into-memory), [Submit a login form over HTTP](libcurl/examples/login.md#submit-a-login-form-over-http), [Get an FTP directory listing](libcurl/examples/ftplist.md#get-an-ftp-directory-listing), [Non-blocking HTTP form-post](libcurl/examples/http-ul-nonblock.md#non-blocking-http-form-post), [Bearer](libcurl-http/auth.md#bearer), [Download](libcurl-http/download.md#download) + - curl_easy_init: [Easy handle](libcurl/easyhandle.md#easy-handle), [Example](libcurl/control/stopslow.md#example), [Example](libcurl/control/ratelimit.md#example), [Example](libcurl/control/meter.md#example), [CURLOPT\_CURLU](libcurl/url/setopt.md#curlopt-_curlu), [--libcurl](libcurl/--libcurl.md#libcurl), [Get a simple HTTP page](libcurl/examples/get.md#get-a-simple-http-page), [Get a response into memory](libcurl/examples/getinmem.md#get-a-response-into-memory), [Submit a login form over HTTP](libcurl/examples/login.md#submit-a-login-form-over-http), [Get an FTP directory listing](libcurl/examples/ftplist.md#get-an-ftp-directory-listing), [Non-blocking HTTP form-post](libcurl/examples/http-ul-nonblock.md#non-blocking-http-form-post), [Bearer](libcurl-http/auth.md#bearer), [Download](libcurl-http/download.md#download) - curl_easy_option_by_id: [Find a specific option by ID](libcurl/options/info.md#find-a-specific-option-by-id) - curl_easy_option_by_next: [Iterate over all options](libcurl/options/info.md#iterate-over-all-options) - curl_easy_perform: [Drive with easy](libcurl/drive/easy.md#drive-with-easy), [Easy API pool](libcurl/conn/reuse.md#easy-api-pool), [Caching](libcurl/conn/names.md#caching), [easy API](libcurl/control/stop.md#easy-api), [Example](libcurl/control/stopslow.md#example), [Example](libcurl/control/ratelimit.md#example), [Example](libcurl/control/meter.md#example), [--libcurl](libcurl/--libcurl.md#libcurl), [Get a simple HTTP page](libcurl/examples/get.md#get-a-simple-http-page), [Get a response into memory](libcurl/examples/getinmem.md#get-a-response-into-memory), [Submit a login form over HTTP](libcurl/examples/login.md#submit-a-login-form-over-http), [Get an FTP directory listing](libcurl/examples/ftplist.md#get-an-ftp-directory-listing), [Add a header](libcurl-http/requests.md#add-a-header), [Bearer](libcurl-http/auth.md#bearer), [Download](libcurl-http/download.md#download), [Everything is multi](internals/multi.md#everything-is-multi) @@ -152,7 +152,7 @@ - curl_multi_add_handle: [Drive with multi](libcurl/drive/multi.md#drive-with-multi), [Many easy handles](libcurl/drive/multi-socket.md#many-easy-handles), [Non-blocking HTTP form-post](libcurl/examples/http-ul-nonblock.md#non-blocking-http-form-post), [Curl_multi](internals/structs.md#curl_multi) - curl_multi_cleanup: [Multi API](libcurl/cleanup.md#multi-api), [Non-blocking HTTP form-post](libcurl/examples/http-ul-nonblock.md#non-blocking-http-form-post) - curl_multi_fdset: [Drive with multi](libcurl/drive/multi.md#drive-with-multi), [Curl_easy](internals/structs.md#curl_easy) - - curl_multi_info_read: [When is a single transfer done?](libcurl/drive/multi.md#when-is-a-single-transfer-done?), [When is it done?](libcurl/drive/multi-socket.md#when-is-it-done?), [Multi API](libcurl/cleanup.md#multi-api), [Curl_multi](internals/structs.md#curl_multi) + - curl_multi_info_read: [When is a single transfer done?](libcurl/drive/multi.md#when-is-a-single-transfer-done), [When is it done?](libcurl/drive/multi-socket.md#when-is-it-done), [Multi API](libcurl/cleanup.md#multi-api), [Curl_multi](internals/structs.md#curl_multi) - curl_multi_init: [Drive with multi](libcurl/drive/multi.md#drive-with-multi), [Non-blocking HTTP form-post](libcurl/examples/http-ul-nonblock.md#non-blocking-http-form-post) - curl_multi_remove_handle: [Drive with multi](libcurl/drive/multi.md#drive-with-multi), [Many easy handles](libcurl/drive/multi-socket.md#many-easy-handles), [multi API](libcurl/control/stop.md#multi-api), [Multi API](libcurl/cleanup.md#multi-api) - curl_multi_setopt: [docs/libcurl/opts](source/layout.md#docs-libcurl-opts), [Drive with multi](libcurl/drive/multi.md#drive-with-multi), [socket_callback](libcurl/drive/multi-socket.md#socket_callback), [Multiplexing](libcurl-http/multiplexing.md#multiplexing) @@ -162,11 +162,11 @@ - curl_off_t: [Set numerical options](libcurl/options/num.md#set-numerical-options), [Progress information](libcurl/callbacks/progress.md#progress-information), [Seek and ioctl](libcurl/callbacks/seek.md#seek-and-ioctl), [Example](libcurl/control/ratelimit.md#example), [Available information](libcurl/getinfo.md#available-information), [Meta](libcurl/ws/meta.md#meta), [`curl_ws_send()`](libcurl/ws/write.md#curl_ws_send), [Transfer and connection identifiers](libcurl/verbose.md#transfer-and-connection-identifiers), [Response meta-data](libcurl-http/responses.md#response-meta-data), [HTTP PUT](libcurl-http/upload.md#http-put) - CURL_SOCKET_TIMEOUT: [timer_callback](libcurl/drive/multi-socket.md#timer_callback) - CURL_SSL_BACKEND: [Line 1: TLS versions](usingcurl/version.md#line-1-tls-versions), [Multiple TLS backends](usingcurl/tls/backends.md#multiple-tls-backends) - - curl_url: [Include files](libcurl/url/include.md#include-files), [Create, cleanup, duplicate](libcurl/url/init.md#create-cleanup-duplicate), [Parse a URL](libcurl/url/parse.md#parse-a-url), [Redirect to a relative URL](libcurl/url/redirect.md#redirect-to-a-relative-url), [Update parts](libcurl/url/set-part.md#update-parts), [CURLOPT\_CURLU](libcurl/url/setopt.md#curlopt\_curlu) + - curl_url: [Include files](libcurl/url/include.md#include-files), [Create, cleanup, duplicate](libcurl/url/init.md#create-cleanup-duplicate), [Parse a URL](libcurl/url/parse.md#parse-a-url), [Redirect to a relative URL](libcurl/url/redirect.md#redirect-to-a-relative-url), [Update parts](libcurl/url/set-part.md#update-parts), [CURLOPT\_CURLU](libcurl/url/setopt.md#curlopt-_curlu) - curl_url_cleanup: [Create, cleanup, duplicate](libcurl/url/init.md#create-cleanup-duplicate) - curl_url_dup: [Create, cleanup, duplicate](libcurl/url/init.md#create-cleanup-duplicate) - curl_url_get: [`CURLU_ALLOW_SPACE`](libcurl/url/parse.md#curlu_allow_space), [Get a URL](libcurl/url/get.md#get-a-url), [Get individual URL parts](libcurl/url/get-part.md#get-individual-url-parts) - - curl_url_set: [Include files](libcurl/url/include.md#include-files), [Parse a URL](libcurl/url/parse.md#parse-a-url), [Redirect to a relative URL](libcurl/url/redirect.md#redirect-to-a-relative-url), [Set individual URL parts](libcurl/url/set-part.md#set-individual-url-parts), [Append to the query](libcurl/url/append-query.md#append-to-the-query), [CURLOPT\_CURLU](libcurl/url/setopt.md#curlopt\_curlu) + - curl_url_set: [Include files](libcurl/url/include.md#include-files), [Parse a URL](libcurl/url/parse.md#parse-a-url), [Redirect to a relative URL](libcurl/url/redirect.md#redirect-to-a-relative-url), [Set individual URL parts](libcurl/url/set-part.md#set-individual-url-parts), [Append to the query](libcurl/url/append-query.md#append-to-the-query), [CURLOPT\_CURLU](libcurl/url/setopt.md#curlopt-_curlu) - curl_version_info: [Support](libcurl/ws/support.md#support), [Which libcurl version runs](libcurl/api.md#which-libcurl-version-runs) ## D - -d: [Arguments to options](cmdline/options.md#arguments-to-options), [Separate options per URL](cmdline/urls/options.md#separate-options-per-url), [POST](usingcurl/uploads.md#post), [MQTT](usingcurl/mqtt.md#mqtt), [HTTP with curl](http.md#http-with-curl), [Method](http/method.md#method), [Simple POST](http/post/simple.md#simple-post), [Content-Type](http/post/content-type.md#content-type), [Posting binary](http/post/binary.md#posting-binary), [Convert to GET](http/post/convert-to-get.md#convert-to-get), [Expect 100-continue](http/post/expect100.md#expect-100-continue), [Chunked encoded POSTs](http/post/chunked.md#chunked-encoded-posts), [Hidden form fields](http/post/hiddenfields.md#hidden-form-fields), [-d vs -F](http/postvspost.md#d-vs--f), [HTTP PUT](http/put.md#http-put), [HTTP cheat sheet](http/cheatsheet.md#http-cheat-sheet), [Web logins and sessions](http/browserlike.md#web-logins-and-sessions) @@ -184,7 +184,7 @@ - --etag-compare: [Check by modification of content](http/conditionals.md#check-by-modification-of-content) - --etag-save: [Check by modification of content](http/conditionals.md#check-by-modification-of-content) - etiquette: [Mailing list etiquette](project/etiquette.md#mailing-list-etiquette) - - event-driven: [Drive with multi\_socket](libcurl/drive/multi-socket.md#drive-with-multi\_socket), [Everything is multi](internals/multi.md#everything-is-multi) + - event-driven: [Drive with multi\_socket](libcurl/drive/multi-socket.md#drive-with-multi-_socket), [Everything is multi](internals/multi.md#everything-is-multi) ## F - -F: [multipart formpost](usingcurl/uploads.md#multipart-formpost), [Not perfect](usingcurl/copyas.md#not-perfect), [HTTP with curl](http.md#http-with-curl), [Method](http/method.md#method), [HTTP POST](http/post.md#http-post), [Sending such a form with curl](http/multipart.md#sending-such-a-form-with-curl), [-d vs -F](http/postvspost.md#d-vs--f), [HTTP cheat sheet](http/cheatsheet.md#http-cheat-sheet) - --fail: [Available exit codes](usingcurl/returns.md#available-exit-codes), [HTTP response codes](http/response.md#http-response-codes) @@ -195,15 +195,15 @@ - --ftp-pasv: [Passive connections](ftp/twoconnections.md#passive-connections) - --ftp-port: [Available exit codes](usingcurl/returns.md#available-exit-codes), [Active connections](ftp/twoconnections.md#active-connections) - --ftp-skip-pasv-ip: [Passive connections](ftp/twoconnections.md#passive-connections) - - FTPS: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support?), [FTPS](protocols/curl.md#ftps), [TLS libraries](build/tls.md#tls-libraries), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Network leakage](cmdline/passwords.md#network-leakage), [Trace options](usingcurl/verbose/trace.md#trace-options), [Version](usingcurl/version.md#version), [Protocols allowing upload](usingcurl/uploads.md#protocols-allowing-upload), [Enable TLS](usingcurl/tls/enable.md#enable-tls), [FTPS](ftp/ftps.md#ftps), [Variables](internals/tests/file-format.md#variables) - - future: [Project communication](project/comm.md#project-communication), [Future](project/future.md#future), [What other protocols are there?](protocols/protocols.md#what-other-protocols-are-there?), [docs](source/layout.md#docs), [curl-security@haxx.se](source/reportvuln.md#curl-security-haxx.se), [More data](usingcurl/verbose/trace.md#more-data), ["Not used"](usingcurl/returns.md#not-used), [Cookies](http/cookies.md#cookies), [Network data conversion](libcurl/callbacks/conversions.md#network-data-conversion), [`age`](libcurl/ws/meta.md#age), [API compatibility](libcurl/api.md#api-compatibility), [Trace more](libcurl/verbose.md#trace-more), [HSTS](libcurl-http/hsts.md#hsts), [Set a timeout](internals/timeouts.md#set-a-timeout) + - FTPS: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [FTPS](protocols/curl.md#ftps), [TLS libraries](build/tls.md#tls-libraries), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Network leakage](cmdline/passwords.md#network-leakage), [Trace options](usingcurl/verbose/trace.md#trace-options), [Version](usingcurl/version.md#version), [Protocols allowing upload](usingcurl/uploads.md#protocols-allowing-upload), [Enable TLS](usingcurl/tls/enable.md#enable-tls), [FTPS](ftp/ftps.md#ftps), [Variables](internals/tests/file-format.md#variables) + - future: [Project communication](project/comm.md#project-communication), [Future](project/future.md#future), [What other protocols are there?](protocols/protocols.md#what-other-protocols-are-there), [docs](source/layout.md#docs), [curl-security@haxx.se](source/reportvuln.md#curl-security-haxx-se), [More data](usingcurl/verbose/trace.md#more-data), ["Not used"](usingcurl/returns.md#not-used), [Cookies](http/cookies.md#cookies), [Network data conversion](libcurl/callbacks/conversions.md#network-data-conversion), [`age`](libcurl/ws/meta.md#age), [API compatibility](libcurl/api.md#api-compatibility), [Trace more](libcurl/verbose.md#trace-more), [HSTS](libcurl-http/hsts.md#hsts), [Set a timeout](internals/timeouts.md#set-a-timeout) ## G - --get: [trurl example command lines](cmdline/urls/trurl.md#trurl-example-command-lines), [Convert to GET](http/post/convert-to-get.md#convert-to-get) - git: [Daily snapshots](project/releases.md#daily-snapshots), [Building libcurl on MSYS2](get/win-msys2.md#building-libcurl-on-msys2), [Clone the code](source.md#clone-the-code), [root](source/layout.md#root), [git](source/contributing.md#git), [Website](source/web.md#website), [git vs release tarballs](build.md#git-vs-release-tarballs), [Notes](build/windows.md#notes), [build boringssl](build/boringssl.md#build-boringssl), [Continuous Integration](internals/tests/ci.md#continuous-integration), [Autobuilds](internals/tests/autobuilds.md#autobuilds) - Globbing: [Garbage in gives garbage out](cmdline.md#garbage-in-gives-garbage-out), [URL globbing](cmdline/globbing.md#url-globbing), [Uploading with FTP](ftp/upload.md#uploading-with-ftp) - GnuTLS: [lib/vtls](source/layout.md#lib-vtls), [Select TLS backend](build/autotools.md#select-tls-backend), [TLS libraries](build/tls.md#tls-libraries), [OCSP stapling](usingcurl/tls/stapling.md#ocsp-stapling), [Restrictions](usingcurl/tls/sslkeylogfile.md#restrictions), [``](internals/tests/file-format.md#less-than-features-greater-than) - - GOPHER: [How it started](project/started.md#how-it-started), [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support?), [GOPHER](protocols/curl.md#gopher), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Version](usingcurl/version.md#version), [Variables](internals/tests/file-format.md#variables) - - GOPHERS: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support?), [GOPHERS](protocols/curl.md#gophers), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Variables](internals/tests/file-format.md#variables) + - GOPHER: [How it started](project/started.md#how-it-started), [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [GOPHER](protocols/curl.md#gopher), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Version](usingcurl/version.md#version), [Variables](internals/tests/file-format.md#variables) + - GOPHERS: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [GOPHERS](protocols/curl.md#gophers), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Variables](internals/tests/file-format.md#variables) ## H - --header: [Server differences](usingcurl/downloads/browsers.md#server-differences), [Proxy headers](usingcurl/proxies/headers.md#proxy-headers), [JSON](http/post/json.md#json), [Customize headers](http/modify/headers.md#customize-headers) - Header callback: [All options](libcurl/options/all.md#all-options), [Header data](libcurl/callbacks/header.md#header-data), [Response body](libcurl-http/responses.md#response-body), [Download headers too](libcurl-http/download.md#download-headers-too) @@ -219,7 +219,7 @@ - HTTP/2: [HTTP](protocols/curl.md#http), [docs](source/layout.md#docs), [nghttp2](build/deps.md#nghttp2), [HTTP/2 and HTTP/3](usingcurl/verbose.md#http-2-and-http-3), [More data](usingcurl/verbose/trace.md#more-data), [Line 4: Features](usingcurl/version.md#line-4-features), [HTTP headers](usingcurl/downloads/compression.md#http-headers), [HTTP/2](usingcurl/proxies/https.md#http-2), [Available exit codes](usingcurl/returns.md#available-exit-codes), [HTTP with curl](http.md#http-with-curl), [HTTP versions](http/versions.md#http-versions), [HTTP/2](http/versions/http2.md#http-2), [HTTP/3](http/versions/http3.md#http-3), [HTTP/2 and later](http/post/expect100.md#http-2-and-later), [GET or POST?](http/redirects.md#get-or-post?), [HTTP/3](http/altsvc.md#http-3), [DNS over HTTPS](libcurl/conn/names.md#dns-over-https), [Trace more](libcurl/verbose.md#trace-more), [Versions](libcurl-http/versions.md#versions), [Header origins](libcurl-http/headerapi.md#header-origins), [Expect: headers](libcurl-http/upload.md#expect-headers), [Multiplexing](libcurl-http/multiplexing.md#multiplexing), [HTTP/3](libcurl-http/alt-svc.md#http-3), [Different backends](internals/backends.md#different-backends), [Curl_easy](internals/structs.md#curl_easy), [Variables](internals/tests/file-format.md#variables) - HTTP/3: [HTTPS](protocols/curl.md#https), [Select HTTP/3 backend](build/autotools.md#select-http-3-backend), [TCP vs UDP](cmdline/urls/port.md#tcp-vs-udp), [HTTP/2 and HTTP/3](usingcurl/verbose.md#http-2-and-http-3), [More data](usingcurl/verbose/trace.md#more-data), [Line 4: Features](usingcurl/version.md#line-4-features), [HTTP headers](usingcurl/downloads/compression.md#http-headers), [Available exit codes](usingcurl/returns.md#available-exit-codes), [HTTP with curl](http.md#http-with-curl), [HTTP versions](http/versions.md#http-versions), [HTTP/3](http/versions/http3.md#http-3), [HTTP/3](http/altsvc.md#http-3), [Which libcurl version runs](libcurl/api.md#which-libcurl-version-runs), [Trace more](libcurl/verbose.md#trace-more), [Versions](libcurl-http/versions.md#versions), [Header origins](libcurl-http/headerapi.md#header-origins), [Expect: headers](libcurl-http/upload.md#expect-headers), [Multiplexing](libcurl-http/multiplexing.md#multiplexing), [HTTP/3](libcurl-http/alt-svc.md#http-3), [Different backends](internals/backends.md#different-backends) - HTTP/3 backend: [Select HTTP/3 backend](build/autotools.md#select-http-3-backend) - - --http0.9: [HTTP/0.9](http/versions/http09.md#http-0.9) + - --http0.9: [HTTP/0.9](http/versions/http09.md#http-0-9) - --http1.1: [HTTP versions](http/versions.md#http-versions) - --http2: [HTTP versions](http/versions.md#http-versions), [HTTP/2](http/versions/http2.md#http-2) - --http2-prior-knowledge: [HTTP versions](http/versions.md#http-versions), [HTTP/2](http/versions/http2.md#http-2) @@ -247,7 +247,7 @@ - -L: [Short options](cmdline/options.md#short-options), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Tell curl to follow redirects](http/redirects.md#tell-curl-to-follow-redirects), [Request method](http/modify/method.md#request-method), [Cookie engine](http/cookies.md#cookie-engine), [HTTP cheat sheet](http/cheatsheet.md#http-cheat-sheet), [Redirects](http/browserlike.md#redirects) - LD_LIBRARY_PATH: [`LD_LIBRARY_PATH`](build/separate.md#ld_library_path) - --libcurl: [--libcurl](libcurl/--libcurl.md#libcurl) - - libcurl version: [The latest version?](build.md#the-latest-version?), [Line 1: curl](usingcurl/version.md#line-1-curl), [Available exit codes](usingcurl/returns.md#available-exit-codes), [Network data conversion](libcurl/callbacks/conversions.md#network-data-conversion), [Which libcurl version](libcurl/api.md#which-libcurl-version) + - libcurl version: [The latest version?](build.md#the-latest-version), [Line 1: curl](usingcurl/version.md#line-1-curl), [Available exit codes](usingcurl/returns.md#available-exit-codes), [Network data conversion](libcurl/callbacks/conversions.md#network-data-conversion), [Which libcurl version](libcurl/api.md#which-libcurl-version) - libidn2: [libidn2](build/deps.md#libidn2) - libpsl: [libpsl](build/deps.md#libpsl) - libressl: [TLS libraries](build/tls.md#tls-libraries), [Restrictions](usingcurl/tls/sslkeylogfile.md#restrictions) @@ -261,7 +261,7 @@ - --max-filesize: [Maximum filesize](usingcurl/downloads/max-filesize.md#maximum-filesize) - --max-time: [Tweak your retries](usingcurl/downloads/retry.md#tweak-your-retries), [Maximum time allowed to spend](usingcurl/timeouts.md#maximum-time-allowed-to-spend) - MIT: [License](source/opensource/license.md#license) - - MQTT: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support?), [MQTT](protocols/curl.md#mqtt), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Using curl](usingcurl.md#using-curl), [Line 3: Protocols](usingcurl/version.md#line-3-protocols), [MQTT](usingcurl/mqtt.md#mqtt), [Variables](internals/tests/file-format.md#variables), [Test servers](internals/tests/servers.md#test-servers) + - MQTT: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [MQTT](protocols/curl.md#mqtt), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Using curl](usingcurl.md#using-curl), [Line 3: Protocols](usingcurl/version.md#line-3-protocols), [MQTT](usingcurl/mqtt.md#mqtt), [Variables](internals/tests/file-format.md#variables), [Test servers](internals/tests/servers.md#test-servers) - mTLS: [Client certificates](usingcurl/tls/clientcert.md#client-certificates) - multi-threading: [multi-threading](libcurl/threading.md#multi-threading) ## N @@ -310,10 +310,10 @@ - redhat: [Redhat and CentOS](get/linux.md#redhat-and-centos) - redirects: [Long options](cmdline/options.md#long-options), [Separate options per URL](cmdline/urls/options.md#separate-options-per-url), [Syntax](cmdline/configfile.md#syntax), [Available --write-out variables](usingcurl/verbose/writeout.md#available---write-out-variables), [Downloads](usingcurl/downloads.md#downloads), [Download to a file named by the URL](usingcurl/downloads/url-named.md#download-to-a-file-named-by-the-url), [Shell redirects](usingcurl/downloads/redirects.md#shell-redirects), [Provide a custom IP address for a name](usingcurl/connections/name.md#provide-a-custom-ip-address-for-a-name), [Available exit codes](usingcurl/returns.md#available-exit-codes), [HTTP with curl](http.md#http-with-curl), [Redirects](http/redirects.md#redirects), [Request method](http/modify/method.md#request-method), [Redirects](http/browserlike.md#redirects), [All options](libcurl/options/all.md#all-options), [Custom addresses for hosts](libcurl/conn/names.md#custom-addresses-for-hosts), [Available information](libcurl/getinfo.md#available-information), [Submit a login form over HTTP](libcurl/examples/login.md#submit-a-login-form-over-http), [Automatic referrer](libcurl-http/requests.md#automatic-referrer), [Request number](libcurl-http/headerapi.md#request-number) - RELEASE-NOTES: [scripts](source/layout.md#scripts) - - releases: [1. [The cURL project](project.md)](how-to-read.md#1.-[the-curl-project]project.md), [curl-announce](project/maillists.md#curl-announce), [Releases](project/releases.md#releases), [scripts](source/layout.md#scripts), [Releases source code](build.md#releases-source-code), [Verbose](usingcurl/verbose.md#verbose), [Which libcurl version](libcurl/api.md#which-libcurl-version) + - releases: [1. [The cURL project](project.md)](how-to-read.md#the-curl-project-project-md), [curl-announce](project/maillists.md#curl-announce), [Releases](project/releases.md#releases), [scripts](source/layout.md#scripts), [Releases source code](build.md#releases-source-code), [Verbose](usingcurl/verbose.md#verbose), [Which libcurl version](libcurl/api.md#which-libcurl-version) - --remote-name-all: [One output for each given URL](cmdline/urls/options.md#one-output-for-each-given-url), [Use the URL's filename part for all URLs](usingcurl/downloads/url-named.md#use-the-urls-filename-part-for-all-urls) - --remove-on-error: [Leftovers on errors](usingcurl/downloads/storing.md#leftovers-on-errors) - - repository: [Releases](project/releases.md#releases), [Source code on GitHub](project/devel.md#source-code-on-github), [Arch Linux](get/linux.md#arch-linux), [Install GCC for x86_64](get/win-msys2.md#install-gcc-for-x86_64), [Hosting and download](source.md#hosting-and-download), [root](source/layout.md#root), [What to add](source/contributing.md#what-to-add), [Website](source/web.md#website), [git vs release tarballs](build.md#git-vs-release-tarballs), [Notes](build/windows.md#notes), [Continuous Integration](internals/tests/ci.md#continuous-integration), [Autobuilds](internals/tests/autobuilds.md#autobuilds), [Content](README.md#content) + - repository: [Releases](project/releases.md#releases), [Source code on GitHub](project/devel.md#source-code-on-github), [Arch Linux](get/linux.md#arch-linux), [Building libcurl on MSYS2](get/win-msys2.md#building-libcurl-on-msys2), [Hosting and download](source.md#hosting-and-download), [root](source/layout.md#root), [What to add](source/contributing.md#what-to-add), [Website](source/web.md#website), [git vs release tarballs](build.md#git-vs-release-tarballs), [Notes](build/windows.md#notes), [Continuous Integration](internals/tests/ci.md#continuous-integration), [Autobuilds](internals/tests/autobuilds.md#autobuilds), [Content](README.md#content) - --resolve: [Provide a custom IP address for a name](usingcurl/connections/name.md#provide-a-custom-ip-address-for-a-name) - --retry: [Retry](usingcurl/downloads/retry.md#retry), [Request rate limiting](usingcurl/transfers/request-rate.md#request-rate-limiting) - --retry-all-errors: [Retry on any and all errors](usingcurl/downloads/retry.md#retry-on-any-and-all-errors) @@ -374,9 +374,9 @@ - STARTTLS: [IMAP](protocols/curl.md#imap), [TLS for emails](usingcurl/reademail.md#tls-for-emails), [STARTTLS](libcurl/options/tls.md#starttls) ## T - -T: [PUT](usingcurl/uploads.md#put), [Upload](usingcurl/tftp.md#upload), [Method](http/method.md#method), [HTTP PUT](http/put.md#http-put), [HTTP cheat sheet](http/cheatsheet.md#http-cheat-sheet), [Uploading with FTP](ftp/upload.md#uploading-with-ftp) - - TELNET: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support?), [TELNET](protocols/curl.md#telnet), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Using curl](usingcurl.md#using-curl), [Version](usingcurl/version.md#version), [Available exit codes](usingcurl/returns.md#available-exit-codes), [TELNET](usingcurl/telnet.md#telnet), [All options](libcurl/options/all.md#all-options), [Variables](internals/tests/file-format.md#variables) - - testing: [What does curl do?](project/does.md#what-does-curl-do?), [Reporting bugs](project/bugs.md#reporting-bugs), [Handling build options](source/options.md#handling-build-options), [Contributing](source/contributing.md#contributing), [Run a local clone](source/web.md#run-a-local-clone), [Separate install](build/separate.md#separate-install), [About HTTP response code "errors"](libcurl-http/responses.md#about-http-response-code-errors), [Debug builds](internals/tests/debug.md#debug-builds), [Test servers](internals/tests/servers.md#test-servers), [Torture](internals/tests/torture.md#torture) - - TFTP: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support?), [TFTP](protocols/curl.md#tftp), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [TCP vs UDP](cmdline/urls/port.md#tcp-vs-udp), [Using curl](usingcurl.md#using-curl), [Version](usingcurl/version.md#version), [Protocols allowing upload](usingcurl/uploads.md#protocols-allowing-upload), [Available exit codes](usingcurl/returns.md#available-exit-codes), [TFTP](usingcurl/tftp.md#tftp), [All options](libcurl/options/all.md#all-options), [Variables](internals/tests/file-format.md#variables), [Test servers](internals/tests/servers.md#test-servers) + - TELNET: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [TELNET](protocols/curl.md#telnet), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [Using curl](usingcurl.md#using-curl), [Version](usingcurl/version.md#version), [Available exit codes](usingcurl/returns.md#available-exit-codes), [TELNET](usingcurl/telnet.md#telnet), [All options](libcurl/options/all.md#all-options), [Variables](internals/tests/file-format.md#variables) + - testing: [What does curl do?](project/does.md#what-does-curl-do), [Reporting bugs](project/bugs.md#reporting-bugs), [Handling build options](source/options.md#handling-build-options), [Contributing](source/contributing.md#contributing), [Run a local clone](source/web.md#run-a-local-clone), [Separate install](build/separate.md#separate-install), [About HTTP response code "errors"](libcurl-http/responses.md#about-http-response-code-errors), [Debug builds](internals/tests/debug.md#debug-builds), [Test servers](internals/tests/servers.md#test-servers), [Torture](internals/tests/torture.md#torture) + - TFTP: [What protocols does curl support?](protocols/protocols.md#what-protocols-does-curl-support), [TFTP](protocols/curl.md#tftp), [Supported schemes](cmdline/urls/scheme.md#supported-schemes), [TCP vs UDP](cmdline/urls/port.md#tcp-vs-udp), [Using curl](usingcurl.md#using-curl), [Version](usingcurl/version.md#version), [Protocols allowing upload](usingcurl/uploads.md#protocols-allowing-upload), [Available exit codes](usingcurl/returns.md#available-exit-codes), [TFTP](usingcurl/tftp.md#tftp), [All options](libcurl/options/all.md#all-options), [Variables](internals/tests/file-format.md#variables), [Test servers](internals/tests/servers.md#test-servers) - --tftp-blksize: [TFTP options](usingcurl/tftp.md#tftp-options) - --tftp-no-options: [TFTP options](usingcurl/tftp.md#tftp-options) - --time-cond: [Check by modification date](http/conditionals.md#check-by-modification-date) @@ -384,16 +384,16 @@ - TLS backend: [Ubuntu and Debian](get/linux.md#ubuntu-and-debian), [lib/vtls](source/layout.md#lib-vtls), [Select TLS backend](build/autotools.md#select-tls-backend), [Line 1: curl](usingcurl/version.md#line-1-curl), [Available exit codes](usingcurl/returns.md#available-exit-codes), [TLS](usingcurl/tls.md#tls), [Certificate pinning](usingcurl/tls/pinning.md#certificate-pinning), [OCSP stapling](usingcurl/tls/stapling.md#ocsp-stapling), [Client certificates](usingcurl/tls/clientcert.md#client-certificates), [TLS backends](usingcurl/tls/backends.md#tls-backends), [SSL context](libcurl/callbacks/sslcontext.md#ssl-context) - TODO: [Future](project/future.md#future), [Suggestions](source/contributing.md#suggestions), [Notes](build/windows.md#notes) - --tr-encoding: [Compression](usingcurl/downloads/compression.md#compression), [Transfer encoding](http/response.md#transfer-encoding) - - --trace: [Trace options](usingcurl/verbose/trace.md#trace-options), [``](internals/tests/file-format.md#less-than-command-[option=no-output-no-include-force-output-binary-trace]-[timeout=secs][delay=secs][type=perl-shell]-greater-than) - - --trace-ascii: [Trace options](usingcurl/verbose/trace.md#trace-options), [Server differences](usingcurl/downloads/browsers.md#server-differences), [HTTP cheat sheet](http/cheatsheet.md#http-cheat-sheet), [``](internals/tests/file-format.md#less-than-command-[option=no-output-no-include-force-output-binary-trace]-[timeout=secs][delay=secs][type=perl-shell]-greater-than) + - --trace: [Trace options](usingcurl/verbose/trace.md#trace-options), [``](internals/tests/file-format.md#less-than-command--option-no-output-no-include-force-output-binary-trace---timeout-secs--delay-secs--type-perl-shell--greater-than) + - --trace-ascii: [Trace options](usingcurl/verbose/trace.md#trace-options), [Server differences](usingcurl/downloads/browsers.md#server-differences), [HTTP cheat sheet](http/cheatsheet.md#http-cheat-sheet), [``](internals/tests/file-format.md#less-than-command--option-no-output-no-include-force-output-binary-trace---timeout-secs--delay-secs--type-perl-shell--greater-than) - --trace-config: [More data](usingcurl/verbose/trace.md#more-data) - --trace-ids: [Identify transfers and connections](usingcurl/verbose/trace.md#identify-transfers-and-connections) - --trace-time: [Time stamps](usingcurl/verbose/trace.md#time-stamps) - transfer-encoding: [Pass on transfer encoding](http/response.md#pass-on-transfer-encoding), [Chunked encoded POSTs](http/post/chunked.md#chunked-encoded-posts) - trurl: [URLs](cmdline/urls.md#urls), [trurl](cmdline/urls/trurl.md#trurl) ## U - - -U: [Install GCC for x86_64](get/win-msys2.md#install-gcc-for-x86_64), [Proxy authentication](usingcurl/proxies/auth.md#proxy-authentication) - - -u: [Install GCC for x86_64](get/win-msys2.md#install-gcc-for-x86_64), [Passwords](cmdline/passwords.md#passwords), [URLs](usingcurl/scpsftp.md#urls), [IMAP](usingcurl/reademail.md#imap), [Authentication](http/auth.md#authentication), [HTTP cheat sheet](http/cheatsheet.md#http-cheat-sheet), [Authentication](ftp.md#authentication) + - -U: [Building libcurl on MSYS2](get/win-msys2.md#building-libcurl-on-msys2), [Proxy authentication](usingcurl/proxies/auth.md#proxy-authentication) + - -u: [Building libcurl on MSYS2](get/win-msys2.md#building-libcurl-on-msys2), [Passwords](cmdline/passwords.md#passwords), [URLs](usingcurl/scpsftp.md#urls), [IMAP](usingcurl/reademail.md#imap), [Authentication](http/auth.md#authentication), [HTTP cheat sheet](http/cheatsheet.md#http-cheat-sheet), [Authentication](ftp.md#authentication) - Ubuntu: [Ubuntu and Debian](get/linux.md#ubuntu-and-debian) - URL Globbing: [Garbage in gives garbage out](cmdline.md#garbage-in-gives-garbage-out), [URL globbing](cmdline/globbing.md#url-globbing) - --url-query: [Query](cmdline/urls/query.md#query) diff --git a/mkindex.pl b/mkindex.pl index 4fa63deeb1..b3eb474bcd 100755 --- a/mkindex.pl +++ b/mkindex.pl @@ -34,22 +34,27 @@ sub folded { sub urlify { my ($fname, $section)=@_; + # convert letters to lower case $section =~ tr/[A-Z]/[a-z]/; - # remove leading dashes amd dots - $section =~ s/^[-\.]+//g; + # Convert all '<' to '-less-than' + $section =~ s/\' to '-greater-than' + $section =~ s/\>/-greater-than-/g; # remove rubbish $section =~ s/[*`'":\(\),]+//g; - # < => less-than- - $section =~ s/^\ => less-than- - $section =~ s/\>$/-greater-than/g; + # convert anything left that isn't a dash, underscore, number or letter + $section =~ s/[^_a-zA-Z0-9-]/-/g; + + # Remove starting chars that aren't a letter or underscore; + # those aren't legal for the beginning of a section ID. + $section =~ s/^[^_a-zA-Z]+//g; + + # strip trailing dash '-' characters from the section header + $section =~ s/-+$//; return "$fname#$section"; } @@ -59,18 +64,45 @@ sub single { my $depth; my $section; my $url; + my $in_code_section = 0; open(F, "<$fname"); while() { chomp; my $l=$_; - if($_ =~ /^(#[\#]*) (.*)/) { - $depth = $1; - $section = $2; - $url=urlify($fname, $section); - # print "$fname / \"$2\"\n"; - $l = $section; # use this too + # Track whether we are within a markdown code block that begins/ends with ``` + if ($_ =~ /^\`\`\`.*/) { + if ($in_code_section) { + $in_code_section = 0; + } else { + $in_code_section = 1; + } + } + + if (!$in_code_section) { + if ($_ =~ /^(#[\#]*) ([^\{]*)(\{\#(.*)\})/) { + # This section header has an explicit ID specified, e.g. "#Foo {#foo}" + $depth = $1; + $section = $2; + my $dest_id=$4; + # trim whitespace off end of section + $section =~ s/\s+$//; + + $url = "$fname#$dest_id"; + $l = $section; + } + elsif ($_ =~ /^(#[\#]*) (.*)/) { + # This section header has no explicit ID specified, e.g. "#Foo" + $depth = $1; + $section = $2; + + # trim whitespace off end of section + $section =~ s/\s+$//; + + $url=urlify($fname, $section); + $l = $section; # use this too + } } my @words = split(/[ \(\)]+/, $_); @@ -84,6 +116,7 @@ sub single { } } } + # check longer words foreach my $w (@lwords) { if(folded($l) =~ /$w/) { @@ -102,7 +135,7 @@ sub single { single($f); } -print "# Index\n\n"; +print "# Index {#everything-curl-index}\n\n"; sub sorting { my ($s) = @_;