~openshift/picard/nxstable

« back to all changes in this revision

Viewing changes to contrib/plugins/initials.py

  • Committer: Carlin Mangar
  • Date: 2009-10-25 06:19:41 UTC
  • mfrom: (994.3.1 plugins-fixed)
  • Revision ID: openshift@gmail.com-20091025061941-ircj9x0p1n19nxff
Merge in plugin fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
PLUGIN_NAME = 'Initials'
2
 
PLUGIN_AUTHOR = 'Lukas Lalinsky'
3
 
PLUGIN_DESCRIPTION = 'Provides tagger script function $initials(text).'
4
 
PLUGIN_VERSION = "0.1"
5
 
PLUGIN_API_VERSIONS = ["0.9.0", "0.10"]
6
 
 
7
 
from picard.script import register_script_function
8
 
 
9
 
def initials(parser, text):
10
 
    return "".join(a[:1] for a in text.split(" ") if a[:1].isalpha())
11
 
 
12
 
register_script_function(initials)