Grafburn cd burner - new version 0.10.1

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#16 Post by Nathan F »

Hmm, where to start?
I don't know how advanced GrafBurn is intended to be.
Dead simple, actually. This is not intended to be a replacement for a ful size burner program. It might be possible to cobble something together regarding audio encoding but I have a feeling it might be kind of clunky anyhow. Let me see how much interest there is over the near future. Right now there's more than I expected, so who knows.

klhrevolutionist - Both are good suggestions. I will change that wording for the next tarball, and I think it might be enough to just pop up the md5sum with one of the dialog windows, along with a warning to double check it. I'm loath to add another step, though, as it would run against my purpose for the scripts.
I did not understand what the tmp directory was for until I created one and ran the program.
OK, that's definately a weak point. What would be ideal would be a file selector widget that can build a list of files and directories, but no such utility exists in Puppy to my knowledge. I know of one good implementation of this type of widget but it requires PyGTK. At the very least I will try to make the preferences dialog more verbose so you know what you're doing when you start.

I think that the use of a temp directory will probably always be a part of this little utility. I got the basic idea from BashBurn. There's an interesting fork of BashBurn actually that uses the dialog program rather than typing responses at the prompt, which I considered adapting to Xdialog usage (dialog and Xdialog are fairly command line compatible), but unfortunately it won't run for me anyway. Anyway if you look at BashBurn a bit you can see a little of my inspiration for starting this. It's nothing fancy, but it works reliably and it stays simple enough that it doesn't ask too many confusing questions.

The confusing questions and settings are what I want to avoid here, hence my desire to keep the number of options to a minimum. For a more full featured program I'd recommend Xcdroast for Puppy, or k3b if you can swing a KDE installation. I have KDE installed on my desktop machine just so I can use k3b, because it's really the best burning program that's ever been written for *nix.

Nathan
Bring on the locusts ...

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#17 Post by plinej »

Here's a cdrdialog script I found. I changed all of the dialog to Xdialog in the script. Just figured I'd put it up here incase there's any worthwhile code in there for you. It's a pretty small simple script though. I haven't tried to burn anything with it either.
Attachments
cdrdialog.tar.gz
(1.57 KiB) Downloaded 738 times

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#18 Post by MU »

Muppy is based on Puppy 2.12.
Maybe I added a different Gtkdialog.
However with my fix it works fine, it helped me building some Test-isos of Muppy007, that is uploading now.

Mark

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#19 Post by plinej »

I also just got that MyBashBurn program to run using Xdialog after a bunch of tweaking. I'm still working on it though. I'll package up a dotpup for testing after a little more work.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#20 Post by Flash »

Nathan F wrote:...
Flash - The program should already support multi-session dvd. When you just burn an iso all it does is call the burniso2cd script. If you create an iso from scratch the burning stage is based on the same code, with all the same functions. I just cleaned it a bit, removed the unnecessary parts, and made it better looking....
Sorry, I didn't make my meaning clear, Nathan. Burniso2cd is only good for making a bootable multisession DVD from an .iso file. I meant to use a DVD as an archive, saving whatever I want to it in session after session until it is full.

