VectorLinux

Cooking up the Treats => General Development => Topic started by: Triarius Fidelis on December 17, 2007, 05:17:00 pm

Title: looking for some bash scripting or something to do
Post by: Triarius Fidelis on December 17, 2007, 05:17:00 pm
Anyone got some back-end programming he can't pull off himself? I'm itching to do something a little more than packaging now (while not biting off more than I can chew, hence 'Epic Fail Guy')

If it's Gambas, I can at least look at the code and suggest an algorithm. :)
Title: Re: looking for some bash scripting or something to do
Post by: M0E-lnx on December 18, 2007, 06:16:43 am
Well, There was a conversation on IRC about a good replacement for vsuper.
easuter had started one but he ran into security issues.

Another suggestion would be a good cd burner app. Maybe you can write a backend, and we could easily draw a nice gui for it. I've always thought we need to give that a shot sometime
Title: Re: looking for some bash scripting or something to do
Post by: exeterdad on December 18, 2007, 06:50:47 am
Agreed with the burner.  I was going to give it a shot, but I've much to much to learn about GTK.  Nooooo  not gonna mess with Gambas.  :)
Title: Re: looking for some bash scripting or something to do
Post by: M0E-lnx on December 18, 2007, 07:24:26 am
I think if we could come up with a good backend, the GUI is no problem
Title: Re: looking for some bash scripting or something to do
Post by: rbistolfi on December 18, 2007, 07:37:08 am
That is a good idea. I use cdrtfe when I am stuck in windows, which is a frontend for cdrtools. It is quite good, and suitable for advanced users as well (you don't lose functionality compared with the cli versions).
Title: Re: looking for some bash scripting or something to do
Post by: kidd on December 18, 2007, 07:57:30 am
Another suggestion would be a good cd burner app. Maybe you can write a backend, and we could easily draw a nice gui for it. I've always thought we need to give that a shot sometime

Isn't that reinventing the wheel?
Title: Re: looking for some bash scripting or something to do
Post by: M0E-lnx on December 18, 2007, 08:00:09 am
Isn't that reinventing the wheel?

I think linux still doesn't have a good cd burner app... maybe it's just me, but all the existing apps have fallen short for me at some time
Title: Re: looking for some bash scripting or something to do
Post by: exeterdad on December 18, 2007, 08:29:05 am
I think k3b is awesome.  But heavy.  I would say Linux doesn't have a good "lightweight" burning app.  Besides, it would introduce us to many new users.
Title: Re: looking for some bash scripting or something to do
Post by: lagagnon on December 18, 2007, 09:04:40 am
I think k3b is awesome.  But heavy.  I would say Linux doesn't have a good "lightweight" burning app.  Besides, it would introduce us to many new users.

I do feel somewhat like "kidd" - it may be re-inventing the wheel. There are great ncurses, lightweight burning apps (bashburn, mybashburn) already out there and Graveman I though was excellent even though it had two bugs in it.

Why not take over the Graveman code? It's a great start, just needs fixing up and adding DVD video capabilities...
Title: Re: looking for some bash scripting or something to do
Post by: Triarius Fidelis on December 18, 2007, 09:10:31 am
Well, There was a conversation on IRC about a good replacement for vsuper.
easuter had started one but he ran into security issues.

Why replace vsuper as it is now? I forgot...

Another suggestion would be a good cd burner app. Maybe you can write a backend, and we could easily draw a nice gui for it. I've always thought we need to give that a shot sometime

Can you give me an idea of what options the script would take?
Title: Re: looking for some bash scripting or something to do
Post by: rbistolfi on December 18, 2007, 09:26:38 am
What about a simple tool to switch default language, locale, and perhaps other environment variables?
Title: Re: looking for some bash scripting or something to do
Post by: saulgoode on December 18, 2007, 09:32:33 am
I would find a KRename-type utility which was not so bloated (not dependent on KDElibs) and bug-prone (last time I used it, anyways) to be very useful. It should be "safe" and it should provide an option to create a script which can restore the original names. The latter would be for situations where randomly named image files are "sequentialized" for processing, then their original names restored.
Title: Re: looking for some bash scripting or something to do
Post by: M0E-lnx on December 18, 2007, 09:47:38 am

Why replace vsuper as it is now? I forgot...
I forgot too...

Quote
Can you give me an idea of what options the script would take?
Pretty much mock the options that k3b offers, but make them work ;)
keep it light-weight (away from kde or gnome libs)

An entirely different line of thought for those of you interested. This might require some ingenuity and creativity.... so here it goes
I've had thoughts about creating a "system restore" utility. This might be very useful to newbies.
This utility would undo (up to some extent) any damage created by a bad upgrade.
I think linux needs this.
maybe find a way to log what is being upgraded.
It may require storing information (if not packages) on the disc drive and maybe make it run in the background (or force gslapt or slapt-get to run it before any operations).

So far, that's all I got... if you all have any other ideas, let's hear them
Title: Re: looking for some bash scripting or something to do
Post by: Triarius Fidelis on December 18, 2007, 08:26:44 pm
http://pastebin.ca/823097

Here's vlocaleset. When you put it in /sbin, it should function. This script can easily be integrated into the existing VASM because it's written in bash.

...but it uses Perl at one point... :)

I'm entertaining the 'krename' idea.

Edit: To be 'lightweight', I would have to implement a subset of KRename's functionality. Hmm...
Title: Re: looking for some bash scripting or something to do
Post by: Triarius Fidelis on December 18, 2007, 08:40:29 pm
Pretty much mock the options that k3b offers, but make them work ;)
keep it light-weight (away from kde or gnome libs)

