File: plugins.html

package info (click to toggle)
puddletag 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 29,888 kB
  • sloc: python: 24,938; javascript: 21,828; xml: 964; makefile: 129; sh: 85
file content (152 lines) | stat: -rw-r--r-- 7,796 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Plugins &#8212; puddletag</title>
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
    <script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script src="../_static/jquery.js"></script>
    <script src="../_static/underscore.js"></script>
    <script src="../_static/doctools.js"></script>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js "></script>
<script type="text/javascript" src="../_static/js/jquery-fix.js "></script>
<script type="text/javascript" src="../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
<script type="text/javascript" src="../_static/bootstrap-sphinx.js "></script>

  </head><body>

  <div id="navbar" class="navbar navbar-default navbar-fixed-top">
    <div class="container">
      <div class="navbar-header">
        <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="../index.html">puddletag</a>
      </div>

        <div class="collapse navbar-collapse nav-collapse">
          <ul class="nav navbar-nav">
            <li class="divider-vertical"></li>
            
                <li><a href="../index.html">Home</a></li>
                <li><a href="../download.html">Download</a></li>
                <li><a href="../news.html">News</a></li>
                <li><a href="../docs.html">Documentation</a></li>
                <li><a href="https://github.com/puddletag/puddletag/issues">Issue Tracker</a></li>
                <li><a href="../screenshots.html">Screenshots</a></li>
                <li><a href="../about.html">About</a></li>
            
            
              
              
            
            
            
            
            
          </ul>

          
            
<form class="navbar-form navbar-right" action="../search.html" method="get">
 <div class="form-group">
  <input type="text" name="q" class="form-control" placeholder="Search" />
 </div>
  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>
          
        </div>
    </div>
  </div>

<div class="container">
  <div class="row">
      <div class="col-md-3">
        <div id="sidebar" class="bs-sidenav" role="complementary"><ul>
<li><a class="reference internal" href="#">Plugins</a><ul>
<li><a class="reference internal" href="#required-info">Required Info</a></li>
<li><a class="reference internal" href="#plugin-examples">Plugin Examples:</a></li>
</ul>
</li>
</ul>


<hr style='width:80%'>


        </div>
      </div>
    <div class="body col-md-9 content" role="main">
      
  <div class="section" id="plugins">
<h1>Plugins<a class="headerlink" href="#plugins" title="Permalink to this headline">¶</a></h1>
<p>It’s pretty easy to write puddletag plugins provided you know a bit of Python. If anything’s unclear don’t hesitate mailing me (<a class="reference external" href="mailto:concentricpuddle&#37;&#52;&#48;gmail&#46;com">concentricpuddle<span>&#64;</span>gmail<span>&#46;</span>com</a>) to complain. Follow the same protocol if you find any errors.</p>
<div class="section" id="required-info">
<h2>Required Info<a class="headerlink" href="#required-info" title="Permalink to this headline">¶</a></h2>
<p>puddletag plugins are stored in <strong>~/.puddletag/plugins</strong>. In order for a plugin to be registered the following tree structure is required.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">~/.</span><span class="n">puddletag</span><span class="o">/</span><span class="n">plugins</span>
    <span class="o">--</span>\<span class="n">modulename</span>
    <span class="o">----</span>\<span class="fm">__init__</span><span class="o">.</span><span class="n">py</span>
    <span class="o">----</span>\<span class="n">info</span>
</pre></div>
</div>
<p>Plugins will be imported using <strong>modulename</strong>, as such only valid in Python module names (no spaces, periods, unicode, etc.) are allowed.</p>
<p><strong>info</strong> is a INI file containing the plugin information. Use the following structure and keep in mind that all keys are case sensitive.</p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[info]</span>
<span class="na">name</span> <span class="o">=</span> <span class="s">Plugin Name</span>
<span class="na">author</span> <span class="o">=</span> <span class="s">Author Name</span>
<span class="na">version</span> <span class="o">=</span> <span class="s">1.0</span>
<span class="na">puddletag_version</span> <span class="o">=</span> <span class="s">0.9.3</span>
<span class="na">description</span> <span class="o">=</span> <span class="s">Description of what the plugin has/does.</span>
</pre></div>
</div>
<ul class="simple">
<li><p><strong>name</strong>: The name of the plugin as it’ll be displayed to a puddletag user.</p></li>
<li><p><strong>author</strong>: Add the names of people responsible for this mofo.</p></li>
<li><p><strong>version</strong>: The version number of your plugin.</p></li>
<li><p><strong>puddletag_version</strong>: The version of puddletag this plugin was created with. May be used for backward compatibility if the plugin interface changes.</p></li>
<li><p><strong>description</strong>: Add a short synopsis of what your plugin does.</p></li>
</ul>
<p>Your plugin will not be loaded unless all this information is present.</p>
</div>
<div class="section" id="plugin-examples">
<h2>Plugin Examples:<a class="headerlink" href="#plugin-examples" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference download internal" download="" href="../_downloads/e1f44bb1cbe1ac486c102e6670cd74d2/functionplugin.tar.gz"><code class="xref download docutils literal notranslate"><span class="pre">Function</span> <span class="pre">plugin</span> <span class="pre">example</span></code></a> contains a short tutorial on writing scripting functions and Functions that can be part of an action.</p>
<p>The <a class="reference download internal" download="" href="../_downloads/9fb209c0582f8fffa0ca88a35649c019/tagsource.tar.gz"><code class="xref download docutils literal notranslate"><span class="pre">Tag</span> <span class="pre">Source</span> <span class="pre">Example</span></code></a> contains puddletag’s Amazon tag source with a lot of comments.</p>
</div>
</div>


    </div>
      
  </div>
</div>
<footer class="footer">
  <div class="container">
    <p class="pull-right">
      <a href="#">Back to top</a>
      
    </p>
    <p>
      This page and associated images are licensed under <a rel="license" href="http://www.apache.org/licenses/LICENSE-2.0">Apache Version 2.0</a>
	Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 3.4.3.<br/>
    </p>
  </div>
</footer>
  </body>
</html>