GithubHelp home page GithubHelp logo

Display calendar about seminars HOT 10 CLOSED

Leticia-maria avatar Leticia-maria commented on May 21, 2024 1
Display calendar

from seminars.

Comments (10)

schneiderfelipe avatar schneiderfelipe commented on May 21, 2024

This might be useful.

from seminars.

Leticia-maria avatar Leticia-maria commented on May 21, 2024

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)

from seminars.

Leticia-maria avatar Leticia-maria commented on May 21, 2024

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

from seminars.

schneiderfelipe avatar schneiderfelipe commented on May 21, 2024

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.

from seminars.

Leticia-maria avatar Leticia-maria commented on May 21, 2024

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
)

from seminars.

Leticia-maria avatar Leticia-maria commented on May 21, 2024

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

from seminars.

Leticia-maria avatar Leticia-maria commented on May 21, 2024
  • deploy again everyday

from seminars.

stale avatar stale commented on May 21, 2024

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.

from seminars.

stale avatar stale commented on May 21, 2024

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.

from seminars.

stale avatar stale commented on May 21, 2024

Closing due to inactivity.

from seminars.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.