Download: http://foobar2000.org/components (http://foobar2000.org/components)
Recommended for people who use the "copy names" command a lot. The Text Tools component lets you create multiple context menu commands copying information about the selected tracks using different title-formatting patterns. Additionally, the "advanced" dialog lets you produce a report with grouping and group headers/footers, for eg. exporting a list of your albums with full track lists.
Excellent! Just what I've been hoping for! I love this component.
Awesome! Thanks
Question: Is it possible to use this to get the total time of the selected tracks? Can't find a titleformatting function to do this.
I follow that....
but why twice the same one text Tools is already available?
and why never for exactly this function was created the t %Total_length%
in the basis I do not understand it there it through to select in the status bar is already available
vllcht it can still be facilitated that my greatest wish would be
see text tools pic
sorry for my bad englisch
(http://img501.imageshack.us/img501/4666/screenshot1gd8.th.jpg) (http://img501.imageshack.us/my.php?image=screenshot1gd8.jpg)
foo_utils already provides a good Text tools Copy names functionality.
Provides various general purpose commands:
- Edit inactive playlists
- Sort by multiple fields
- Protect playlists against editing
- Cycle through playback orders
- Format text from track information and copy to clipboard or save to file
- Open foobar2000 profile and component directories in Explorer
Some of these features don't work anymore, so I guess that's why we now get a new text tools component.
Group header/footer item explanationGroup footer pattern is not the same as foo_utils's footer text, so a %total_length% title formatting item would be pointless here. Instead think of it as a footer to a block of text for each item.
Take this example where the field of the Text Tools Advanced dialog is filled in like this:
Track pattern: [%tracknumber%. ][%artist% - ]%title%
Group header pattern (checked): %list_index%: %path%
Group footer pattern (checked): Length: %length%$crlf()
This will yield the following result:
01: E:\music\diverse\video game music\chrono_cross.rar|Chrono Cross 115 Viper Manor.psf
Yasunori Mitsuda - 115 Viper Manor
Length: 3:04
02: E:\music\diverse\video game music\chrono_cross.rar|Chrono Cross 116 Victory - Spring's Gift.psf
Yasunori Mitsuda - 116 Victory - Spring's Gift
Length: 1:05
03: E:\music\diverse\video game music\chrono_cross.rar|Chrono Cross 117 Lost Child of Time.psf
Yasunori Mitsuda - 117 Lost Child of Time
Length: 3:33
The name and functionality clash with the text tools function from foo_utils is unfortunate and probably confusing; I have talked about this with Peter before he released foo_texttools. Since foo_texttools has support for presets and grouping, which foo_utils does not have, I am going to remove my text tools implementation from foo_utils in a future version. As far as I know, the remaining functionality that is only present in foo_utils - saving the formatted text directly using a menu command, larger scripts (or at least larger edit boxes) - is usually used to generate entire (HTML) documents. I plan to support that use case with a new component.
Hello foosion
Thanks for these words that lets me hope for years
and something would be advantage especially of several layouts
to manage
For that I make a request<A[request|application]> in the hope loves push
Thanks for all the effort<A[effort|trouble]> up to now and weiterso
sorry for my bad englisch
This is awesome. Thank you Peter
Thank you!
thanks
Cool!
Thanks Peter!
I think I found a bug : if you assign a keyboard shortcut to a copy command, and then change the pattern of this command, the keyboard shortcut is broken (it says "Action Not Found (*lots of number and letters*)").
I have also a request : is it possible to have a multi-line editing field for the patterns ? I have some -very- long copy commands and it's not easy to modify them with one single line.
Anyway, thanks for this great component.
It would be great if it was able to save the results directly as a textfile just like foo_utils
Using previous version foo_utils with Copy Name function, I can do it by two steps only: Utils -> Copy Name.
Now using the new Text Tools component, I have to do it by three steps: Utils -> Text Tools -> Copy.
Is it possible to make it more simple? Thanks.
You can edit the context menu so that Text Tools is available from the root, in Preferences.
I am going to remove my text tools implementation from foo_utils in a future version.
Any updates on that?
Thanks for this useful plugin!
Small request: in the advanced window, would it be possible to remember the state of the Skip duplicate/repeating lines checkbox?
I think I found a bug : if you assign a keyboard shortcut to a copy command, and then change the pattern of this command, the keyboard shortcut is broken (it says "Action Not Found (*lots of number and letters*)").
A new version is up (http://www.foobar2000.org/?page=Download), with a fix for this misbehaviour.
Thanks! I was looking for something like this.
Thanks for the fix.
Thanks for much useful plugin.
However, i have this annoying trouble: in Advanced window, the footer code don't save if i close foobar.
I have to store footer code in header area, which somewhat limiting my options...
also, it is posible to make template with all 3 fileds, so we don't have to go to advanced window all the time and copy by simply clicking menu option?
Is it possible to be able to add brackets to my outputs? having no such luck unfortunately
You need to escape brackets in title-formatting eg:
'('%artist%')'
Ohh nice tyvm
Moderation: Removed unnecessary full quote of the preceding post.
wow, very useful!
i too would like to see the ability to save advanced queries.
here is a code to output simple album listings. it's amazingly fast, even when processing 1000+ albums
Track Pattern:
%track% %title% ['['%track artist%']']
Group header pattern:
Artist: $if2(%album artist%,%artist%)$crlf()Album: %album%$crlf()Year: %date%$crlf()Quality: $ifequal($strcmp(%codec_profile%,CBR),1,%bitrate% ,)%codec_profile%$crlf()
Group footer pattern:
$crlf()
Result:Artist: Blue Foundation
Album: Blue Foundation
Year: 2001
Quality: VBR V0
01 Wiseguy
02 Grand
03 Witch of Trouble
04 Crushed
05 Jabber
06 Hollywood
07 Burgeon
08 Black S
09 Mazda
10 Hide
11 Cutting Me Up
12 J.Hurt
13 Evo
Artist: Blue Foundation
Album: Sweep Of Days
Year: 2004
Quality: 320 CBR
01 History
02 As I Moved On
03 End Of The Day (Silence)
04 Ricochet
05 02.17 Am
06 Embers
07 Bonfires
08 The Yellow Man
09 Shine
10 Save This Town
11 Sweep
12 My Day
That is actually amazingly useful
Moderation: Removed unnecessary full quote of the preceding post.
just the thing i was looking for.
thanks!
Thanks garbanzo.bean, that was really useful. Now I can copy album information a lot more easily
@ garbanzo.bean small notice,
the second part of this: $if2(%album artist%,%artist%) never gets evaluated, there is no need (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Title_Formatting_Reference#.25album_artist.25) for $if.
Slight edit of garbanzo.bean's code:
Track Pattern:
%track%. %title%[' ['%track artist%']']
Group header pattern:
$crlf()Artist: %album artist%$crlf()Album: %album%$crlf()Year: %date%$crlf()Quality: $ifequal($strcmp(%codec_profile%,CBR),1,%bitrate% ,)%codec_profile%$crlf()
Eliminates need for group footer pattern. Also removed first $if validation (not necessary).
Sample output:
Artist: U2
Album: How To Dismantle An Atomic Bomb
Year: 2004
Quality: VBR V4
01. Vertigo
02. Miracle Drug
03. Sometimes You Can't Make It On Your Own
04. Love And Peace Or Else
05. City Of Blinding Lights
06. All Because Of You
07. A Man And A Woman
08. Crumbs From Your Table
09. One Step Closer
10. Original Of The Species
11. Yahweh
12. Fast Cars
@ thecircusfreak - can you explain why? i put it there because i only add album artist if two or more tracks have different artists. otherwise the tag is empty. if %album artist% is empty, does foobar automatically look for %artist%?
@ Rain - thanks for tidying things up
if %album artist% is empty, does foobar automatically look for %artist%?
Yes, and it looks for composer then performer as well if artist is empty.
i use this for copying the content of my entire library (just albums:)
Track List:
'['%date%']'%album% // $ifequal($strcmp(%codec_profile%,CBR),1,%bitrate% ,)%codec_profile%
Group Header:
%album artist%
This will result in a list like this:
Audioslave
[2002]Audioslave // VBR V0
[2005]Out Of Exile // VBR V0
[2006]Revelations // VBR V0
Autechre
[1993]Incunabula // VBR V0
[1994]Amber // VBR V0
[2001]Confield // VBR V0
[2003]Draft 7.30 // VBR V0
Autumn's Grey Solace
[2006]Shades Of Grey // VBR V0
Band Of Horses
[2006]Everything All The Time // VBR V0
[2007]Cease To Begin // VBR V2
Found a strange behaviour:
%list_index% is not treated the same in «Quick Copy Commands» (i.e. presets) and «Advanced...» when called up from within a playlist. IMO the Advanced settings do better.
Hi Peter,
very useful plugin, thank you.
also thanks to garbanzo.bean & Rain for their code. helpful!
i too would like to see the ability to save advanced queries.
me to :-)
for the
quick copy command i'd like to know, if its possible to have all information in one single line (without crlf, space instead).
i mostly copy tracktitles to the clipboard and then want to paste them into a search field of a website in an internet-browser.
that searchfield, of course, needs the search-query in a single line.
so i need to copy the text to notepad, remove the line breaks by hand ...
this might be a "let the user change the separator" feature request if this isnt possible :-)
anybody an idea, on how i could accomplish this?
HI!
If I'm not mistaken this is the only etension for fb2k having reporting capabilities. It would be very useful to extend it for more than one level of grouping, ie. allow one group for global header and it's closing footer (no grouping capabilities), then on lower level a custom header/closing footer for %album artist% / %album% group, and on another level a custom header/closing footer for [%discnumber%] (if present). If discnumber not present, this header/footer wouldnot be inserted. On lovest level individual tracks. Also the closing footer wouldnot have grouping capabilities, ie. it would just close the related header on the same level (if inserted)
So I'd like the global header could contain any user defined text, header on album level could be this:
Artist: %album artist%
Album: %album%
Release date: $if2(%releasedate%,%date%)
Genre: %genre%
Total tracks: %totaltracks%
...
header on Disc level could be
Disc %discnumber%
It would be also very useful to enable on each level define set of grouping tags, ie. enable not to handle all tags used in header text as unique group.
Made some more generic script concerning Codec, Album Artist/Track Artist and Total Disc Info (based on garbanzo.bean's/Rain's code):
Group header pattern:
$crlf()%album artist%/%album%$ifgreater(%totaldiscs%,1, - CD %discnumber%,)/%date% '('%codec%[ %codec_profile%$ifequal($strcmp(%codec_profile%,CBR),1, %bitrate% kbps,)]')'$crlf()
Track pattern:
%track% $if($meta(album artist),%artist%: ,)%title% - %length%
results in:
Air/Premiers Symptomes/1999 (MP3 CBR 128 kbps)
01 Modular Mix - 6:00
02 Casanova 70 - 5:54
03 Les Professionnels - 4:33
04 J'Ai Dormi Sous l'Eau - 5:42
05 Le Soleil Est Pres de Moi - 4:52
06 Californie - 2:28
07 Brakes On - 4:23
The Hellacopters/Payin' The Dues/1999 (FLAC)
01 You Are Nothin' - 2:39
02 Like No Other Man - 3:15
03 Looking At Me - 2:04
04 Riot On The Rocks - 1:23
05 Hey! - 3:21
06 Soulseller - 3:13
07 Where The Action Is - 2:41
08 Twist Action - 2:04
09 Colapso Nervioso - 4:04
10 Psyched Out And Furious - 4:14
LTJ Bukem/Progression Sessions 003/2000 (MP3 VBR V2)
01 Control: Control - 8:07
02 Big Bud: Pure - 7:00
03 Big Bud: State Of Mind - 7:03
04 Future Engineers: Time Shift - 6:39
05 Voyager: Apollo - 4:52
06 Second Vision: Italian Job - 6:15
07 Blu Mar Ten: Santur - 6:00
08 Big Bud: Transmission - 7:23
09 Intense: Solar - 7:30
10 Big Bud: Emotionography (Remix) - 6:49
11 Blu Mar Ten: B.R.O. - 7:29
120 Days/120 Days - CD 1/2006 (MP3 VBR V2)
01 Come Out (Come Down, Fade Out, Be Gone) - 8:51
02 Be Mine - 4:15
03 C-Musik - 7:22
04 Sleepwalking - 3:28
05 Get Away - 4:41
06 Keep on Smiling - 5:30
07 Lazy Eyes - 4:40
08 Sleepless Nights #3 - 3:04
09 I've Lost My Vision (Kraut nr1) - 11:26
120 days/120 days - CD 2/2006 (MP3 VBR V2)
01 120 days / Sleepwalking 120 days Remix - 8:00
02 120 days / Come Out, Come Down, Fade Out, Be Gone (T.A.Kaukolampi remix) - 9:33
03 Come Out, Come Down, Fade Out, Be Gone (Reconstructed by Secret Machines) - 6:07
04 120 days / Come Out, Come Down, Fade Out, Be Gone (Mental Overdrive remix) - 9:14
Yes that's right I can do this with Text Tools, but much more I liked the report in following format.
Demonstrate it on a playlist of one 1disc album and one 2disc album.
This is what I get with Text Tools actually:
The BEATLES/Rubber Soul (2009 Mono Remaster)/1965 (TAK 4 max)
01. Drive My Car [2:34]
...
28. Run for Your Life (stereo) [2:22]
The BEATLES/White Album (2009 Mono Remaster) - CD 1/1968 (TAK 4 max)
01. Back In The U.S.S.R. [2:44]
...
17. Julia [2:54]
The BEATLES/White Album (2009 Mono Remaster) - CD 2/1968 (TAK 4 max)
18. Birthday [2:43]
...
30. Good Night [3:13]
And this is what I have asked for in my previous post, ie. more hiarerchic grouping:
[size=16px][b]Tracklist:[/b][/size]
[size=14px][b]The BEATLES/Rubber Soul (2009 Mono Remaster)/1965 (TAK 4 max)[/b]
[font=Courier]01. Drive My Car [2:34]
...
28. Run for Your Life (stereo) [2:22][/font]
[b]The BEATLES/White Album (2009 Mono Remaster)/1968 (TAK 4 max)[/b]
[b]Disc 1:[/b]
[font=Courier]01. Back In The U.S.S.R. [2:44]
...
17. Julia [2:54][/font]
[b]Disc 2:[/b]
[font=Courier]18. Birthday [2:43]
...
30. Good Night [3:13][/font][/size]
^^ jfi my post was NOT a reply to your request
Too bad. Anyone else can fullfill my request?
nice puzzle, here you go (adjust the line breaks to your liking):
Group header:
$ifgreater(%totaldiscs%,1,$ifgreater(%discnumber%,1,,$crlf()%album artist%/%album%/%date% '('%codec%[ %codec_profile%$ifequal($strcmp(%codec_profile%,CBR),1, %bitrate% kbps,)]')'$crlf()),$crlf()%album artist%/%album%/%date% '('%codec%[ %codec_profile%$ifequal($strcmp(%codec_profile%,CBR),1, %bitrate% kbps,)]')'$crlf())$ifgreater(%totaldiscs%,1,$crlf()disc %discnumber%,)
gives for a multi disc album:
120 Days/120 Days/2006 (MP3 VBR V2)
disc 1
01 Come Out (Come Down, Fade Out, Be Gone) - 8:51
02 Be Mine - 4:15
03 C-Musik - 7:22
04 Sleepwalking - 3:28
05 Get Away - 4:41
06 Keep on Smiling - 5:30
07 Lazy Eyes - 4:40
08 Sleepless Nights #3 - 3:04
09 I've Lost My Vision (Kraut nr1) - 11:26
disc 2
01 120 days / Sleepwalking 120 days Remix - 8:00
02 120 days / Come Out, Come Down, Fade Out, Be Gone (T.A.Kaukolampi remix) - 9:33
03 Come Out, Come Down, Fade Out, Be Gone (Reconstructed by Secret Machines) - 6:07
04 120 days / Come Out, Come Down, Fade Out, Be Gone (Mental Overdrive remix) - 9:14
and for all others the usual output
Johnny Cash/American IV: The Man Comes Around/2002 (MP3 VBR V2)
01 The Man Comes Around - 4:27
02 Hurt - 3:39
03 Give My Love To Rose - 3:29
04 Bridge Over Troubled Water - 3:55
I'm bumping this thread to see if anyone has a technique for splitting the output into multiple files and saving each file to a unique path.
For example:
I use text tools to create a master file with a basic XML format such as:
<file>
<path>directory path/filename</path>
album info
</file>
...
I would now like to split the info between <file></file> and save each block as the address in <path>
any tips?
I would now like to split the info between <file></file>
Chopping List (http://skwire.dcmembers.com/fp/?page=chopping-list) (don't let the software's name annoy you) is capable of "splitting the content of text files into multiple new files based on a user-provided delimiter."
and save each block as the address in <path>
Not possible with that software.
Not possible with that software.
I'm aware it is not directly possible - I'm just wondering if any of the great minds here might have an idea on how to achieve this (win7).
Splitting the file is not so difficult - it is saving the pieces to correct directories that I'm stuck on.
Also the general format is completely flexible - I could write out anything to fit a solution.
Really wish this component would be updated. It's super useful, but it's got some serious bugs and missing features. There was a legacy Text Tools add-on that I've been using for probably 6 years now, went to install it on a new foobar install and found this one instead. I decided to copy over my formatting scripts and found some problems with it.
Bugs/Improvements needed:
- Advanced settings can't be accessed except from a playlist, not the component settings itself which makes it hard to find initially
- Inside Advanced settings, you can't paste more than one line at a time. If you try nothing is output.
- Your advanced settings code can ONLY take up two lines maximum. This means my incredibly involved titleformatting stuff has to be done on one line. Like my code for pasting album info to music forums:
$if($and($greater(%totaldisc%,1),$not($greater(%tracknumber%,1))),$crlf()'['b']'Disc %disc%'['/b']'$if(%discsubtitle%,' - '%discsubtitle%,)$crlf()$crlf(),)$puts(va,$if($or($stricmp(%album artist%,'Soundtrack'),$stricmp(%album artist%,'Various Artists')),'true','false'))$puts(artistStr,$ifgreater($meta_num(ArtistFilter),1,$puts(mArtist,$meta(ArtistFilter,0))$if($put(comma,$sub($strstr($get(mArtist),', '),1)),$puts(mArtist,$substr($get(mArtist),$add($get(comma),3),$len($get(mArtist))) $substr($get(mArtist),0,$get(comma))),)$if($get(mArtist),$if($stricmp($get(va),'true'),,$if($stricmp($get(mArtist),%artist%),$puts(feat,1),$get(mArtist))$puts(mArtist,$meta(ArtistFilter,1))$if($put(comma,$sub($strstr($get(mArtist),', '),1)),$puts(mArtist,$substr($get(mArtist),$add($get(comma),3),$len($get(mArtist))) $substr($get(mArtist),0,$get(comma))),)$if($get(mArtist),$if($stricmp($get(va),'true'),,$if($get(feat), feat. ,', ')'[artist]'$get(mArtist)'[/artist]'$puts(mArtist,$meta(ArtistFilter,2))$if($put(comma,$sub($strstr($get(mArtist),', '),1)),$puts(mArtist,$substr($get(mArtist),$add($get(comma),3),$len($get(mArtist))) $substr($get(mArtist),0,$get(comma))),)$if($get(mArtist),$if($stricmp($get(va),'true'),,$ifequal($meta_num(ArtistFilter),3,' & ',', ')'[artist]'$get(mArtist)'[/artist]'$puts(mArtist,$meta(ArtistFilter,3))$if($put(comma,$sub($strstr($get(mArtist),', '),1)),$puts(mArtist,$substr($get(mArtist),$add($get(comma),3),$len($get(mArtist))) $substr($get(mArtist),0,$get(comma))),)$if($get(mArtist),$if($stricmp($get(va),'true'),,$ifequal($meta_num(ArtistFilter),4,' & ',', ')'[artist]'$get(mArtist)'[/artist]')))))))),))'['b']'$num(%tracknumber%,$ifgreater(%list_total%, 9, 2, 1)).'[/b]'$if($stricmp(%album artist%,'Various Artists'), '[artist]'%artist%'[/artist]' - %title% ['([artist]'%original artist%'[/artist] cover) '], %title%[ '([artist]'%original artist%'[/artist] cover) '][ - $get(artistStr)])' '['i']'('%length%')'['/i']'
Explanation of that mess: ArtistFilter is custom tag I use for adding guest/featured artists to a track, or listing who was on the track in the case of a VA or Soundtrack release. Names are stored "Last, First" for sorting purposes and so my titleformatting code unpacks them, restores them to the correct order, adds "feat. " if needed as well as Ampersands if multiple artists are featured.
Example output:
13. Bang Bang - feat. [artist]Jessie J[/artist] & [artist]Nicki Minaj[/artist] (3:19)
Obviously that's completely unreadable. To edit it, I have to have a copy saved in a text editor with line breaks, and then strip them out for editing here.
- You can't select all in the Advanced Settings
- It'd be nice if you could actually "Copy" the Advanced Settings output without actually having to open the page. It should be an entry just like Album/Artist/Filename, etc.
- As a follow up the previous, you ought to be able to store different versions of advanced settings
If the source code for this plugin were available I'd happily update it. But starting from scratch seems a little daunting, especially for such a rarely used plugin.
Bump. Please consider what MordredKLB said, this tool is quite lacking compared to the old foo_utils one.
Would it be possible to copy the text and then send it to the search bar automatically, in facets for instance?
Hi Peter, could you read it here?
https://hydrogenaud.io/index.php/topic,117962.msg973844/topicseen.html#new
The substitution of CR/LF has it's weaknesses. Firstly different line ending sequences lead to different count of _s, and secondly backward conversion is ambiguous. I'd appreciate a smarter sequence, or possibility of user-defined sequences.
More generally, I'd appreciate yet more if foobar was able to copy all available info (%metadata% + $info(...)) about selected tracks in some more standardized format, like XML or JSON scheme.