~cedric/newspipe

c5c07a17d3175257aa14f14f8f8da127e2607f5d — Cédric Bonhomme 1 year, 2 months ago 112c531 + 0f713e5
Merge branch 'master' of git.sr.ht:~cedric/newspipe
M newspipe/crawler/default_crawler.py => newspipe/crawler/default_crawler.py +1 -1
@@ 4,7 4,7 @@
# newspipe - A Web based news aggregator.
# Copyright (C) 2010-2019  Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

M newspipe/lib/data.py => newspipe/lib/data.py +2 -2
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# Newspipe - A Web based news aggregator.
# Copyright (C) 2010-2020  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

M newspipe/lib/misc_utils.py => newspipe/lib/misc_utils.py +2 -2
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# Newspipe - A Web based news aggregator.
# Copyright (C) 2010-2020  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

M newspipe/notifications/emails.py => newspipe/notifications/emails.py +2 -2
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# Newspipe - A Web based news aggregator.
# Copyright (C) 2010-2020  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

M newspipe/notifications/notifications.py => newspipe/notifications/notifications.py +2 -2
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# Newspipe - A Web based news aggregator.
# Copyright (C) 2010-2020  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

M newspipe/runserver.py => newspipe/runserver.py +2 -2
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# Newspipe - A Web based news aggregator.
# Copyright (C) 2010-2020  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

M newspipe/web/forms.py => newspipe/web/forms.py +2 -2
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# Newspipe - A Web based news aggregator.
# Copyright (C) 2010-2020  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : http://gitlab.com/newspipe/newspipe
# For more information: http://gitlab.com/newspipe/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by

M newspipe/web/models/__init__.py => newspipe/web/models/__init__.py +2 -2
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# Newspipe - A Web based news aggregator.
# Copyright (C) 2010-2020  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

M newspipe/web/models/article.py => newspipe/web/models/article.py +2 -2
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# Newspipe - A Web based news aggregator.
# Copyright (C) 2010-2020  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

M newspipe/web/models/bookmark.py => newspipe/web/models/bookmark.py +2 -2
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# Newspipe - A Web based news aggregator.
# Copyright (C) 2010-2020  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

M newspipe/web/models/feed.py => newspipe/web/models/feed.py +2 -2
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# newspipe - A Web based news aggregator.
# Copyright (C) 2010-2020  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

M newspipe/web/models/role.py => newspipe/web/models/role.py +2 -2
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# newspipe - A Web based news aggregator.
# Copyright (C) 2010-2020  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

M newspipe/web/models/user.py => newspipe/web/models/user.py +2 -2
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# newspipe - A Web based news aggregator.
# Copyright (C) 2010-2020  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

M newspipe/web/static/js/articles.js => newspipe/web/static/js/articles.js +1 -1
@@ 2,7 2,7 @@
* pyAggr3g470r - A Web based news aggregator.
* Copyright (C) 2010-2014  Cédric Bonhomme - http://cedricbonhomme.org/
*
* For more information : https://bitbucket.org/cedricbonhomme/pyaggr3g470r/
* For more information: https://bitbucket.org/cedricbonhomme/pyaggr3g470r/
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as

M newspipe/web/templates/bookmarks.html => newspipe/web/templates/bookmarks.html +3 -2
@@ 18,10 18,11 @@
    <div class="row">
        <div class="col-6">
            {% if tag %}
                <span class="glyphicon glyphicon-tags" aria-hidden="true"></span>&nbsp;&nbsp;{{ tag }}
                <i class="fa fa-tag" aria-hidden="true"></i>&nbsp;&nbsp;{{ tag }}
            {% endif %}
            {% if query %}
                <span class="glyphicon glyphicon-search" aria-hidden="true"></span>&nbsp;&nbsp;{{ query }}
                {% if tag %}<br />{% endif %}
                <i class="fa fa-search" aria-hidden="true"></i>&nbsp;&nbsp;{{ query }}
            {% endif %}
        </div>
        <div class="col-6 text-right pull-right">

M newspipe/web/templates/layout.html => newspipe/web/templates/layout.html +1 -1
@@ 79,7 79,7 @@
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownBookmark" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-bookmark" aria-hidden="true"></i>&nbsp;{{ _('Bookmarks') }}</a>
                        <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownBookmark">
                            <a class="dropdown-item" href="{{ url_for('bookmarks.list_') }}">{{ _('Your bookmarks') }}</a>
                            <a class="dropdown-item" href="{{ url_for('bookmarks.list_') }}">{{ _('Bookmarks') }}</a>
                            <a class="dropdown-item" href="{{ url_for('bookmark.form') }}">{{ _('Add a new bookmark') }}</a>
                        </div>
                    </li>

M newspipe/web/views/bookmark.py => newspipe/web/views/bookmark.py +6 -11
@@ 2,9 2,9 @@
# -*- coding: utf-8 -*-

# Newspipe - A Web based news aggregator.
# Copyright (C) 2010-2017  Cédric Bonhomme - https://www.cedricbonhomme.org
# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://git.sr.ht/~cedric/newspipe
# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as


@@ 94,15 94,10 @@ def list_(per_page, status="all"):
        # query for the shared bookmarks (of all users)
        head_titles = [gettext("Recent bookmarks")]
        filters["shared"] = True
        last_bookmark = (
            BookmarkController(user_id)
            .read(**filters)
            .order_by(desc("time"))
            .limit(1)[0]
        )
        not_created_before = last_bookmark.time - datetime.timedelta(days=365)
        filters["time__gt"] = not_created_before  # only "recent" bookmarks
        bookmarks = BookmarkController(user_id).read(**filters).order_by(desc("time"))

    bookmarks = (
        BookmarkController(user_id).read(**filters).order_by(desc("time")).limit(1000)
    )

    # tag_contr = BookmarkTagController(user_id)
    # tag_contr.read().join(bookmarks).all()