mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Merge branch 'master' of github.com:samuelclay/NewsBlur
This commit is contained in:
commit
6dd63c9938
3 changed files with 10 additions and 5 deletions
4
fabfile.py
vendored
4
fabfile.py
vendored
|
@ -160,6 +160,10 @@ def setup_user():
|
||||||
put("~/.ssh/id_dsa.pub", "authorized_keys")
|
put("~/.ssh/id_dsa.pub", "authorized_keys")
|
||||||
run('mv authorized_keys ~/.ssh/')
|
run('mv authorized_keys ~/.ssh/')
|
||||||
|
|
||||||
|
def add_machine_to_ssh():
|
||||||
|
put("~/.ssh/id_dsa.pub", "local_keys")
|
||||||
|
run("echo `cat local_keys` >> .ssh/authorized_keys")
|
||||||
|
|
||||||
def setup_repo():
|
def setup_repo():
|
||||||
run('mkdir -p ~/code')
|
run('mkdir -p ~/code')
|
||||||
run('git clone https://github.com/samuelclay/NewsBlur.git newsblur')
|
run('git clone https://github.com/samuelclay/NewsBlur.git newsblur')
|
||||||
|
|
|
@ -289,6 +289,7 @@
|
||||||
margin: 5px 6px 0 0;
|
margin: 5px 6px 0 0;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
float: left;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
.NB-bookmarklet .NB-bookmarklet-error {
|
.NB-bookmarklet .NB-bookmarklet-error {
|
||||||
|
|
|
@ -177,7 +177,6 @@ def getLinksLXML(data, baseuri):
|
||||||
if link.attrib.get('type') in LinkParser.FEED_TYPES:
|
if link.attrib.get('type') in LinkParser.FEED_TYPES:
|
||||||
href = link.attrib['href']
|
href = link.attrib['href']
|
||||||
if href: links.append(href)
|
if href: links.append(href)
|
||||||
print links
|
|
||||||
return links
|
return links
|
||||||
|
|
||||||
def getALinks(data, baseuri):
|
def getALinks(data, baseuri):
|
||||||
|
@ -186,16 +185,16 @@ def getALinks(data, baseuri):
|
||||||
return p.links
|
return p.links
|
||||||
|
|
||||||
def getLocalLinks(links, baseuri):
|
def getLocalLinks(links, baseuri):
|
||||||
if not baseuri: return links
|
found_links = []
|
||||||
|
if not baseuri: return found_links
|
||||||
baseuri = baseuri.lower()
|
baseuri = baseuri.lower()
|
||||||
# urilen = len(baseuri)
|
|
||||||
for l in links:
|
for l in links:
|
||||||
try:
|
try:
|
||||||
if l.lower().startswith(baseuri):
|
if l.lower().startswith(baseuri):
|
||||||
links.append(l)
|
found_links.append(l)
|
||||||
except (AttributeError, UnicodeDecodeError):
|
except (AttributeError, UnicodeDecodeError):
|
||||||
pass
|
pass
|
||||||
return links
|
return found_links
|
||||||
|
|
||||||
def isFeedLink(link):
|
def isFeedLink(link):
|
||||||
return link[-4:].lower() in ('.rss', '.rdf', '.xml', '.atom')
|
return link[-4:].lower() in ('.rss', '.rdf', '.xml', '.atom')
|
||||||
|
@ -277,6 +276,7 @@ def feeds(uri, all=False, querySyndic8=False, _recurs=None):
|
||||||
links = getALinks(data, fulluri)
|
links = getALinks(data, fulluri)
|
||||||
except:
|
except:
|
||||||
links = []
|
links = []
|
||||||
|
_debuglog('no LINK tags, looking at local links')
|
||||||
locallinks = getLocalLinks(links, fulluri)
|
locallinks = getLocalLinks(links, fulluri)
|
||||||
# look for obvious feed links on the same server
|
# look for obvious feed links on the same server
|
||||||
outfeeds.extend(filter(isFeed, filter(isFeedLink, locallinks)))
|
outfeeds.extend(filter(isFeed, filter(isFeedLink, locallinks)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue