Descriptive Filenames / Autogeneration

I save a lot of images for study and also to create little guides, and one of the most important things is to save images with all the important reference details.
The most efficient way I’ve currently found to do this is to use a short bit of webcode that injects the filename onto the pages (in Firefox) along with a copy button, and before saving an image I just click “Copy” and it copies it to the clipboard so I can use it as the filename (followed by an image number 1… n), with the button changing to “Copied!”.
I’ve attached a screenshot. It’s actually just a temporary add-in I have loaded for a session but it’s amazing how much time it saves me.
If anyone would find it helpful to have a copy let me know and I can perhaps look at making it a bit more available.

David

1 Like

if this is something folks want, it might make sense to include it an existing browser extension that contains a suite of enhancements for iNaturalist, such as the one described here: https://forum.inaturalist.org/t/chrome-extension-showing-computer-vision-confidence/35171/8.

there are also a few other folks who have made development versions of browser extensions (not available through an extension store):

i think it would be nice if folks could work together to publish all their iNat power tools in just one (or maybe two) browser extensions which could be published in the main browser extension stores.

1 Like

That certainly makes sense.
There’s also an interesting advantage of a temporary add-in, in that it’s easy for people to tweak knowing basic JS, so if someone wants the filename calculation to be slightly different, they can just alter it.

1 Like

i think the way to address this is to make it configurable, with simple interface to edit configuration template, with a default template such as:
${taxon.name} - ${id} - ${user.login}

1 Like

That would cover most things, though there’s all number of ways people might want to tweak it, for example I have the CC license highlighted red, or it may be wished to place the name elsewhere or hide it altogether (just having the copy button).

Perhaps the easiest thing may be just to provide a link to it with a basic readme and people can use and adapt it as wished.

d

1 Like

you can still handle color and other style things in a basic string. if you envision the string as just what’s going to go into a the dsiplay element’s innerHTML, then you can just modify styles with some simple HMTL tags, such as:

${taxon.name} - <em>${id}</em> - <span style="color:red">${user.login}</span>

you could make it more complicated, of course, but i think this strikes a good mix of flexibility and standardization.

i think you lose a large chunk of your potential audience when you tell them that they have to manually install an extension on their own. it’s better if it’s packaged up, and even better if it comes with tons of other functionality.

2 Likes

I’ll adjust it to use .replaceAll() on a template html string, putting values in via <user> etc, and provide any other customisations I can think of.
I suppose it might be a useful practice to sign and publish it formally but ideally someone could take the code and put it in an existing plugin as you suggest.

The code for my extension is on GitHub, so anyone is free to submit a pull request!

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.