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

Display calendar #11

Closed
1 of 2 tasks
Leticia-maria opened this issue Mar 22, 2022 · 10 comments
Closed
1 of 2 tasks

Display calendar #11

Leticia-maria opened this issue Mar 22, 2022 · 10 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@Leticia-maria
Copy link
Member

Leticia-maria commented Mar 22, 2022

Some ideas to implement here:

  • display calendar
  • link to the google calendar (maybe sending an invite.ics (?) to registered emails)
@schneiderfelipe
Copy link
Member

This might be useful.

@Leticia-maria Leticia-maria self-assigned this Mar 23, 2022
@Leticia-maria
Copy link
Member Author

Leticia-maria commented Mar 23, 2022

Almost there, @schneiderfelipe :

  • Dependencies:

    from IPython.display import display,HTML
    import calendar

  • Calendar (I think it is better to do all in one line, in this case):

    HEADER = """# Seminars
    Click on each seminar to see more details.
    > Want to add a seminar? Check if the date of interest is available and take a look at [the instructions page](/seminars/instructions).
    """
    CALENDAR = calendar.HTMLCalendar().formatmonth(datetime.today().year, datetime.today().month)

I have already updated poetry.lock and the TOML file (2a46317)

@Leticia-maria
Copy link
Member Author

Now I will display the calendar and highlight the dates with seminars.

@schneiderfelipe
Copy link
Member

IPython seems overkill, as it's not meant for that. Why are you using this? I seems to me that generating a .ics file using some library and a simple JS widget would do the trick just fine. We need an .ics file anyway if we ever want to import to Google Calendar. And they have a widget.

@Leticia-maria
Copy link
Member Author

Thank you for your comments, @schneiderfelipe.

  1. I have solved the dependency with IPython (the calendar is being displayed now by using markdown, since it is an HTML code):

(I have used this solution because it is quite simple, and the design is according to the rest of the web page)
2. Today's date is highlighted:

Click on each seminar to see more details.
"""
CALENDAR = markdown(
calendar.HTMLCalendar().formatmonth(
datetime.today().year, datetime.today().month).replace(
'>%i<'%datetime.today().day, ' bgcolor="#66ff66"><b><u>%i</u></b><'%datetime.today().day
)

@Leticia-maria
Copy link
Member Author

I have removed the markdown method of line 174, since the calendar is in HTML, calling it is not necessary

@Leticia-maria
Copy link
Member Author

  • deploy again everyday

@stale
Copy link

stale bot commented Jun 23, 2022

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed soon if no further activity occurs.

@stale stale bot added the wontfix This will not be worked on label Jun 23, 2022
@schneiderfelipe schneiderfelipe pinned this issue Jun 24, 2022
@stale stale bot removed the wontfix This will not be worked on label Jun 24, 2022
@stale
Copy link

stale bot commented Sep 22, 2022

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed soon if no further activity occurs.

@stale stale bot added the wontfix This will not be worked on label Sep 22, 2022
@stale
Copy link

stale bot commented Sep 29, 2022

Closing due to inactivity.

@stale stale bot closed this as completed Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants