Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#2968 closed enhancement (wontfix)

script to generate DVD box labels for mytharchive native format archive disks

Reported by: schachte@… Owned by: paulh
Priority: minor Milestone: unknown
Component: mytharchive Version: 0.20
Severity: low Keywords:
Cc: Ticket locked: yes

Description

I'm attaching a small script to generate attractive DVD box labels listing the content of MythArchive? native format archive discs. Feel free to include this in the contrib section of mythtv, or wherever else seems appropriate, or even to incorporate the code into mytharchive proper.

A few small improvements to mytharchive would make it possible to make this script more useful:

  • If permitted by the DVD standard, it would be useful if normal (non-native format) Mytharchive discs included the same xml format file for each archived item as native format archive discs do. This would allow labels for DVD, as well as native, format discs.
  • For both disc formats, it would be useful to be able to specify the name (label) of each disc as it is written. This would permit this script to determine disc names itself, rather than having to prompt for them.
  • To make the previous request easier to use, it would be helpful if MythArchive? volunteered a name like "MythArchive? Disc 1" as the default name for a newly generated disk. If this name is accepted, a counter would be incremented, so the next disc would automatically be suggested to be "MythArchive? Disc 2".

With all these features added, it would be possible for mytharchive to have a button for "Print DVD labels" that would allow you to insert previously generated MythArchive? DVDs or native format archives, click OK on the remote, and have an attractive label listing the content of the disc(s) pop out of the printer.

Attachments (1)

mytharchive-label-print (7.5 KB) - added by schachte@… 7 years ago.

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by schachte@…

comment:1 Changed 7 years ago by lukas.kasprowicz@…

Hi Peter,

First some comments on your work:

  • Have you read

http://www.mythtv.org/wiki/index.php/Coding_Standards#Design_guidelines
Please see the section "Avoid dependencies". I do not like it, because why to
invent the wheel 2 times. If they want it like this it has to be done this
way. Maybe paulh can decide to use something like cdlabelgen.

  • Why aren't you using config/mydata.xml which is used to create the DVD?

Using this would make it easier to create DVD Standard dvds. Because you
would not need to create xml files on the DVD. This would help to use code
from mytharchive.py.

I created a concept, that does work for me that creates without additional deps a bitmap from the xml file that is created by mytharchive.py. I have to test it a bit more. I am using bitmaps because these are needed for lightscribe.
This would make your code able to drop the cdlabelgen dep.

Lukas

comment:2 Changed 7 years ago by schachte@…

Hi Lukas,

Thanks for your comments.

I hadn't noticed the part about new dependencies, but I certainly agree with it in general. That's why I suggested this script for the contrib directory rather than integration into mytharchive proper. I had thought about generating postscript directly, and I may yet do that, but cdlabelgen does a pretty good job and already does most of the work. Also note that just by virtue of the fact that this script generates something to be printed it will necessarily add dependencies, since Myth currently doesn't do any printing.

As to config/mydata.xml, I wanted this script to be able to run long after the DVD is burned and that file is purged. This is for two reasons: firstly, I wanted to be able to print covers for DVDs I had already burned (and I expect others would, too). Secondly, I wanted to be able to generate covers for DVD cases holding multiple archive discs generated at different times. The cases I use hold two discs; I may burn the two discs months apart, so I won't have the two mydata.xml files at the same time. Happily, native archive discs already contain practically all the info needed for a DVD label. If regular (non-native) mytharchive DVDs had the same info, I could adapt this script to work for them, too.

comment:3 follow-up: Changed 6 years ago by paulh

  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for you contribution it's much appreciated but I don't want to add this to MythArchive? as it is because of the additional dependencies it adds.

I've added a page to the wiki for your script so anyone who is interested can find it. Feel free to make any changes you see fit. http://www.mythtv.org/wiki/index.php/Print_MythArchive_Native_DVD_Labels

comment:4 in reply to: ↑ 3 ; follow-up: Changed 6 years ago by schachte@…

Thanks, Paul. If I removed the dependency on cdlabelgen and generated postscript directly, would you reconsider adding it? I've been thinking I could produce nicer covers that way, anyway. Also, would a dependency on the netpbm package be unacceptable? Or is there some acceptable python module I can use to read .jpg, .png or .gif video cover art?

Thanks.

comment:5 in reply to: ↑ 4 Changed 6 years ago by paulh

Replying to schachte@csse.unimelb.edu.au:

Thanks, Paul. If I removed the dependency on cdlabelgen and generated postscript directly, would you reconsider adding it? I've been thinking I could produce nicer covers that way, anyway. Also, would a dependency on the netpbm package be unacceptable? Or is there some acceptable python module I can use to read .jpg, .png or .gif video cover art?

Thanks.

Sorry I forgot about this.

I'd rather not add any new dependencies unless absolutely necessary. The mythburn.py script already uses the PIL imaging library that you could probably use. http://www.pythonware.com/library/pil/handbook/index.htm

I think printing DVD labels or case inlays etc need to be as easy as possible otherwise no one will use it - it's easier to just get a pen :-) Scripts that require the user to enter stuff don't work very well in the Myth environment were many users use a remote and don't have a keyboard attached.

The way I originally thought this would work was that there would be a new 'Print Labels' menu option on the 'Archive Utilities' menu. Clicking that would show a screen that allows you to chose what you want to print, dvd label, inlay etc, possibly with different themeable layouts similar to those used to create the DVD menu's (there is a lot of code that could be reused there). You would then be prompted to insert the DVD in the drive which would contain all the information needed to create the label (probably an xml file describing whats on the DVD which will be similar for both native archives and normal DVDs assuming regular DVDs can have additional files on them without freaking out any DVD players that is. When all the information required is available the script would be called to create the label/inlay. It would actually just create an image which the frontend plugin can then show as a preview with a button to actually print the image. QT has a class that can handle printing which could possibly be used to do the actual printing. I also know that Lukas was working on using LightScribe? to create the DVD labels on drives that support it. I would imaging that would work in a similar way with another script that creates the image which can then be burned on the DVD. There would have to be a prompt for the user to turn the disc over of cause.

If you still want to work on this let me know. I don't mind working on the plugin side of things if you don't know c++/qt if you take care of the script.

You'd best reply to one of the lists or email me directly if you prefer - some people get a little upset if you use trac for discussions :-)


comment:7 Changed 5 years ago by stuartm

  • Ticket locked set

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.