oliverdavies.uk/content/node.57f28cf3-4474-4668-8222-c430cbe9b88b.json
Oliver Davies 7a7dc297ca Make all links relative
Now the abs_to_rel module is enabled, links can be made relative so they
work on the current environment.
2025-05-29 16:42:25 +01:00

100 lines
No EOL
5.2 KiB
JSON

{
"uuid": [
{
"value": "57f28cf3-4474-4668-8222-c430cbe9b88b"
}
],
"langcode": [
{
"value": "en"
}
],
"type": [
{
"target_id": "daily_email",
"target_type": "node_type",
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
}
],
"revision_timestamp": [
{
"value": "2025-05-11T09:00:08+00:00"
}
],
"revision_uid": [
{
"target_type": "user",
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
}
],
"revision_log": [],
"status": [
{
"value": true
}
],
"uid": [
{
"target_type": "user",
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
}
],
"title": [
{
"value": "Writing bash scripts with Nix"
}
],
"created": [
{
"value": "2024-08-20T00:00:00+00:00"
}
],
"changed": [
{
"value": "2025-05-11T09:00:08+00:00"
}
],
"promote": [
{
"value": false
}
],
"sticky": [
{
"value": false
}
],
"default_langcode": [
{
"value": true
}
],
"revision_translation_affected": [
{
"value": true
}
],
"path": [
{
"alias": "\/daily\/2024\/08\/20\/writing-bash-scripts-with-nix",
"langcode": "en"
}
],
"body": [
{
"value": "\n <p>Yesterday, I wrote about <a href=\"/daily\/2024\/08\/19\/bash-scripting-for-fun-and-profit\">a bash script I've written<\/a> to export a list of videos on my external hard drive.<\/p>\n\n<p>If you <a href=\"https:\/\/github.com\/opdavies\/dotfiles.nix\/blob\/a1ef2d1402c9c607e7a3e4427ce125d0cabeddcd\/lib\/shared\/scripts\/export-video-list.nix#L12-L31\">looked at the script on GitHub<\/a> and you're familiar with bash scripting, you may have thought it looked a bit odd or missing some things.<\/p>\n\n<p>That's because I wrote it <a href=\"/daily\/2022\/09\/26\/experimenting-with-the-nix-package-manager\">with Nix<\/a> - the tool I've been using for almost two years to manage my dotfiles and operating system configuration.<\/p>\n\n<p>Using Nix for bash scripts has advantages, like automatically adding the shebang line, setting sensible defaults for error handling, and automatically running <code>shellcheck<\/code> when switching.<\/p>\n\n<p>I think the main advantage, though, is it can inject any dependency packages into the script.<\/p>\n\n<p>This script needs <code>tree<\/code> and <code>jq<\/code>, so they are dependencies of the script and the script can't run if they aren't installed.<\/p>\n\n<p>But, I don't need to assume they are available. Nix can do it automatically and make any packages added as build inputs available.<\/p>\n\n<p>Now, if anyone else wanted to use this script, or I wanted to share another script with colleagues or a client, they can use it without needing to install any dependencies separately and the script will continue to work in the future using its explicitly-added dependencies.<\/p>\n\n ",
"format": "full_html",
"processed": "\n <p>Yesterday, I wrote about <a href=\"/daily\/2024\/08\/19\/bash-scripting-for-fun-and-profit\">a bash script I've written<\/a> to export a list of videos on my external hard drive.<\/p>\n\n<p>If you <a href=\"https:\/\/github.com\/opdavies\/dotfiles.nix\/blob\/a1ef2d1402c9c607e7a3e4427ce125d0cabeddcd\/lib\/shared\/scripts\/export-video-list.nix#L12-L31\">looked at the script on GitHub<\/a> and you're familiar with bash scripting, you may have thought it looked a bit odd or missing some things.<\/p>\n\n<p>That's because I wrote it <a href=\"/daily\/2022\/09\/26\/experimenting-with-the-nix-package-manager\">with Nix<\/a> - the tool I've been using for almost two years to manage my dotfiles and operating system configuration.<\/p>\n\n<p>Using Nix for bash scripts has advantages, like automatically adding the shebang line, setting sensible defaults for error handling, and automatically running <code>shellcheck<\/code> when switching.<\/p>\n\n<p>I think the main advantage, though, is it can inject any dependency packages into the script.<\/p>\n\n<p>This script needs <code>tree<\/code> and <code>jq<\/code>, so they are dependencies of the script and the script can't run if they aren't installed.<\/p>\n\n<p>But, I don't need to assume they are available. Nix can do it automatically and make any packages added as build inputs available.<\/p>\n\n<p>Now, if anyone else wanted to use this script, or I wanted to share another script with colleagues or a client, they can use it without needing to install any dependencies separately and the script will continue to work in the future using its explicitly-added dependencies.<\/p>\n\n ",
"summary": null
}
],
"feeds_item": [
{
"imported": "1970-01-01T00:33:45+00:00",
"guid": null,
"hash": "b9459e8502e6216a6d8f4cd2842d9bba",
"target_type": "feeds_feed",
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
}
]
}