Access to README.txt from within plugin
#1
My plugin (iPhoto), like a lot of others, requires some setup before it can be used. Because of this I very frequently get a lot of questions that I've already answered in the included README.txt; however, most users don't know how to access it.

So I thought I'd include a context menu item that would display the README file in a dialog window for the user from within XBMC. But then it occurred to me that this would probably be beneficial for all plugins, and thus maybe should simply be a part of XBMC? That is, if a README.txt is included with an addon, automatically add a context menu item labeled something like "Plugin Documentation" or whatever.

What do you guys think?

-j
Reply
#2
You could always put the instructions in the description - not ideal, I agree. A readme facility might be useful - am interested in hearing what others think.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
I use an addon for this made by dandar
Reply
#4
jmarshall Wrote:You could always put the instructions in the description - not ideal, I agree. A readme facility might be useful - am interested in hearing what others think.

True, but honestly I think there should be both, and the readme should also be available from the installation screen too. I think it's imperative too that the add-on documentation be easily accessible from within the add-on since a lot of users probably won't think to go back to the installation screen for it.

I suppose I could put a link to the README in the description (rather than the text itself), but you'd really be surprised how hard it is to get people to actually read stuff if it's not immediately accessible from where they are currently.

-j
Reply
#5
Robotica Wrote:I use an addon for this made by dandar

Which add-on?

-j
Reply
#6
http://forum.xbmc.org/showthread.php?tid=52387
Reply
#7
@jingai: I completely agree. I'll bring it up with the addon gods and see what they sayeth.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#8
hi,

Simple code from my add-on moviesets
http://code.google.com/p/passion-xbmc/so...ewer.py#30


PHP Code:
# Modules general
import os

# Modules XBMC
import xbmc
import xbmcgui
from xbmcaddon import Addon

# constants
ADDON      Addon"script.moviesets" )
ADDON_NAME ADDON.getAddonInfo"name" )
ADDON_DIR  ADDON.getAddonInfo"path" )


class 
Viewer:
    
# 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
        
self.window xbmcgui.Windowself.WINDOW )
        
# give window time to initialize
        
xbmc.sleep100 )
        
# set controls
        
self.setControls()

    
def setControlsself ):
        
#get header, text
        
headingtext self.getText()
        
# set heading
        
self.window.getControlself.CONTROL_LABEL ).setLabel"%s - %s" % ( headingADDON_NAME, ) )
        
# set text
        
self.window.getControlself.CONTROL_TEXTBOX ).setTexttext )

    
def getTextself ):
        try:
            
txt openos.path.joinADDON_DIR"README.txt" ) ).read()
            return 
"README"txt
        except
:
            
print_exc()
        return 
""""

Viewer() 
Image


Cheers
frost
For my bad English, sorry. I am French Canadian.
Admin @ Passion-XBMC.org
Reply
#9
FrostBox Wrote:Simple code from my add-on moviesets

Thanks for the snippet. I knew how to achieve it, but wanted to bring it up with other developers since I thought it might be valuable to have a more general implementation in XBMC that just works for all addons.

I'll probably do it in my own add-on for now like you did though just as an attempt to keep from answering the same questions over and over Smile

-j
Reply
#10
jmarshall Wrote:You could always put the instructions in the description - not ideal, I agree. A readme facility might be useful - am interested in hearing what others think.
Jonathan,

While I see that FrostBox posted how to achieve this in a script a few posts back from here, it would be really nice to be able to do the same thing from a skin. That is something along the lines of

PHP Code:
<onclick>ShowText($INFO[Skin.String(FileLocation)])</onclick
The above code (or something much better structured) could bring up the skins DialogTextViewer.xml file and display a text file with F.A.Q's, setup instructions or whatever.

Just a thought
Wyrm (xTV-SAF)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#11
+! - more complex addons/skins should definitely have a standard way od putting instructions/notes in front of users
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#12
It seems like a general set of built-ins for displaying online help is definitely warranted. In the interim though, at least a built-in function for displaying a text file would certainly help.

-j
Reply
#13
Jonathan, I'm sure you've already thought about this, but I figured I'd mention it: we need to have multilingual support as well. I propose that the README.txt in the root directory of the plugin be in the addon author's native tongue, but also have translated versions in resources/language/.

-j
Reply
#14
Robotica Wrote:http://forum.xbmc.org/showthread.php?tid=52387

Sweet baby jebus, why isn't this in the official repo?
Reply
#15
Ned Scott Wrote:Sweet baby jebus, why isn't this in the official repo?

Found the source code for 1.4 however this is still only made for xbox.
However this doesn't look to hard.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
Access to README.txt from within plugin0