- Timestamp:
- Jul 16, 2018, 12:53:25 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-store/trunk/fuentes/python3-lliurex-store.install/usr/share/lliurexstore/plugins/appImageManager.py
r7721 r7730 33 33 self.bundle_types=['appimg'] 34 34 self.appimage_dir=os.getenv("HOME")+"/.local/bin" 35 #To get the description of an app we must go to a specific url defined in url_info. 36 #$(appname) we'll be replaced with the appname so the url matches the right one. 37 #If other site has other url naming convention it'll be mandatory to define it with the appropiate replacements 35 38 self.repos={'appimagehub':{'type':'json','url':'https://appimage.github.io/feed.json','url_info':''}} 36 #Appim ages not stored in a repo must be listed in this file, providing at least the download url39 #Appimges not stored in a repo must be listed in this file, providing the download url and the info url (if there's any) 37 40 self.external_appimages="/usr/share/lliurex-store/files/external_appimages.json" 38 41 self.locale=['ca_ES@valencia','ca@valencia','qcv','ca','ca_ES','es_ES','es','en_US','en_GB','en','C'] … … 225 228 all_apps.extend(applist) 226 229 return True 227 #def _get_bundles_catalogue228 230 229 231 def _get_external_catalogue(self): … … 256 258 appinfo['keywords']=app_info['keywords'] 257 259 if 'version' in app_info.keys(): 258 appinfo[' version']=app_info['version']260 appinfo['reywords']=app_info['keywords'] 259 261 self._debug("Fetching external appimage %s"%app_info['url']) 260 262 appinfo['bundle']='appimage' … … 269 271 # self._clean_bundle_catalogue(all_apps,outdir) 270 272 return(True) 271 #def _get_ external_catalogue273 #def _get_bundles_catalogue 272 274 273 275 def _fetch_repo(self,repo): … … 311 313 312 314 def load_json_appinfo(self,appimage): 315 self._debug(appimage) 313 316 appinfo=self._init_appinfo() 314 317 appinfo['name']=appimage['name'] … … 318 321 appinfo['summary']='' 319 322 if 'description' in appimage.keys(): 320 if type(appi nfo['description'])==type({}):323 if type(appimage['description'])==type({}): 321 324 for lang in appinfo['description'].keys(): 322 325 appinfo['description'].update({lang:appimage['description'][lang]}) … … 373 376 sw_new=False 374 377 app=appstream.App() 375 app_orig=self.store.get_app_by_pkgname(appinfo[' package'].lower())378 app_orig=self.store.get_app_by_pkgname(appinfo['name'].lower()) 376 379 if not app_orig: 377 app_orig=self.store.get_app_by_id(appinfo[' package'].lower()+".desktop")380 app_orig=self.store.get_app_by_id(appinfo['name'].lower()+".desktop") 378 381 if app_orig: 379 382 self._debug("Extending app %s"%appinfo['package']) … … 418 421 if not appinfo['name'].endswith('.appimage'): 419 422 app.set_name("C",appinfo['name']+".appimage") 420 for lang,desc in appinfo['description'].items(): 421 description="This is an AppImage bundle of app %s. It hasn't been tested by our developers and comes from a 3rd party dev team. Please use it carefully.\n%s"%(appinfo['name'],desc) 423 if appinfo['description']: 424 for lang,desc in appinfo['description'].items(): 425 description="This is an AppImage bundle of app %s. It hasn't been tested by our developers and comes from a 3rd party dev team. Please use it carefully.\n%s"%(appinfo['name'],desc) 426 summary=' '.join(list(description.split(' ')[:8])) 427 app.set_description(lang,description) 428 app.set_comment(lang,summary) 429 else: 430 description="This is an AppImage bundle of app %s. It hasn't been tested by our developers and comes from a 3rd party dev team. Please use it carefully"%(appinfo['name']) 422 431 summary=' '.join(list(description.split(' ')[:8])) 423 if len(description.split(' '))>8: 424 summary+="... " 425 app.set_description(lang,description) 426 app.set_comment(lang,summary) 432 app.set_description("C",description) 433 app.set_comment("C",summary) 434 427 435 if 'categories' in appinfo.keys(): 428 436 for category in appinfo['categories']: … … 596 604 releases_page="" 597 605 url_source="opensuse" 606 # app_info['installerUrl']=app_info['installerUrl']+"/download" 598 607 599 608 if url_source or releases_page: … … 609 618 package_name=package_data.findAll('strong', attrs={ "class" : "pl-1"}) 610 619 package_link=package_data['href'] 611 package_link=releases_page+package_link 612 releases.append(package_link) 613 self._debug("Link: %s"%package_link) 620 if releases_page or url_source: 621 package_link=releases_page+package_link 622 releases.append(package_link) 623 self._debug("Link: %s"%package_link) 614 624 else: 615 625 releases=[app_info['installerUrl']]
Note: See TracChangeset
for help on using the changeset viewer.