parxivScore.py
def _createArticleData(self, feed):
    """
      Decompose the feed information.
      
      Parameters
      ----------
      feed : feedparser feed
          The arxiv feed.
    """
    for i, e in enumerate(feed.entries):
      a = {}
      # Assign full info
      a["full"] = copy.copy(e)
      # Get title
      a["title"] = e.title
      # Separate the (arXiv:...) part
      r = re.match("^(.*)\s*\((arXiv.*)\)\s*$", e.title)
      a["titlePure"] = None
      a["titleFinish"] = None
      if r is not None:
        a["titlePure"] = r.group(1)
        a["titleFinish"] = r.group(2)
      # Determine subcategory (None if this is impossible)
      a["subcat"] = None
      r = re.match(".*\(arXiv:.+\[astro-ph\.(\w+)\].*$", a["title"])
      if r is not None:
        a["subcat"] = r.group(1)
      # Get the abstract and remove newlines and paragraphs
      a["abstract"] = str(e.summary).replace("\n", " ").replace("\r", '').replace("<p>", "").replace("</p>","")
      # Get authors
      a["authors"] = []
      a["authorsDecomp"] = []
      for el in e.author_detail["name"].split(','):
        r = re.match(".*\>(.*)\<.*", el)
        if r is None:
          continue
        a["authors"].append(r.group(1))
        a["authorsDecomp"].append(self._decomposeName(a["authors"][-1]))
      
      self.articles[i+1] = a.copy()

      Decompose the feed information.
      
      Parameters
      ----------
      feed : feedparser feed
          The arxiv feed.
    
Decompose the feed information.
Parameters


Decompose the feed information . Parameters
def _createArticleData(self, feed):
    for i, e in enumerate(feed.entries):
      a = {}
      a["full"] = copy.copy(e)
      a["title"] = e.title
      r = re.match("^(.*)\s*\((arXiv.*)\)\s*$", e.title)
      a["titlePure"] = None
      a["titleFinish"] = None
      if r is not None:
        a["titlePure"] = r.group(1)
        a["titleFinish"] = r.group(2)
      a["subcat"] = None
      r = re.match(".*\(arXiv:.+\[astro-ph\.(\w+)\].*$", a["title"])
      if r is not None:
        a["subcat"] = r.group(1)
      a["abstract"] = str(e.summary).replace("\n", " ").replace("\r", '').replace("<p>", "").replace("</p>","")
      a["authors"] = []
      a["authorsDecomp"] = []
      for el in e.author_detail["name"].split(','):
        r = re.match(".*\>(.*)\<.*", el)
        if r is None:
          continue
        a["authors"].append(r.group(1))
        a["authorsDecomp"].append(self._decomposeName(a["authors"][-1]))
      self.articles[i+1] = a.copy()
def _createArticleData ( self , feed ) : for i , e in enumerate ( feed . entries ) : a = { } a [ "full" ] = copy . copy ( e ) a [ "title" ] = e . title r = re . match ( "^(.*)\s*\((arXiv.*)\)\s*$" , e . title ) a [ "titlePure" ] = None a [ "titleFinish" ] = None if r is not None : a [ "titlePure" ] = r . group ( 1 ) a [ "titleFinish" ] = r . group ( 2 ) a [ "subcat" ] = None r = re . match ( ".*\(arXiv:.+\[astro-ph\.(\w+)\].*$" , a [ "title" ] ) if r is not None : a [ "subcat" ] = r . group ( 1 ) a [ "abstract" ] = str ( e . summary ) . replace ( "\n" , " " ) . replace ( "\r" , '' ) . replace ( "<p>" , "" ) . replace ( "</p>" , "" ) a [ "authors" ] = [ ] a [ "authorsDecomp" ] = [ ] for el in e . author_detail [ "name" ] . split ( ',' ) : r = re . match ( ".*\>(.*)\<.*" , el ) if r is None : continue a [ "authors" ] . append ( r . group ( 1 ) ) a [ "authorsDecomp" ] . append ( self . _decomposeName ( a [ "authors" ] [ - 1 ] ) ) self . articles [ i + 1 ] = a . copy ( )
Decompose the feed information.
Decompose the feed information .
"""
      Decompose the feed information.
      
      Parameters
      ----------
      feed : feedparser feed
          The arxiv feed.
    """ # Assign full info # Get title # Separate the (arXiv:...) part # Determine subcategory (None if this is impossible) # Get the abstract and remove newlines and paragraphs # Get authors
self
feed