At some point in the collective minds of people we stopped understanding the difference between attacking ideas, vs attacking the people who hold those ideas. People assume if you hate an idea someone holds by extension you hate the person. If you think an idea is idiotic then you must think people who hold the idea are idiots.
We need to get back to the place where people dont take personally when ideas are attacked.
My preferred way of making #tea is using a #FrenchPress since I use loose grounds/herbs.
Until recently, I could not figure out why when the plunger is all the way done and one tries to pour all the liquid in the beacon, there will always be some underneath the plunger. This made cleaning the soggy herbs more messy than necessary.
I finally noticed that if one pulls up the plunger ever so slightly, the leftover liquid will pour with more ease and thereby make cleanup easier.
While writing up a reflection of completing the #DailyBloggingChallenge for a year, I realized that my #Hugo based website is missing #SEO data in its head.
The [hugo clarity theme](https://github.com/chipzoller/hugo-clarity) comes with SEO though it is not activated by default and one would only realize it when going through the `layouts/partials/opengraph.html` code. There is the mention of the site param `blogDir` that is not implemented anywhere else within the code.
Thus to activate the SEO over #SchemaOrg and #JsonLd one needs to add the param `blogDir` and point it to the designated section. Using the exampleSite as a reference it would be `blogDir = "post"` in the `config/_default/params.toml` file.
#DailyBloggingChallenge (365/365)
The only caveat of the #Whisper project is that it only works on 16-bit #WAV files.
There is a #FFMPEG script on how to do it via the #terminal
`ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wav`
#DailyBloggingChallenge (364/365)
The 'Quick Start' section in the Readme sufficed for setting up.
The only thing that I had to change in the `./models/download-ggml-model.sh` script (1) is remove the option `--show-progress` on line 105. Seems like GNU Wget2 2.1.0 doesn't have that option.
Alternatively one can replace the option with
`--progress=bar --force-progress`
- 1: https://github.com/ggerganov/whisper.cpp/blob/master/models/download-ggml-model.sh
#DailyBloggingChallenge (363/365)
Instead opted in to using #Whisper which also works with #KdenLive.
Although Whisper is originally written in #Python there is a #CPP project that makes transcribing very fast. It took less than 2min to transcribe the 26 min audio clip.
#DailyBloggingChallenge (362/365)
Originally wanted to use #VOSK to transcribe the #SpeechToText. Initially tried it out over #KdenLive and its 'Speech Recognition' tool.
This took quite awhile to setup, since it is not concrete what kind file format, if any, the VOSK model should have. Additionally, the recommendation of setting up a virtual #Python environment didn't work as expect and went with the global approach.
And finally scratched the whole approach, once realizing that transcribing 26 min audio clip is taking longer than 10min.
#DailyBloggingChallenge (361/365)
Further options exist like #YouTubeDL (1) or stream via #VLC.
Sometimes I wished that creators would mirror their channels on more permissive sites like #PeerTube or #Odysee that don't hard-lock into watching ads.
#DailyBloggingChallenge (360/365)
Alternatively one could also use #FFMPEG to combine the files together via the #Terminal like
`ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac output.mp4`
Source: https://superuser.com/a/277667
#DailyBloggingChallenge (359/365)
Most of the time, I try to watch videos on #Invidious with lower resolution to speed up loading time, especially since I watch by default at twice the playback rate.
Today I realized that some instances permit the downloading of content. And even if one has to download audio and video separate, one can easily merge them together temporarily in one's favorite #VideoEditor without the need to render the end product.
#DailyBloggingChallenge (358/365)
For a long time #BraveBrowser was the trick to mitigate #YouTube ads.
Seems like YouTube has finally caught on and now going back to #Invidious.
#DailyBloggingChallenge (357/365)
This concludes the explanation behind the process of creating a #Paypal partial for #Hugo using #GoLang tricks combined with #HTML, #CSS, and #JavaScript
The #TLDR can be read at https://bf5.eu/post/guide/hugo-how-to-create-paypal-partial/
#DailyBloggingChallenge (356/365)
Now one shall add the missing checks and default cases. Further one shall add the CSS classes mentioned in 353.
The result is seen in the image.
#DailyBloggingChallenge (355/365)
Now that the partial is complete, look back at its parent. Combining the code from 345 and 348 one gets this image.
The problem of this code so far is that it doesn't check if the `$itemsOutput` exists. Further there are no checks that the array `.Params.paypalItems` has any items and there is no default case.
- 345: https://qoto.org/@barefootstache/112786991862960301
- 348: https://qoto.org/@barefootstache/112915551078887830
#DailyBloggingChallenge (354/365)
The whole code of the partial looks like in the image.
A lot of this code can be squashed to save space for the cost of readability.
#DailyBloggingChallenge (353/365)
Looking at the #JavaScript code in the image that will be parsed over #GoLang using the `printf` function.
First one creates a `change` event listener function that is bound to the id of `item-select-$uniqueID`. The `<select>`-tag shall be added the `id` attribute in line 13 (351).
Additionally a custom attribute `data-image` shall be created and placed on the `<option>`-tag in line 15 (351). This holds the path to the image value within the `paypalItems` element.
Outside of the partial the #CSS classes `selected-value` and `selected-image` need to be defined. They present the respective values from `paypalItems` element.
In the initial case, lines 10-11 will be called that take the value from the first element in the `paypalItems` array. Defined from `{{ $selectedValue := index .items 0 }}` which shall be prepended before the JavaScript code.
#DailyBloggingChallenge (352/365)
This code will generate dynamically based off of the length of the `paypalItem` or `.items` variable and use the first element of it as the default value (line 9).
Next one will extend the code with more CSS classes to ease the referencing of the JavaScript actions.
#DailyBloggingChallenge (351/365)
Now that the #PseudoCode exists, it shall be converted into #Hugo syntax as described in 349. As in the image, some #GoLang functions are used like `printf` and other Hugo functions to loop over the variables that are saved as an array type.
#DailyBloggingChallenge (350/365)
Now wrap the #HTML code (338) with a `<div>` and a #CSS class that extends the `uniqueID` (345) in its name. The pseudo code looks like the image.
- 338: https://qoto.org/@barefootstache/112786449265511946
- 345: https://qoto.org/@barefootstache/112786991862960301
#DailyBloggingChallenge (349/365)
Further within the partial, since `safeHTML` will be used one can parse string using #HTML and #JavaScript syntax within #GoLang. As an example
`{{ $output := "" }}`
`{{ $output = print $output "<span>Example</span>" }}`
`{{ return $output }}`
This creates a `<span>`-tag with the text `Example` after `safeHTML` pipe is applied.
I am a strong proponent of leaving this planet better behind than when I arrived on it. Thus to get the most bang for a lifetime my key focus is #longevity which I attempt to achieve with #nutrition specifically #plantbased.
Longevity is good and all as long as you are not frail and weak. Ideally would be to die young at an old age. Thus I incorporate tactics from #biohacking and #primalfitness. Additionally I am an advocate of #wildcrafting, which is a super set of #herbalism.
Studied many fields of science like maths or statistics, though the constant was always computer science.
Currently working as a fullstack web developer, though prefer to call myself a #SoftwareCrafter.
The goal of my side projects is to practice #GreenDevelopement meaning to create mainly static websites. The way the internet was intended to be.
On the artistic side, to dub all content under the Creative Commons license. Thereby, ideally, only using tools and resources that are #FLOSS #OpenSource. #nobot