[xbmc-addons] r2282 committed - [script.pydocs] - Version: 2.1.0...

19 views
Skip to first unread message

xbmc-...@googlecode.com

unread,
Jun 3, 2012, 7:30:02 PM6/3/12
to xbmc-addo...@googlegroups.com
Revision: 2282
Author: nuka...@gmail.com
Date: Sun Jun 3 16:29:40 2012
Log: [script.pydocs] - Version: 2.1.0

-added: creates PyDev Predefined Completions
-changed: added xbmcvfs module
-removed: unnecessary modules
http://code.google.com/p/xbmc-addons/source/detail?r=2282

Added:
/addons/script.pydocs/resources/lib/pypredefcom.py
Deleted:
/addons/script.pydocs/resources/lib/updates.py
/addons/script.pydocs/resources/lib/utils.py
Modified:
/addons/script.pydocs/addon.py
/addons/script.pydocs/addon.xml
/addons/script.pydocs/resources/language/English/strings.xml
/addons/script.pydocs/resources/settings.xml

=======================================
--- /dev/null
+++ /addons/script.pydocs/resources/lib/pypredefcom.py Sun Jun 3 16:29:40
2012
@@ -0,0 +1,195 @@
+#====================================================================
+# PyDev Predefined Completions Creator
+# Copyright (C) 2010 James F. Carroll
+#
+# 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
+# MERCHANTABILITY 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
+#====================================================================
+
+'''
+Created on Jul 31, 2010
+
+The main purpose of this module is to create a PyDev Predefined Completion
from
+another module using introspection and write it out to a file.
+
+@author: jim
+'''
+
+import inspect
+import os
+import re
+
+oneindent = " "
+
+def visiblename(name, all=None):
+ """Decide whether to show documentation on a variable."""
+ # Certain special names are redundant.
+ if name in ['__builtins__', '__doc__', '__file__', '__path__',
+ '__module__', '__name__', 'Helper' ]: return 0
+ # Private names are hidden, but special names are displayed.
+ if name.startswith('__') and name.endswith('__'): return 1
+ if all is not None:
+ # only document that which the programmer exported in __all__
+ return name in all
+ else:
+ return not name.startswith('_')
+
+def ensuredir(dir):
+ """ This method simply ensures that the directory path provided exists
and creates it otherwise. """
+ if not os.path.exists(dir):
+ os.makedirs(dir)
+
+docquote = '''"""'''
+quote = '''"'''
+
+def displayDocLine(f,object, indent = ""):
+ try:
+ docline = object.__doc__
+ except AttributeError:
+ return
+
+ if docline is None or len(docline) == 0:
+ return
+ lines = docline.splitlines()
+
+ prefix = indent + docquote
+ for line in lines:
+ f.write(prefix + line + "\n")
+ prefix = indent
+ f.write( indent + docquote + '\n\n')
+
+def myformatvalue(object):
+ """Format an argument default value as text."""
+ return '=' + repr(object)
+
+
+def displayMethod(f, method, indent = ""):
+ name = method.__name__
+ f.write (indent + "def " + name)
+
+ try:
+ args, varargs, varkw, defaults = inspect.getargspec(method)
+ argspec = inspect.formatargspec(
+ args, varargs, varkw, defaults, formatvalue=myformatvalue)
+ if name == '<lambda>':
+ argspec = argspec[1:-1] # remove parentheses
+ except TypeError:
+# None of this works because the docs are too inconsistent.
+# # many of the xbmc document strings contain an signature for the
+# # function. It may be possible to pull the signature from the
document
+# # line but it's not necessarily reliable as it's more than likely
that
+# # someone can update the signature but not go back and update the
documentation.
+# # Nevertheless it's probably better to use it if it can be parsed
out of
+# # the string than to simply provide varargs.
+#
+# # OK - we might as well make the attempt
+#
+# # TODO: There MUST be a better way to do this. How can I get the
argspec
+# # from a built in/native Python method?
+# try:
+# docline = method.__doc__
+# argspec = re.search(name + "\( *.*\)", docline)
+# if argspec is None:
+# argspec = '(*args)'
+# else:
+# argspec = argspec.group(0)
+# # now get rid of square brackets that denote optional
attributes
+# argspec = re.sub("\[", "", argspec, 999)
+# argspec = re.sub("\]", "", argspec, 999)
+#
+# except AttributeError:
+# argspec = '(*args)'
+ argspec = '(*args)'
+
+ f.write (argspec + ":\n")
+
+ displayDocLine(f,method,indent + oneindent)
+
+def displayClass(f, clazz, indent = ""):
+ name = clazz.__name__
+ all = dir(clazz)
+ f.write (indent + "class " + name + ":\n" )
+ displayDocLine(f, clazz, indent + oneindent)
+
+ parts = inspect.getmembers(clazz)
+
+ for key, value in parts:
+ if visiblename(key,all):
+# Apparently all classes contain other standard classes (and themselves as
members?). If I run across a case
+# where this is needed then I will need to add a filter here.
+# if inspect.isclass(value):
+# displayClass(f,value, indent + oneindent)
+ if lookslikeamethod(value):
+ displayMethod(f,value,indent + oneindent)
+ else:
+ otherpart(f,key,value,indent + oneindent)
+ f.write("\n\n")
+
+def otherpart(f, key, value, indent = ""):
+ """ If I don't know how to handle a 'part' then I call this method
which
+ currently just logs the details of the part to stdout for later
evaluation """
+# f.write( indent + "other part:" + key + ", " + str(value) + " --- of
type --->(" + str(type(value)) + ")\n")
+ print( indent + "other part:" + key + ", " + str(value) + " --- of
type --->(" + str(type(value)) + ")\n")
+ print( indent + oneindent + str(inspect.getmembers(value)))
+ return
+
+def lookslikeamethod(part):
+ """ Does the passed part appear to be methodlike? """
+ if inspect.isfunction(part) or inspect.ismethod(part) or
inspect.isbuiltin(part) or inspect.ismethoddescriptor(part):
+ return True
+ return False
+
+def lookslikeattribute(part):
+ """ Does the passed part look like an attribute of a class or
modules? """
+ if type(part) is int or type(part) is str or type(part) is bool:
+ return True
+
+def displayAttribute(f, attributename, attributevalue, indent = ""):
+ # TODO: This seems to be a bit of a hack. There ought to be a better
way to handle
+ # retrieving a string that contains the type (and only the type) of
the attribute.
+ mytype = re.sub("^<type '", "", repr(type(attributevalue)), 1)
+ mytype = re.sub("'>$", "", mytype, 1)
+
+ f.write( indent + attributename + " = " + mytype + "\n")
+ return
+
+def pypredefmodule(f, module):
+ """Produce PyDev Predefined Completions for a module."""
+
+ print ("writing to file " + str(f))
+
+ name = module.__name__ # ignore the passed-in name
+ try:
+ all = object.__all__
+ except AttributeError:
+ all = None
+
+ displayDocLine(f, module)
+
+ parts = inspect.getmembers(module)
+
+ for key, value in parts:
+ if visiblename(key, all):
+ if inspect.isclass(value):
+ displayClass(f,value)
+ elif lookslikeamethod(value):
+ displayMethod(f,value)
+ elif lookslikeattribute(value):
+ displayAttribute(f,key,value)
+ else:
+ otherpart(f,key,value)
+
+
+
+
=======================================
--- /addons/script.pydocs/resources/lib/updates.py Sat Nov 13 08:34:14 2010
+++ /dev/null
@@ -1,40 +0,0 @@
-## updates module for xbmc4xbox
-
-import xbmcgui
-import xbmcaddon
-
-# Addon class
-Addon = xbmcaddon.Addon( id=None )
-
-
-def _check_for_updates():
- try:
- # create dialog
- pDialog = xbmcgui.DialogProgress()
- # give feedback
- pDialog.create( Addon.getAddonInfo( "Name" ),
Addon.getLocalizedString( 30760 ) )
- pDialog.update( 0 )
- # url to addon.xml file
- url = "%ssvn/addons/%s/addon.xml" % ( Addon.getSetting( "Repo" ),
Addon.getAddonInfo( "Id" ), )
- # import here for faster dialog
- import urllib
- import re
- # get addon.xml source
- xml = urllib.urlopen( url ).read()
- # parse version
- version = re.search( "<addon
id=\"[^\"]+\".+?name=\"[^\"]+\".+?version=\"([^\"]+)\".+?provider-name=\"[^\"]+\".*?>",
xml, re.DOTALL ).group( 1 )
- # set proper message
- msg1 = Addon.getLocalizedString( 30700 ) % (
Addon.getAddonInfo( "Version" ), )
- msg2 = [ Addon.getLocalizedString( 30701 ),
Addon.getLocalizedString( 30702 ) % ( version, ) ][ version >
Addon.getAddonInfo( "Version" ) ]
- except Exception, e:
- # set proper error messages
- msg1 = Addon.getLocalizedString( 30770 )
- msg2 = str( e )
- # done, close dialog
- pDialog.close()
- # notify user of result
- ok = xbmcgui.Dialog().ok( Addon.getAddonInfo( "Name" ), msg1, "", msg2
)
-
-
-if ( __name__ == "__main__" ):
- _check_for_updates()
=======================================
--- /addons/script.pydocs/resources/lib/utils.py Sat Nov 6 18:20:07 2010
+++ /dev/null
@@ -1,142 +0,0 @@
-## Utilities module
-
-import sys
-import os
-
-try:
- import xbmc
- import xbmcgui
- import xbmcaddon
-except:
- # get dummy xbmc modules (Debugging)
- from debug import *
- xbmc = XBMC()
- xbmcgui = XBMCGUI()
- xbmcaddon = XBMCADDON()
-
-# get current working directory
-cwd = os.getcwd()
-# check if we're at root folder of addon
-if ( not os.path.isfile( os.path.join( cwd, "addon.xml" ) ) ):
- # we're not at root, assume resources/lib/
- cwd = os.path.dirname( os.path.dirname( os.getcwd() ) )
-# Addon class
-Addon = xbmcaddon.Addon( id=os.path.basename( cwd ) )
-
-
-class Viewer:
- # we need regex for parsing info
- import re
- # constants
- WINDOW = 10147
- CONTROL_LABEL = 1
- CONTROL_TEXTBOX = 5
-
- def __init__( self, *args, **kwargs ):
- # activate the text viewer window
- xbmc.executebuiltin( "ActivateWindow(%d)" % ( self.WINDOW, ) )
- # get window
- window = xbmcgui.Window( self.WINDOW )
- # give window time to initialize
- xbmc.sleep( 100 )
- # set message
- msg = { "updates": 30760, "changelog": 30761, "readme":
30762, "license": 30763, "properties": 30764 }[ kwargs[ "kind" ] ]
- # set heading
- window.getControl( self.CONTROL_LABEL ).setLabel( "%s - %s" % (
Addon.getLocalizedString( msg + 5 ), Addon.getAddonInfo( "Name" ), ) )
- # set fetching message
- window.getControl( self.CONTROL_TEXTBOX ).setText(
Addon.getLocalizedString( msg ) )
- # fetch correct info
- try:
- if ( kwargs[ "kind" ] in [ "updates", "changelog" ] ):
- text = self._fetch_changelog( kwargs[ "kind" ] )
- elif ( kwargs[ "kind" ] in [ "readme", "license" ] ):
- text = self._fetch_text_file( kwargs[ "kind" ] )
- #elif ( kwargs[ "kind" ] == "properties" ):
- # text = self._fetch_properties()
- except Exception, e:
- # set error message
- text = "%s[CR][CR]%s" % ( Addon.getLocalizedString( 30771 ) %
( Addon.getLocalizedString( msg + 5 ), ), e, )
- # set text
- window.getControl( self.CONTROL_TEXTBOX ).setText( text )
-
- def _fetch_changelog( self, kind ):
- # import required modules
- import datetime
- import pysvn
- # get our regions format
- date_format = "%s %s" % ( xbmc.getRegion( "datelong" ),
xbmc.getRegion( "time" ), )
- # get client
- client = pysvn.Client()
- client.callback_cancel = self._pysvn_cancel_callback
- try:
- # grab current revision and repo url
- info = client.info( path=Addon.getAddonInfo( "Path" ) )
- # fetch changelog for current revision
- if ( kind == "changelog" ):
- log = client.log( url_or_path=info[ "url" ], limit=25,
revision_start=pysvn.Revision( pysvn.opt_revision_kind.number,
info[ "commit_revision" ].number ) )
- # updates
- else:
- log = client.log( url_or_path=info[ "url" ], limit=25,
revision_end=pysvn.Revision( pysvn.opt_revision_kind.number,
info[ "commit_revision" ].number + 1 ) )
- except:
- # changelog
- log = client.log(
url_or_path="http://xbmc-addons.googlecode.com/svn/addons/%s" % (
Addon.getAddonInfo( "Id" ), ), limit=25 )
- # if no entries set user message
- if ( len( log ) ):
- # initialize our log variable
- changelog = "%s\n" % ( "-" * 150, )
- else:
- # should only happen for "updates" and there are none
- changelog = Addon.getLocalizedString( 30704 )
- # we need to compile so we can add flags
- clean_entry =
self.re.compile( "\[.+?\][\s]+(?P<name>[^\[]+)(?:\[.+)?", self.re.DOTALL )
- version = self.re.compile( "(Version.+)", self.re.IGNORECASE )
- # iterate thru and format each message
- for entry in log:
- # add version
- changelog += "%s\n" % ( version.search( entry[ "message" ]
).group( 1 ), )
- # add heading
- changelog += "r%d - %s - %s\n" % ( entry[ "revision" ].number,
datetime.datetime.fromtimestamp( entry[ "date" ] ).strftime( date_format ),
entry[ "author" ], )
- # add formatted message
- changelog += "\n".join( [
self.re.sub( "(?P<name>^[a-zA-Z])", "- \\1", line.lstrip( " -" ) ) for line
in entry[ "message" ].strip().splitlines() if ( not line.startswith( "[" )
) ] )
- #changelog += "\n".join( [
self.re.sub( "(?P<name>^[a-zA-Z])", "- \\1", line.lstrip( " -" ) ) for line
in clean_entry.sub( "\\1", entry[ "message" ] ).strip().splitlines() ] )
- # add separator
- changelog += "\n%s\n" % ( "-" * 150, )
- # return colorized result
- return self._colorize_text( changelog )
-
- def _pysvn_cancel_callback( self ):
- # check if user cancelled operation
- return False
-
- def _fetch_text_file( self, kind ):
- # set path, first try translated version
- _path = os.path.join( Addon.getAddonInfo( "Path" ), "%s-%s.txt" %
( kind, xbmc.getLanguage()[ : 2 ].lower(), ) )
- # if doesn't exist, use default
- if ( not os.path.isfile( _path ) ):
- _path = os.path.join( Addon.getAddonInfo( "Path" ), "%s.txt" %
( kind, ) )
- # read file
- text = open( _path, "r" ).read()
- # return colorized result
- return text##self._colorize_text( text )
-
- def _colorize_text( self, text ):
- # format text using colors
- text = self.re.sub( "(?P<name>Version:.+)[\r\n]+", "[COLOR
FFEB9E17]\\1[/COLOR]\n\n", text )
- text = self.re.sub( "(?P<name>r[0-9]+
- .+?)(?P<name2>[\r\n]+)", "[COLOR FF0084FF]\\1[/COLOR]\\2", text )
- text = self.re.sub( "(?P<name>http://[\S]+)", "[COLOR
FFEB9E17]\\1[/COLOR]", text )
- text = self.re.sub( "(?P<name>[^\]]r[0-9]+)", "[COLOR
FFEB9E17]\\1[/COLOR]", text )
- text = self.re.sub( "(?P<name>\".+?\")", "[COLOR
FFEB9E17]\\1[/COLOR]", text )
- text = self.re.sub( "(?P<name>[A-Z ]+:)[\r\n]+", "[COLOR
FF0084FF][B]\\1[/B][/COLOR]\n", text )
- text = self.re.sub( "(?P<name> - )", "[COLOR
FFFFFFFF]\\1[/COLOR]", text )
- text = self.re.sub( "(?P<name>-[-]+)", "[COLOR
FFFFFFFF]\\1[/COLOR]", text )
- # return colorized text
- return text
-
-
-if ( __name__ == "__main__" ):
- # need this while debugging
- if ( len( sys.argv ) == 1 ):
- sys.argv.append( "changelog" )
- # show info
- if ( sys.argv[ 1 ] in [ "updates", "changelog", "readme", "license" ]
):
- Viewer( kind=sys.argv[ 1 ] )
=======================================
--- /addons/script.pydocs/addon.py Fri Oct 22 11:14:02 2010
+++ /addons/script.pydocs/addon.py Sun Jun 3 16:29:40 2012
@@ -1,56 +1,108 @@
-## PyDocs Printer
+## PyDocs & PyPredefs Printer

import os
+import resources.lib.pydoc as pydoc
+import resources.lib.pypredefcom as pypredefcomp
import xbmc
+import xbmcaddon
import xbmcgui
import xbmcplugin
-import xbmcaddon
-import resources.lib.pydoc as pydoc
+import xbmcvfs


-def _get_browse_dialog( default="", heading="", dlg_type=3,
shares="files", mask="", use_thumbs=False, treat_as_folder=False ):
- """
- shows a browse dialog and returns a value
- - 0 : ShowAndGetDirectory
- - 1 : ShowAndGetFile
- - 2 : ShowAndGetImage
- - 3 : ShowAndGetWriteableDirectory
- """
- dialog = xbmcgui.Dialog()
- value = dialog.browse( dlg_type, heading, shares, mask, use_thumbs,
treat_as_folder, default )
- return value
-
-if ( __name__ == "__main__" ):
- # get Addon object
- Addon = xbmcaddon.Addon( id=os.path.basename( os.getcwd() ) )
- # get user prefered save location
- doc_path = Addon.getSetting( "doc_path" )
- # get location if none set
- if ( not doc_path ):
- doc_path = _get_browse_dialog( doc_path, Addon.getLocalizedString(
30110 ) )
- # if doc_path create html docs
- if ( doc_path ):
- # show feedback
- pDialog = xbmcgui.DialogProgress()
- pDialog.create( Addon.getAddonInfo( "Name" ) )
- # set the doc_path setting incase the browse dialog was used
- Addon.setSetting( "doc_path", doc_path )
- # get our document object
- doc = pydoc.HTMLDoc()
- # modules
- modules = [ "xbmc", "xbmcgui", "xbmcplugin", "xbmcaddon" ]
- # enumerate thru and print our help docs
- for count, module in enumerate( modules ):
- # set correct path
- _path = xbmc.validatePath( xbmc.translatePath( os.path.join(
doc_path, "%s.html" % ( module, ) ) ) )
- # update dialog
- pDialog.update( count * ( 100 / len( modules ) ),
Addon.getLocalizedString( 30711 ) % ( module + ".html PyDoc", ),
Addon.getLocalizedString( 30712 ) % ( _path, ) )
- # print document
- try:
- open( _path, "w" ).write( doc.document( eval( module ) ) )
- except Exception, e:
- # oops
- xbmc.log( "An error occurred saving %s! (%s)" % ( module,
e, ), xbmc.LOGERROR )
- #close dialog
- pDialog.update( 100 )
- pDialog.close()
+class DocsPrinter:
+
+ def __init__(self):
+ # get Addon object
+ self.Addon = xbmcaddon.Addon(id="script.pydocs")
+ # get user preferences
+ self.doc_path = self.Addon.getSetting("doc_path")
+ self.include_pydocs = (self.Addon.getSetting("include_pydocs")
== "true")
+ self.include_pypredefs =
(self.Addon.getSetting("include_pypredefs") == "true")
+
+ def print_docs(self):
+ # get location if none set
+ if (not self.doc_path):
+ self.doc_path = self._get_browse_dialog(self.doc_path,
self.Addon.getLocalizedString(30110))
+ # if a valid doc_path create docs
+ if (self.doc_path):
+ # show feedback
+ pDialog = xbmcgui.DialogProgress()
+ pDialog.create(self.Addon.getAddonInfo("Name"))
+ # set the doc_path setting in case the browse dialog was used
+ self.Addon.setSetting("doc_path", self.doc_path)
+ # modules
+ modules =
[ "xbmc", "xbmcgui", "xbmcplugin", "xbmcaddon", "xbmcvfs" ]
+ # enumerate thru and print our help docs
+ for count, module in enumerate(modules):
+ # include PyDocs
+ if (self.include_pydocs):
+ # set correct path
+ _path = self._make_path(module, u"PyDocs", u".html")
+ # only need to print doc if we have a valid dir
+ if (_path is not None):
+ # update dialog
+ pDialog.update(count * (100 / len(modules)),
self.Addon.getLocalizedString(30711).format(msg="{module}.html
PyDoc".format(module=module)),
self.Addon.getLocalizedString(30712).format(msg=_path))
+ try:
+ # get our document object
+ doc = pydoc.HTMLDoc()
+ # print document
+
open(_path, "w").write(doc.document(eval(module)))
+ except Exception as error:
+ # oops
+ xbmc.log("An error occurred saving
{module}.html PyDoc! ({error})".format(module=module, error=error),
xbmc.LOGERROR)
+
+ # include PyPredefs
+ if (self.include_pypredefs):
+ # set correct path
+ _path = _path = self._make_path(module, u"PyPredefs",
u".pypredef")
+ # only need to print doc if we have a valid dir
+ if (_path is not None):
+ # update dialog
+ pDialog.update(count * (100 / len(modules)),
self.Addon.getLocalizedString(30711).format(msg="{module}.pypredef
PyPredef".format(module=module)),
self.Addon.getLocalizedString(30712).format(msg=_path))
+ try:
+ # get our file object
+ predefcomf = open(_path, "w")
+ # print document
+ pypredefcomp.pypredefmodule(predefcomf,
eval(module))
+ # close file
+ predefcomf.close();
+ except Exception as error:
+ # oops
+ xbmc.log("An error occurred saving
{module}.pypredef PyPredef! ({error})".format(module=module, error=error),
xbmc.LOGERROR)
+
+ #close dialog
+ pDialog.update(100)
+ pDialog.close()
+
+ def _make_path(self, module, doc_type, ext):
+ # set correct path
+ _path =
xbmc.validatePath(xbmc.translatePath(os.path.join(self.doc_path,
doc_type))).decode("UTF-8")
+ try:
+ # make dir if it doesn't exist
+ if (not xbmcvfs.exists(_path)):
+ xbmcvfs.mkdir(_path)
+ except:
+ # oops
+ xbmc.log("An error occurred making dir for {path}!
({error})".format(module=module, error=error), xbmc.LOGERROR)
+ return None
+ else:
+ # return full filepath
+ return os.path.join(_path,
u"{module}{ext}".format(module=module, ext=ext))
+
+ def _get_browse_dialog(self, default="", heading="", dlg_type=3,
shares="files", mask="", use_thumbs=False, treat_as_folder=False):
+ """
+ shows a browse dialog and returns a value
+ - 0 : ShowAndGetDirectory
+ - 1 : ShowAndGetFile
+ - 2 : ShowAndGetImage
+ - 3 : ShowAndGetWriteableDirectory
+ """
+ dialog = xbmcgui.Dialog()
+ value = dialog.browse(dlg_type, heading, shares, mask, use_thumbs,
treat_as_folder, default)
+ return value
+
+
+if (__name__ == "__main__"):
+ # print the documents
+ DocsPrinter().print_docs()
=======================================
--- /addons/script.pydocs/addon.xml Sat Nov 13 08:34:14 2010
+++ /addons/script.pydocs/addon.xml Sun Jun 3 16:29:40 2012
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.pydocs" name="PyDocs Printer" version="2.0.5"
provider-name="nuka1195">
+<addon id="script.pydocs" name="PyDocs &amp; PyPredefs Printer"
version="2.1.0" provider-name="nuka1195 &amp; jfcarroll">
<requires>
- <import addon="xbmc.python" version="1.0"/>
- <import addon="script.module.pysvn" version="2.4.0"/>
- <import addon="script.module.xbmcaddon" version="1.0.3"/>
+ <import addon="xbmc.python" version="2.0"/>
</requires>
<extension point="xbmc.python.script" library="addon.py">
<provides>executable</provides>
@@ -11,8 +9,9 @@
<extension point="xbmc.addon.metadata">
<platform>all</platform>
<nochangelog>true</nochangelog>
- <summary lang="en">Creates html python help docs.</summary>
- <disclaimer lang="en">Only accurate for the version of xbmc this
addon was run in.</disclaimer>
- <description lang="en">Creates html python help docs for xbmc,
xbmcgui, xbmcplugin and xbmcaddon modules.</description>
+ <nofanart>false</nofanart>
+ <summary lang="en">Creates Python html help docs and PyDev
Predefined Completions.</summary>
+ <description lang="en">Creates Python html help docs and PyDev
Predefined Completions for xbmc, xbmcgui, xbmcplugin, xbmcaddon and xbmcvfs
modules.</description>
+ <disclaimer lang="en">Only accurate for the version of XBMC this
addon was run in.</disclaimer>
</extension>
</addon>
=======================================
--- /addons/script.pydocs/resources/language/English/strings.xml Sat Nov 13
08:34:14 2010
+++ /addons/script.pydocs/resources/language/English/strings.xml Sun Jun 3
16:29:40 2012
@@ -1,74 +1,95 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<strings>
- <!-- plugin title -->
- <string id="30000">PyDocs Printer</string>
- <!-- language author (translators put your name here) -->
- <string id="30002">nuka1195</string>
-
- <!-- category separators -->
- <string id="30051">General</string>
- <string id="30052"></string>
- <string id="30053"></string>
- <string id="30054"></string>
- <string id="30055"></string>
- <string id="30056">Maintenance</string>
-
- <!-- General -->
- <string id="30100">Preferences</string>
- <!-- settings labels & options -->
- <string id="30110">Save help docs to</string>
-
- <!-- Maintenance -->
- <string id="30600">Status</string>
- <!-- settings labels & options -->
- <string id="30610">Check for updates</string>
- <string id="30615">View changelog</string>
- <string id="30620">View readme</string>
- <string id="30625">View license</string>
-
- <!-- universal strings -->
- <!-- compatible messages -->
- <string id="30700">You're currently running version %s.</string>
- <string id="30701">Your version is up to date.</string>
- <string id="30702">An updated version %s is available.</string>
- <!-- messages -->
- <string id="30710">Downloading: %s</string>
- <string id="30711">Saving: %s</string>
- <string id="30712">To: %s</string>
- <string id="30713">Extracting: %s</string>
- <string id="30714">B</string>
- <string id="30715">KB</string>
- <string id="30716">MB</string>
- <string id="30717">of</string>
- <string id="30718">at</string>
- <string id="30719">ETA</string>
- <string id="30720">'%s' successfully installed.</string>
- <string id="30721">An error occurred extracting '%s'</string>
- <string id="30722">An error occurred downloading '%s'</string>
- <string id="30723">Installing '%s' cancelled!</string>
- <string id="30728">Failed install</string>
- <string id="30729">Installed</string>
- <!-- search terms -->
- <string id="30730">Search</string>
- <string id="30731">Enter keywords/phrase to search for...</string>
- <string id="30735">Browse for install path</string>
- <!-- credits titles -->
- <string id="30750">Author</string>
- <string id="30751">Version</string>
- <string id="30752">Subversion Repo</string>
- <string id="30753">Language Translation</string>
- <string id="30754">Icon by</string>
- <string id="30759">Updated</string>
- <!-- viewer messages -->
- <string id="30760">Checking for updates, please wait...</string>
- <string id="30761">Fetching changelog, please wait...</string>
- <string id="30762">Fetching readme, please wait...</string>
- <string id="30763">Fetching license, please wait...</string>
- <string id="30765">Updates</string>
- <string id="30766">Changelog</string>
- <string id="30767">Readme</string>
- <string id="30768">License</string>
- <string id="30769">Properties</string>
- <string id="30770">An error occurred checking for updates!</string>
- <string id="30771">An error occurred fetching %s!</string>
+
+ <!-- addon localized title -->
+ <string id="30000">PyDocs &amp; PyPredefs Printer</string>
+ <!-- do NOT localize {addon} -->
+ <string id="30001">{addon} Package Manager</string>
+ <!-- language author (translators put your name here) -->
+ <string id="30002">nuka1195</string>
+
+ <!-- category separators -->
+ <string id="30051">General</string>
+ <string id="30052"></string>
+ <string id="30053"></string>
+ <string id="30054"></string>
+ <string id="30055"></string>
+ <string id="30056">Maintenance</string>
+
+ <!-- General -->
+ <string id="30100">Path</string>
+ <string id="30101">Documents</string>
+ <!-- settings labels & options -->
+ <string id="30110">Save docs to</string>
+ <string id="30115">Print HTML PyDocs</string>
+ <string id="30120">Print PyDev Predefined Completions</string>
+
+ <!-- Maintenance -->
+ <string id="30600">Information</string>
+ <string id="30601">Utilities</string>
+ <!-- settings labels & options -->
+ <string id="30610">View changelog</string>
+ <string id="30615">View readme</string>
+ <string id="30620">View license</string>
+ <string id="30625">View properties</string>
+ <string id="30650">Check for updates</string>
+
+ <!-- universal strings -->
+ <!-- compatible messages -->
+ <!-- do NOT localize {version!s} {msg} {file} {addon} {function} -->
+ <string id="30700">You&apos;re currently running version
{version!s}.</string>
+ <string id="30701">Your version is up to date.</string>
+ <string id="30702">An updated version {version!s} is available.</string>
+ <!-- messages -->
+ <string id="30710">Downloading: {msg}</string>
+ <string id="30711">Saving: {msg}</string>
+ <string id="30712">To: {msg}</string>
+ <string id="30713">Extracting: {msg}</string>
+ <string id="30714">B</string>
+ <string id="30715">KB</string>
+ <string id="30716">MB</string>
+ <string id="30717">of</string>
+ <string id="30718">at</string>
+ <string id="30719">ETA</string>
+ <string id="30720">{addon} successfully installed.</string>
+ <string id="30721">An error occurred extracting
&apos;{file}&apos;</string>
+ <string id="30722">An error occurred downloading
&apos;{file}&apos;</string>
+ <string id="30723">An error occurred saving &apos;{file}&apos;</string>
+ <string id="30724">Installing &apos;{addon}&apos; cancelled!</string>
+ <string id="30728">Failed install</string>
+ <string id="30729">Installed</string>
+ <!-- search terms -->
+ <string id="30730">Search</string>
+ <string id="30731">Enter keywords/phrase to search for...</string>
+ <string id="30735">Browse for install path</string>
+ <string id="30736">Reset controls to previous values?</string>
+ <string id="30737">Reset controls to default values?</string>
+ <!-- button labels -->
+ <string id="30740">Reset</string>
+ <string id="30741">Previous</string>
+ <string id="30742">Defaults</string>
+ <string id="30745">Open</string>
+ <string id="30746">Save</string>
+ <!-- credits titles -->
+ <string id="30750">Author</string>
+ <string id="30751">Version</string>
+ <string id="30752">Repository</string>
+ <string id="30753">Branch</string>
+ <string id="30754">Language Translation</string>
+ <string id="30755">Icon by</string>
+ <string id="30759">Updated</string>
+ <!-- viewer messages -->
+ <string id="30760">Checking for updates, please wait...</string>
+ <string id="30761">Fetching changelog, please wait...</string>
+ <string id="30762">Fetching readme, please wait...</string>
+ <string id="30763">Fetching license, please wait...</string>
+ <string id="30764">Fetching window properties, please wait...</string>
+ <string id="30765">Updates</string>
+ <string id="30766">Changelog</string>
+ <string id="30767">Readme</string>
+ <string id="30768">License</string>
+ <string id="30769">Properties</string>
+ <string id="30770">An error occurred checking for updates!</string>
+ <string id="30771">An error occurred fetching {function}!</string>
+
</strings>
=======================================
--- /addons/script.pydocs/resources/settings.xml Sat Nov 13 08:34:14 2010
+++ /addons/script.pydocs/resources/settings.xml Sun Jun 3 16:29:40 2012
@@ -1,25 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<settings>

- <!-- General -->
- <category label="30051">
- <setting label="30100" type="lsep" />
- <setting label="30110" type="folder" id="doc_path" default=""
source="auto" option="writeable" />
- </category>
-
- <!-- Maintenance -->
- <category label="30056">
- <setting type="sep"/>
- <setting label="[B]$ADDON[script.pydocs 30750][/B]" type="text"
default="nuka1195" enable="false"/>
- <!--setting label="[B]$ADDON[script.pydocs 30751][/B]" type="text"
default="$VERSION" enable="false" /-->
- <setting label="[B]$ADDON[script.pydocs 30752][/B]" type="text"
id="repo" default="http://xbmc-addons.googlecode.com/" enable="false"/>
- <setting label="[B]$ADDON[script.pydocs 30753][/B]" type="text"
default="$ADDON[script.pydocs 30002]" enable="false"/>
- <setting type="sep"/>
- <setting label="30600" type="lsep"/>
- <setting label="30610" type="action"
action="RunScript($CWD/resources/lib/updates.py)"
visible="system.platform.xbox"/>
- <setting label="30615" type="action"
action="RunScript($CWD/resources/lib/utils.py,changelog)"
visible="system.platform.windows + System.HasAddon(script.module.pysvn)"/>
- <!--setting label="30620" type="action"
action="RunScript($CWD/resources/lib/utils.py,readme)"/>
- <setting label="30625" type="action"
action="RunScript($CWD/resources/lib/utils.py,license)"/-->
- </category>
+ <!-- General -->
+ <category label="30051" id="category_general">
+ <setting label="30100" type="lsep"/>
+ <setting label="30110" type="folder" id="doc_path" default=""
source="auto" option="writeable"/>
+ <setting label="30101" type="lsep"/>
+ <setting label="30115" type="bool" id="include_pydocs" default="true"
enable="!eq(-2,)"/>
+ <setting label="30120" type="bool" id="include_pypredefs" default="true"
enable="!eq(-3,)"/>
+ </category>

</settings>
Reply all
Reply to author
Forward
0 new messages