Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pronatura Bydgoszcz #2138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jestempablo
Copy link

Pronatura Bydgoszcz serves a part of Bydgoszcz, Poland

Paper / Plastics / Glass is always on the same they so they are combined into Recycling

@5ila5
Copy link
Collaborator

5ila5 commented Jun 12, 2024

Please provide a md file and run the updatedoculinks.py script like described in the Source Contribution Guide

Comment on lines +55 to +59
try:
return self.get_data()
except Exception as e:
_LOGGER.error(f"fetch failed for source {TITLE}: {e}")
return []
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not catch any errors, they will be caught automatically

Comment on lines +102 to +120
if waste_type in ["papier", "plastik", "szkło"]:
recykling_days.add(int(day))
else:
entries.append(
Collection(
datetime.date(year, month, int(day)),
name_map[waste_type],
ICON_MAP[waste_type],
)
)
# Add recykling entries
for day in recykling_days:
entries.append(
Collection(
datetime.date(year, month, day),
name_map["papier"],
"mdi:recycle",
)
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you are mapping paper plastic and glass to recycling instead of showing all 3. Are they always at the same date? For all addresses?


TITLE = "Bydgoszcz Garbage Collection"
DESCRIPTION = "Source for Bydgoszcz city garbage collection by Pronatura"
URL = "https://zs5cv4ng75.execute-api.eu-central-1.amazonaws.com/prod"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL is used by the updatedoculinks.py script and will be shown in the README.md use the website URL here instead and rename this variable to something like API_URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants