Fix command recent
This commit is contained in:
parent
42cf0afeff
commit
e2ad10592d
1 changed files with 22 additions and 24 deletions
|
@ -1069,28 +1069,29 @@ async def remove_nonexistent_entries(db_file, feed, source):
|
||||||
await maintain_archive(cur, limit)
|
await maintain_archive(cur, limit)
|
||||||
|
|
||||||
|
|
||||||
async def get_feeds(db_file):
|
# TODO What is this function for? 2024-01-02
|
||||||
"""
|
# async def get_feeds(db_file):
|
||||||
Query table feeds for Title, URL, Categories, Tags.
|
# """
|
||||||
|
# Query table feeds for Title, URL, Categories, Tags.
|
||||||
|
|
||||||
Parameters
|
# Parameters
|
||||||
----------
|
# ----------
|
||||||
db_file : str
|
# db_file : str
|
||||||
Path to database file.
|
# Path to database file.
|
||||||
|
|
||||||
Returns
|
# Returns
|
||||||
-------
|
# -------
|
||||||
result : list
|
# result : list
|
||||||
Title, URL, Categories, Tags of feeds.
|
# Title, URL, Categories, Tags of feeds.
|
||||||
"""
|
# """
|
||||||
with create_connection(db_file) as conn:
|
# with create_connection(db_file) as conn:
|
||||||
cur = conn.cursor()
|
# cur = conn.cursor()
|
||||||
sql = (
|
# sql = (
|
||||||
"SELECT name, address, type, categories, tags "
|
# "SELECT name, address, type, categories, tags "
|
||||||
"FROM feeds"
|
# "FROM feeds"
|
||||||
)
|
# )
|
||||||
result = cur.execute(sql).fetchall()
|
# result = cur.execute(sql).fetchall()
|
||||||
return result
|
# return result
|
||||||
|
|
||||||
|
|
||||||
async def get_feeds_url(db_file):
|
async def get_feeds_url(db_file):
|
||||||
|
@ -1138,10 +1139,6 @@ async def get_feeds(db_file):
|
||||||
"FROM feeds"
|
"FROM feeds"
|
||||||
)
|
)
|
||||||
results = cur.execute(sql)
|
results = cur.execute(sql)
|
||||||
print("type of resilts in sqlite.py is:")
|
|
||||||
print(type(results))
|
|
||||||
print(results)
|
|
||||||
breakpoint()
|
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
||||||
|
@ -1180,6 +1177,7 @@ async def last_entries(db_file, num):
|
||||||
"LIMIT :num "
|
"LIMIT :num "
|
||||||
)
|
)
|
||||||
results = cur.execute(sql, (num,))
|
results = cur.execute(sql, (num,))
|
||||||
|
return results
|
||||||
|
|
||||||
|
|
||||||
async def search_feeds(db_file, query):
|
async def search_feeds(db_file, query):
|
||||||
|
|
Loading…
Reference in a new issue