From 33e36008ed7e1d4bba05d661c1432079932118ee Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Mon, 25 Oct 2021 16:33:14 +0200 Subject: [PATCH] Add open-amazon.ps1 and open-facebook.ps1 --- Data/scripts.csv | 2 ++ Docs/open-amazon.md | 26 ++++++++++++++++++++++++++ Docs/open-facebook.md | 26 ++++++++++++++++++++++++++ README.md | 2 ++ Scripts/open-amazon.ps1 | 20 ++++++++++++++++++++ Scripts/open-facebook.ps1 | 20 ++++++++++++++++++++ 6 files changed, 96 insertions(+) create mode 100644 Docs/open-amazon.md create mode 100644 Docs/open-facebook.md create mode 100755 Scripts/open-amazon.ps1 create mode 100755 Scripts/open-facebook.ps1 diff --git a/Data/scripts.csv b/Data/scripts.csv index e3d6c088..3ddf3cce 100644 --- a/Data/scripts.csv +++ b/Data/scripts.csv @@ -159,12 +159,14 @@ locate-zip-code.ps1, Prints the geographic location of the given zip-code make-install.ps1, Installs built executables and libs to the installation directory moon.ps1, Prints the current moon phase mute-audio.ps1, Mutes the audio device +open-amazon.ps1, Opens Amazon's website open-browser.ps1, Starts the default Web browser open-calculator.ps1, Starts the calculator program open-c-drive.ps1, Opens the C: drive folder open-downloads-folder.ps1, Opens the user's downloads folder open-dropbox-folder.ps1, Opens the user's Dropbox folder open-email-client.ps1, Starts the default email client +open-facebook.ps1, Opens Facebook's website open-file-explorer.ps1, Opens the File Explorer open-google-contacts.ps1, Opens Google Contacts open-google-earth.ps1, Opens Google Earth diff --git a/Docs/open-amazon.md b/Docs/open-amazon.md new file mode 100644 index 00000000..732ac80c --- /dev/null +++ b/Docs/open-amazon.md @@ -0,0 +1,26 @@ +## open-amazon.ps1 - Opens Amazon's website + +This script starts the Web browser and opens the Amazon website. + +## Parameters +```powershell +open-amazon.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./open-amazon + +``` + +## Notes +Author: Markus Fleschutz · License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +*Generated by convert-ps2md.ps1 using the comment-based help of open-amazon.ps1* diff --git a/Docs/open-facebook.md b/Docs/open-facebook.md new file mode 100644 index 00000000..9a420fd7 --- /dev/null +++ b/Docs/open-facebook.md @@ -0,0 +1,26 @@ +## open-facebook.ps1 - Opens Facebook's website + +This script starts the Web browser and opens Facebook's website. + +## Parameters +```powershell +open-facebook.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./open-facebook + +``` + +## Notes +Author: Markus Fleschutz · License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +*Generated by convert-ps2md.ps1 using the comment-based help of open-facebook.ps1* diff --git a/README.md b/README.md index f332d6f1..c03536a5 100644 --- a/README.md +++ b/README.md @@ -114,12 +114,14 @@ Mega Collection of PowerShell Scripts | [enable-god-mode.ps1](Scripts/enable-god-mode.ps1) | Enables the god mode (adds a new icon to the desktop) | [Help](Docs/enable-god-mode.md) | | [list-clipboard.ps1](Scripts/list-clipboard.ps1) | Lists the contents of the clipboard | [Help](Docs/list-clipboard.md) | | [new-email.ps1](Scripts/new-email.ps1) | Starts the default email client to write a new email | [Help](Docs/new-email.md) | +| [open-amazon.ps1](Scripts/open-amazon.ps1) | Opens Amazon's website | [Help](Docs/open-amazon.md) | | [open-browser.ps1](Scripts/open-browser.ps1) | Starts the default Web browser | [Help](Docs/open-browser.md) | | [open-calculator.ps1](Scripts/open-calculator.ps1) | Starts the calculator program | [Help](Docs/open-calculator.md) | | [open-c-drive.ps1](Scripts/open-c-drive.ps1) | Opens the C: drive folder | [Help](Docs/open-c-drive.md) | | [open-downloads-folders.ps1](Scripts/open-downloads-folder.ps1) | Opens the user's downloads folder | [Help](Docs/open-downloads-folder.md) | | [open-dropbox-folder.ps1](Scripts/open-dropbox-folder.ps1) | Opens the user's Dropbox folder | [Help](Docs/open-dropbox-folder.md) | | [open-email-client.ps1](Scripts/open-browser.ps1) | Starts the default email client | [Help](Docs/open-email-client.md) | +| [open-facebook.ps1](Scripts/open-facebook.ps1) | Opens Facebook's website | [Help](Docs/open-facebook.md) | | [open-file-explorer.ps1](Scripts/open-file-explorer.ps1) | Opens the File Explorer | [Help](Docs/open-file-explorer.md) | | [open-google-contacts.ps1](Scripts/open-google-contacts.ps1) | Opens Google Contacts | [Help](Docs/open-google-contacts.md) | | [open-google-earth.ps1](Scripts/open-google-earth.ps1) | Opens Google Earth | [Help](Docs/open-google-earth.md) | diff --git a/Scripts/open-amazon.ps1 b/Scripts/open-amazon.ps1 new file mode 100755 index 00000000..3b7110c0 --- /dev/null +++ b/Scripts/open-amazon.ps1 @@ -0,0 +1,20 @@ +<# +.SYNOPSIS + Opens Amazon's website +.DESCRIPTION + This script starts the Web browser and opens the Amazon website. +.EXAMPLE + PS> ./open-amazon +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +try { + & "$PSScriptRoot/open-browser.ps1" "https://www.amazon.com" + exit 0 # success +} catch { + "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" + exit 1 +} diff --git a/Scripts/open-facebook.ps1 b/Scripts/open-facebook.ps1 new file mode 100755 index 00000000..b241d676 --- /dev/null +++ b/Scripts/open-facebook.ps1 @@ -0,0 +1,20 @@ +<# +.SYNOPSIS + Opens Facebook's website +.DESCRIPTION + This script starts the Web browser and opens Facebook's website. +.EXAMPLE + PS> ./open-facebook +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +try { + & "$PSScriptRoot/open-browser.ps1" "https://www.facebook.com" + exit 0 # success +} catch { + "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" + exit 1 +}