mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
23 lines
755 B
Python
23 lines
755 B
Python
import datetime
|
|
import errno
|
|
import os
|
|
import re
|
|
|
|
from django.conf import settings
|
|
from django.contrib.auth.models import User
|
|
from django.core.management.base import BaseCommand
|
|
|
|
from apps.reader.models import UserSubscription
|
|
from apps.rss_feeds.models import Feed
|
|
|
|
|
|
class Command(BaseCommand):
|
|
def add_argument(self, parser):
|
|
parser.add_argument("-q", "--query", dest="query", help="Search query")
|
|
parser.add_argument("-l", "--limit", dest="limit", type="int", default=1000, help="Limit of stories")
|
|
|
|
def handle(self, *args, **options):
|
|
# settings.LOG_TO_STREAM = True
|
|
|
|
# Feed.query_popularity(options['query'], limit=options['limit'])
|
|
Feed.xls_query_popularity(options["query"], limit=options["limit"])
|