Hpodder-and-Torsox

Christopher Chaltain chaltain at gmail.com
Thu Oct 23 02:27:51 UTC 2014


I can't provide as much information as Tim, but wouldn't mv in Linux do 
the same and more than ren in DOS?

On 10/22/2014 10:31 AM, Tim Chase wrote:
> On October 22, 2014, Hart Larry wrote:
>> I am surprised I cannot type consecutive numbers with a dash,
>> such as hpodder fetch 60-76
>
> In this case, if your shell is bash, you can use the notation
> "{60..76}", so you'd type
>
>    hpodder fetch {60..76}
>
> If you have disjoint sets, you can just stack them
>
>    hpodder fetch {3..18} {60..76}
>
> Note that it's *bash* that does the expansion, so this notation works
> with any command you might want to pass a sequence of numbers to:
>
>    echo {1..10}
>
> will print the numbers 1 through 10.
>
> If shellworld uses a shell other than bash, your mileage may vary.  I
> would have tested it directly, but I don't have an account there, nor
> could I find any way to request an account--you must have secret
> access (grins).
>
>> Also, its a shaim there are no ways of arranging podcast
>> numbers in to catagories. They just asend even if one is removed.
>
> That's a known/intentional limitation of hpodder: the IDs are fixed.
>
> That said, you could define a variable to contain them:
>
>   NON_TOR="1 3 5 6 18"
>   NEEDS_TOR="2 4 8"
>   hpodder fetch $NON_TOR
>   set_up_tor.sh
>   hpodder fetch $NEEDS_TOR
>   tear_down_tor.sh
>
>> And mostly in video podcasts, it is not showing any file extention,
>> even though they all may be dot mp4. Even some mp3 podcasts are not
>> showing an extention, but I canot figure out a pattern.
>
> I'm not sure what's happening there, but you might be able to use the
> ~/.hpodder/hpodder.conf to specify either a "postprocesscommand" or a
> "renametypes" line for particular feeds, so you might have a block
> that looks something like
>
>    [64]
>    renametypes=audio/mpeg:.mp3,audio/mp3:.mp3,x-audio/mp3:.mp3,video/mp4:.mp4
>
> to have feed id=64 rename mp4 files if the mime-type is
> "video/mp4".  According to "man hpodder", the default is the first
> three items for renaming mp3 files.  If you're not getting .mp3
> extensions on mp3 files, you might have to check what mime-type the
> server is sending for that particular file.  I haven't tested that,
> but it sounds like what you want based on the man pages.
>
>> And lastly, that leads me to wonder if there are any easy2use
>> renaming programs, which would work similar to ren or rename in
>> DOS?
>
> There's a utility called "rename" which I *think* comes with Perl.
> It's present out-of-the-box on my Debian install.  You can specify a
> perl regular-expression to do the renames.  I usually use the "-n"
> flag to test the results (it does a dry-run without actually
> renaming), and then if it works, I recall the command and remove the
> "-n"
>
>    rename -n 's/$/.mp3/' [0-9]*
>
> will tell you what it *would* do to the files beginning with a number
> (the "[0-9]*" is a file-globbing spec for the files you'd want to
> target).  In this case, it would tack ".mp3" on the end of the files
> you specified.
>
> Then you can use the up-arrow or control+P or "fc" to edit the
> previous command and remove the "-n".  If you're really lazy, Bash
> offers a substitution syntax so you can just type
>
>    ^-n
>
> and it will search for "-n" and replace it with nothing.  I love this
> lazy syntax, but it's a bit obscure for many folks.
>
>
> Hope this gives you some more progress towards less annoyance,
>
> -tim
>
>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list at redhat.com
> https://www.redhat.com/mailman/listinfo/blinux-list
>

-- 
Christopher (CJ)
chaltain at Gmail




More information about the Blinux-list mailing list