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

Update Docs #1471

Merged
merged 75 commits into from
Sep 17, 2021
Merged

Update Docs #1471

merged 75 commits into from
Sep 17, 2021

Conversation

vedantmgoyal9
Copy link
Contributor

@vedantmgoyal9 vedantmgoyal9 commented Sep 15, 2021


Microsoft Reviewers: Open in CodeFlow

@github-actions
Copy link

github-actions bot commented Sep 15, 2021

@check-spelling-bot Report

Unrecognized words, please review:

  • IJ
Previously acknowledged words that are now absent ATL contosa contosainstaller Globals IInstalled mytool
To accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands

... in a clone of the git@github.com:vedantmgoyal2009/winget-cli.git repository
on the patch-2 branch:

update_files() {
perl -e '
my @expect_files=qw('".github/actions/spelling/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"$patch_remove"');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"$patch_add"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
}

comment_json=$(mktemp)
curl -L -s -S \
  --header "Content-Type: application/json" \
  "https://api.github.com/repos/microsoft/winget-cli/issues/comments/919977145" > "$comment_json"
comment_body=$(mktemp)
jq -r .body < "$comment_json" > $comment_body
rm $comment_json

patch_remove=$(perl -ne 'next unless s{^</summary>(.*)</details>$}{$1}; print' < "$comment_body")
  

