Exemplo n.º 1
0
 def on_ok_button_clicked(self, widget, data=None):
     import wwjufsdatabase.libs.services.servicesV2 as service
     req = service.req()
     #gtk.main_quit()
     entry = self.builder.get_object("entry1")
     tag = entry.get_text()
     print tag
     tag_list_raw = tag.split(",")
     tag_list = []
     for i in tag_list_raw:
         if i == "":
             continue
         tag_list.append(unicode(i))
     t = tagSystem.getTagSysObj(req.getDbSys())
     for i in self.liststore:
         #print i[0], i[1]
         if i[0]:
             url = i[1]
             url = url.replace("file:///", "")
             url = unicode(url)
             full_path = transform.transformDirToInternal(url)
             #print "full_path is:", full_path
             t.tag(full_path, tag_list)
             from localLibs.services.beanstalkdServices.TagProcessServiceV2 import TagProcessService
             p = TagProcessService()
             for cur_tag in tag_list:
                 p.addItem({"url":full_path, "tag":cur_tag})
     self.window1.hide()
Exemplo n.º 2
0
def ProcessTagged(tag = u"archive", target_dir = g_default_target_dir,
                     workingDir = gWorkingDir):
    
    auto_ext_info_with_thumb_tube_name = "AutoExtractInfoWithThumbeService_"+str(uuid.uuid4())
    
    a = AutoExtractInfoWithThumbeService()
    a.addItem({"input_tube_name":auto_ext_info_with_thumb_tube_name})
    
    s1 = TagProcessService()
    s1.addItem({"working_dir": workingDir,
               "target_dir": target_dir, "tag":tag, 
               "output_tube_name":auto_ext_info_with_thumb_tube_name})
def ProcessTagged(tag=u"archive", target_dir=g_default_target_dir, workingDir=gWorkingDir):

    auto_archive_tag_output_tube_name = "AutoArchiveService_" + str(uuid.uuid4())

    a = AutoArchiveService()
    a.addItem({"input_tube_name": auto_archive_tag_output_tube_name})

    s1 = TagProcessService()
    s1.addItem(
        {
            "working_dir": workingDir,
            "target_dir": target_dir,
            "tag": tag,
            "output_tube_name": auto_archive_tag_output_tube_name,
        }
    )