def general(self): data_dict, params = self._parse_url_params() data_dict['q'] = '*:*' item_count, results = _package_search(data_dict) navigation_urls = self._navigation_urls(params, item_count=item_count, limit=data_dict['rows'], controller='feed', action='general') feed_url = self._feed_url(params, controller='feed', action='general') alternate_url = self._alternate_url(params) return self.output_feed(results, feed_title=_(u'data.gc.ca Dataset Feed'), feed_description='', feed_link=alternate_url, feed_guid=_create_atom_id( u'/feeds/dataset.atom'), feed_url=feed_url, navigation_urls=navigation_urls)
def general(self): data_dict, params = self._parse_url_params() data_dict['q'] = '*:*' item_count, results = _package_search(data_dict) navigation_urls = self._navigation_urls( params, item_count=item_count, limit=data_dict['rows'], controller='ckanext.dge.controllers:DGEFeedController', action='general') feed_url = self._feed_url( params, controller='ckanext.dge.controllers:DGEFeedController', action='general') alternate_url = self._alternate_url(params) return self.output_feed( results, feed_title=g.site_title, feed_description= 'Conjuntos de datos recientemente creados o actualizados en %s' % g.site_title, feed_link=alternate_url, feed_guid=_create_atom_id(u'/feeds/dataset.atom'), feed_url=feed_url, navigation_urls=navigation_urls)
def tag(self, id): data_dict, params = self._parse_url_params() data_dict['fq'] = 'tags:"%s"' % id item_count, results = _package_search(data_dict) navigation_urls = self._navigation_urls(params, item_count=item_count, limit=data_dict['rows'], controller='feed', action='tag', id=id) feed_url = self._feed_url(params, controller='feed', action='tag', id=id) alternate_url = self._alternate_url(params, tags=id) return self.output_feed(results, feed_title=u'%s - Tag: "%s"' % (g.site_title, id), feed_description=u'Recently created or ' 'updated datasets on %s by tag: "%s"' % (g.site_title, id), feed_link=alternate_url, feed_guid=_create_atom_id (u'feeds/tag/%s.atom' % id), feed_url=feed_url, navigation_urls=navigation_urls)
def general(self): data_dict, params = self._parse_url_params() data_dict['q'] = '*:*' item_count, results = _package_search(data_dict) navigation_urls = self._navigation_urls(params, item_count=item_count, limit=data_dict['rows'], controller='feed', action='general') feed_url = self._feed_url(params, controller='feed', action='general') alternate_url = self._alternate_url(params) return self.output_feed( results, feed_title=_(u'Open Government Dataset Feed'), feed_description='', feed_link=alternate_url, feed_guid=_create_atom_id( u'/feeds/dataset.atom'), feed_url=feed_url, navigation_urls=navigation_urls )
def _group_or_organization(self, obj_dict, is_org): data_dict, params = self._parse_url_params() key = 'owner_org' if is_org else 'groups' data_dict['fq'] = '%s:"%s"' % (key, obj_dict['id'],) group_type = 'organization' if not is_org: group_type = 'group' item_count, results = _package_search(data_dict) navigation_urls = self._navigation_urls(params, item_count=item_count, limit=data_dict['rows'], controller='feed', action=group_type, id=obj_dict['name']) feed_url = self._feed_url(params, controller='feed', action=group_type, id=obj_dict['name']) guid = _create_atom_id(u'feeds/group/%s.atom' % obj_dict['name']) alternate_url = self._alternate_url(params, groups=obj_dict['name']) desc = u'Recently created or updated datasets on %s by group: "%s"' %\ (g.site_title, obj_dict['title']) title = u'%s - Group: "%s"' %\ (g.site_title, obj_dict['title']) if is_org: guid = _create_atom_id(u'feeds/organization/%s.atom' % obj_dict['name']) alternate_url = self._alternate_url(params, organization=obj_dict['name']) desc = u'Recently created or updated datasets on %s '\ 'by organization: "%s"' % (g.site_title, obj_dict['title']) title = u'%s - Organization: "%s"' %\ (g.site_title, obj_dict['title']) return self.output_feed(results, feed_title=title, feed_description=desc, feed_link=alternate_url, feed_guid=guid, feed_url=feed_url, navigation_urls=navigation_urls)
def general(self): data_dict, params = self._parse_url_params() data_dict["q"] = "*:*" item_count, results = _package_search(data_dict) navigation_urls = self._navigation_urls( params, item_count=item_count, limit=data_dict["rows"], controller="feed", action="general" ) feed_url = self._feed_url(params, controller="feed", action="general") alternate_url = self._alternate_url(params) return self.output_feed( results, feed_title=_(u"data.gc.ca Dataset Feed"), feed_description="", feed_link=alternate_url, feed_guid=_create_atom_id(u"/feeds/dataset.atom"), feed_url=feed_url, navigation_urls=navigation_urls, )