mirror of
https://github.com/Kunsi/pretalx-plugin-broadcast-tools
synced 2024-11-22 02:11:03 +00:00
Merge pull request #22 from pretalx/main
Compatibility with pretalx v2024.2.x
This commit is contained in:
commit
513f3ebe75
10 changed files with 25 additions and 23 deletions
|
@ -59,7 +59,7 @@ Development setup
|
||||||
|
|
||||||
3. Activate the virtual environment you use for pretalx development.
|
3. Activate the virtual environment you use for pretalx development.
|
||||||
|
|
||||||
4. Execute ``python setup.py develop`` within this directory to register
|
4. Execute ``python -m pip install -e .`` within this directory to register
|
||||||
this application with pretalx's plugin registry.
|
this application with pretalx's plugin registry.
|
||||||
|
|
||||||
5. Execute ``make`` within this directory to compile translations.
|
5. Execute ``make`` within this directory to compile translations.
|
||||||
|
|
1
pretalx_broadcast_tools/__init__.py
Normal file
1
pretalx_broadcast_tools/__init__.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
__version__ = "2.2.0"
|
|
@ -1,6 +1,8 @@
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from django.utils.translation import gettext_lazy
|
from django.utils.translation import gettext_lazy
|
||||||
|
|
||||||
|
from pretalx_broadcast_tools import __version__
|
||||||
|
|
||||||
|
|
||||||
class PluginApp(AppConfig):
|
class PluginApp(AppConfig):
|
||||||
name = "pretalx_broadcast_tools"
|
name = "pretalx_broadcast_tools"
|
||||||
|
@ -15,7 +17,7 @@ class PluginApp(AppConfig):
|
||||||
"embedded into your broadcasting software"
|
"embedded into your broadcasting software"
|
||||||
)
|
)
|
||||||
visible = True
|
visible = True
|
||||||
version = "2.2.0"
|
version = __version__
|
||||||
category = "FEATURE"
|
category = "FEATURE"
|
||||||
|
|
||||||
def ready(self):
|
def ready(self):
|
||||||
|
|
|
@ -17,7 +17,7 @@ from reportlab.platypus import (
|
||||||
TableStyle,
|
TableStyle,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .utils.placeholders import placeholders
|
from pretalx_broadcast_tools.utils.placeholders import placeholders
|
||||||
|
|
||||||
A4_WIDTH, A4_HEIGHT = A4
|
A4_WIDTH, A4_HEIGHT = A4
|
||||||
PAGE_PADDING = 10 * mm
|
PAGE_PADDING = 10 * mm
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from django.urls import re_path
|
from django.urls import re_path
|
||||||
from pretalx.event.models.event import SLUG_CHARS
|
from pretalx.event.models.event import SLUG_REGEX
|
||||||
|
|
||||||
from .views.event_info import BroadcastToolsEventInfoView
|
from .views.event_info import BroadcastToolsEventInfoView
|
||||||
from .views.orga import BroadcastToolsOrgaView
|
from .views.orga import BroadcastToolsOrgaView
|
||||||
|
@ -9,37 +9,37 @@ from .views.static_html import BroadcastToolsLowerThirdsView, BroadcastToolsRoom
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
re_path(
|
re_path(
|
||||||
f"^(?P<event>[{SLUG_CHARS}]+)/p/broadcast-tools/event.json$",
|
rf"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/event.json$",
|
||||||
BroadcastToolsEventInfoView.as_view(),
|
BroadcastToolsEventInfoView.as_view(),
|
||||||
name="event_info",
|
name="event_info",
|
||||||
),
|
),
|
||||||
re_path(
|
re_path(
|
||||||
f"^(?P<event>[{SLUG_CHARS}]+)/p/broadcast-tools/schedule.json$",
|
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/schedule.json$",
|
||||||
BroadcastToolsScheduleView.as_view(),
|
BroadcastToolsScheduleView.as_view(),
|
||||||
name="schedule",
|
name="schedule",
|
||||||
),
|
),
|
||||||
re_path(
|
re_path(
|
||||||
f"^(?P<event>[{SLUG_CHARS}]+)/p/broadcast-tools/lower-thirds/$",
|
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/lower-thirds/$",
|
||||||
BroadcastToolsLowerThirdsView.as_view(),
|
BroadcastToolsLowerThirdsView.as_view(),
|
||||||
name="lowerthirds",
|
name="lowerthirds",
|
||||||
),
|
),
|
||||||
re_path(
|
re_path(
|
||||||
f"^(?P<event>[{SLUG_CHARS}]+)/p/broadcast-tools/feedback-qr/(?P<talk>[0-9]+).svg$",
|
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/feedback-qr/(?P<talk>[0-9]+).svg$",
|
||||||
BroadcastToolsFeedbackQrCodeSvg.as_view(),
|
BroadcastToolsFeedbackQrCodeSvg.as_view(),
|
||||||
name="feedback_qr_id",
|
name="feedback_qr_id",
|
||||||
),
|
),
|
||||||
re_path(
|
re_path(
|
||||||
f"^(?P<event>[{SLUG_CHARS}]+)/p/broadcast-tools/public-qr/(?P<talk>[0-9]+).svg$",
|
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/public-qr/(?P<talk>[0-9]+).svg$",
|
||||||
BroadcastToolsPublicQrCodeSvg.as_view(),
|
BroadcastToolsPublicQrCodeSvg.as_view(),
|
||||||
name="public_qr_id",
|
name="public_qr_id",
|
||||||
),
|
),
|
||||||
re_path(
|
re_path(
|
||||||
f"^(?P<event>[{SLUG_CHARS}]+)/p/broadcast-tools/room-info/$",
|
f"^(?P<event>{SLUG_REGEX})/p/broadcast-tools/room-info/$",
|
||||||
BroadcastToolsRoomInfoView.as_view(),
|
BroadcastToolsRoomInfoView.as_view(),
|
||||||
name="room_info",
|
name="room_info",
|
||||||
),
|
),
|
||||||
re_path(
|
re_path(
|
||||||
f"^orga/event/(?P<event>[{SLUG_CHARS}]+)/settings/p/broadcast-tools/$",
|
f"^orga/event/(?P<event>{SLUG_REGEX})/settings/p/broadcast-tools/$",
|
||||||
BroadcastToolsOrgaView.as_view(),
|
BroadcastToolsOrgaView.as_view(),
|
||||||
name="orga",
|
name="orga",
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from django.views.generic import FormView
|
from django.views.generic import FormView
|
||||||
from pretalx.common.mixins.views import PermissionRequired
|
from pretalx.common.views.mixins import PermissionRequired
|
||||||
|
|
||||||
from ..forms import BroadcastToolsSettingsForm
|
from ..forms import BroadcastToolsSettingsForm
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from xml.etree import ElementTree as ET
|
from xml.etree import ElementTree
|
||||||
|
|
||||||
import qrcode
|
import qrcode
|
||||||
import qrcode.image.svg
|
import qrcode.image.svg
|
||||||
|
@ -15,7 +15,7 @@ class BroadcastToolsFeedbackQrCodeSvg(View):
|
||||||
image = qrcode.make(
|
image = qrcode.make(
|
||||||
f"{domain}{talk.urls.feedback}", image_factory=qrcode.image.svg.SvgImage
|
f"{domain}{talk.urls.feedback}", image_factory=qrcode.image.svg.SvgImage
|
||||||
)
|
)
|
||||||
svg_data = mark_safe(ET.tostring(image.get_image()).decode())
|
svg_data = mark_safe(ElementTree.tostring(image.get_image()).decode())
|
||||||
return HttpResponse(svg_data, content_type="image/svg+xml")
|
return HttpResponse(svg_data, content_type="image/svg+xml")
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,5 +26,5 @@ class BroadcastToolsPublicQrCodeSvg(View):
|
||||||
image = qrcode.make(
|
image = qrcode.make(
|
||||||
f"{domain}{talk.urls.public}", image_factory=qrcode.image.svg.SvgImage
|
f"{domain}{talk.urls.public}", image_factory=qrcode.image.svg.SvgImage
|
||||||
)
|
)
|
||||||
svg_data = mark_safe(ET.tostring(image.get_image()).decode())
|
svg_data = mark_safe(ElementTree.tostring(image.get_image()).decode())
|
||||||
return HttpResponse(svg_data, content_type="image/svg+xml")
|
return HttpResponse(svg_data, content_type="image/svg+xml")
|
||||||
|
|
|
@ -5,7 +5,7 @@ from django.http import JsonResponse
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.views import View
|
from django.views import View
|
||||||
from pretalx.agenda.views.schedule import ScheduleMixin
|
from pretalx.agenda.views.schedule import ScheduleMixin
|
||||||
from pretalx.common.mixins.views import EventPermissionRequired
|
from pretalx.common.views.mixins import EventPermissionRequired
|
||||||
from pretalx.schedule.exporters import ScheduleData
|
from pretalx.schedule.exporters import ScheduleData
|
||||||
|
|
||||||
from ..utils.placeholders import placeholders
|
from ..utils.placeholders import placeholders
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[project]
|
[project]
|
||||||
name = "pretalx-broadcast-tools"
|
name = "pretalx-broadcast-tools"
|
||||||
version = "2.2.0"
|
dynamic = ["version"]
|
||||||
description = """
|
description = """
|
||||||
Some tools which can be used for supporting a broadcasting software.
|
Some tools which can be used for supporting a broadcasting software.
|
||||||
This currently includes a generator for PDF printouts, a 'lower thirds'
|
This currently includes a generator for PDF printouts, a 'lower thirds'
|
||||||
|
@ -24,9 +24,8 @@ dependencies = [
|
||||||
pretalx_broadcast_tools = "pretalx_broadcast_tools:PretalxPluginMeta"
|
pretalx_broadcast_tools = "pretalx_broadcast_tools:PretalxPluginMeta"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = [
|
build-backend = "setuptools.build_meta"
|
||||||
"setuptools",
|
requires = ["setuptools", "wheel"]
|
||||||
]
|
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
homepage = "https://github.com/Kunsi/pretalx-plugin-broadcast-tools"
|
homepage = "https://github.com/Kunsi/pretalx-plugin-broadcast-tools"
|
||||||
|
@ -35,5 +34,8 @@ repository = "https://github.com/Kunsi/pretalx-plugin-broadcast-tools.git"
|
||||||
[tool.setuptools]
|
[tool.setuptools]
|
||||||
include-package-data = true
|
include-package-data = true
|
||||||
|
|
||||||
|
[tool.setuptools.dynamic]
|
||||||
|
version = {attr = "pretalx_broadcast_tools.__version__"}
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools.packages.find]
|
||||||
include = ["pretalx*"]
|
include = ["pretalx*"]
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -1,3 +0,0 @@
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
setup()
|
|
Loading…
Reference in a new issue