Thank you #nixos <3
simple-scan doesn't have a great default filename when saving a scan. Its always the same (something like, "New scan"), and I don't really care about the name (paperless does the rest).
Upstream has an issue open for 4 years, so I'm not super confident it will appear anytime soon. So I went and just patched it myself locally :D
Here's roughly how I did it:
The patch itself:
index 402065a..5b03250 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -403,7 +403,8 @@ public class AppWindow : Adw.ApplicationWindow
/* Default filename to use when saving document. */
/* To that filename the extension will be added, eg. "Scanned Document.pdf" */
save_dialog.initial_name = (_("Scanned Document") + "." + mime_type_to_extension (save_format));
var now = new DateTime.now_local ();
save_dialog.initial_name = (_("Scanned Document") + (now.format ("%Y_%m_%d_%H_%M_%S")) + "." + mime_type_to_extension (save_format));
}
var filters = new ListStore (typeof (Gtk.FileFilter));
@@ -1637,4 +1638,4 @@ private class CropActions
else
crop_set.set_state (crop_name);
}
-}
\ No newline at end of file
+}
=> More informations about this toot | More toots from Hemera@meow.social
Thinking about it, I feel that it should be even easier to just add some stuff so that you can just quickly say "save and new scan" and it will just use this default filename, so I can finally digitize the mountain of letters I have.
=> More informations about this toot | More toots from Hemera@meow.social
@Hemera
Have you proposed the patch upstream?
=> More informations about this toot | More toots from Atemu@darmstadt.social
@Hemera wait you can use nix develop
on arbitrary packages in nixpkgs? This is going to be a massive game changer for me. Thank you for sharing this!
=> More informations about this toot | More toots from Lehmanator@fosstodon.org
@Hemera is there no pull request to download the patch from?
=> More informations about this toot | More toots from acidbong@cupoftea.social
@acidbong Nope, I wrote it haha
=> More informations about this toot | More toots from Hemera@meow.social This content has been proxied by September (3851b).Proxy Information
text/gemini