mirror of
https://github.com/curl/curl.git
synced 2026-05-14 08:16:20 +03:00
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md, as the documentation is now markdown-looking. - made the parser treat 4-space indents as quotes - switch to building the curl.1 manpage using the "mainpage.idx" file, which lists the files to include to generate it, instead of using the previous page-footer/headers. Also, those files are now also .md ones, using the same format. I gave them underscore prefixes to make them sort separately: _NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md, _VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md, _OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md, _EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md - updated test cases accordingly Closes #12751
This commit is contained in:
parent
dfe34d2559
commit
2494b8dd51
295 changed files with 3963 additions and 1834 deletions
52
.github/scripts/cleancmd.pl
vendored
Executable file
52
.github/scripts/cleancmd.pl
vendored
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/perl
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# SPDX-License-Identifier: curl
|
||||
#
|
||||
# Input: a cmdline docs markdown, it gets modfied *in place*
|
||||
#
|
||||
# The main purpose is to strip off the leading meta-data part, but also to
|
||||
# clean up whatever else the spell checker might have a problem with that we
|
||||
# still deem is fine.
|
||||
|
||||
my $header = 1;
|
||||
while(1) {
|
||||
# set this if the markdown has no meta-data header to skip
|
||||
if($ARGV[0] eq "--no-header") {
|
||||
shift @ARGV;
|
||||
$header = 0;
|
||||
}
|
||||
else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
my $f = $ARGV[0];
|
||||
|
||||
open(F, "<$f") or die;
|
||||
|
||||
my $ignore = $header;
|
||||
my $sepcount = 0;
|
||||
my @out;
|
||||
while(<F>) {
|
||||
if(/^---/ && $header) {
|
||||
if(++$sepcount == 2) {
|
||||
$ignore = 0;
|
||||
}
|
||||
next;
|
||||
}
|
||||
next if($ignore);
|
||||
|
||||
# strip out all long command line options
|
||||
$_ =~ s/--[a-z0-9-]+//g;
|
||||
|
||||
# strip out https URLs, we don't want them spellchecked
|
||||
$_ =~ s!https://[a-z0-9\#_/.-]+!!gi;
|
||||
|
||||
push @out, $_;
|
||||
}
|
||||
close(F);
|
||||
|
||||
open(O, ">$f") or die;
|
||||
print O @out;
|
||||
close(O);
|
||||
2
.github/scripts/spellcheck.words
vendored
2
.github/scripts/spellcheck.words
vendored
|
|
@ -50,6 +50,7 @@ backend
|
|||
backends
|
||||
backoff
|
||||
backticks
|
||||
balancers
|
||||
Baratov
|
||||
basename
|
||||
bashrc
|
||||
|
|
@ -445,6 +446,7 @@ Makefile
|
|||
makefiles
|
||||
malloc
|
||||
mallocs
|
||||
manpage
|
||||
maprintf
|
||||
Marek
|
||||
Mavrogiannopoulos
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue