Merge branch 'master' into multiprefix
|
@ -0,0 +1,29 @@
|
|||
### Description
|
||||
|
||||
*Describe the changes you made here.*
|
||||
|
||||
Fixes #{issue}
|
||||
|
||||
### Type of change
|
||||
|
||||
Please delete options that are not relevant.
|
||||
|
||||
- Bug fix (non-breaking change which fixes an issue)
|
||||
- New feature (non-breaking change which adds functionality)
|
||||
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- This change requires a documentation update
|
||||
|
||||
### How has this been tested?
|
||||
|
||||
*Describe the procedure used for verifying your changes here.*
|
||||
|
||||
### Checklist
|
||||
|
||||
- [ ] Issue exists for PR
|
||||
- [ ] Code reviewed by the author
|
||||
- [ ] Code documented (comments or other documentation)
|
||||
- [ ] Changes tested
|
||||
- [ ] `flake8` passes
|
||||
- [ ] `CHANGELOG.md` updated
|
||||
- [ ] Informative commit messages
|
||||
- [ ] Descriptive PR title
|
|
@ -7,7 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
## [Unreleased]
|
||||
### Added
|
||||
- Canadian prefix info to the `?prefixes` command.
|
||||
- `?worksplit` command.
|
||||
- Maps for CQ Zones, ITU Zones, ITU Regions, and Canadian prefixes.
|
||||
- Attribution for all maps.
|
||||
- Option to append ` | ?help` to the playing status.
|
||||
### Changed
|
||||
- ARRL/RAC section maps to include all current ARRL/RAC sections.
|
||||
### Fixed
|
||||
- Issue where multiple prefixes were not handled properly.
|
||||
|
||||
|
@ -16,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
### Fixed
|
||||
- Dependency issues
|
||||
|
||||
|
||||
## [2.3.1] - 2020-04-02
|
||||
### Fixed
|
||||
- Wordlist containing innappropriate words.
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
# Contributing to qrm
|
||||
|
||||
## Before You Start
|
||||
|
||||
- Make sure there's an issue for the feature, bugfix, or other improvement you want to make.
|
||||
- Make sure it's something that the project maintainers want.
|
||||
We can discuss it and assign the issue to you.
|
||||
- Make sure work isn't already being done on the issue.
|
||||
|
||||
### Environment Setup
|
||||
|
||||
Once all of the above is done, you can get started by setting up your development envronment.
|
||||
|
||||
1. [Fork this repo][1] into your own GitHub namespace.
|
||||
1. Make sure the `master` branch is up to date, then make yourself a new branch with a descriptive name.
|
||||
1. Once the forked repo is cloned and on the proper branch, you can set up the development environment.
|
||||
1. Install python 3.7 or higher.
|
||||
1. Run `make dev-install`.
|
||||
This should install everything you need to develop and run qrm.
|
||||
1. [Create a bot and token][2], and add it to `data/keys.py`.
|
||||
Also add your [QRZ credentials][3] if needed.
|
||||
1. In `data/options.py`, change values as needed.
|
||||
Some commands require adding your Discord user ID to `owner_uids`.
|
||||
1. To activate the virtual env that was created by `make`, run `source botenv/bin/activate` (or the equivelent for your shell or operating system).
|
||||
|
||||
## While You Develop
|
||||
|
||||
To run qrm, use the command `./run.sh`.
|
||||
We recommend you use the `--pass-errors` flags to avoid perpetual restart loops if you break the bot.
|
||||
It exists because repeatedly mashing [Ctrl+C] at high speed to break a fast loop is not fun.
|
||||
|
||||
Commit messages should be descriptive and mention issues that they fix ("fixes #123") or contain progress on ("progress on #123").
|
||||
Make commits as needed, but try to keep it reasonable.
|
||||
If there are too many, your contribution may be squashed when merged.
|
||||
You may want to squash your commits locally yourself:
|
||||
|
||||
```sh
|
||||
git reset --soft [commit before your changes]
|
||||
git commit
|
||||
```
|
||||
|
||||
Make sure to document your code as you go, in both comments and external documentation (in `/dev-notes/`) as needed.
|
||||
`dev-notes` is especially important if you introduce a new json file format or to document some development process (like the command to crush the various images in the repository).
|
||||
|
||||
**Test your changes.**
|
||||
If your code doesn't work, it's not ready for merging.
|
||||
Make sure you not only test intended behaviour, but also edge cases and error cases.
|
||||
Make sure to run `flake8` to ensure your code uses the proper style, and `mypy [files...]` to ensure proper typing.
|
||||
|
||||
If you're making a user-facing change, put a quick summary in `CHANGELOG.md` under the `[Unreleased]` heading.
|
||||
Follow the [Keep a Changelog][4] format.
|
||||
|
||||
### A Note on Style
|
||||
|
||||
qrm tries to keep to PEP 8 style whenever possible.
|
||||
Use the utility `flake8` to check that you follow this style.
|
||||
When you start a PR or push commits, GitHub will automatically run this for you;
|
||||
if that fails, you will be expected to fix those errors before merge.
|
||||
|
||||
Otherwise, try to follow the existing style:
|
||||
double-quotes except when required to be single,
|
||||
indentation of mult-line structures matching other examples in the code,
|
||||
add type hints,
|
||||
etc.
|
||||
|
||||
## When You're Ready to Merge
|
||||
|
||||
1. When you have finished working on your contribution, create a pull request from your fork's branch into the master branch of this repository.
|
||||
1. Read through and complete the pull request template.
|
||||
If the checklist is not complete, your contribution will not be merged.
|
||||
1. Your pull request will get reviewed by at least one maintainer.
|
||||
1. If approved, another maintainer may merge the pull request if everything looks good.
|
||||
|
||||
[1]: https://github.com/miaowware/qrm2/fork
|
||||
[2]: https://discordpy.readthedocs.io/en/latest/discord.html
|
||||
[3]: https://www.qrz.com/page/xml_data.html
|
||||
[4]: https://keepachangelog.com/en/1.0.0/
|
|
@ -28,6 +28,10 @@ Run. For more information on options, see the [quick-bot-no-pain run.sh document
|
|||
$ run.sh
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Check out the [contribution guidelines](/CONTRIBUTING.md) for more information about how to contribute to this project.
|
||||
|
||||
## Copyright
|
||||
|
||||
Copyright (C) 2019-2020 Abigail Gold, 0x5c
|
||||
|
|
|
@ -63,6 +63,7 @@ emojis = SimpleNamespace(
|
|||
paths = SimpleNamespace(
|
||||
data=Path("./data/"),
|
||||
resources=Path("./resources/"),
|
||||
img=Path("./resources/img/"),
|
||||
bandcharts=Path("./resources/img/bandcharts/"),
|
||||
maps=Path("./resources/img/maps/"),
|
||||
)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# Image processing instructions
|
||||
|
||||
For images like bandplans and maps, first resize the image to a reasonable size, then run `pngquant --quality 30-40` on the images.
|
||||
Do not apply that to non-flat images like actual pictures.
|
|
@ -20,5 +20,5 @@ Used for grouping info such as name, description, source, and such.
|
|||
| `name` | The name of the file. | `Canada`, `ITU Zones` |
|
||||
| `long_name` | The long name (title) of the file. | `Worldwide map of ITU Zones` |
|
||||
| `description` | The description accompanying the file. | `Full radio allocations chart for all services.` |
|
||||
| `source` | The source of the file. | `Instituto Federal de Telecomunicaciones (IFT)` |
|
||||
| `source` | The source of the file. | `Instituto Federal de Telecomunicaciones (IFT)` |
|
||||
| `emoji` | A Unicode emoji associated with the file. | `📻`, `🇨🇦` |
|
||||
|
|
11
exts/fun.py
|
@ -10,6 +10,7 @@ the GNU General Public License, version 2.
|
|||
|
||||
import random
|
||||
|
||||
import discord
|
||||
import discord.ext.commands as commands
|
||||
|
||||
import common as cmn
|
||||
|
@ -36,6 +37,16 @@ class FunCog(commands.Cog):
|
|||
"""Returns xkcd: Standards."""
|
||||
await ctx.send("http://xkcd.com/927")
|
||||
|
||||
@commands.command(name="worksplit", aliases=["split", "ft8"], category=cmn.cat.fun)
|
||||
async def _worksplit(self, ctx: commands.Context):
|
||||
"""Posts "Work split you lids"."""
|
||||
fn = "worksplit.jpg"
|
||||
embed = cmn.embed_factory(ctx)
|
||||
embed.title = "Work Split, You Lids!"
|
||||
embed.set_image(url="attachment://" + fn)
|
||||
img = discord.File(cmn.paths.img / fn, filename=fn)
|
||||
await ctx.send(embed=embed, file=img)
|
||||
|
||||
@commands.command(name="xd", hidden=True, category=cmn.cat.fun)
|
||||
async def _xd(self, ctx: commands.Context):
|
||||
"""ecks dee"""
|
||||
|
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 286 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 27 KiB |
|
@ -1,6 +1,10 @@
|
|||
{
|
||||
"arrl": ["arrl-rac.png", "ARRL Sections", "ARRL Sections", "", "", "🇺🇸"],
|
||||
"rac": ["arrl-rac.png", "RAC Sections", "RAC Sections", "", "", "🇨🇦"],
|
||||
"arrl": ["arrl-rac.png", "ARRL Sections", "ARRL Sections", "", "[EI8IC](https://www.mapability.com/ei8ic/maps/maps.php)", "🇺🇸"],
|
||||
"rac": ["arrl-rac.png", "RAC Sections", "RAC Sections", "", "[EI8IC](https://www.mapability.com/ei8ic/maps/maps.php)", "🇨🇦"],
|
||||
"cn": ["cn.png", "China's Prefixes", "Map of prefix regions in China", "", "CRAC", "🇨🇳"],
|
||||
"us": ["us.png", "USA's Prefixes", "Map of prefix regions in the USA", "", "*[ARRL WAS Map](https://www.arrl.org/was-forms)* [[PDF]](http://www.arrl.org/files/file/Awards%20Application%20Forms/WASmap_Color.pdf)", "🇺🇸"]
|
||||
"us": ["us.png", "USA's Prefixes", "Map of prefix regions in the USA", "", "*[ARRL WAS Map](https://www.arrl.org/was-forms)* [[PDF]](http://www.arrl.org/files/file/Awards%20Application%20Forms/WASmap_Color.pdf)", "🇺🇸"],
|
||||
"ca": ["ca.png", "Canada's Prefixes", "Map of the prefix regions in Canada", "", "[Denelson83 (Wikimedia Commons)](https://commons.wikimedia.org/wiki/File:Amateur_radio_prefixes_in_Canada.svg)", "🇨🇦"],
|
||||
"ituz": ["itu-zones.png", "ITU Zones", "ITU Zones", "", "[EI8IC](https://www.mapability.com/ei8ic/maps/maps.php)", "🇺🇳"],
|
||||
"itur": ["itu-regions.png", "ITU Regions", "ITU Regions", "These are also used by the IARU for their regions.", "[EI8IC](https://www.mapability.com/ei8ic/maps/maps.php)", "🇺🇳"],
|
||||
"cq": ["cq-zones.png", "CQ Zones", "CQ Zones", "These are used for the CQWW contest.", "[EI8IC](https://www.mapability.com/ei8ic/maps/maps.php)", "🌐"]
|
||||
}
|
||||
|
|
After Width: | Height: | Size: 304 KiB |