Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: fb2k 0.8.3 copy & masstagger problems (Read 2435 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

fb2k 0.8.3 copy & masstagger problems

Hello,

i've come across a minor but frustrating problem using fb2k, v0.8.3:

1.)  the $tab() is behaving as if it were a "$space()" command, adding spaces to
      the end of the previous entry instead of jumping to the next column position.
      the string formatting i'm using is:

$if2(%title%,%_filename_ext%)
$tab(3)
$if2(%artist%,unknown artist)


which is behaving as:

Werewolves Of London___________________________Warren Zevon
Run To You_________________________Bryan Adams

instead of:

Werewolves Of London___________________________Warren Zevon
Run To You____________________________________.Bryan Adams

any ideas?

fb2k 0.8.3 copy & masstagger problems

Reply #1
I'm not that familiar with Foobar code, but I would assume that this is because "Run To You" is so much shorter than "Werewolves Of London".  A tab will only jump to the next tab position - for Run To You" this position is probably the tab before the position for "Werewolves Of London".

In order to ensure that any piece of text followed by 3 tabs places the cursor at the same place you will need to:
  • Ensure you are using a monospaced font, like Courier, FixedSys, or Lucidia Console
  • Pad the text with spaces to ensure that all pieces of text are the same length and therefore will use the same three tab positions
Therefore, try using:

$pad($if2(%title%,%_filename_ext%),30)
$tab(3)
$if2(%artist%,unknown artist)


Where "30" is the length that all strings will be stretched to, using spaces.

As some items may be longer than 30 characters you may need to either increase this value (e.g.: from 30 to 50), or use more code to truncate longer strings, e.g.:

$puts(myTitle,$if2(%title%,%_filename_ext%))
$pad($iflonger($get(myTitle),30,$cut($get(myTitle),27)...,$get(myTitle)),30)
$tab(3)
$if2(%artist%,unknown artist)
I'm on a horse.

fb2k 0.8.3 copy & masstagger problems

Reply #2
You would probably be better off using only $pad() or $padcut() if you are trying to use some sort of columns system for the mass renamer. Although, why are you trying to do this, when you can arrange things into folders instead?

fb2k 0.8.3 copy & masstagger problems

Reply #3
Quote
You would probably be better off using only $pad() or $padcut() if you are trying to use some sort of columns system for the mass renamer. Although, why are you trying to do this, when you can arrange things into folders instead?
[a href="index.php?act=findpost&pid=253992"][{POST_SNAPBACK}][/a]
I totally overlooked $padcut.  That said, my code does include the "..." to signify a truncated value, which isn't available by simply using $padcut.

Using $padcut would change the code to:

$padcut($if2(%title%,%_filename_ext%),30)
$tab(3)
...


I can't comment on whether this should actually be implemented or not, as I've never used Masstagger.  I tested using my "Copy command".

That said, if kode54 doubts your logic, I should seriously consider investigating folders.
I'm on a horse.

fb2k 0.8.3 copy & masstagger problems

Reply #4
Thank you kode54 and Synthetic Soul;  both explanations have provided useful in solving the problem!

-transparency