Here is the Github issue that I made for this feature. I want to make a parser that can be run from the navigator to set fields using a regular expression, which would read either the filename or an existing field.
I have begun looking at the code to try to make this feature. I have no experience with PHP or Typescript, but have some experience with D, C++, PHP, and HTML, and a little bit of Javascript and Python. May someone please help me figure out the steps I need to implement this feature?
It looks like the user interface code is in /ui/v2.5/src/
, written in Typescript. I suppose that this may be a button alongside “Edit” and “Delete”, but I’m thinking of putting it in the drop-down menu for other operations. The menu that pops up should have a multiple-choice selection for what the regular expression is run on. I cannot figure out how to put in a multiple-choice selection, though I see options for checkboxes. Then I would need to put in a text input.
I suppose then I would need to add some functions in Go, right? Where should I look for that?
Another thing that I’m undecided on is if most of the UI code should be shared for scenes, galleries, and images, or if I should put separate code in each. I suppose that the user interface would be mostly the same.
With the Typescript portion, I don’t know how I would test that my code is valid.
I successfully managed to add a filter for galleries and scenes lacking a studio code. I still need to do more work to get the parser interface to show up, and I have not started on getting it to actually work.
This is something that is better suited as a plugin. I already intend to eventually move the parser out of the core system into a plugin.
The UI part should be implemented via react/typescript, and any backend required stuff can be implemented via backend plugin operations - these are typically implemented in python or the built-in javascript interpreter.
Whenever I tackle the separation of the parser into a separate plugin, I’d be looking at adding better filtering and applying it to other object types. There’s a bit of overlap between this and a generalised scraper/tagger system, albeit with the added wrinkle of a filename pattern input.