• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rero / sonar / 17425918180

03 Sep 2025 07:11AM UTC coverage: 95.796% (-0.6%) from 96.378%
17425918180

push

github

PascalRepond
translations: extract messages

Co-Authored-by: Pascal Repond <pascal.repond@rero.ch>

7816 of 8159 relevant lines covered (95.8%)

0.96 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/sonar/modules/sitemap/cli/sitemap.py
1
# Swiss Open Access Repository
2
# Copyright (C) 2022 RERO
3
#
4
# This program is free software: you can redistribute it and/or modify
5
# it under the terms of the GNU Affero General Public License as published by
6
# the Free Software Foundation, version 3 of the License.
7
#
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU Affero General Public License for more details.
12
#
13
# You should have received a copy of the GNU Affero General Public License
14
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
15

16
"""Sitemap cli."""
17

18
import click
1✔
19
from flask import current_app
1✔
20
from flask.cli import with_appcontext
1✔
21

22
from sonar.modules.sitemap.sitemap import sitemap_generate
1✔
23

24

25
@click.group()
1✔
26
def sitemap():
1✔
27
    """Sitemap."""
28

29

30
@sitemap.command()
1✔
31
@click.option("-s", "--server-name", "server_name", required=True, default=None)
1✔
32
@with_appcontext
1✔
33
def generate(server_name):
1✔
34
    """Generate a sitemap.
35

36
    :param: server_name: organisation server name.
37
    """
38
    sitemap_generate(server_name, current_app.config.get("SONAR_APP_SITEMAP_ENTRY_SIZE", 10000))
×
39
    click.secho(f"Generate sitemap for {server_name}", fg="green")
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc