Skip to content
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

docs/_optionsall: new page #306

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ PAGES = \
tutorial.html \
mk-ca-bundle.html \
mqtt.html \
optionsall.html \
optionswhen.html \
projdocs.html \
protdocs.html \
Expand Down Expand Up @@ -265,6 +266,12 @@ optionswhen.html: _optionswhen.html optionswhen.gen
optionswhen.gen: $(DOCROOT)/options-in-versions optionswhen.pl
./optionswhen.pl $< > $@

optionsall.html: _optionsall.html optionsall.gen
$(ACTION)

optionsall.gen: $(DOCROOT)/options-in-versions alloptions.pl
./alloptions.pl $< > $@

curl.1: ../cvssource/docs/cmdline-opts/*.d
(cd ../cvssource/docs/cmdline-opts && perl gen.pl mainpage *.d) > curl.1

Expand Down
37 changes: 37 additions & 0 deletions docs/_optionsall.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#include "_doctype.html"
<html>
<head> <title>curl - When command line options were introduced</title>
#include "css.t"
#include "manpage.t"
</head>

#define CURL_DOCS
#define DOCS_MANPAGE
#define TOOL_DOCS
#define CURL_URL docs/optionswhen.html

#include "_menu.html"
#include "setup.t"

WHERE3(Docs, "/docs/", Tool, "/docs/tooldocs.html", Options when)
TITLE(When command line options were introduced)
<div class="relatedbox">
<b>Related:</b>
<br><a href="faq.html">FAQ</a>
<br><a href="httpscripting.html">HTTP Scripting</a>
<br><a href="manpage.html">Man page</a>
</div>

curl is continuously developed and new command line options are added over
time. This list shows which options that were added in which version.

<p>
[<b> <a href="optionswhen.html">sort on version</a> | <b>sort on option name</b> ]
<p>

#include "optionsall.gen"

#include "_footer.html"

</body>
</html>
2 changes: 2 additions & 0 deletions docs/_optionswhen.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
curl is continuously developed and new command line options are added over
time. This list shows which options that were added in which version.

<p>
[<b> sort on version</b> | <a href="optionsall.html">sort on option name</a> ]
<p>

#include "optionswhen.gen"
Expand Down
63 changes: 63 additions & 0 deletions docs/alloptions.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/perl
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <[email protected]>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################

# options-in-versions
my $oinv = $ARGV[0];

my $html = "manpage.html";
my $changelog = "/changes.html";

my %vers;
open(O, "<$oinv");
while(<O>) {
if($_ =~ /^(\S+) (\((.*)\)|) +([0-9.]+)/) {
my ($long, $sh, $version) = ($1, $3, $4);
$added{$long} = $version;
$short{$long} = $sh;
}
}

sub verlink {
my ($ver)= @_;
$ver =~ s/\./_/g;
return $ver;
}

sub manlink {
my ($long)= @_;
if($short{$long}) {
return $short{$long};
}
return $long;
}

print "<table>\n";
for my $long (sort {lc($a) cmp lc($b) } keys %short) {
my $v = $added{$long};
printf "<tr><td><a href=\"manpage.html#%s\">$long</a></td><td><a href=\"%s#%s\">$v</a></td></tr>\n",
manlink($long),
$changelog, verlink($v);
}
print "</table>\n";
Loading