From bb208bea31918d099832fc559be1da1f8ffbeeb0 Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Sat, 28 Aug 2021 11:03:21 +0200 Subject: [PATCH] apps/phototool: init --- apps/phototool/README.md | 14 ++++++++++++++ apps/phototool/pt-import | 22 ++++++++++++++++++++++ apps/phototool/shell.nix | 6 ++++++ 3 files changed, 42 insertions(+) create mode 100644 apps/phototool/README.md create mode 100755 apps/phototool/pt-import create mode 100644 apps/phototool/shell.nix diff --git a/apps/phototool/README.md b/apps/phototool/README.md new file mode 100644 index 00000000000..4c9e62d4183 --- /dev/null +++ b/apps/phototool/README.md @@ -0,0 +1,14 @@ +# photo 🔷 tool + +A small tool to import and export photos from darktable collections. + + +## How to build + +Use [Nix](https://nixos.org)! + +```console +$ nix-build +$ result/bin/pt +``` + diff --git a/apps/phototool/pt-import b/apps/phototool/pt-import new file mode 100755 index 00000000000..59957ef8580 --- /dev/null +++ b/apps/phototool/pt-import @@ -0,0 +1,22 @@ +#!/usr/bin/env raku + +# Define a str type of path +# TODO: validate a path? +subset path of Str; +subset ID of Str; + +multi sub MAIN("--version") +{ + say "pt-import 0.1.0" +} + +multi sub MAIN( + $src, #= Source of image data (on SD card) + $store, #= Directory of darktable collections + ID :$start-id, #= The start image ID to import + ID :$end-Id, #= The end image ID to import + Bool :$verbose, #= Display verbose output +) +{ + say "execute main function" +} diff --git a/apps/phototool/shell.nix b/apps/phototool/shell.nix new file mode 100644 index 00000000000..c78981d513c --- /dev/null +++ b/apps/phototool/shell.nix @@ -0,0 +1,6 @@ +with import {}; + +stdenv.mkDerivation { + name = "raku"; + buildInputs = with pkgs; [ rakudo ]; +}