Skip to content

Commit dfe382c

Browse files
authored
Merge branch 'weechat:main' into master
2 parents 4bc459e + d67b7e4 commit dfe382c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+8521
-2644
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ labels: bug
66

77
---
88

9-
<!-- Please do not report any security issue here, see file Contributing.md -->
9+
<!-- Please do not report any security issue here, see file CONTRIBUTING.md -->
1010

1111
## Script / WeeChat
1212

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
# SPDX-FileCopyrightText: 2020-2025 Sébastien Helleu <[email protected]>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
15
blank_issues_enabled: false

.github/pull_request_template.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
<!-- MANDATORY INFO: -->
44

5-
- Script name: 
6-
- Version: 
5+
- Script name:
6+
- Version:
77

88
<!-- Optional: external dependencies (other than WeeChat and standard interpreter libraries) -->
9-
- Requirements: 
9+
- Requirements:
1010

1111
<!-- Optional: fill only if you are sure that a specific WeeChat version is required -->
12-
- Min WeeChat version: 
12+
- Min WeeChat version:
1313

1414
<!-- Optional: tags for script (see list of tags on https://weechat.org/scripts/), new tags are allowed -->
15-
- Script tags: 
15+
- Script tags:
1616

1717
## Description
1818

@@ -24,26 +24,26 @@
2424

2525
<!-- To fill only if you are adding a new script -->
2626

27-
<!-- Please validate and check each item with "[x]" (see file Contributing.md) -->
27+
<!-- Please validate and check each item with "[x]" (see file CONTRIBUTING.md) -->
2828

2929
- [ ] Single commit, single file added
3030
- [ ] Commit message: `New script name.py: short description…`
3131
- [ ] No similar script already exists
3232
- [ ] Name: max 32 chars, only lower case letters, digits and underscores
3333
- [ ] Unique name, does not already exist in repository
3434
- [ ] No shebang on the first line
35-
- [ ] Comment in script with name/pseudo, e-mail and license
35+
- [ ] Comment in script with name/pseudo, e-mail and license using [SPDX](https://spdx.dev/) tags (see [Contributing guide](https://github.com/weechat/scripts/blob/main/CONTRIBUTING.md#copyright-and-license))
3636
- [ ] Only English in code/comments
3737
- [ ] Pure WeeChat API used, no extra API
38-
- [ ] Function `hook_process` is used for any blocking call
38+
- [ ] Function `hook_url`, `hook_process` or `hook_process_hashtable` is used for any blocking call
3939
- [ ] For Python script: works with Python 3 (Python 2 support is optional)
4040
- [ ] Score 100 / 100 displayed by [weechat-script-lint](https://github.com/weechat/weechat-script-lint)
4141

4242
## Checklist (script update)
4343

4444
<!-- To fill only if you are updating an existing script -->
4545

46-
<!-- Please validate and check each item with "[x]" (see file Contributing.md) -->
46+
<!-- Please validate and check each item with "[x]" (see file CONTRIBUTING.md) -->
4747

4848
- [ ] Author has been contacted
4949
- [ ] Single commit, single file added
@@ -56,7 +56,7 @@
5656

5757
<!-- To fill only if you are deleting an existing script -->
5858

59-
<!-- Please validate and check each item with "[x]" (see file Contributing.md) -->
59+
<!-- Please validate and check each item with "[x]" (see file CONTRIBUTING.md) -->
6060

6161
- [ ] Author has been contacted
6262
- [ ] Single commit, single file deleted

.github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021-2025 Sébastien Helleu <[email protected]>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
15
name: CI
26

37
on:
@@ -6,15 +10,15 @@ on:
610

711
jobs:
812
check-scripts:
9-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1014
name: Check scripts
1115
steps:
12-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1317
- name: Set up Python
14-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v5
1519
with:
16-
python-version: "3.10"
20+
python-version: "3.12"
1721
- name: Install dependencies
1822
run: pip install weechat-script-lint
1923
- name: Check scripts
20-
run: make partial-check
24+
run: make check

.github/workflows/reuse.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# SPDX-FileCopyrightText: 2025 Sébastien Helleu <[email protected]>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
name: REUSE Compliance Check
6+
7+
on:
8+
- push
9+
- pull_request
10+
11+
jobs:
12+
13+
test:
14+
15+
runs-on: ubuntu-24.04
16+
17+
steps:
18+
19+
- uses: actions/checkout@v4
20+
21+
- name: REUSE Compliance Check
22+
uses: fsfe/reuse-action@v4

.mailmap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2014-2025 Sébastien Helleu <[email protected]>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
#
15
# Map author and committer names and email addresses to canonical real names
26
# and email addresses.
37
#

Contributing.md renamed to CONTRIBUTING.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2014-2025 Sébastien Helleu <[email protected]>
3+
4+
SPDX-License-Identifier: GPL-3.0-or-later
5+
-->
6+
17
# Contributing to WeeChat scripts
28

39
## Reporting an issue
@@ -19,6 +25,8 @@ Thank you for your help!
1925

2026
New scripts are added with pull requests against master branch of this repository, using the pull request template called `Add script`.
2127

28+
### Guidelines
29+
2230
**Important:** please fill the pull request template and follow **all** these rules, otherwise your new script will be rejected:
2331

2432
- pull request:
@@ -34,16 +42,32 @@ New scripts are added with pull requests against master branch of this repositor
3442
- do **NOT** use the word "weechat" in the script name: for example prefer `notify.py` to `weechat_notify.py` (the script is only for WeeChat)
3543
- script content:
3644
- do **NOT** use a shebang on the first line (like `#!/usr/bin/perl`), this is not needed
37-
- write a comment at the beginning with your name (or pseudo), your e-mail and the chosen license (which must be free)
38-
- consider using [Semantic versioning ](https://semver.org/) (recommended, not mandatory); only digits and dots are allowed in version
45+
- write a comment at the beginning with your name (or pseudo), your e-mail and the chosen license, which must be free (see [Copyright and license](#copyright-and-license))
46+
- consider using [Semantic versioning](https://semver.org/) (recommended, not mandatory); only digits and dots are allowed in version
3947
- use only English for code and comments
4048
- do **NOT** use an extra API between WeeChat and your script (like Ruby gem "WeeChat"), use the standard WeeChat API only
41-
- use function [hook_process](https://weechat.org/files/doc/stable/weechat_plugin_api.en.html#_hook_process) or [hook_process_hashtable](https://weechat.org/files/doc/stable/weechat_plugin_api.en.html#_hook_process_hashtable) if your script is doing something blocking (like fetching URL), to not block WeeChat
49+
- use function [hook_url](https://weechat.org/files/doc/stable/weechat_plugin_api.en.html#_hook_url) (WeeChat ≥ 4.1.0), [hook_process](https://weechat.org/files/doc/stable/weechat_plugin_api.en.html#_hook_process) or [hook_process_hashtable](https://weechat.org/files/doc/stable/weechat_plugin_api.en.html#_hook_process_hashtable) if your script is doing something blocking (like fetching URL), to not block WeeChat
4250
- make your Python script compatible with Python 3.x, the support of Python 2.x is now optional
4351
- use the official WeeChat URL: [https://weechat.org](https://weechat.org) (`https` and no `www.`) in any link to the WeeChat website.
4452

4553
Your script is automatically checked in CI, see [Automatic checks on scripts](#automatic-checks-on-scripts).
4654

55+
### Copyright and license
56+
57+
The copyright and license must be present in header, using [SPDX](https://spdx.dev/) tags, see the [list of licenses](https://spdx.org/licenses/).
58+
59+
Example of header in a Python script:
60+
61+
<!-- REUSE-IgnoreStart -->
62+
63+
```python
64+
# SPDX-FileCopyrightText: 2025 Your Name <[email protected]>
65+
#
66+
# SPDX-License-Identifier: GPL-3.0-or-later
67+
```
68+
69+
<!-- REUSE-IgnoreEnd -->
70+
4771
## Updating a script
4872

4973
### Contacting the author

LICENSES/0BSD.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Copyright (C) YEAR by AUTHOR EMAIL
2+
3+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
4+
5+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

0 commit comments

Comments
 (0)