def jqueryListOnCollection(): #Get request param: collectionId, start, cnt param = webUtils.paramWithDefault({u"collectionId":u"D:/tmp",u"start":0,u"cnt":100}) #Get collection from system, collection system contains cached collections and filesystem collections. #h.write("<!--") #print "hello" if not objTools.isUuid(param["collectionId"]): #param["collectionId"] = collectionListItems.jsIdEncoding(param["collectionId"]) param["collectionId"] = stringTools.jsIdDecoding(param["collectionId"]) #h.write(unicode(str(int(param["start"])))+unicode(str(int(param["cnt"])))) co = collectionManager.getCollection(param["collectionId"], dbSys.dbSysSmart()) containerCo = container.collectionContainer(co, dbSys.dbSysSmart()).getRange(int(param["start"]), int(param["cnt"])) #Output #h.write(str(co)) #res = "" #h.write("-->") if True:#try: res = collectionListItem(containerCo) else:#except: pass h = libs.html.response.html() #print "hello" #h.write("good") h.genPartialHtmlHead() h.write(res) #h.write(l.s) #print res h.end()
def main(): import libs.ufsDb.ufsDbSys as dbSys o = objSys(dbSys.dbSysSmart()) print o.getSameObjsForFullPath("D:/Profiles/q19420/My Documents/Bluetooth/Inbox/CAM_0001.jpg") print '-----------------------------------------------------------' print o.getSameObjsForFullPath('D:\\proj\\LTE\\CAM_0001.jpg') print o.getSameObjsForFullPath('D:/proj/LTE/LTE-BCU2-procedure.xls') print '-----------------------------------------------------------' print o.getSameObjsForFullPath('D:\\proj\\LTE\\bcu2-physap.xls')
def main(): dbSysInst = dbSys.dbSysSmart() newDbSysInst = newDbSys.dbSysSmart() dbNew = tagSys.tagSystemShoveDb(newDbSysInst) dbOld = tagSys.tagSystemShoveDb(dbSysInst, dbSupportsCnt=True) res = {} for i,j in dbOld.getAllTags(): print 'find tag:',i,j for url in dbOld.enumObjsWithTag(i): print url.encode('gbk','replace'),i.encode('gbk','replace'),j if res.has_key(url): res[url].append(i) else: res[url] = [i] for i in res: if os.path.exists(i): dbNew.tag(i, list(set(res[i]))) pass else: print i.encode('gbk','replace'), str(list(set(res[i]))).encode('gbk','replace')