Lists all published articles.
 Responds to html and atom
17238
def index
      respond_to do |format|
        format.html {
          @first_page = (params[:page] and params[:page].to_i > 0) ? false : true
          if params[:tag]
            @articles = Lines::Article.published.tagged_with(params[:tag]).page(params[:page].to_i)
          else
            @articles = Lines::Article.published.page(params[:page].to_i).padding(1)
          end
          
          if @articles.first_page?
            if @first_article = Article.published.first
              @first_article.teaser = nil unless @first_article.teaser.present?
            end
          end
          
          set_meta_tags title: SITE_TITLE,
                        description: CONFIG[:meta_description],
                        keywords: KEYWORDS,
                        open_graph: { title: SITE_TITLE,
                                        type: 'website',
                                        url: articles_url,
                                        site_name: SITE_TITLE,
                                        image: CONFIG[:og_logo]
                                      }

        }
        format.atom{
          @articles = Lines::Article.published
        }
      end
    end
1166242
def list(self):
        '''
        
        '''
        kwd = {
            'pager': '',
            'title': '单页列表',
        }
        self.render('wiki_page/page_list.html',
                    kwd=kwd,
                    view=MWiki.query_recent(),
                    view_all=MWiki.query_all(),
                    format_date=tools.format_date,
                    userinfo=self.userinfo,
                    cfg=CMS_CFG)
528083
def dict(self):
        
        post_dict = {
            'id': self.id,
            'link': self.link,
            'permalink': self.permalink,
            'content_type': self.content_type,
            'slug': self.slug,
            'updated': self.updated, #.strftime(conf.GOSCALE_ATOM_DATETIME_FORMAT),
            'published': self.published, #.strftime(conf.GOSCALE_ATOM_DATETIME_FORMAT),
            'title': self.title,
            'description': self.description,
            'author': self.author,
            'categories': self.categories[1:-1].split(',') if self.categories else None,
            'summary': self.summary,
            }
        if self.attributes:
            attributes = simplejson.loads(self.attributes)
            post_dict.update(attributes)
        return post_dict
618167
def search_all(self, template: str) -> _Result:
        
        return [r for r in findall(template, self.html)]
376253
def entry_index(request, limit=0, template='djournal/entry_index.html'):
    ''' '''

    entries = Entry.public.all()

    if limit > 0:
        entries = entries[:limit]

    context = {
        'entries': entries,
    }

    return render_to_response(
        template,
        context,
        context_instance=RequestContext(request),
    )
864530
def list(self, request, *args, **kwargs):
        

        queryset = self.get_filtered_queryset(get_request_data(request))
        # Switch between paginated or standard style responses
        page = self.paginate_queryset(queryset)
        if page is not None:
            serializer = self.get_serializer(page, many=True)
            return self.get_paginated_response(serializer.data)

        serializer = self.get_serializer(queryset, many=True)
        return Response(serializer.data)
1306776
def get_articles(self, issue=''):
        	
		
		
	soup = get_soup() # get soup of all articles 
	issues = soup.find_all('ul')
		
	# validating and assigning default value for issue
	if not type(issue) is int or issue < 0 :
		issue = 1
	if issue > len(issues):
		issue = len(issues)		
		
	# considering latest article is last element 		
	articles = issues[len(issues)-issue].find_all('a') 
	mArticles = []
	for article in articles:
		mArticle = {}
		mArticle['link'] = article.get('href')[1:]
		mArticle['title'] = article.find('li').contents[0].strip()
		mArticle['author'] = article.find('span').contents[0].encode('utf8')
		mArticles.append(mArticle)
	return mArticles
530534
def list(self, toa=None, show_history=False):
        
        if not toa:
            toa = time.mktime(datetime.datetime.now().timetuple())

        query = {
            "$query": {
                "master_id": self.master_id,
                "processed": show_history,
                "toa" : {"$lte" : toa}
            },
            "$orderby": {
                "toa": 1
            }
        }

        revisions = yield self.revisions.find(query)

        raise Return(revisions)
