-
Notifications
You must be signed in to change notification settings - Fork 1
Usage
Scaleios edited this page Nov 30, 2019
·
3 revisions
All needed functions after the first setup are in the "articlesearch.py" file. They are all async functions and thus need to be run in an async loop. (A basic example can be seen in "autoinitalbuild.py" using asyncio.)
Looks for and adds new articles to the database.
Searches the database for a given input.
Takes string as input. Example: "--title --limit=5 words and more words"
Options:
- title: Searches only in the titles of the articles (default search mode)
- content: Searches only in the content of an article, and ignores the title
- searchall: Searches both title and content of an article
- searchreverse: Searches the DB from the oldest article
- limit: Returns only the latest results up to the number given (default 5). Format: limit=XYZ
- limitall: Returns all results found
- before: Looks for articles that were written before a given date. Format: YYYY-MM-DD
- after: Looks for articles that were written after a given date. Format: YYYY-MM-DD If both the --after & --before tags are given, the search is limited to the dates between both options.
Returns the record for the article with the given ID.
Takes string as input. Example: Passing "1" as input would return the record with ID number 1 from the database
Counts the number of articles that fit the given conditions.
Takes string as input. Example: "--content --before=3305-06-23"
Options:
- title: Counts the number of articles that contain a certain term in the title.
- content: Counts the number of articles that contain a certain term only in their content.
- all: Counts the number of articles that contain a certain term in either the title or the content.
- before: Counts the number of articles before a given date. Format: YYYY-MM-DD
- after: Counts the number of articles after a given date. Format: YYYY-MM-DD If both the --after & --before tags are given, the search is limited to the dates between both options.