From d49ad5951b2df1ddd5426eaa4b2f17c7498ecf35 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Tue, 25 Apr 2023 14:37:52 +0200 Subject: [PATCH] Update write-quote.ps1 --- Data/quotes.csv | 3 ++- Scripts/write-quote.ps1 | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Data/quotes.csv b/Data/quotes.csv index fc41bb0e..161bed58 100644 --- a/Data/quotes.csv +++ b/Data/quotes.csv @@ -7,7 +7,7 @@ Life,James M. Barrie,"Life is a long lesson in humility." Life,Bob Marley,"Love the life you live. Live the life you love." Life,Ray Bradbury,"Life is trying things to see if they work." Life,Helen Keller,"Life is either a daring adventure or nothing at all." -Life,John Lennon,"Life is what happens when you're busy making other plans" +Life,John Lennon,"Life is what happens when you're busy making other plans." Life,Jonathan Swift,"May you live all the days of your life." Misc,Abraham Lincoln,"The best thing about the future is that it only comes one day at a time." Misc,Albert Einstein,"Learn from yesterday, live for today, hope for tomorrow." @@ -37,6 +37,7 @@ Misc,William Shakespeare,"Having nothing, nothing can he lose." Misc,Tony Robbins,"The only impossible journey is the one you never begin." Misc,Ralph Waldo Emerson,"Do not go where the path may lead, go instead where there is no path and leave a trail." Misc,Margaret Mead,"Always remember that you are absolutely unique. Just like everyone else." +Misc,J.K. Rowling,"When in doubt go to the library." Success,Albert Einstein,"Try not to become a man of success, but rather try to become a man of value." Success,Steve Jobs,"If you really look closely, most overnight successes took a long time." Success,Oprah Winfrey,"You know you are on the road to success if you would do your job and not be paid for it." diff --git a/Scripts/write-quote.ps1 b/Scripts/write-quote.ps1 index 1e6f7b0d..1fa6ac5e 100755 --- a/Scripts/write-quote.ps1 +++ b/Scripts/write-quote.ps1 @@ -19,11 +19,11 @@ try { $Quote = $Table[$Index].QUOTE $Author = $Table[$Index].AUTHOR - "" - Write-Host '“'$Quote' ”' + Write-Output "" + Write-Host '“'"$Quote"'„' $Spaces = " " $Spaces = $Spaces.Substring(0, $Quote.Length - $Author.Length) - "$Spaces $($Author.toUpper())" + Write-Output "$Spaces- $($Author.toUpper())" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"