Usage?: tag vs label vs extra column for MovieYear meta data

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
DrChiron
Posts: 40
Joined: 04 Apr 2013 15:01
Location: Los Angeles environs

Usage?: tag vs label vs extra column for MovieYear meta data

Post by DrChiron »

Greetings of the season (as appropriate):
I'm a compulsive collector of movies-to-be-watched then discarded.
Since my media file sources usually include the (presumptive) year of release in the filename, I have access to that file-content meta-data, but not in a sort-friendly manner.
As I haven't braved the script writing waters (not lazy - just easily distracted) I was considering adding a column containing that meta-data. I read ALL of the help.chm info on the TAGS (tags, label, comment) usage as well as the Extra Column usage as well, but it wasn't obvious as to which type would offer the best options for getting that meta-data into the new column. I read that I could create a list of tags (years) that I could access via a context menu, but I also read about Extra Columns being appropriate for time-stamps (usually meta-data about the file itself and not its contents). Therefore I was hoping there could be some discussion on the relative merits of using the various options available. I guess I should have searched the already-written scripts topic for the ability to sort file lists based on embedded file-name content, but alas I just thought of that while composing this missive.
BTW: This is all because visitors when confronted with a list over 400 items long invariably ask "what do you have that's recent?" As I collect with indifference to release-year, sorting is a pain. Doc
Retired Hollywood Video Engr
[WinX Home amd64] [XYplorer 20.80.0000]

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Usage?: tag vs label vs extra column for MovieYear meta

Post by bdeshi »

DrChiron wrote:Since my media file sources usually include the (presumptive) year of release in the filename, I have access to that file-content meta-data, but not in a sort-friendly manner.
What's the filename pattern (it should be constant too) ?
DrChiron wrote:Therefore I was hoping there could be some discussion on the relative merits of using the various options available
Extra columns provide some pre-defined sortable "datatypes", otherwise extra columns and tags are pretty similar. In fact the data saved in extra columns are saved as tags.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

FluxTorpedoe
Posts: 904
Joined: 05 Oct 2011 13:15

Re: Usage?: tag vs label vs extra column for MovieYear meta

Post by FluxTorpedoe »

Hi'
Too cool an idea to ignore it ! :kidding:

So here it is (at least it's one working approach for standard 4 digits “isolated” release dates).
I'm on a rush, so, sorry but no time to elaborate now on the regex or the snippet use… Well, here's at least a quick and dirty version:

Enter "::snippet;" in the address bar > Enter > paste the following code in the snippet window > OK >
Right click on a colum header > "New Column" > Right click on the new column header > "Select custom column…" >
Choose the "Date" one and you're good to go !


Have a nice day, 8)
Flux

Code: Select all

Snip: CustomColumn 1
  XYplorer 14.60.0000, 14-11-28 21:21:44
Action
  ConfigureColumn
Caption
  Date
Type
  3
Definition
    return gettoken(regexmatches(<cc_name>, "\b\d\d\d\d\b"), 1, "|");
Format
  2
Trigger
  0
Item Type
  0
Item Filter
  

DrChiron
Posts: 40
Joined: 04 Apr 2013 15:01
Location: Los Angeles environs

Re: Usage?: tag vs label vs extra column for MovieYear meta

Post by DrChiron »

Thank You Flux.
Sorry for the delay; no good excuse as I'm easily distracted...
At the moment my eyes are not co-operating; must use reverse video to minimize the glare caused by the large white areas.
(Tip: DON'T AGE, but if you must, do it well.)
I saved your post, and will try it when seeing is less a strain.
Doc
Retired Hollywood Video Engr
[WinX Home amd64] [XYplorer 20.80.0000]

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Usage?: tag vs label vs extra column for MovieYear meta

Post by bdeshi »

DrChiron wrote:At the moment my eyes are not co-operating; must use reverse video to minimize the glare caused by the large white areas.
Programmer's Eye. :mrgreen:
Stay up late programming, and you soon appreciate the brightness control, and dark themes/skins of programs. :D
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

DrChiron
Posts: 40
Joined: 04 Apr 2013 15:01
Location: Los Angeles environs

Re: Usage?: tag vs label vs extra column for MovieYear meta

Post by DrChiron »

@Flux
1. Thank You, your snippet works. (I have yet to work through the snippet code.)
2.I had to try both the Date Taken and Date script (*.*) custom column as Date Taken supposedly uses camera sourced (meta?) data that is somehow part of the file or filename. I guessed you used the year in the filename as a substitute for the missing meta-data. When it didn't work I tried the other custom column date that immediately displayed the year extracted by your snippet.
Questions (before playing around):
1. Is there an existing XYp function to not include the thousands comma much like the size column has?
2. Does the snippet remain as part of XYp so that new MovieFiles added have their year displayed automatically? Where is it stored? (xyplorer.ini ?) I will look for it.
3. After single-click select of the custom column type I had to click OK to complete the operation. I'm used to double-clicking selections to get the implied OK. I only mention this in case you wanted to correct your instructions for others finding this solution via a search.
4 Thanks again you "king of the snippets". Doc
Retired Hollywood Video Engr
[WinX Home amd64] [XYplorer 20.80.0000]

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Usage?: tag vs label vs extra column for MovieYear meta

Post by TheQwerty »

DrChiron wrote:1. Is there an existing XYp function to not include the thousands comma much like the size column has?
I don't believe Don has given us that much control over formatting number custom columns, what you could do though is use the Text format so it doesn't do the digit-grouping at all. Unfortunately this sacrifices natural number sorting (you'd get (1, 10, 2) instead of (1, 2, 10)) but since you're sorting 4-digit years this shouldn't become an issue until the year 10,000. ;)
screenshot.13.png
screenshot.13.png (48.88 KiB) Viewed 2427 times
DrChiron wrote:2. Does the snippet remain as part of XYp so that new MovieFiles added have their year displayed automatically? Where is it stored? (xyplorer.ini ?) I will look for it.
A snippet is not a script but rather a way to share specific XY configuration settings. Often those settings can contain scripts themselves. In this case Flux shared the configuration for a custom column and once imported XY will treat it just like you had filled out the custom column dialog yourself and store that data in the CustomColumns section of XYplorer.ini.

Post Reply