Re: [Freevo-devel] Re: Help requested for Unicode/XML strings in FXD files !!!!

2004-02-29 Thread centraladmin
 Unicode again, I'm starting to hate it.
The same for me.

 The imdb grabber that writes the file is bad! You should use the
 fxdparser in util to write the file. And you need cvs of Freevo.
OK, understood. BTW.i work with Freevo CVS, so no problem for that.

 I just patched the fxdparser. You need to write the files in the
 encoding 'utf-8' and (not like the imdb parser) put the encoding
 information in the header. Again, use fxdparser to read _and_ write
 fxd files. How to write, just take a look at directory.py where the
 new config is written.
OK, i do that for my allocine.py plugin. So if i understand well, id need :
1 - a video/plugins/allocine.py
2 - a plugins/fxdallocine.py with import of fxdparser.py. Right ??

 BTW, if someone could fix the imdb grabber, that would be really
 great.
OK, i can do that after my plugin if nobody is interested.

Regards (and thanks!), Sylvain.



---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


Re: [Freevo-devel] Help requested for Unicode/XML strings in FXD files !!!!

2004-02-29 Thread den_RDC
I don't know if you can use UTF8 in an FXD XML file, but it works with XMLTV 
XML files. I use the following function to convert what the server gives me 
(windows 1215 charset) to UTF8 in pytvgrab. 

def clean_char( self, contents ):

Convert windows-1252 char's to UTF-8 encoding

contents = unicode(contents, 'windows-1252')
contents = contents.encode('utf-8')
return contents

I hope this is usefull.

Mvg
den_rdc

On Saturday 28 February 2004 18:58, [EMAIL PROTECTED] wrote:
 I am currently developping a new video plugin similar to imdb.py, but for
 getting french comments and title for movies. The equivalent website for
 that in France is called 'allocine.fr'. The grabber works very well and
 give me all the needed information, but i have a big problem when i want
 to write the strings to the FXD files.
 1 - I have created a plugins/fxdallocine.py and a video/plugins/allocine.py
 2 - These files are copy of plugins/fxdimdb.py and video/plugins/imdb.py
 3 - The problem is located in the str2XML function of fxdallocine.py (i
 think) because strings are now in French, with many accent, like é, è, à,
 and so on.
 4 - So my big problem is :How to convert these characaters, where in the
 code and with which kind of code ???
 If someone can just give me an example to encode a string like
 après leur échec pour éliminer Sarah Connor
 in an FXD file, it would be great...

 Thanks by advance, Sylvain.


 ---
 SF.Net is sponsored by: Speed Start Your Linux Apps Now.
 Build and deploy apps  Web services for Linux with
 a free DVD software kit from IBM. Click Now!
 http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
 ___
 Freevo-devel mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/freevo-devel


---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56alloc_id438op=click
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-devel] [PATCH AND NEW FILE]

2004-02-29 Thread centraladmin
Hi.
Here is the first attempt for an Allocine.fr video information grabber.
Allocine.fr is similar to IMDB, but for french speaking people. So this
grabber works like the video/plugin/imdb.py plugin.

Dishi, i have found one bug (i think) in the util/fxdparser.py : the
setattr method doe not work, i modify it. Moroever, i add a setcdata
method to allow cdata just below a root node. My modified fxdparser is
joined.

If you wand to test the plugin (with Freevo CVS only)
1 - save the joined fxdparser.py in src/util
2 - save the joined allocine.py in src/video/plugins
3 - Add a plugin.activate(video.allocine.py) in your config file.
Then you should see a new menu item allowing you to grab video information
from Allocine (again, only for french speaking people).

Current data downloaded :
 - Title
 - Plot
 - Year
 - Picture (if available)

Sylvain.

french
Si vous parlez français et que vous utilisez Freevo CVS, pourriez vous
faire des tests complémentaires ??
Merci.
/french
#if 0 /*
# ---
# allocine.py - Plugin for ALLOCINE support
# ---
# $Id$
#
# Notes: IMDB plugin. You can add IMDB informations for video items
#with the plugin
#activate with plugin.activate('video.allocine')
#You can also set allocine_search on a key (e.g. '1') by setting
#EVENTS['menu']['1'] = Event(MENU_CALL_ITEM_ACTION, arg='allocine_search_or_cover_search')
#
# Todo:  - Update existing FXD file
#- DVD/VCD support (discset ??)
#
# ---
# $Log$
# ---
# Freevo - A Home Theater PC framework
# Copyright (C) 2002 Krister Lagerstrom, et al. 
# Please see the file freevo/Docs/CREDITS for a complete list of authors.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# --- */
#endif

import re
import urllib, urllib2, urlparse
import sys
import codecs
import os
import traceback

import menu
import config
import plugin
import time
from util import htmlenties2txt
from util import fxdparser
from gui.PopupBox import PopupBox
from mmpython.disc.discinfo import cdrom_disc_id

# headers for urllib2
txdata = None
txheaders = {
'User-Agent': 'freevo (%s)' % sys.platform,
'Accept-Language': 'fr-fr',
}

class PluginInterface(plugin.ItemPlugin):
def __init__(self, license=None):
Initialise class instance