861233
def comments(self, article):
        
        return self._query_zendesk(self.endpoint.comments, object_type='comment', id=article)
1281207
function htmlTableOfContents () {
    var toc = document.getElementById('toc');
    var headings;

    if( navigator.userAgent.indexOf("MSIE") != -1 ) {
       headings = document.getElementsByTagName('h2');
    } else {
       headings = document.querySelectorAll("h2");
    }

    var list = document.createElement('ul');
    var heading = document.createElement('h2');

    for(var i = 0, n = headings.length; i < n; i ++) {
        var listItem = document.createElement('li');
        var link = document.createElement('a');
        link.href = '#' + headings[i].id;
        link.innerText = headings[i].innerText.replace(' #','');
        listItem.appendChild(link);
        list.appendChild(listItem);
    }

    heading.id = "contents";
    heading.innerText = 'Contents';
    toc.appendChild(heading);
    toc.appendChild(list);
}
419109
def _getNextArticleBatch(self):
        """"""
        # try to get more uris, if none
        self._articlePage += 1
        # if we have already obtained all pages, then exit
        if self._totalPages != None and self._articlePage > self._totalPages:
            return
        self.setRequestedResult(RequestArticlesInfo(page=self._articlePage,
            sortBy=self._sortBy, sortByAsc=self._sortByAsc,
            returnInfo = self._returnInfo))
        if self._er._verboseOutput:
            print("Downloading article page %d..." % (self._articlePage))
        res = self._er.execQuery(self)
        if "error" in res:
            print("Error while obtaining a list of articles: " + res["error"])
        else:
            self._totalPages = res.get("articles", {}).get("pages", 0)
        results = res.get("articles", {}).get("results", [])
        self._articleList.extend(results)
127989
def initWithArticleUriList(uriList):
        
        q = QueryArticles()
        assert isinstance(uriList, list), "uriList has to be a list of strings that represent article uris"
        q.queryParams = { "action": "getArticles", "articleUri": uriList }
        return q
158951
protected function _processListArticles()
    {
        $sAddDynParams = $this->getAddUrlParams();
        if ($sAddDynParams && ($aArtList = $this->getArticleList())) {
            $blSeo = \OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive();
            foreach ($aArtList as $oArticle) {
                // appending std and dynamic urls
                if (!$blSeo) {
                    // only if seo is off..
                    $oArticle->appendStdLink($sAddDynParams);
                }
                $oArticle->appendLink($sAddDynParams);
            }
        }
    }
1192287
def index():
    """"""
    kwdb = current_app.kwdb

    libraries = get_collections(kwdb, libtype="library")
    resource_files = get_collections(kwdb, libtype="resource")

    return flask.render_template("libraryNames.html",
                                 data={"libraries": libraries,
                                       "version": __version__,
                                       "resource_files": resource_files
                                   })
506307
def fetch_and_parse_article_list(list, extraction_fields = nil)
      # list should be an array of objects of format {pmid: pmid, article: RayyanFormats::Target}
      @hercules_articles.fight(list) do |article|
        fetch_and_parse_detail_page(article.sid, article, extraction_fields) do |article|
          yield article if block_given?
        end
      end
    end
20520
def article_parse(self, response, rss_title=None):
        
        if not self.helper.parse_crawler.content_type(response):
            return

        yield self.helper.parse_crawler.pass_to_pipeline_if_article(
            response, self.ignored_allowed_domain, self.original_url,
            rss_title)
933121
protected function HandleArticleList()
    {
        $aFields = $this->GetFields();
        $oArticleList = $this->GetArticleList();
        $iCount = 0;
        if (!is_null($oArticleList)) {
            /** @var $oArticle TdbShopArticle */
            while ($oArticle = &$oArticleList->Next() && !$this->BreakUp($iCount)) {
                $oArticle = $this->PreProcessArticle($oArticle);
                $this->HandleArticle($oArticle, $aFields);
                ++$iCount;
            }
        }

        return;
    }