I do this with CD audio books that I convert to mp3. After I convert a book, I save it to the DVD as a session. It works wonderfully well. Whether the disk is mounted in Linux or Windows, the books all show up even though each is saved in a separate session. Then I transfer the books from the DVD to a hard drive so all the books in my library are conveniently in one folder. The original DVDs are then in effect incremental backups before the fact. 8)
A little window showing the burning commands might not be a bad idea,
Especially if the commands in the window can be edited before clicking "run" in the GUI. It looks like they can with plinej's PBcdripper, though I haven't tried it yet. (I'm researching cdparanoia in the hope of finding a command line option that will speed up the ripping process.)

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#21 Post by Nathan F »

Mark - I went in and added one of the fixes you mentioned, the check to make sure the iso file exists, but I did it on top of the error check. Seems good to me to have both, I'd rather know if mkisofs exited with errors even if the file exists.

Also, regarding the trailing slashes, the best way to proceed would be to find out what the file selector widget returns for you. Mine returns the path with the trailing slash already there, as I think it's supposed to. Not sure if having an extra one in there would cause problems or not, I'll have to try it.

I have a new version partway done, with a much improved preferences dialog. I'll probably upload sometime late tonight or maybe tomorrow depending on how busy I get. The new dialog explains what the temp and output directories are for and has an entry to set the default speed, although the use of that data isn't integrated into the burning stage yet.

I'm thinking about how best to add a function that encodes and burns an audio cd. Not about how to do it technically, but where it might fit best into the gui. There are two options, either an extra button on the main window, or an extra choice in the creation dialog. I like the first option, but to keep it from getting cluttered I would probably rearrange the rest of the window a bit. I'm thinking maybe move the preferences and exit buttons to a horizontal position along the bottom along with a help button. They would probably be made smaller in the process. Of course, this is assuming I want to put that much work into the project. That depends a little bit on how much everybody wants that particular function.

Nathan
Bring on the locusts ...

User avatar
klhrevolutionist
Posts: 1121
Joined: Wed 08 Jun 2005, 10:09

#22 Post by klhrevolutionist »

Nathan, if I could click a button and choose a directory of mp3 to burn to cd I say why not add that. That is the great thing about most pup projects people try and make everyday task that much easier. Of course I understand you wanting to keep clutter out of the way so maybe just created another wrapper if your up to it !

Don't burn yourself out !
Heaven is on the way, until then let's get the truth out!

User avatar
john biles
Posts: 1458
Joined: Sun 17 Sep 2006, 14:05
Location: Australia
Contact:

#23 Post by john biles »

Hello Nathan F,
I installed your CD burner and now plinej's PBcdripper won't open when I click on the Icon.
I unzipped your tar.gz file and copied the files in to their respective folders eg: usr etc.
Is this the correct procedure for installing your program as the file wasn't a Dotpup?

I'm Running Puppy 2.10 and I did the install of your package while running live to test it before installing your package to the Puppy that is installed on my HD.

Has anyone else had the same problem?
Legacy OS 2017 has been released.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#24 Post by plinej »

You can install as an alien package with petget, but manually dragging files to their locations still shouldn't affect PBcdripper. What version of PBcdripper are you using? What happens when you type 'PBcdripper' (without the quotes) on the command line?

User avatar
john biles
Posts: 1458
Joined: Sun 17 Sep 2006, 14:05
Location: Australia
Contact:

#25 Post by john biles »

Hello plinej,
I'm at work but believe it's version 1.5 as you seem to update you burner ever couple of days it hard to keep track.
I will try the command line when I get home.
Legacy OS 2017 has been released.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#26 Post by plinej »

1.9 is my newest version, give that one a try.

http://www.murga-linux.com/puppy/viewtopic.php?t=12088

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#27 Post by Nathan F »

I created a mockup of the window as it would appear with the audio cd option. See screenshot. Doesn't look too bad. I'm not going to write that code right away, but I'm thinking I'll probably go ahead and do it after all. There are a few considerations. I know I'd like to be able to encode to wav from mp3 and ogg, but are there any other formats that are going to be vital here? Bearing in mind simplicity.

john - I can't see personally how it might be related. Grafburn doesn't install any system libraries and pretty much stays confined to it's own AppDirectory. If there really is a bug I will fix it for sure, but I think it's probably coincidence.

I'll upload version 0.4 in the morning sometime.

Nathan
Bring on the locusts ...

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

Wav, Mp3 and Ogg sounds about right for starters

#28 Post by WhoDo »

As to other formats, I hope I'm not teaching my Grandma any egg-sucking, or exposing my own ignorance, but at a minimum I'd like it to be able to encode from mp3 to CDDA and perhaps flac, too.
That may be quite a lot. Wav, Mp3 and Ogg sounds about right for starters. Plinej is working on adding sound recording to an app he is working on - that may be worked co-operatively?

the amazing Soxgui-0.2 which converts between audio formats
is in Puppy Star (2.13)
http://www.murga-linux.com/puppy/viewtopic.php?p=85761

However for future features who knows what might well be possible (ultimately it is up to Nathans good judgement)

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#29 Post by Nathan F »

Yes, I don't know why I forgot about flac, and I guess cdda is pretty popular also. This is new ground for me though, currently I just use ogg (and mp3 when circumstances force me to).

I'm thinking I could have an Xdialog combobox for selecting the format to encode to, and just use the file extension to figure out what format we're coming from. Give me some time to think about this, I hadn't planned originally on even adding any kind of encoding.

Nathan
Bring on the locusts ...

amish
Posts: 615
Joined: Sun 24 Sep 2006, 23:15

#30 Post by amish »

that's a beeeeautiful app, nathan. does it use cdrecord? if it doesn't, it will already be set to avoid a cdrecord bug with the 2.6 kernel. but, i have puppy 1.07 and grafpup 104 :) :) and i can use this with one of those. thank you yet again.
sadly, it is not possible to separate politics from free software. free software - politics = unfree software.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#31 Post by plinej »

