mipops / dvrescue

Archivist-made software that supports data migration from DV tapes into digital files suitable for long-term preservation. Snapshot daily builds are at https://mediaarea.net/download/snapshots/binary/dvrescue/.
BSD 3-Clause "New" or "Revised" License
82 stars 19 forks source link

support output filename patterns in gui #876

Open dericed opened 1 week ago

dericed commented 1 week ago

@elderorb, can you add a dropdown list with these values to the GUI on the PACKAGE tab:

%FILENAME%_part%PARTNO%
%FILENAME%_%RECDATE%_%RECTIME%
%FILENAME%_%PARTNO%_%TC%
%FILENAME%_%RECDATE%-%RECTIME%_%TC%

The selected value should be sent to dvpackager with a -O (capital letter O) as in dvpackager -O "%FILENAME%_%RECDATE%_%RECTIME%" ...

The drop down can go into the list row as the Segmenting Rules with the label "Filename Pattern".

dericed commented 1 week ago

Hmm, I suppose we could also have an option for custom patterns. From the documentation we have

 -O <pattern>
          (specify a pattern for output files. The following variables may be
           used:
          %FILENAME% - will use the filename of the input file without it's
                       extension
          %RECDATE% -  will use the recording date of the first output frame,
                       in YYYY-MM-DD format. If there is no embedded recording
                       date, then 'XXXX-XX-XX' will be used.
          %RECTIME% -  will use the recording date of the first output frame.
                       If there is no embedded recording date, then
                       'XX-XX-XX' will be used.
          %TC% -       will use the timecode value of the first frame or use
                       XX-XX-XX-XX if no timecode is stored in the first frame.
          %PARTNO% -   This is an incrementing number of the output starting
                       from 1.
           The default pattern is "%FILENAME%_part%PARTNO%". The
           extension of the output file is determined by the -e
           setting.)

           Note that if the output pattern would generate multiple output files
           with the same name then a 3-digit incrementing number such as "-001"
           will be added to the end of the filename.

Maybe, we could add a PACKAGE tab to the Preferences and give a textbox where users could enter one custom pattern per line. @libbyhopfauf, thoughts?

libbyhopfauf commented 1 week ago

What if we do something like this in the packager tab:

Screenshot 2024-06-19 at 1 15 01 PM

To make selecting a file naming pattern more intuitive for users less experienced with code, I was thinking we could use these options (see image above). Below I have listed what code the options would refer to:

It might be helpful to have explanation text appear when you hover over the "File Naming Pattern" text that reads: To customize your file naming pattern further, please see the "Packager" tab in the "Settings" menu.

Another suggestion that I included in the mock-up image is to add bold titles for "Extension" and "Output Location" and separate them a bit if possible. Just to make that section a little more clear and intuitive for new users.

libbyhopfauf commented 1 week ago

And then for the Packager tab in the Settings menu, we could have something like this for users to create a custom file naming pattern:

Screenshot 2024-06-19 at 1 29 38 PM

@dericed let me know if I misunderstood what you were saying about either the prefix/suffix or the text boxes :)