#yq — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #yq, aggregated by home.social.
-
Turns out that not only do Actions runners come with jq preinstalled, but yq is there too.
hollycummins.com/using-yq-in-g…
There was a featured snippet for “is yq available on GitHub actions,” which directed me to a marketplace installer. The yq project itself had a marketplace installer. Clearly, I needed to install it before using it. Right?
My colleague George Gastaldi looked at what I’d done, and pointed out yq was available on the runners. This matters, because we try and limit our use of external, ‘non-official’ actions, for supply chain security reasons.
So I searched again to confirm, and … still found very little. To actually confirm, I had to merge and experiment. And, indeed, the GitHub runners do come with yq pre-installed. They’ve had yq since 2021.
#yaml #yq #jq #GithubActions
#CICD
#ContinuousIntegration
#ContinuousDeployment -
Turns out that not only do Actions runners come with jq preinstalled, but yq is there too.
hollycummins.com/using-yq-in-g…
There was a featured snippet for “is yq available on GitHub actions,” which directed me to a marketplace installer. The yq project itself had a marketplace installer. Clearly, I needed to install it before using it. Right?
My colleague George Gastaldi looked at what I’d done, and pointed out yq was available on the runners. This matters, because we try and limit our use of external, ‘non-official’ actions, for supply chain security reasons.
So I searched again to confirm, and … still found very little. To actually confirm, I had to merge and experiment. And, indeed, the GitHub runners do come with yq pre-installed. They’ve had yq since 2021.
#yaml #yq #jq #GithubActions
#CICD
#ContinuousIntegration
#ContinuousDeployment -
Turns out that not only do Actions runners come with jq preinstalled, but yq is there too.
hollycummins.com/using-yq-in-g…
There was a featured snippet for “is yq available on GitHub actions,” which directed me to a marketplace installer. The yq project itself had a marketplace installer. Clearly, I needed to install it before using it. Right?
My colleague George Gastaldi looked at what I’d done, and pointed out yq was available on the runners. This matters, because we try and limit our use of external, ‘non-official’ actions, for supply chain security reasons.
So I searched again to confirm, and … still found very little. To actually confirm, I had to merge and experiment. And, indeed, the GitHub runners do come with yq pre-installed. They’ve had yq since 2021.
#yaml #yq #jq #GithubActions
#CICD
#ContinuousIntegration
#ContinuousDeployment -
Turns out that not only do Actions runners come with jq preinstalled, but yq is there too.
hollycummins.com/using-yq-in-g…
There was a featured snippet for “is yq available on GitHub actions,” which directed me to a marketplace installer. The yq project itself had a marketplace installer. Clearly, I needed to install it before using it. Right?
My colleague George Gastaldi looked at what I’d done, and pointed out yq was available on the runners. This matters, because we try and limit our use of external, ‘non-official’ actions, for supply chain security reasons.
So I searched again to confirm, and … still found very little. To actually confirm, I had to merge and experiment. And, indeed, the GitHub runners do come with yq pre-installed. They’ve had yq since 2021.
#yaml #yq #jq #GithubActions
#CICD
#ContinuousIntegration
#ContinuousDeployment -
Turns out that not only do Actions runners come with jq preinstalled, but yq is there too.
hollycummins.com/using-yq-in-g…
There was a featured snippet for “is yq available on GitHub actions,” which directed me to a marketplace installer. The yq project itself had a marketplace installer. Clearly, I needed to install it before using it. Right?
My colleague George Gastaldi looked at what I’d done, and pointed out yq was available on the runners. This matters, because we try and limit our use of external, ‘non-official’ actions, for supply chain security reasons.
So I searched again to confirm, and … still found very little. To actually confirm, I had to merge and experiment. And, indeed, the GitHub runners do come with yq pre-installed. They’ve had yq since 2021.
#yaml #yq #jq #GithubActions
#CICD
#ContinuousIntegration
#ContinuousDeployment -
So, in order to do the cleanups, I can use `yq`'s excellent filtering abilities. For example I have a list of verbatim API endpoints like `/token` and `/endpoint/{id}` in `allowed_apis.lst`:
```
yq '(load_str("allowed_apis.lst") | split("\n")) as $l | .paths |= with_entries(select(.key as $k | $l | any_c(. == $k)))' api.yaml > api_cleaned_paths.yaml
```And similar approach for models, except for `any_c(..)` I have to use `all_c(. != $k)`.
-
So, in order to do the cleanups, I can use `yq`'s excellent filtering abilities. For example I have a list of verbatim API endpoints like `/token` and `/endpoint/{id}` in `allowed_apis.lst`:
```
yq '(load_str("allowed_apis.lst") | split("\n")) as $l | .paths |= with_entries(select(.key as $k | $l | any_c(. == $k)))' api.yaml > api_cleaned_paths.yaml
```And similar approach for models, except for `any_c(..)` I have to use `all_c(. != $k)`.
-
So, in order to do the cleanups, I can use `yq`'s excellent filtering abilities. For example I have a list of verbatim API endpoints like `/token` and `/endpoint/{id}` in `allowed_apis.lst`:
```
yq '(load_str("allowed_apis.lst") | split("\n")) as $l | .paths |= with_entries(select(.key as $k | $l | any_c(. == $k)))' api.yaml > api_cleaned_paths.yaml
```And similar approach for models, except for `any_c(..)` I have to use `all_c(. != $k)`.
-
So, in order to do the cleanups, I can use `yq`'s excellent filtering abilities. For example I have a list of verbatim API endpoints like `/token` and `/endpoint/{id}` in `allowed_apis.lst`:
```
yq '(load_str("allowed_apis.lst") | split("\n")) as $l | .paths |= with_entries(select(.key as $k | $l | any_c(. == $k)))' api.yaml > api_cleaned_paths.yaml
```And similar approach for models, except for `any_c(..)` I have to use `all_c(. != $k)`.
-
So, in order to do the cleanups, I can use `yq`'s excellent filtering abilities. For example I have a list of verbatim API endpoints like `/token` and `/endpoint/{id}` in `allowed_apis.lst`:
```
yq '(load_str("allowed_apis.lst") | split("\n")) as $l | .paths |= with_entries(select(.key as $k | $l | any_c(. == $k)))' api.yaml > api_cleaned_paths.yaml
```And similar approach for models, except for `any_c(..)` I have to use `all_c(. != $k)`.
-
So, workflow is following:
0. Manually fix the OpenAPI `bundle.yaml` - this was actually something that caused the tool to exit with error...
1. Filter out unwanted APIs with `yq`
2. Run the openapi-generator-cli validator to get the list of unused models/types
3. Use `sed` to parse the list of unused models/types
4. Use `yq` again to filter out the unneeded models.
5. Generate the "minimum" client and models :) -
So, workflow is following:
0. Manually fix the OpenAPI `bundle.yaml` - this was actually something that caused the tool to exit with error...
1. Filter out unwanted APIs with `yq`
2. Run the openapi-generator-cli validator to get the list of unused models/types
3. Use `sed` to parse the list of unused models/types
4. Use `yq` again to filter out the unneeded models.
5. Generate the "minimum" client and models :) -
So, workflow is following:
0. Manually fix the OpenAPI `bundle.yaml` - this was actually something that caused the tool to exit with error...
1. Filter out unwanted APIs with `yq`
2. Run the openapi-generator-cli validator to get the list of unused models/types
3. Use `sed` to parse the list of unused models/types
4. Use `yq` again to filter out the unneeded models.
5. Generate the "minimum" client and models :) -
So, workflow is following:
0. Manually fix the OpenAPI `bundle.yaml` - this was actually something that caused the tool to exit with error...
1. Filter out unwanted APIs with `yq`
2. Run the openapi-generator-cli validator to get the list of unused models/types
3. Use `sed` to parse the list of unused models/types
4. Use `yq` again to filter out the unneeded models.
5. Generate the "minimum" client and models :) -
So, workflow is following:
0. Manually fix the OpenAPI `bundle.yaml` - this was actually something that caused the tool to exit with error...
1. Filter out unwanted APIs with `yq`
2. Run the openapi-generator-cli validator to get the list of unused models/types
3. Use `sed` to parse the list of unused models/types
4. Use `yq` again to filter out the unneeded models.
5. Generate the "minimum" client and models :) -
So.. looked into this OpenAPI thing to query an API and eventually found a fancy tool - openapi-generator - https://openapi-generator.tech/.
With this I can generate a ton of useful boilerplate in almost every programming language.But what if I only want to communicate only two of the endpoints?!
So, over a few days I've been part-time tinkering with `yq` and `sed` to cut down the autogenerated code to include just the minimum by filtering out the unwanted APIs and data types...
-
So.. looked into this OpenAPI thing to query an API and eventually found a fancy tool - openapi-generator - https://openapi-generator.tech/.
With this I can generate a ton of useful boilerplate in almost every programming language.But what if I only want to communicate only two of the endpoints?!
So, over a few days I've been part-time tinkering with `yq` and `sed` to cut down the autogenerated code to include just the minimum by filtering out the unwanted APIs and data types...
-
So.. looked into this OpenAPI thing to query an API and eventually found a fancy tool - openapi-generator - https://openapi-generator.tech/.
With this I can generate a ton of useful boilerplate in almost every programming language.But what if I only want to communicate only two of the endpoints?!
So, over a few days I've been part-time tinkering with `yq` and `sed` to cut down the autogenerated code to include just the minimum by filtering out the unwanted APIs and data types...
-
So.. looked into this OpenAPI thing to query an API and eventually found a fancy tool - openapi-generator - https://openapi-generator.tech/.
With this I can generate a ton of useful boilerplate in almost every programming language.But what if I only want to communicate only two of the endpoints?!
So, over a few days I've been part-time tinkering with `yq` and `sed` to cut down the autogenerated code to include just the minimum by filtering out the unwanted APIs and data types...
-
So.. looked into this OpenAPI thing to query an API and eventually found a fancy tool - openapi-generator - https://openapi-generator.tech/.
With this I can generate a ton of useful boilerplate in almost every programming language.But what if I only want to communicate only two of the endpoints?!
So, over a few days I've been part-time tinkering with `yq` and `sed` to cut down the autogenerated code to include just the minimum by filtering out the unwanted APIs and data types...
-
CW: shell script in post
YAML to XLSX pipeline 🙈
This was fun, but I don't want to do it again.
curl -s https://raw.githubusercontent.com/AKVorrat/dearmep/refs/heads/main/server/dearmep/example-config.yaml \
| uvx yq '(.l10n.strings + .l10n.frontend_strings) | to_entries | map(select(.value | type == "object")) | map({id: .key} + .value)' \
| uvx --from csvkit in2csv -f json > strings.csv \
&& libreoffice --headless --infilter=CSV:44,34,76,1 --convert-to xlsx strings.csv#YAML #CSV #XSLX #jq #yq #CSVKit #LibreOffice #CLI #ShellScript #bash
-
CW: shell script in post
YAML to XLSX pipeline 🙈
This was fun, but I don't want to do it again.
curl -s https://raw.githubusercontent.com/AKVorrat/dearmep/refs/heads/main/server/dearmep/example-config.yaml \
| uvx yq '(.l10n.strings + .l10n.frontend_strings) | to_entries | map(select(.value | type == "object")) | map({id: .key} + .value)' \
| uvx --from csvkit in2csv -f json > strings.csv \
&& libreoffice --headless --infilter=CSV:44,34,76,1 --convert-to xlsx strings.csv#YAML #CSV #XSLX #jq #yq #CSVKit #LibreOffice #CLI #ShellScript #bash
-
CW: shell script in post
YAML to XLSX pipeline 🙈
This was fun, but I don't want to do it again.
curl -s https://raw.githubusercontent.com/AKVorrat/dearmep/refs/heads/main/server/dearmep/example-config.yaml \
| uvx yq '(.l10n.strings + .l10n.frontend_strings) | to_entries | map(select(.value | type == "object")) | map({id: .key} + .value)' \
| uvx --from csvkit in2csv -f json > strings.csv \
&& libreoffice --headless --infilter=CSV:44,34,76,1 --convert-to xlsx strings.csv#YAML #CSV #XSLX #jq #yq #CSVKit #LibreOffice #CLI #ShellScript #bash
-
CW: shell script in post
YAML to XLSX pipeline 🙈
This was fun, but I don't want to do it again.
curl -s https://raw.githubusercontent.com/AKVorrat/dearmep/refs/heads/main/server/dearmep/example-config.yaml \
| uvx yq '(.l10n.strings + .l10n.frontend_strings) | to_entries | map(select(.value | type == "object")) | map({id: .key} + .value)' \
| uvx --from csvkit in2csv -f json > strings.csv \
&& libreoffice --headless --infilter=CSV:44,34,76,1 --convert-to xlsx strings.csv#YAML #CSV #XSLX #jq #yq #CSVKit #LibreOffice #CLI #ShellScript #bash
-
CW: shell script in post
YAML to XLSX pipeline 🙈
This was fun, but I don't want to do it again.
curl -s https://raw.githubusercontent.com/AKVorrat/dearmep/refs/heads/main/server/dearmep/example-config.yaml \
| uvx yq '(.l10n.strings + .l10n.frontend_strings) | to_entries | map(select(.value | type == "object")) | map({id: .key} + .value)' \
| uvx --from csvkit in2csv -f json > strings.csv \
&& libreoffice --headless --infilter=CSV:44,34,76,1 --convert-to xlsx strings.csv#YAML #CSV #XSLX #jq #yq #CSVKit #LibreOffice #CLI #ShellScript #bash
-
#HoyAprendí que existe "yq", una aplicación para línea de comandos, que permite procesar archivos YAML usando la misma sintaxis que usa "jq", al procesar archivos JSON.
Me está sirviendo para leer configuraciones complejas para scripts en Bash.
-
#HoyAprendí que existe "yq", una aplicación para línea de comandos, que permite procesar archivos YAML usando la misma sintaxis que usa "jq", al procesar archivos JSON.
Me está sirviendo para leer configuraciones complejas para scripts en Bash.
-
#HoyAprendí que existe "yq", una aplicación para línea de comandos, que permite procesar archivos YAML usando la misma sintaxis que usa "jq", al procesar archivos JSON.
Me está sirviendo para leer configuraciones complejas para scripts en Bash.
-
Programming By Stealth is officially spun off as a standalone podcast with new music, a new intro, and a direct link to @bart’s fabulous tutorial shownotes!
Instalment 169 of X — Advanced YAML Topics https://pbs.bartificer.net/pbs169
-
Programming By Stealth is officially spun off as a standalone podcast with new music, a new intro, and a direct link to @bart’s fabulous tutorial shownotes!
Instalment 169 of X — Advanced YAML Topics https://pbs.bartificer.net/pbs169
-
Programming By Stealth is officially spun off as a standalone podcast with new music, a new intro, and a direct link to @bart’s fabulous tutorial shownotes!
Instalment 169 of X — Advanced YAML Topics https://pbs.bartificer.net/pbs169
-
Programming By Stealth is officially spun off as a standalone podcast with new music, a new intro, and a direct link to @bart’s fabulous tutorial shownotes!
Instalment 169 of X — Advanced YAML Topics https://pbs.bartificer.net/pbs169
-
Programming By Stealth is officially spun off as a standalone podcast with new music, a new intro, and a direct link to @bart’s fabulous tutorial shownotes!
Instalment 169 of X — Advanced YAML Topics https://pbs.bartificer.net/pbs169
-
🆕 📜: Get webmentions with shell script using jq & yq
Here is my new blog post of how I manage on website to fetch and sync new webmentions, using shell script and `jq` and `yq` to parse and set the data
-
🆕 📜: Get webmentions with shell script using jq & yq
Here is my new blog post of how I manage on website to fetch and sync new webmentions, using shell script and `jq` and `yq` to parse and set the data
-
Transcripción de la charla "Conectando Soluciones" de OSiUX en FLISoL CABA 2024
#Bash #Boxart #Charla #Consola #Debian #Eventol #FLISoL #Git #GraphViz #grep #ImageMagick #Journal #jq #jrnl #JSON #Linux #Markdown #RegEx #shellrun #Shellrun #Talk #Terminal #TTY #txt2md #Vim #yq
https://osiux.com/2024-04-27-flisol-caba-2024-conectando-soluciones.html
-
Transcripción de la charla "Conectando Soluciones" de OSiUX en FLISoL CABA 2024
#Bash #Boxart #Charla #Consola #Debian #Eventol #FLISoL #Git #GraphViz #grep #ImageMagick #Journal #jq #jrnl #JSON #Linux #Markdown #RegEx #shellrun #Shellrun #Talk #Terminal #TTY #txt2md #Vim #yq
https://osiux.com/2024-04-27-flisol-caba-2024-conectando-soluciones.html
-
Transcripción de la charla "Conectando Soluciones" de OSiUX en FLISoL CABA 2024
#Bash #Boxart #Charla #Consola #Debian #Eventol #FLISoL #Git #GraphViz #grep #ImageMagick #Journal #jq #jrnl #JSON #Linux #Markdown #RegEx #shellrun #Shellrun #Talk #Terminal #TTY #txt2md #Vim #yq
https://osiux.com/2024-04-27-flisol-caba-2024-conectando-soluciones.html
-
Transcripción de la charla "Conectando Soluciones" de OSiUX en FLISoL CABA 2024
#Bash #Boxart #Charla #Consola #Debian #Eventol #FLISoL #Git #GraphViz #grep #ImageMagick #Journal #jq #jrnl #JSON #Linux #Markdown #RegEx #shellrun #Shellrun #Talk #Terminal #TTY #txt2md #Vim #yq
https://osiux.com/2024-04-27-flisol-caba-2024-conectando-soluciones.html
-
I'm making a concerted effort to switch flat config files to formatted YAML in my various scripts and utilities. I've been using Mike Farah's yq for my random shell scripts, excellent!
#yaml #developer #shell #yq -
I'm making a concerted effort to switch flat config files to formatted YAML in my various scripts and utilities. I've been using Mike Farah's yq for my random shell scripts, excellent!
#yaml #developer #shell #yq -
I half sort of found a way to do this with #Infisical and #yq, by using props annotation and parsing it through yq:
infisical export --env=dev -fyaml | yq -pprops -o yaml
This get it's into properly formatted yaml. yq can also do the same in the opposite direction to import back into infisical.
And to support having .'s in keys, use \\x2e and pass it through echo:
echo -e "$(infisical export --env=dev -fyaml | yq -pprops -o yaml)"
-
I half sort of found a way to do this with #Infisical and #yq, by using props annotation and parsing it through yq:
infisical export --env=dev -fyaml | yq -pprops -o yaml
This get it's into properly formatted yaml. yq can also do the same in the opposite direction to import back into infisical.
And to support having .'s in keys, use \\x2e and pass it through echo:
echo -e "$(infisical export --env=dev -fyaml | yq -pprops -o yaml)"
-
I half sort of found a way to do this with #Infisical and #yq, by using props annotation and parsing it through yq:
infisical export --env=dev -fyaml | yq -pprops -o yaml
This get it's into properly formatted yaml. yq can also do the same in the opposite direction to import back into infisical.
And to support having .'s in keys, use \\x2e and pass it through echo:
echo -e "$(infisical export --env=dev -fyaml | yq -pprops -o yaml)"
-
I half sort of found a way to do this with #Infisical and #yq, by using props annotation and parsing it through yq:
infisical export --env=dev -fyaml | yq -pprops -o yaml
This get it's into properly formatted yaml. yq can also do the same in the opposite direction to import back into infisical.
And to support having .'s in keys, use \\x2e and pass it through echo:
echo -e "$(infisical export --env=dev -fyaml | yq -pprops -o yaml)"
-
I half sort of found a way to do this with #Infisical and #yq, by using props annotation and parsing it through yq:
infisical export --env=dev -fyaml | yq -pprops -o yaml
This get it's into properly formatted yaml. yq can also do the same in the opposite direction to import back into infisical.
And to support having .'s in keys, use \\x2e and pass it through echo:
echo -e "$(infisical export --env=dev -fyaml | yq -pprops -o yaml)"