Nathan, Here's a dotpup for a hacked MyBashBurn using Xdialog. This is not for everyday use because I haven't tested any of it, I just made the gui work. It has quite a few features and it may give you some ideas. When you start this dotpup from the menu it will be started from within rxvt because there are parts in the code that use echo that I need to find and convert to xdialog. The scripts depend on the tput command which isn't in puppy either so I'll attach a dotpup for that too. I really like your app better but there's alot of good code in this that may be useful.
Attachments
MyBashBurn.pup
(64.91 KiB) Downloaded 660 times
Tput.pup
(13.2 KiB) Downloaded 758 times

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#32 Post by plinej »

Nathan, I had to edit the set_prefs script in 0.3 like this:

from:
--stdout --title "Grafburn: temp directory" --dselect $OLDTMPDIR 0 0`
to:
--stdout --title "Grafburn: temp directory" --dselect "$OLDTMPDIR" 0 0`

and

from:
--title "Grafburn: output directory" --dselect $OLDOUTDIR 0 0`
to:
--title "Grafburn: output directory" --dselect "$OLDOUTDIR" 0 0`

without the quotes I got no Xdialog popup

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#33 Post by plinej »

One other thing I always disliked about the burniso2cd code was the line:

Code: Select all

 SCSIDRIVES="`cdrecord -scanbus 2>&1 | grep '[0-9],[0-9],[0-9]' | grep -v '*$' | tr '|' " " | tr '\t' '|' | cut -f 2,3 -d '|' | tr -s " " | tr "'" '_' | tr " " '_' | tr -s '_'`" #'
my output:

Code: Select all

0,0,0|_0)_LITE-ON_DVDRW_SHW-1635S_YS0N_Removable_CD-ROM
1,0,0|100)_WD_1600JB_External_0107_Disk
I'd change it to:

Code: Select all

 SCSIDRIVES="`cdrecord -scanbus 2>&1 | grep -i cd-*rom | grep '[0-9],[0-9],[0-9]' | grep -v '*$' | tr '|' " " | tr '\t' '|' | cut -f 2,3 -d '|' | tr -s " " | tr "'" '_' | tr " " '_' | tr -s '_'`" #'
my output:

Code: Select all

0,0,0|_0)_LITE-ON_DVDRW_SHW-1635S_YS0N_Removable_CD-ROM
That way your usb hard drives don't show up as a possible selection to burn to. It needs to be `grep -i cd-*rom` because most drives show up as cdrom but as you can see, I have one that shows up as CD-ROM.

I only mention this because I see you used that same piece of code in a couple of your scripts.

User avatar
Nathan F
Posts: 1764
Joined: Wed 08 Jun 2005, 14:45
Location: Wadsworth, OH (occasionally home)
Contact:

#34 Post by Nathan F »

The quotes around "$OLDTMPDIR" and "$OLDOUTDIR" should only be necessary with spaces in directory names, but since that's a very real possibility I went ahead and added it.

The extra parameter for the search of the drives seems like a good idea also. I was going to have a look at it myself, since on this laptop it was picking up the hard drive and any attached pendrives also. Now fixed. Thanks to plinej for both of those suggestions.

I also went ahead and added the trailing slash I was talking to MU about, seems to do no harm even though that means in my circumstance I get a double slash before the filename.

Nathan
Bring on the locusts ...

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#35 Post by plinej »

Nathan,

This line in the grafburn script:

<action>rox /usr/local/apps/Grafburn/help.txt</action>

Does rox actually display the text file? I don't know because I actually stripped out rox and just have a script that passes rox commands to emelfm2 since so many puppy scripts utilize rox. Instead of using rox as the command would it be okay to use defaulttexteditor? Or does Rox display the text nicer? No big deal, I can just edit my rox script to take that command into account. Just curious if it was a mistake or not.

Post Reply