What kind of interface are we talking about?

BTW, I don't have k3b atm. :)
Title: Re: looking for some bash scripting or something to do
Post by: M0E-lnx on December 19, 2007, 06:24:45 am
I was thinking a gambas GUI using gb.gui so that it looks nice in GTK and QT.
not sure what all we need in the background... but it should be able to do the same things k3b does
burn cd and dvd images
burn data discs, audio and video
maybe (lots of work alert) process audio and video (convert mp3 -> wav for cd's)
I'm sure we can probabbly use lots of existing libraries for it... just need to make the right calls

Title: Re: looking for some bash scripting or something to do
Post by: Triarius Fidelis on December 19, 2007, 06:35:03 am
I was thinking a gambas GUI using gb.gui so that it looks nice in GTK and QT.
not sure what all we need in the background... but it should be able to do the same things k3b does
burn cd and dvd images
burn data discs, audio and video
maybe (lots of work alert) process audio and video (convert mp3 -> wav for cd's)

Ah, interesting, but how would you estimate the size of the uncompressed audio?

If you can make a front-end and show me screencaps, I can deduce a spec from it and write the back-end. Deal?
Title: Re: looking for some bash scripting or something to do
Post by: Joe1962 on December 19, 2007, 10:53:10 am
Ah, interesting, but how would you estimate the size of the uncompressed audio?
No estimation involved, 74 mins = 650 MB. Actually, that's an aproximation, but the point is that it is a constant ratio once uncompressed. You need to take into account the silence between tracks though, unless using crossfade.
Title: Re: looking for some bash scripting or something to do
Post by: M0E-lnx on December 19, 2007, 01:14:12 pm
So that can be easily done by looking at each file's size attributes...
Title: Re: looking for some bash scripting or something to do
Post by: easuter on December 19, 2007, 01:31:40 pm
So that can be easily done by looking at each file's size attributes...


Yep. An mp3 file *should* have a predictable compression ratio at a given bit-rate. Higher bit rates mean the file will be larger.

Quote from wikipedia:

Quote
In digital multimedia, bit rate often refers to the number of bits used per unit of time to represent a continuous medium such as audio or video after source coding (data compression). The size of a multimedia file in byte is the product of the bit rate (in bit/s) and the length of the recording (in seconds), times eight. In case of streaming multimedia, this bit rate measure is the goodput that is required to avoid interrupts.
Title: Re: looking for some bash scripting or something to do
Post by: Joe1962 on December 19, 2007, 01:40:07 pm
Forget about compressed file size and bitrate, etc... Just find out the sound length in seconds.
Title: Re: looking for some bash scripting or something to do
Post by: easuter on December 19, 2007, 02:00:51 pm
Forget about compressed file size and bitrate, etc... Just find out the sound length in seconds.

Heh...the simplest solution is always the best  :-X
Title: Re: looking for some bash scripting or something to do
Post by: M0E-lnx on December 19, 2007, 02:06:36 pm
Forget about compressed file size and bitrate, etc... Just find out the sound length in seconds.

Heh...the simplest solution is always the best  :-X

That could be right... IIRC, in .wav format 1sec of audio is around 10mb or something like that
Title: Re: looking for some bash scripting or something to do
Post by: Joe1962 on December 19, 2007, 02:15:32 pm
IIRC, in .wav format 1sec of audio is around 10mb or something like that
Exactly. It's a constant, just have to google it up or something... ;)

Think about VBR files... that would be a sort of nightmare to calculate otherwise... ;D
Title: Re: looking for some bash scripting or something to do
Post by: Triarius Fidelis on December 19, 2007, 06:21:32 pm
IIRC, in .wav format 1sec of audio is around 10mb or something like that
Exactly. It's a constant, just have to google it up or something... ;)

Even for different bit rates?

Edit: BTW, until I have a spec, I won't be able to do anything. I don't even know where to start.
Title: Re: looking for some bash scripting or something to do
Post by: Joe1962 on December 19, 2007, 07:05:35 pm
Even for different bit rates?
There are no different bitrates, audioCD is standard 44.1 KHz stereo.
Title: Re: looking for some bash scripting or something to do
Post by: Dweeberkitty on December 23, 2007, 05:27:59 pm
Hanumizzle,

If you are looking for some scripting to do, could you help me with this? I had posted this a while back but nobody replied. It would be a great help with the MMBD development.

http://www.vectorlinux.com/forum2/index.php?topic=4667.0

Thanks!
Title: Re: looking for some bash scripting or something to do
Post by: Toe on December 23, 2007, 06:53:25 pm
Even for different bit rates?
There are no different bitrates, audioCD is standard 44.1 KHz stereo.
Well, there is one part you're forgetting here.  There's two things that determine the size of one channel of uncompressed audio: the sample rate and the sample size, in bits.

The full equation is like this: Sample rate * sample size * number of channels = bits per second.
Title: Re: looking for some bash scripting or something to do
Post by: Joe1962 on December 23, 2007, 08:04:47 pm
I know, but the only need for audio conversions in a burner app is from any compressed format to Red Book audio CD specs. Well, actually there are couple of other standards, but I don't think they are relevant, since I don't suppose they will play on normal equipment. Anyway, I finally took the time to look up the specs:

Quote
2-channel signed 16-bit PCM sampled at 44 100 Hz.
Bit rate = 44,100 samples/sec × 16 bit/sample × 2 channels = 1,378.125 kbit/s (10.09 MByte per minute)

Source: http://en.wikipedia.org/wiki/Red_Book_(audio_CD_standard)

If you want to know about the other standards: http://en.wikipedia.org/wiki/Audio_CD