Skip to content

Commit

Permalink
fixed typos; improved ci pipeline; added requirements; added django t…
Browse files Browse the repository at this point in the history
…ranslations
  • Loading branch information
felbinger committed Oct 12, 2023
1 parent b8ce77f commit 72001a4
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 3 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v3
with:
Expand All @@ -39,12 +44,19 @@ jobs:
pip install setuptools wheel
- name: Build Python package
run: python setup.py sdist
run: python setup.py sdist bdist_wheel

- name: Upload package to artifacts
uses: actions/upload-artifact@v2
with:
name: python-packages
path: |
dist/*.whl
dist/*.tar.gz
- uses: crazy-max/ghaction-github-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*.whl
dist/*.tar.gz
6 changes: 4 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
name = django-wpm
version = 0.1
description = A Django app to manage wireguard peers on wireguard capeable routers.
description = A Django app to manage wireguard peers on wireguard capable routers.
long_description = file: README.md
url = https://github.com/secshellnet/wpm-django
author = Nico Felbinger
Expand All @@ -26,4 +26,6 @@ include_package_data = true
packages = find:
python_requires = >=3.8
install_requires =
Django >= 4.2
Django >= 4.2
apscheduler >= 3.10
requests >= 2.31.0
2 changes: 2 additions & 0 deletions wpm/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ def ready(self):
from wpm.services.check_valid import check_valid
import wpm.signals

# add the check_valid task - which checks the status of invalid
# peers using the api on the wireguard endpoint - to the scheduler, to run it every 5 seconds
scheduler = BackgroundScheduler()
scheduler.add_job(check_valid, 'interval', seconds=5)
scheduler.start()
99 changes: 99 additions & 0 deletions wpm/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# German translations for wpm-django.
# Copyright (C) 2023
# This file is distributed under the same license as the secshell.de package.
# Nico Felbinger <26925347+felbinger@users.noreply.github.com>, 2023.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-01 12:15+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: wpm/models.py:74
msgid "owner"
msgstr "Besitzer"

#: wpm/models.py:95
msgid "created"
msgstr "Erstellt"

#: wpm/admin.py:29
msgid ""
"This key has been generated in the browser.Feel free to overwrite the public "
"key below to use your own key."
msgstr ""
"Dieser Schlüssel wurde im Browser generiert. Sie können auch Ihren eigenen "
"Schlüssel nutzen und ihren öffentlichen Schlüssel unten angeben."

#: wpm/admin.py:31
msgid "configure psk"
msgstr "Pre-Shared Key konfigurieren"

#: wpm/admin.py:75 wpm/models.py:96
msgid "valid"
msgstr "Gültig"

#: wpm/apps.py:8
msgid "wpm"
msgstr "Wireguard Peer Manager"

#: wpm/models.py:14
msgid "dns server"
msgstr "DNS Server"

#: wpm/models.py:15
msgid "dns servers"
msgstr "DNS Server"

#: wpm/models.py:17
msgid "ip address"
msgstr "IP Adresse"

#: wpm/models.py:26 wpm/models.py:73
msgid "wireguard endpoint"
msgstr "Wireguard Endpunkt"

#: wpm/models.py:27
msgid "wireguard endpoints"
msgstr "Wireguard Endpunkte"

#: wpm/models.py:53 wpm/models.py:83
msgid "public key"
msgstr "Öffentlicher Schlüssel"

#: wpm/models.py:60
msgid "api token"
msgstr "API Token"

#: wpm/models.py:70
msgid "peer"
msgstr "Peer"

#: wpm/models.py:71
msgid "peers"
msgstr "Peers"

#: wpm/models.py:75
msgid "name"
msgstr "Bezeichnung"

#: wpm/models.py:81
msgid "tunnel ipv4"
msgstr "Tunnel IPv4 Adresse"

#: wpm/models.py:82
msgid "tunnel ipv6"
msgstr "Tunnel IPv6 Adresse"

#: wpm/models.py:89
msgid "psk"
msgstr "Pre-Shared Key"
99 changes: 99 additions & 0 deletions wpm/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# German translations for wpm-django.
# Copyright (C) 2023
# This file is distributed under the same license as the secshell.de package.
# Nico Felbinger <26925347+felbinger@users.noreply.github.com>, 2023.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-01 12:15+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: wpm/models.py:74
msgid "owner"
msgstr "Owner"

#: wpm/models.py:95
msgid "created"
msgstr "Created"

#: wpm/admin.py:29
msgid ""
"This key has been generated in the browser.Feel free to overwrite the public "
"key below to use your own key."
msgstr ""
"This key has been generated in the browser.Feel free to overwrite the public "
"key below to use your own key."

#: wpm/admin.py:31
msgid "configure psk"
msgstr "Configure psk"

#: wpm/admin.py:75 wpm/models.py:96
msgid "valid"
msgstr "Valid"

#: wpm/apps.py:8
msgid "wpm"
msgstr "Wireguard Peer Manager"

#: wpm/models.py:14
msgid "dns server"
msgstr "DNS server"

#: wpm/models.py:15
msgid "dns servers"
msgstr "DNS servers"

#: wpm/models.py:17
msgid "ip address"
msgstr "Ip address"

#: wpm/models.py:26 wpm/models.py:73
msgid "wireguard endpoint"
msgstr "Wireguard Endpoint"

#: wpm/models.py:27
msgid "wireguard endpoints"
msgstr "Wireguard Endpoints"

#: wpm/models.py:53 wpm/models.py:83
msgid "public key"
msgstr "Public key"

#: wpm/models.py:60
msgid "api token"
msgstr "API token"

#: wpm/models.py:70
msgid "peer"
msgstr "Peer"

#: wpm/models.py:71
msgid "peers"
msgstr "Peers"

#: wpm/models.py:75
msgid "name"
msgstr "name"

#: wpm/models.py:81
msgid "tunnel ipv4"
msgstr "Tunnel ipv4 address"

#: wpm/models.py:82
msgid "tunnel ipv6"
msgstr "Tunnel ipv6 address"

#: wpm/models.py:89
msgid "psk"
msgstr "Pre shared key"

0 comments on commit 72001a4

Please sign in to comment.