示例#1
0
文件: tktttag.py 项目: exhuma/tagtiql
#!/usr/bin/env python
from Tkinter import Tk
from tkSimpleDialog import askstring
import sys
from tagtiql.core import tag_path

filename = sys.argv[1]

root = Tk()
#root.withdraw()

input = askstring("Swarmtags", "Enter a comma separated list of tags:")

if input:
    tags, tagfile = tag_path( filename, input )

示例#2
0
文件: ttuntag.py 项目: exhuma/tagtiql
#!/usr/bin/env python

import sys
from glob import glob
from tagtiql.core import tag_path, OP_REMOVE_TAG

if (len(sys.argv) < 3):
   print """
Tagswarm un-tagger.
Remove one or many tags from one or many files (using standard globbing pattern).

NOTE: Depending on the shell behaviour you might need to enclose globbing
patterns in quotes. The application assumes that only the first parameters
specifies the filename pattern. Shells like ZSH expand the globbing pattern
BEFORE passing it to the application. This will cause only the first filename
to be tagged...... with the names of the other files as tags!

Usage:
   %s <filename> <tag1> [tag2 [tag3 [tag4 ... ] ] ]
""" % sys.argv[0]
   sys.exit(1)

for path in glob(sys.argv[1]):
   tag_path( path, sys.argv[2:], OP_REMOVE_TAG )

示例#3
0
文件: tttag.py 项目: exhuma/tagtiql
#!/usr/bin/env python

import sys
from glob import glob
from tagtiql.core import tag_path

if (len(sys.argv) < 3):
   print """
Tagswarm tagger.
Tag one or many files (using standard globbing pattern) with one or many tags.

NOTE: Depending on the shell behaviour you might need to enclose globbing
patterns in quotes. The application assumes that only the first parameters
specifies the filename pattern. Shells like ZSH expand the globbing pattern
BEFORE passing it to the application. This will cause only the first filename
to be tagged...... with the names of the other files as tags!

Usage:
   %s <filename> <tag1> [tag2 [tag3 [tag4 ... ] ] ]
""" % sys.argv[0]
   sys.exit(1)

for path in glob(sys.argv[1]):
   tag_path( path, sys.argv[2:] )