コード例 #1
0
ファイル: pomf.py プロジェクト: Gosha/uguubot
def pomfadd(inp, chan=None, nick=None, say=None, db=None, notice=None):
    "pomfadd <word> <url> -- Downloads file, uploads it and adds it to the dictionary"

    dfile, url = inp.split(None, 1)
    pomfurl = upload(url)
    strsave = "{} {}".format(dfile, pomfurl)
    notice("{} added to {}".format(pomfurl, dfile))
    datafiles.add(strsave, notice)
コード例 #2
0
ファイル: pomf.py プロジェクト: FrozenPigs/uguubot
def pomfadd(inp, chan=None, nick=None, notice=None, db=None, say=None):
	"pomfadd <word> <url> -- Downloads file, uploads it and adds it to the dictionary"

        dfile, url = inp.split(None, 1)
	pomfurl = upload(url)
	strsave = "{} {}".format(dfile, pomfurl)
	datafiles.add(strsave, notice)
	return(formatting.output('pomf', ['{} remembered as {}'.format(pomfurl, dfile)]))
コード例 #3
0
def pomfadd(inp, chan=None, nick=None, say=None, db=None, notice=None):
	"pomfadd <word> <url> -- Downloads file, uploads it and adds it to the dictionary"

        dfile, url = inp.split(None, 1)
	pomfurl = upload(url)
	strsave = "{} {}".format(dfile, pomfurl)
	notice("{} added to {}".format(pomfurl, dfile))
	datafiles.add(strsave, notice)
コード例 #4
0
ファイル: pomf.py プロジェクト: nojusr/Taigabot
def pomfadd(inp, chan=None, nick=None, notice=None, db=None, say=None):
    "pomfadd <word> <url> -- Downloads file, uploads it and adds it to the dictionary"

    dfile, url = inp.split(None, 1)
    pomfurl = upload(url)
    strsave = "{} {}".format(dfile, pomfurl)
    datafiles.add(strsave, notice)
    return (formatting.output('pomf',
                              ['{} remembered as {}'.format(pomfurl, dfile)]))