# these are considered as private variables - don't mess with them unless
# no other choise is given
# fyi, the other choice always exists : add a subroutine or ask :)
if not config.USE_NETWORK:
self.reason = 'no network'
return
plugin.ItemPlugin.__init__(self)

def initmyself(self):
self.allocine_id_list = []
self.allocine_id = None
self.isdiscset = False
self.title = ''
self.info = {}

self.image = None # full path image filename
self.image_urls = [] # possible image url list
self.image_url  = None # final image url

self.fxdfile = None # filename, full path, WITHOUT extension

self.append = False
self.device = None
self.regexp = None
self.mpl_global_opt = None
self.media_id = None
self.file_opts = []
self.video = []
self.variant = []
self.parts = []
self.var_mplopt = []
self.var_names = []

#image_url_handler stuff
self.image_url_handler = {}

def searchAllocine(self, name):
name (string), returns id list
Search for name and returns an id list with tuples:
(id , name, year, type)
# Clean internal variables
self.initmyself()

url = 'http://www.allocine.fr/recherche/rubrique.html?typerecherche=3motcle=%s' % urllib.quote(name)
req = urllib2.Request(url, txdata, txheaders)
searchstring = name

try:
response = urllib2.urlopen(req)
except urllib2.HTTPError, error:
raise FxdAllocine_Net_Error(IMDB unreachable :  + error)
exit

regexp_idarea   = 

Re: [Freevo-devel] Help requested for Unicode/XML strings in FXD files !!!!

2004-02-29 Thread den_RDC
I don't know if you can use UTF8 in an FXD XML file, but it works with XMLTV 
XML files. I use the following function to convert what the server gives me 
(windows 1215 charset) to UTF8 in pytvgrab. 

def clean_char( self, contents ):

Convert windows-1252 char's to UTF-8 encoding

contents = unicode(contents, 'windows-1252')
contents = contents.encode('utf-8')
return contents

I hope this is usefull.

Mvg
den_rdc

On Saturday 28 February 2004 18:58, [EMAIL PROTECTED] wrote:
 I am currently developping a new video plugin similar to imdb.py, but for
 getting french comments and title for movies. The equivalent website for
 that in France is called 'allocine.fr'. The grabber works very well and
 give me all the needed information, but i have a big problem when i want
 to write the strings to the FXD files.
 1 - I have created a plugins/fxdallocine.py and a video/plugins/allocine.py
 2 - These files are copy of plugins/fxdimdb.py and video/plugins/imdb.py
 3 - The problem is located in the str2XML function of fxdallocine.py (i
 think) because strings are now in French, with many accent, like é, è, à,
 and so on.
 4 - So my big problem is :How to convert these characaters, where in the
 code and with which kind of code ???
 If someone can just give me an example to encode a string like
 après leur échec pour éliminer Sarah Connor
 in an FXD file, it would be great...

 Thanks by advance, Sylvain.


 ---
 SF.Net is sponsored by: Speed Start Your Linux Apps Now.
 Build and deploy apps  Web services for Linux with
 a free DVD software kit from IBM. Click Now!
 http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
 ___
 Freevo-devel mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/freevo-devel


---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56alloc_id438op=click
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel


[Freevo-wikilog] [Freevo Wiki] Update of DocumentationPage/GameEmulators

2004-02-29 Thread freevo-wikilog
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Freevo Wiki for change 
notification.

The following page has been changed by 213.196.251.52:
http://freevo.sourceforge.net/cgi-bin/moin.cgi/DocumentationPage_2fGameEmulators

--
@@ -41,6 +41,7 @@
  * Spaces will work as long as you don't start you own hand-rolled emulator-scripts 
and forget to handle the arguments properly. [[BR]]
  * Game-roms which contain special characters, for instance '[PSX] Megaman 8 ntsc 
eng(bin  cue).bin' will not work, so sanitize filenames accordingly ('Megaman 8 ntsc 
eng.bin' for instance). [[BR]]
  * All game types support using the button mapped to STOP if you only have a remote 
and no keyboard. [[BR]]
+ * You can add -skip_disclaimer -skip_gameinfo to the parameters for MAME to get 
rid of the screens before a game starts![[BR]] 
 
 = Other Emulators =
 


---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Freevo-wikilog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-wikilog


[Freevo-devel] mmpython question

2004-02-29 Thread Tom Chance
Hello,

I'm playing around with mmpython, and I have a
question about the dvd part. Sorry if this is the
wrong place, but this is what the mmpython project
page suggested.

So, I do the following with a dvd in the drive:

 import mmpython
 dvd =
mmpython.Factory().create_from_device('/dev/dvd')
 dvd.tracks
[]

The DVD drive spins, so it's accessing the disc, but
there's no information gathered.

I'm guessing that either:
1 - I need to do more work to get the DVD info
2 - mmpython isn't working

Which is true? Can somebody help me out with it, as
the documentation is, well, near-to useless, and I'd
rather somebody explain it than spend hours jumping
between files trying to figure it out.

Regards,
Tom

=
True security is to be found in social solidarity rather than in isolated individual 
effort - Fyodor Dostoyevsky





___
Yahoo! Messenger - Communicate instantly...Ping 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html


---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel