Leading and trailing spaces removal

George Akimov's Avatar

George Akimov

31 Oct, 2017 01:20 AM

1. If you experienced a crash or other abnormal behavior, please attach the log file 'beaTunes-logs-2017-10-30-181426.zip' by dragging it from your desktop onto the 'Attach File' button below.

2. Please enter your message to us here.

It would be nice to add inspection check for leading and trailing spaces and a way to remove them from any tag, similar to https://dougscripts.com/itunes/scripts/ss.php?sp=removeleadingtrailingspaces

* beaTunes: 5.0.5
* JVM: OpenJDK 64-Bit Server VM
* Version: 25.152-b6
* Vendor: JetBrains s.r.o
* OS: Mac OS X 10.12.6, x86_64
* Library: iTunes
* Memory: 92m - 2048m
* Registered as: George Akimov

  1. 1 Posted by George Akimov on 16 Jan, 2018 10:59 AM

    George Akimov's Avatar

    No comments? No reaction? No takers?

  2. Support Staff 2 Posted by hendrik on 16 Jan, 2018 05:52 PM

    hendrik's Avatar

    Hey George,

    apologies, I've never reacted to this. I noticed and the request makes a lot of sense.
    While coding a full blown inspection to do this takes a little bit more effort, a simple beaTlet is a piece of cake. I did and the result is attached.

    To install, unzip the attached file and place the contained file named RemoveWhitespace.groovy in your plugin directory (see http://help.beatunes.com/kb/plugins/how-to-install-a-plugin).

    Note: This is a simple beaTlet. It always operates on the whole library. You cannot select specific fields. Instead, standard fields (name, album, artist, ...) are used.

    Hope this helps,

    -hendrik

    PS: I also checked the file into the source code repository on GitHub

  3. Support Staff 3 Posted by hendrik on 16 Jan, 2018 05:54 PM

    hendrik's Avatar

    I should add: After installation of the beaTlet and a beaTunes restart, there should be a new menu item under Tools.

  4. 4 Posted by George Akimov on 27 Jan, 2018 12:56 AM

    George Akimov's Avatar

    Tested it on a quite large library, worked fine and fast too, thank you. There was no clear indication what tracks and fields have been changed, but the Modification time could be used to sort by and see what comes on top.

    Also thanks for pointing me to the plugin API, I may play with it later and do something in Python, seems clear and easy enough to me.

  5. Support Staff 5 Posted by hendrik on 27 Jan, 2018 12:24 PM

    hendrik's Avatar

    Tested it on a quite large library, worked fine and fast too, thank you.

    Please note that, some changes may still be written after the beaTlet ran through.

    Also thanks for pointing me to the plugin API, I may play with it later and do something in Python, seems clear and easy enough to me.

    Awesome! Let me know, in case you have questions (preferably in a new discussion).

    Have a great weekend!

  6. 6 Posted by muell_bin on 20 May, 2018 08:18 PM

    muell_bin's Avatar

    oh noes :(

    java.util.concurrent.RejectedExecutionExeption: Task java.util.concurrent.FutureTask@174190ab receted from com.tagtraum.tunes.TunesUtilities$1@67c99391 etc ...
    pool size 1, threads 1, qued tasks 1000, completed 67

  7. Support Staff 7 Posted by hendrik on 20 May, 2018 10:46 PM

    hendrik's Avatar

    Just wait a little and let it run again...

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac