Menu

#19 2 more filename parameters OR commandline bug?

Version 0.8.2
closed
Matthias
None
5
2017-01-13
2017-01-11
No

Hi there

I love the app.

Please can you add another couple of %variables for use in the filename parameters?
I want to use only the initials of the Speaker,and not the full name. However, I don't want to only type initials in the 'Speaker' text box, because then the MP3 tag doesn't show the full name.
Can you add a piece of code that looks at the Name and Surname field and extracts initial 1, 2 (and more?)

We need the MP3 tag to be full name, and the filename to be initials.

For example,
If Speaker = Bob Goldsmith and Title = My Testimony
Then the file could be called "BG My Testimony"

I tried my own workaround by writing a complicated batch script to run from Commandline after the sermon was recorded : it strips away the name and surname and replace initials..., only to find the script is called BEFORE the file is renamed - so it's useless. (BTW - don't you think that's a bug? Shouldn't the rename happen first, and then the commandline be executed?)

Great work.

Malcolm

Related

Tickets: #19

Discussion

  • Matthias

    Matthias - 2017-01-11
    • Group: Version 0.8.1 --> Version 0.8.2
     
  • Matthias

    Matthias - 2017-01-11

    Hi Malcolm,

    thanks for your feedback! If this tool is useful for some people, it was worth the effort.

    Sure, I can add such a parameter. I'm sure it is not so much effort, since C# features really powerful string functions. I'll look at this in the next days.

    LOL If you try to do that in windows batch, that might really become somewhat complicated!

    Why did you name the ticket "2 more filename parameters"? Was there yet another parameter idea?

    My intention of the commandline call was to have it done after everything finished, of course! Else, the whole concept would be nonsense.
    So, if the commandline is executed before renaming that's really a bug. Why should I have done it in this order? Or is the call simply done a bit too early (just some µs after the rename)?
    Same as above, I'll look at this in the coming days, maybe tonight.
    Short test result is: The call is done after renaming but with the filename before renaming! --> Like this, it's useless and it seems like I've never tested what strings are in fact used... :-(

    So, to have it right, the ticket/thread should be renamed "one more filename parameter AND commandline bug" :-)

     

    Last edit: Matthias 2017-01-11
  • Matthias

    Matthias - 2017-01-11
    • status: open --> accepted
     
  • Matthias

    Matthias - 2017-01-12

    Dear Malcolm,

    would you please try if the attached release candidate solves your problems?

     
    • Malcolm Cunningham

      Hi Matthias,
      That works perfectly.

      • the %IS parameter,
      • the order of commandline execution

      Thank you so much
      This will save me some admin!

      God bless you today
      Malcolm

      FYI, I spent the whole day yesterday on this script. I still find CMD batch
      scripts the most complex programs!
      @echo off
      cls
      Echo Replace Name and Surname with initials.
      Echo Assuming KBC[yyyymmdd][FirstName] [Surname] [Title]

      SETLOCAL EnableDelayedExpansion
      echo Path is:
      echo %*

      REM Extract the filename
      set _f=%*
      For %%A in (%_f%) do set _f=%%~nxA
      echo Filename is:%_f%

      REM First 12 characters of filename to keep ("KBCyyyymmdd and Initial of
      Firstname")
      set _st1=%_f:~0,12%

      REM Find 2nd word as Surname and strip initial letter
      FOR /F "tokens=1-8" %%G IN ("%_f%") do set _st2=%%H
      echo Surname is :!_st2!
      set _st3=%_st2:~0,1%
      echo Initial is therefore:%_st3%

      REM Find the remaining Title to append later
      CALL SET _st4=%%_f:*%_st2% =%%

      REM Concatenate the entire sequence
      set _f2=%_st1%%_st3% %_st4%
      echo The New filename is to be %_f2%

      pause

      On Thu, Jan 12, 2017 at 2:18 AM, Matthias manolo0815@users.sf.net wrote:

      Dear Malcolm,

      would you please try if the attached release candidate solves your
      problems?

      Attachments:


      Status: accepted
      Group: Version 0.8.2
      Created: Wed Jan 11, 2017 10:55 AM UTC by Malcolm Cunningham
      Last Updated: Wed Jan 11, 2017 06:04 PM UTC
      Owner: Matthias

      Hi there

      I love the app.

      Please can you add another couple of %variables for use in the filename
      parameters?
      I want to use only the initials of the Speaker,and not the full name.
      However, I don't want to only type initials in the 'Speaker' text box,
      because then the MP3 tag doesn't show the full name.
      Can you add a piece of code that looks at the Name and Surname field and
      extracts initial 1, 2 (and more?)

      We need the MP3 tag to be full name, and the filename to be initials.

      For example,
      If Speaker = Bob Goldsmith and Title = My Testimony
      Then the file could be called "BG My Testimony"

      I tried my own workaround by writing a complicated batch script to run
      from Commandline after the sermon was recorded : it strips away the name
      and surname and replace initials..., only to find the script is called
      BEFORE the file is renamed - so it's useless. (BTW - don't you think that's
      a bug? Shouldn't the rename happen first, and then the commandline be
      executed?)

      Great work.

      Malcolm

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/sermonrecorder/feature-requests/19/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Tickets: #19

  • Matthias

    Matthias - 2017-01-12

    Very nice.

    Then I will release this to the community in the coming days and update the documentation.

     
  • Matthias

    Matthias - 2017-01-13
    • status: accepted --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB