Author: duncan
Date: Wed Nov 28 06:49:31 2007
New Revision: 10163
Log:
Tidy up of epytext docstring
Modified:
branches/rel-1/freevo/src/animation/render.py
branches/rel-1/freevo/src/audio/__init__.py
branches/rel-1/freevo/src/audio/plugins/album_tree.py
branches/rel-1/freevo/src/helpers/plugins.py
branches/rel-1/freevo/src/helpers/recordserver.py
branches/rel-1/freevo/src/image/__init__.py
branches/rel-1/freevo/src/osd.py
branches/rel-1/freevo/src/plugins/idlebar/__init__.py
branches/rel-1/freevo/src/skin/models.py
branches/rel-1/freevo/src/skins/main/info_area.py
branches/rel-1/freevo/src/skins/main/main.py
branches/rel-1/freevo/src/video/commdetectclient.py
branches/rel-1/freevo/src/video/encodingclient.py
branches/rel-1/freevo/src/video/fxdhandler.py
branches/rel-1/freevo/src/video/videoitem.py
branches/rel-1/freevo/src/www/web_types.py
Modified: branches/rel-1/freevo/src/animation/render.py
==============================================================================
--- branches/rel-1/freevo/src/animation/render.py (original)
+++ branches/rel-1/freevo/src/animation/render.py Wed Nov 28 06:49:31 2007
@@ -67,10 +67,10 @@
"""
This class/interface handles updating animation sprites
- @problems How to do everything correctly so we don't end up with garbled
+ @note: How to do everything correctly so we don't end up with garbled
screens. Currently there's probably tons of problems with this.
- @notes Perhaps we should utilize spritegroups for this, as it is supposed
+ @note: Perhaps we should utilize spritegroups for this, as it is supposed
to be optimized for this kind of stuff - pluss we get alot of code for
free.
(ex. RenderUpdates). All animations objects would need to extend the
pygame.sprite.Sprite object.
Modified: branches/rel-1/freevo/src/audio/__init__.py
==============================================================================
--- branches/rel-1/freevo/src/audio/__init__.py (original)
+++ branches/rel-1/freevo/src/audio/__init__.py Wed Nov 28 06:49:31 2007
@@ -132,7 +132,7 @@
def fxdhandler(self, fxd, node):
"""
- parse audio specific stuff from fxd files
+ parse audio specific stuff from fxd files::
<?xml version="1.0" ?>
<freevo>
@@ -143,20 +143,17 @@
<playlist/>
<reconnect/>
<url>http://64.236.34.141:80/stream/1005</url>
-
<info>
<genre>JAZZ</genre>
<description>A nice description</description>
</info>
-
</audio>
</freevo>
- Everything except title and url is optional. If <player> is set,
- this player will be used (possible xine or mplayer). The tag
- <playlist/> signals that this url is a playlist (mplayer needs that).
- <reconnect/> sihnals that the player should reconnect when the
- connection stopps.
+ Everything except title and url is optional. If <player> is set, this
player
+ will be used (possible xine or mplayer). The tag <playlist/> signals
that this
+ url is a playlist (mplayer needs that). <reconnect/> sihnals that the
player
+ should reconnect when the connection stopps.
"""
a = AudioItem('', fxd.getattr(None, 'parent', None), scan=False)
Modified: branches/rel-1/freevo/src/audio/plugins/album_tree.py
==============================================================================
--- branches/rel-1/freevo/src/audio/plugins/album_tree.py (original)
+++ branches/rel-1/freevo/src/audio/plugins/album_tree.py Wed Nov 28
06:49:31 2007
@@ -104,10 +104,10 @@
"""
Plugin to browse songs in a tree-like way.
- Requires:
- * pysqlite.
+ @requires: pysqlite.
- === Pre Installation ===
+ Pre Installation
+ ----------------
The sqlite-meta-database should be available.
@@ -115,14 +115,15 @@
you can skip the rest of the pre-install if those plugins
are already succesfully installed.
- * install pysqlite, sqlite
- * edit your local_config.py
+ - install pysqlite, sqlite
+ - edit your local_config.py
Configure AUDIO_ITEMS ('''AudioConfig''', don't leave it at the
default!)
- * run freevo cache
- * wait.....
- * The meta database should be available now.
+ - run freevo cache
+ - wait.....
+ - The meta database should be available now.
- === Configuration ===
+ Configuration
+ -------------
Edit your local_config.py and add this:
@@ -167,7 +168,8 @@
| 'alt_grouping':[None, None, None, 'track']
| })
- === Post Installation ===
+ Post Installation
+ -----------------
New plugins are not immediately visible on the freevo webserver.
Modified: branches/rel-1/freevo/src/helpers/plugins.py
==============================================================================
--- branches/rel-1/freevo/src/helpers/plugins.py (original)
+++ branches/rel-1/freevo/src/helpers/plugins.py Wed Nov 28 06:49:31 2007
@@ -44,7 +44,7 @@
def find_plugin_interface(data):
"""
Search a source file for the PluginInterface classes
- @returns a list of classes source code as a string
+ @return: a list of classes source code as a string
"""
has_classes = re.compile('\n\s*(class[^\n]*:.*?)((\n\s*class)|($))',
re.DOTALL)
@@ -244,9 +244,10 @@
def iscode(line):
"""
- Find code lines in the docstring
- When the line starts with a '|' then is has been marked as a code line
- @note this does not work too well in all cases
+ Find code lines in the docstring When the line starts with a '|' then is
has
+ been marked as a code line
+
+ @note: this does not work too well in all cases
"""
return line.strip().startswith('|')
return (len(line) > 2 and line[:2].upper() == line[:2] and \
Modified: branches/rel-1/freevo/src/helpers/recordserver.py
==============================================================================
--- branches/rel-1/freevo/src/helpers/recordserver.py (original)
+++ branches/rel-1/freevo/src/helpers/recordserver.py Wed Nov 28 06:49:31 2007
@@ -138,6 +138,10 @@
self.delay_recording = None
+ @kaa.rpc.expose('ping')
+ def pingtest(self):
+ return True
+
@kaa.rpc.expose('isRecording')
def isRecording(self):
_debug_('isRecording()', 2)
@@ -212,9 +216,9 @@
def isPlayerRunning(self):
"""
returns the state of a player, mplayer, xine, etc.
- TODO:
- real player running test, check /dev/videoX.
- this could go into the upsoon client
+
+ @todo: real player running test, check /dev/videoX. This could go
into the
+ upsoon client
"""
_debug_('isPlayerRunning()', 2)
res = (os.path.exists(config.FREEVO_CACHEDIR + '/playing'))
Modified: branches/rel-1/freevo/src/image/__init__.py
==============================================================================
--- branches/rel-1/freevo/src/image/__init__.py (original)
+++ branches/rel-1/freevo/src/image/__init__.py Wed Nov 28 06:49:31 2007
@@ -101,7 +101,7 @@
def fxdhandler(self, fxd, node):
"""
- parse image specific stuff from fxd files
+ parse image specific stuff from fxd files::
<?xml version="1.0" ?>
<freevo>
Modified: branches/rel-1/freevo/src/osd.py
==============================================================================
--- branches/rel-1/freevo/src/osd.py (original)
+++ branches/rel-1/freevo/src/osd.py Wed Nov 28 06:49:31 2007
@@ -873,11 +873,11 @@
ellipses, word_splitter):
"""
calculate _one_ line for drawstringframed.
- @returns a list
+ @returns: a list
- width used
- string to draw
- rest that didn't fit
- - True if this function stopped because of a \n.
+ - True if this function stopped because of a <nl>.
"""
c = 0 # num of chars fitting
width = 0 # width needed
@@ -982,18 +982,19 @@
This is a wrapper to drawstringframedsoft() and -hard()
Parameters:
- - string: the string to be drawn, supports also '\n'. \t is not
supported
- by pygame, you need to replace it first
- - x,y: the posistion
- - width, height: the frame dimensions,
- height == -1 defaults to the font height size
- - fgcolor, bgcolor: the color for the foreground and background
- respectively. (Supports the alpha channel: 0xAARRGGBB)
- - font, ptsize: font and font point size
- - align_h: horizontal align. Can be left, center, right, justified
- - align_v: vertical align. Can be top, bottom, center or middle
- - mode: the way we should break lines/truncate. Can be
'hard'(based on chars)
- or 'soft' (based on words)
+ @param string: the string to be drawn, supports also <nl>. <tab> is
not supported
+ by pygame, you need to replace it first
+ @param x: horizontal position
+ @param y: vertical position
+ @param width: frame width
+ @param height: frame height == -1 defaults to the font height size
+ @param fgcolor, bgcolor: the color for the foreground and background
+ respectively. (Supports the alpha channel: 0xAARRGGBB)
+ @param font, ptsize: font and font point size
+ @param align_h: horizontal align. Can be left, center, right, justified
+ @param align_v: vertical align. Can be top, bottom, center or middle
+ @param mode: the way we should break lines/truncate. Can be
'hard'(based on chars)
+ or 'soft' (based on words)
font can also be a skin font object. If so, this functions also
supports
shadow and border. fgcolor and bgcolor will also be taken from the skin
Modified: branches/rel-1/freevo/src/plugins/idlebar/__init__.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/idlebar/__init__.py (original)
+++ branches/rel-1/freevo/src/plugins/idlebar/__init__.py Wed Nov 28
06:49:31 2007
@@ -136,7 +136,8 @@
class IdleBarPlugin(plugin.Plugin):
"""
To activate the idle bar, put the following in your local_conf.py:
- plugin.activate('idlebar')
+ | plugin.activate('idlebar')
+
You can then add various plugins. Plugins inside the idlebar are
sorted based on the level (except the clock, it's always on the
right side). Use "freevo plugins -l" to see all available plugins,
Modified: branches/rel-1/freevo/src/skin/models.py
==============================================================================
--- branches/rel-1/freevo/src/skin/models.py (original)
+++ branches/rel-1/freevo/src/skin/models.py Wed Nov 28 06:49:31 2007
@@ -52,10 +52,11 @@
def __get_line__(self, string, max_width, font, word_splitter, hard):
"""
- calculate _one_ line. Returns a list:
+ calculate _one_ line.
+ @returns: a list
- string to draw
- rest that didn't fit
- - True if this function stopped because of a \n.
+ - True if this function stopped because of a <nl>.
"""
c = 0 # num of chars fitting
width = 0 # width needed
Modified: branches/rel-1/freevo/src/skins/main/info_area.py
==============================================================================
--- branches/rel-1/freevo/src/skins/main/info_area.py (original)
+++ branches/rel-1/freevo/src/skins/main/info_area.py Wed Nov 28 06:49:31 2007
@@ -225,15 +225,16 @@
- def eval_expressions( self, list, index = [ ] ):
+ def eval_expressions( self, list, index=[ ] ):
"""
- travesse the list evaluating the expressions,
- return a flat list with valid elements indexes only
- (false 'if' expressions eliminated). Also, text elements
- are in the list too in a tuple:
- ( index, 'text value' )
- so you can check if it changed just comparing two lists
- (useful in music player, to update 'elapsed')
+ traverse the list evaluating the expressions,
+
+ @returns: a flat list with valid elements indexes only (false 'if'
expressions
+ eliminated).
+
+ Also, text elements are in the list too in a tuple: ( index, 'text
value' ) so
+ you can check if it changed just comparing two lists (useful in music
player,
+ to update 'elapsed')
"""
item = self.infoitem
ret_list = [ ]
Modified: branches/rel-1/freevo/src/skins/main/main.py
==============================================================================
--- branches/rel-1/freevo/src/skins/main/main.py (original)
+++ branches/rel-1/freevo/src/skins/main/main.py Wed Nov 28 06:49:31 2007
@@ -355,21 +355,20 @@
"""
This function returns style information for drawing a popup box.
- return backround, spacing, color, font, button_default, button_selected
+ @returns: backround, spacing, color, font, button_default,
button_selected
background is ('image', Image) or ('rectangle', Rectangle)
Image attributes: filename
- Rectangle attributes: color (of the border), size (of the border),
- bgcolor (fill color), radius (round box for the border). There are
also
- x, y, width and height as attributes, but they may not be needed
for the
- popup box
-
- button_default, button_selected are XML_item
- attributes: font, rectangle (Rectangle)
-
- All fonts are Font objects
- attributes: name, size, color, shadow
- shadow attributes: visible, color, x, y
+
+ Rectangle attributes: color (of the border), size (of the border),
bgcolor
+ (fill color), radius (round box for the border). There are also x, y,
width and
+ height as attributes, but they may not be needed for the popup box
+
+ button_default, button_selected are XML_item attributes: font,
rectangle
+ (Rectangle)
+
+ All fonts are Font objects attributes: name, size, color, shadow shadow
+ attributes: visible, color, x, y
"""
menu = self.__find_current_menu__(widget)
Modified: branches/rel-1/freevo/src/video/commdetectclient.py
==============================================================================
--- branches/rel-1/freevo/src/video/commdetectclient.py (original)
+++ branches/rel-1/freevo/src/video/commdetectclient.py Wed Nov 28 06:49:31 2007
@@ -72,7 +72,7 @@
def queueIt(idnr, now=False):
"""
Insert the current job in the commdetectqueue
- If now is true, the commdetect queue is automatically started
+ If now is true, the commdetect queue is automatically started
"""
if not idnr:
return (False, "CommDetectClient: no idnr")
Modified: branches/rel-1/freevo/src/video/encodingclient.py
==============================================================================
--- branches/rel-1/freevo/src/video/encodingclient.py (original)
+++ branches/rel-1/freevo/src/video/encodingclient.py Wed Nov 28 06:49:31 2007
@@ -105,13 +105,13 @@
def initEncodeJob(source, output, friendlyname="", title=None):
"""Initialize the encodingjob.
- source is the source video you want to have encoded
- output is the name of the resulting encoded file you want
- friendlyname is a "friendly name" to assign to this encoding job
- title is obligatory if you have a dvd/dvd-on-disc, in wich case you need
+ @param source: is the source video you want to have encoded
+ @param output: is the name of the resulting encoded file you want
+ @param friendlyname: is a "friendly name" to assign to this encoding job
+ @param title: is obligatory if you have a dvd/dvd-on-disc, in wich case
you need
to specify a title (integer)
- This function returns an idnr (integer) if succesful
+ This function returns an idnr (integer) if successful
This call can take some time (10 seconds on average) before returning,
because the
encodingserver analyzes the video during this call."""
@@ -183,13 +183,13 @@
def setVideoCodec(idnr, vcodec, tgtsize, multipass=False, vbitrate=0):
"""Set a video codec
- vcodec is one of the possible video codecs. It should be one of the strings
+ @param vcodec: is one of the possible video codecs. It should be one of
the strings
returned by getVideoCodecCAP.
- tgtsize is the target size of the encoded file, in megabytes (this includes
+ @param tgtsize: is the target size of the encoded file, in megabytes (this
includes
audio data and container format overhead)
- multipass is a boolean. Set this to True if you want multipass encoding (1
audio
+ @param multipass: is a boolean. Set this to True if you want multipass
encoding (1 audio
pass, 2 video passes). The default is no multipass (1 audio, 1 video)
- vbitrate is the video bitrate, if it is not 0 then this value is used
instead
+ @param vbitrate: is the video bitrate, if it is not 0 then this value is
used instead
of using the tgtsize.
"""
@@ -223,11 +223,12 @@
def setAudioCodec(idnr, acodec, abrate):
"""Set a audio codec
- acodec is one of the possible audio codecs. It should be one of the strings
+ @param acodec: is one of the possible audio codecs. It should be one of
the strings
returned byt getAudioCodecCAP.
- abrate is the audio bitrate to be set, in kbit/s. Although any integer
between 0
- and 320 is valid, it is advisable to take standard encoding bitrates
like
- 32,64,128,160,192,256 and 320.
+
+ @param abrate: is the audio bitrate to be set, in kbit/s. Although any
integer
+ between 0 and 320 is valid, it is advisable to take standard encoding
bitrates
+ like 32,64,128,160,192,256 and 320.
"""
if not (idnr or acodec or abrate):
@@ -297,19 +298,19 @@
"""Get the progress & pass information of the job currently encoding.
This call returns False if no job is currently encoding (fx the queue is
not active).
- When the queue is active, this call returns a tuple of 4 values:
+ @returns: When the queue is active, this call returns a tuple of 4 values:
(friendlyname, status, perc, timerem)
friendlyname is the friendlyname you assigned to the encoding job
status is the current status of the encoding job, represented by an integer
- 0 - Not set (this job hasn't started encoding). Never used in this
context
- 1 - Audio pass in progress
- 2 - First (analyzing) video pass (only used in multipass encoding)
- 3 - Final video pass
- 4 - Postmerge (not used atm). Final merging or similar processing in
progress
- perc is the percentage completed of the current pass
- timerem is the estimated time remaining of the current pass, formatted as a
- human-readable string.
+ - 0 Not set (this job hasn't started encoding). Never used in this
context
+ - 1 Audio pass in progress
+ - 2 First (analyzing) video pass (only used in multipass encoding)
+ - 3 Final video pass
+ - 4 Postmerge (not used atm). Final merging or similar processing in
progress
+
+ perc is the percentage completed of the current pass, timerem is the
estimated
+ time remaining of the current pass, formatted as a human-readable string.
"""
try:
@@ -332,12 +333,11 @@
def listJobs():
"""Get a list with all jobs in the encoding queue and their current state
- Returns a list of tuples containing all the current queued jobs. When the
queue is
- empty, an empty list is returned.
- Each job in the list is a tuple containing 3 values
- (idnr, friendlyname, status)
- These values have the same meaning as the corresponding values returned by
the
- getProgress call"""
+ @returns: a list of tuples containing all the current queued jobs. When the
+ queue is empty, an empty list is returned. Each job in the list is a
tuple
+ containing 3 values (idnr, friendlyname, status) These values have the
same
+ meaning as the corresponding values returned by the getProgress call
+ """
try:
(status, response) = server.listJobs()
Modified: branches/rel-1/freevo/src/video/fxdhandler.py
==============================================================================
--- branches/rel-1/freevo/src/video/fxdhandler.py (original)
+++ branches/rel-1/freevo/src/video/fxdhandler.py Wed Nov 28 06:49:31 2007
@@ -35,7 +35,7 @@
def parse_movie(fxd, node):
"""
- Callback for VideoItem <movie>
+ Callback for VideoItem <movie>::
<movie title>
<cover-img>file</cover-img>
Modified: branches/rel-1/freevo/src/video/videoitem.py
==============================================================================
--- branches/rel-1/freevo/src/video/videoitem.py (original)
+++ branches/rel-1/freevo/src/video/videoitem.py Wed Nov 28 06:49:31 2007
@@ -395,17 +395,16 @@
def set_next_available_subitem(self):
"""
- select the next available subitem. Loops on each subitem and checks if
- the needed media is really there.
- If the media is there, sets self.current_subitem to the given subitem
- and returns 1.
- If no media has been found, we set self.current_subitem to None.
- If the search for the next available subitem did start from the
- beginning of the list, then we consider that no media at all was
- available for any subitem: we return 0.
- If the search for the next available subitem did not start from the
- beginning of the list, then we consider that at least one media
- had been found in the past: we return 1.
+ select the next available subitem. Loops on each subitem and checks if
the
+ needed media is really there. If the media is there, sets
self.current_subitem
+ to the given subitem and returns 1.
+
+ If no media has been found, we set self.current_subitem to None. If
the search
+ for the next available subitem did start from the beginning of the
list, then
+ we consider that no media at all was available for any subitem: we
return 0.
+ If the search for the next available subitem did not start from the
beginning
+ of the list, then we consider that at least one media had been found
in the
+ past: we return 1.
"""
if hasattr(self, 'conf_select_this_item'):
# XXX bad hack, clean me up
Modified: branches/rel-1/freevo/src/www/web_types.py
==============================================================================
--- branches/rel-1/freevo/src/www/web_types.py (original)
+++ branches/rel-1/freevo/src/www/web_types.py Wed Nov 28 06:49:31 2007
@@ -145,13 +145,13 @@
""" Header
This produces the header of a freevo page with the navigation bar.
- Parameter:
- title = title of the webpage
- style = style sheet to use for this page
- script = java script to use for this page
- selected = which tab in the tabline should be highlighed
- prefix = how many directory levels is this file below the main
level
- this is needed for the links in the navigation bar.
+
+ @param title: title of the webpage
+ @param style: style sheet to use for this page
+ @param script: java script to use for this page
+ @param selected: which tab in the tabline should be highlighed
+ @param prefix: how many directory levels is this file below the main
level
+ this is needed for the links in the navigation bar.
"""
# debug print
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog