Changeset 6547 for lliurex-store/trunk/fuentes/python3-lliurex-store.install/usr/share/lliurexstore/plugins/loadStore.py
- Timestamp:
- Dec 22, 2017, 2:07:25 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-store/trunk/fuentes/python3-lliurex-store.install/usr/share/lliurexstore/plugins/loadStore.py
r6458 r6547 14 14 import gettext 15 15 from bs4 import BeautifulSoup 16 gettext.textdomain('python3-lliurex-store')17 _=gettext.gettext18 16 19 17 class loadstore: 20 18 def __init__(self): 21 19 self.dbg=0 22 self.pluginInfo={'load':'*' }20 self.pluginInfo={'load':'*','load_bundles':'*'} 23 21 self.store='' 24 22 self.progress=0 … … 50 48 self.store=appstream.Store() 51 49 if action=='load': 52 self._load_store(self.store,loadBundles) 53 # self.progress=100 50 self._load_store(self.store) 51 if action=='load_bundles': 52 self._load_store(self.store,loadBundles=True) 53 self.progress=100 54 54 return (self.store) 55 55 #def execute_action … … 93 93 def _generic_file_load(self,filesDir,store): 94 94 iconPath='/usr/share/icons/hicolor/128x128' 95 files=os.listdir(filesDir) 95 96 for appFile in os.listdir(filesDir): 96 97 if appFile.endswith('appdata.xml'): … … 147 148 app.set_priority(0) 148 149 if app.get_id_filename() in lliurexApps.keys(): 149 # app.set_merge_kind(appstream.AppMergeKind.APPEND)150 150 self._debug("Mergin app "+str(app.get_id())+" as is in Lliurex") 151 # app.set_id(lliurexApps[app.get_id_filename()])152 151 lliurexApps[app.get_id_filename()].subsume_full(app,appstream.AppSubsumeFlags.BOTH_WAYS) 153 152 store.remove_app(app) … … 219 218 self._debug("Blacklisted app: "+blApp) 220 219 resultRe=re.search('([^a-zA-Z0-9_-])',blApp) 221 # if blApp[-1]!='*':222 220 if resultRe: 223 221 if blApp[0]=='*': … … 238 236 resultRe=re.search(blApp,app.get_id()) 239 237 if resultRe: 240 # if blApp.lower() in app.get_id_filename().lower():241 238 store.remove_app(app) 242 239 self._debug("Removed "+str(app.get_id()) +" as matches with "+blApp) … … 268 265 for repo in repoTypeList: 269 266 self._debug(("Fetching repo %s")%(repo)) 270 print (_("Fetching %s catalogue: "+progressBar)%repoType,end="\r")271 progressBar=progressBar+"#"272 print (_("Fetching %s catalogue: "+progressBar)%repoType,end="\r")267 # print (("Fetching %s catalogue: "+progressBar)%repoType,end="\r") 268 # progressBar=progressBar+"#" 269 # print (("Fetching %s catalogue: "+progressBar)%repoType,end="\r") 273 270 applist=self._generate_applist(self._fetch_repo(repo)) 274 progressBar=progressBar+"##"275 print (_("Fetching %s catalogue: "+progressBar)%repoType,end="\r")271 # progressBar=progressBar+"##" 272 # print (("Fetching %s catalogue: "+progressBar)%repoType,end="\r") 276 273 self._debug("Processing info...") 277 274 self._th_generate_xml_catalog(applist,outdir,infoPage,repoType,progressBar) 278 275 self._debug("Fetched repo "+repo) 279 print (_("Removing old entries..."))276 # print (("Removing old entries...")) 280 277 self._clean_bundle_catalogue(applist,outdir) 281 278 else: … … 318 315 lenAppList=len(randomList) 319 316 inc=30/lenAppList 320 print (CURSOR_UP)317 # print (CURSOR_UP) 321 318 for app in randomList: 322 319 th=threading.Thread(target=self._th_write_xml, args = (app,outdir,infoPage,semaphore,inc)) … … 327 324 progressBar='#'+progressBar 328 325 # print (CURSOR_UP) 329 print (_("Fetching %s catalogue: "+progressBar)%repoType,end="\r")326 # print (("Fetching %s catalogue: "+progressBar)%repoType,end="\r") 330 327 os.system('setterm -cursor on') 331 328 print('') … … 338 335 version=nameSplitted[1] 339 336 arch=nameSplitted[2] 340 # filename=outdir+name+"_"+version+".appdata.xml"341 337 filename=outdir+app.lower().replace('appimage',"appdata.xml") 342 338 self._debug("checking if we need to download "+filename)
Note: See TracChangeset
for help on using the changeset viewer.