コード例 #1
0
def qss(name):
    """
  @param  name  str  id
  @return  unicode
  @throw  KeyError  when unknown name
  """
    from sakurakit import skfileio
    return skfileio.readfile(qss_path(name))
コード例 #2
0
 def loadClosedUrls(self):
     data = skfileio.readfile(rc.CLOSE_HISTORY_LOCATION)
     if data:
         #self.closedUrls = data.split('\n')
         self.closedUrls = [
             it for it in data.split('\n')
             if it and len(it) < defs.MAX_HISTORY_URL_SIZE
         ]
     dprint("pass")
コード例 #3
0
ファイル: rc.py プロジェクト: blackknifes/VNR-Core
def qss(name):
    """
  @param  name  str  id
  @return  unicode
  @throw  KeyError  when unknown name
  """
    from sakurakit import skfileio
    return skfileio.readfile(qss_path(name)).replace('$PWD',
                                                     config.root_abspath())
コード例 #4
0
def qss(name):
  """
  @param  name  unicode  id
  @return  unicode  qss file content
  @throw  KeyError  when unknown name

  The return string  is not cached.
  """
  #return cssmin(skfileio.readfile(qss_path(name)))
  return skfileio.readfile(qss_path(name))
コード例 #5
0
 def loadVisitedUrls(self):
     data = skfileio.readfile(rc.VISIT_HISTORY_LOCATION)
     if data:
         #self.visitedUrls = data.split('\n')
         self.visitedUrls = [
             it for it in data.split('\n')
             if it and len(it) < defs.MAX_HISTORY_URL_SIZE
         ]
         for url in reversed(self.visitedUrls):
             icon = rc.url_icon(url)
             self.addressEdit.addItem(icon, url)
     dprint("pass")
コード例 #6
0
ファイル: rc.py プロジェクト: blackknifes/VNR-Core
def cdn_data(name):
    """
  @param  name  str  id
  @return  unicode
  @throw  KeyError  when unknown name
  """
    ret = CDN_DATA.get(name)
    if not ret:
        from sakurakit import skfileio
        ret = CDN_DATA[name] = skfileio.readfile(cdn_path(name)).replace(
            '$PWD', config.root_abspath())
    return ret
コード例 #7
0
 def loadTabs(self):  # -> bool
     ret = False
     data = skfileio.readfile(rc.TABS_LOCATION)
     if data:
         #urls = data.split('\n')
         urls = [
             it for it in data.split('\n')
             if it and len(it) < defs.MAX_HISTORY_URL_SIZE
         ]
         for url in urls:
             self.openUnknownAfterCurrent(url)
         ret = True
     dprint("pass: ret = %s" % ret)
     return ret