patch_add=$(perl -e '$/=undef;
$_=<>;
s{<details>.*}{}s;
s{^#.*}{};
s{\n##.*}{};
s{(?:^|\n)\s*\*}{}g;
s{\s+}{ }g;
print' < "$comment_body")
  
update_files
rm $comment_body
git add -u

@vedantmgoyal9
Copy link
Contributor Author

vedantmgoyal9 commented Sep 15, 2021

I don't think you intended to delete doc/ManifestSpecv0.1.md

I deleted it because I think it is outdated and not used after the 1.0 schema came out. Should I revert that commit?

@denelon
Copy link
Contributor

denelon commented Sep 15, 2021

OK, since that specification is no longer supported.

@github-actions
Copy link

github-actions bot commented Sep 16, 2021

@check-spelling-bot Report

Unrecognized words, please review:

  • commande
  • onglets
  • rience
  • une
Previously acknowledged words that are now absent ATL contosa contosainstaller Globals IInstalled mytool px WSL
To accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands

... in a clone of the git@github.com:vedantmgoyal2009/winget-cli.git repository
on the patch-2 branch:

update_files() {
perl -e '
my @expect_files=qw('".github/actions/spelling/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"$patch_remove"');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"$patch_add"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
}

comment_json=$(mktemp)
curl -L -s -S \
  --header "Content-Type: application/json" \
  "https://api.github.com/repos/microsoft/winget-cli/issues/comments/920629058" > "$comment_json"
comment_body=$(mktemp)
jq -r .body < "$comment_json" > $comment_body
rm $comment_json

patch_remove=$(perl -ne 'next unless s{^</summary>(.*)</details>$}{$1}; print' < "$comment_body")
  

patch_add=$(perl -e '$/=undef;
$_=<>;
s{<details>.*}{}s;
s{^#.*}{};
s{\n##.*}{};
s{(?:^|\n)\s*\*}{}g;
s{\s+}{ }g;
print' < "$comment_body")
  
update_files
rm $comment_body
git add -u

@vedantmgoyal9
Copy link
Contributor Author

vedantmgoyal9 commented Sep 16, 2021

@denelon I have fixed the issue as lechacon suggested. I'm ready for review again 😃.

Copy link
Contributor

@jedieaston jedieaston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you convert that MP4 file to a gif? MP4s aren't autoplayed by GitHub (and probably not autoplayed by docs.microsoft.com either...)

@ghost ghost added the Needs-Author-Feedback Issue needs attention from issue or PR author label Sep 16, 2021
@denelon
Copy link
Contributor

denelon commented Sep 16, 2021

Great call out @jedieaston. I don't think the tool was quite ready when that was written.

@denelon
Copy link
Contributor

denelon commented Sep 16, 2021

@vedantmgoyal2009 Do you want to add a blurb about being able to use the wingetcreate utility, or go ahead and get this PR approved and merged?

@ghost ghost removed the Needs-Author-Feedback Issue needs attention from issue or PR author label Sep 17, 2021
@github-actions
Copy link

github-actions bot commented Sep 17, 2021

@check-spelling-bot Report

Unrecognized words, please review:

  • wingetcreate
  • yamlcreateps
Previously acknowledged words that are now absent ATL contosa contosainstaller Globals IInstalled mytool px WSL
To accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands

... in a clone of the git@github.com:vedantmgoyal2009/winget-cli.git repository
on the patch-2 branch:

update_files() {
perl -e '
my @expect_files=qw('".github/actions/spelling/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"$patch_remove"');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"$patch_add"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
}

comment_json=$(mktemp)
curl -L -s -S \
  --header "Content-Type: application/json" \
  "https://api.github.com/repos/microsoft/winget-cli/issues/comments/921508548" > "$comment_json"
comment_body=$(mktemp)
jq -r .body < "$comment_json" > $comment_body
rm $comment_json

patch_remove=$(perl -ne 'next unless s{^</summary>(.*)</details>$}{$1}; print' < "$comment_body")
  

patch_add=$(perl -e '$/=undef;
$_=<>;
s{<details>.*}{}s;
s{^#.*}{};
s{\n##.*}{};
s{(?:^|\n)\s*\*}{}g;
s{\s+}{ }g;
print' < "$comment_body")
  
update_files
rm $comment_body
git add -u

@github-actions
Copy link

github-actions bot commented Sep 17, 2021

@check-spelling-bot Report

Unrecognized words, please review:

  • wingetcreate
  • yamlcreateps
Previously acknowledged words that are now absent ATL contosa contosainstaller Globals IInstalled mytool px WSL
To accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands

... in a clone of the git@github.com:vedantmgoyal2009/winget-cli.git repository
on the patch-2 branch:

update_files() {
perl -e '
my @expect_files=qw('".github/actions/spelling/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"$patch_remove"');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"$patch_add"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
}

comment_json=$(mktemp)
curl -L -s -S \
  --header "Content-Type: application/json" \
  "https://api.github.com/repos/microsoft/winget-cli/issues/comments/921509015" > "$comment_json"
comment_body=$(mktemp)
jq -r .body < "$comment_json" > $comment_body
rm $comment_json

patch_remove=$(perl -ne 'next unless s{^</summary>(.*)</details>$}{$1}; print' < "$comment_body")
  

patch_add=$(perl -e '$/=undef;
$_=<>;
s{<details>.*}{}s;
s{^#.*}{};
s{\n##.*}{};
s{(?:^|\n)\s*\*}{}g;
s{\s+}{ }g;
print' < "$comment_body")
  
update_files
rm $comment_body
git add -u

@vedantmgoyal9
Copy link
Contributor Author

@vedantmgoyal2009 Do you want to add a blurb about being able to use the wingetcreate utility, or go ahead and get this PR approved and merged?

@denelon I have added a section about using the tools. Also, I have converted the mp4 file to gif.

@denelon
Copy link
Contributor

denelon commented Sep 17, 2021

@vedantmgoyal2009 the expect.txt still shows the new words at the bottom of the file rather than alphabetically inline.

@vedantmgoyal9
Copy link
Contributor Author

@denelon Really sorry for that. Your previous message got missed with github-actions's spelling comments.

.github/actions/spelling/expect.txt Outdated Show resolved Hide resolved
doc/windows/package-manager/index.md Show resolved Hide resolved
doc/windows/package-manager/winget/index.md Show resolved Hide resolved
@denelon denelon merged commit 75e7ae0 into microsoft:master Sep 17, 2021
@vedantmgoyal9 vedantmgoyal9 deleted the patch-2 branch September 17, 2021 14:46
@vedantmgoyal9
Copy link
Contributor Author

I think you pressed the wrong button. Should I create another PR with your suggestions?

@denelon
Copy link
Contributor

denelon commented Sep 17, 2021

@vedantmgoyal2009. I'm not really a fan of huge PRs. Smaller ones are far easier to validate and accept. This way at least the bulk of what you did is updated, and we can continue making incremental improvements. Documentation is one of the most valuable things a contributor can make on a project. Thanks for all of the hard work!

Yes, please make another PR 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants