Menu

command line processing - for scripting

Anonymous
2014-02-26
2018-09-30
  • Anonymous

    Anonymous - 2014-02-26

    Hi guys,

    I just found your tool after many months trying to find something, and im very excited about it.
    Do you have the ability to input command lines and do batch processing?

    Cheers
    Steffen

     
  • t j

    t j - 2014-02-27

    Hi Steffen,
    There should be the executable, tSubGetC.exe, which is the console version of tSubGet. You should be able to use this with some sort of batch (bat) script to perform batch scripting, depending on what you want it to do.

    If you execute tSubGetC without any parameters, you should see something similar to what's shown below.

    tSubGetC - Version: 0.9, Core version: 0.9.6.5 (5 Apr 2012)
    
    Usage:
    tsubgetc [-d msDelay] [-p pageNum] [-o fileOut] [-c] [-y] [-l langid] fileIn
            [-d msDelay]    Delay in ms to add to each caption. Can be positive
                            or negative.
            [-p pageNum]    Specifies the teletext page on which to search for
                            captions. Defaults to page 801 (Australian default)
            [-o fileOut]    Specifies the output file. Defaults to the
                            original filename with the extension removed and
                            '.srt' appended.
            [-c]            Adds colour tags to the output, if present.
            [-y]            Overwrites the output without prompt.
            [-l langid]     Selects the required language id. For a list of IDs,
                            enter 'help' instead of an id.
    

    Let me know if you need any more information.

     
    • Anonymous

      Anonymous - 2018-08-19

      I'm having a problem running the commandline as my filenames have spaces in them. When i rename to something basic like "test.wtv" it works.

      When I put in the full file name it keeps tell me "An invalid parameter was passed". I've tried replacing the spaces with % and %20, but neither work. Any ideas???

       
      • Anonymous

        Anonymous - 2018-08-19

        Don't worry, figured it out... wrap the name in "quotation marks"

         
  • Anonymous

    Anonymous - 2014-03-03

    Amazing!

    Its taken me months of trying to find this exact program and it works!
    Love it.

    Can i donate some $$ to you guys? This will save me so much time.

    Steffen.

     
  • t j

    t j - 2014-03-04

    I'm glad you found it useful! If you wish to donate, you can do so here. Thanks!

     
  • Anonymous

    Anonymous - 2018-03-11

    I know this is old. Wonder if instead of "[-y] Overwrites the output without prompt." is there a commandline to simply skip if the file is already there. NOTE: I'd like to run this against all files in the "Recorded TV" folder and want it to simply skip files it has already done.

     
  • t j

    t j - 2018-03-12

    To be honest, you could probably get around it with some scripting (e.g. here), but here, try this: https://sourceforge.net/projects/tsubget/files/tSubGet-0.9.7

    Not tested, so ymmv. Pass -k to skip if it exists.

     
    • Anonymous

      Anonymous - 2018-08-19

      Thanks for this, just what i was looking for too!

       
  • Anonymous

    Anonymous - 2018-09-29

    Hope you can give me some advice. What i'd like to do with this program with WMC is as follows:

    1. WMC records a TV program
    2. Upon Recording completion i'd like TSUBGET to run to create an SRT file in the same folder location

    I'm really struggling with the best way to achieve the following in priority order (1) how do i inject the unique path\filename into the commandline since it doesn't accept wildcards (i.e. . or *.wtv). (2) what script/program should i use to automatically detect that a new show has just finished recording.

    Ideally the ability to use wildcards (.) would fix all my problems as I'd simply run the commandline with "-k" to skip files already processed every 30 minutes.

     
    • Anonymous

      Anonymous - 2018-09-29

      If wildcards were available i'd run it agains *.wtv files.

       
  • t j

    t j - 2018-09-30
    set "BASE=%~dp0"
    set "TSUBGET=%BASE%\tSubGetc.exe"
    
    for %%f in (*.wtv) do (
      "%TSUBGET%" -k "%%f" 
    )
    

    Stick that in a .bat file (save it in the same location as tsubget) and run it from the same folder as your WTVs. As for detecting new WTV files, as you've mentioned, running on a scheduler is probably the easiest. E.g. use the task scheduler to do this, just make sure it starts in the same folder as your WTVs.

     

    Last edit: t j 2018-09-30
    • Anonymous

      Anonymous - 2018-09-30

      Legend!!! thanks for responding so quickly. Works perfectly.

       
      • Anonymous

        Anonymous - 2018-09-30

        I used the following:

        set dir=z:\Recorded TV

        for /f "delims=" %%A in ('dir /b "%dir%*.wtv"') do ("C:\Program Files (x86)\tSubGet\tSubGetC.exe" -k "%dir%\%%A")

         

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB