Skip to content

Commit

Permalink
mostly implemented feed info page in Flask
Browse files Browse the repository at this point in the history
  • Loading branch information
fazalmajid committed Oct 23, 2016
1 parent 81afe39 commit c40df04
Show file tree
Hide file tree
Showing 7 changed files with 286 additions and 518 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,3 +7,4 @@ ChangeLog
*.pid *.pid
modules modules
private.py private.py
backups
13 changes: 12 additions & 1 deletion dbop.py
Expand Up @@ -174,7 +174,18 @@ def view_sql(c, where, sort, params, overload_threshold):
tag_dict.setdefault(item_uid, []).append(tag_name) tag_dict.setdefault(item_uid, []).append(tag_name)
return tag_dict, c.execute("""select * from articles return tag_dict, c.execute("""select * from articles
order by """ + sort + """, item_uid DESC""") order by """ + sort + """, item_uid DESC""")


def feed_info_sql(c, feed_uid):
mv_on_demand(c)
return c.execute("""select feed_title, feed_desc, feed_filter,
feed_html, feed_xml, feed_pubxml,
last_modified, interesting, unread, uninteresting, filtered, total,
feed_status, feed_private, feed_exempt, feed_dupcheck, feed_errors
from v_feeds_snr
where feed_uid=?
group by feed_uid, feed_title, feed_html, feed_xml
""", [feed_uid])

c = db() c = db()
mv_on_demand(c) mv_on_demand(c)
rebuild_v_feed_stats(c) rebuild_v_feed_stats(c)
Expand Down
2 changes: 2 additions & 0 deletions filters.py
Expand Up @@ -166,6 +166,8 @@ def normalize_rule(rule):
wrapper.wordsep_re = re.compile(r'(\s+)') wrapper.wordsep_re = re.compile(r'(\s+)')
def rule_lines(rule): def rule_lines(rule):
"Find how many lines are needed for the rule in a word-wrapped <textarea>" "Find how many lines are needed for the rule in a word-wrapped <textarea>"
if not rule:
return 4
lines = 0 lines = 0
for line in rule.splitlines(): for line in rule.splitlines():
if line.strip(): if line.strip():
Expand Down

0 comments on commit c40df04

Please sign in to comment.