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

Scheduling: Apply Weekly Plans via Web Interface #101

Merged
merged 10 commits into from
Nov 30, 2024

Conversation

martastain
Copy link
Member

@martastain martastain commented Nov 25, 2024

This update introduces the ability to apply weekly scheduling plans directly from the web interface. The new templates use a JSON-based structure, differing from the legacy XML files previously utilized by Firefly.

Template Location

Templates are expected to be stored under storage ID 1 in the .nx/scheduling_templates directory.

Template Structure

Events are categorized as either

  • Default: Applicable to all days of the week.
  • Per-Day Overrides: Customizations for specific days.

Example JSON Template

{
  "schedule": {
    "default": [
      {
        "time": "7:30",
        "title": "Morning Mourning",
        "items": [
          {
            "item_role": "placeholder",
            "title": "MorningPlaceholder",
            "duration": 3600
          }
        ]
      },
      {
        "time": "10:00",
        "title": "Main movie"
      },
      {
        "time": "12:00",
        "title": "NX Rocks"
      },
      {
        "time": "19:00",
        "title": "PostX"
      },
      {
        "time": "21:00",
        "title": "Main movie",
        "color": "#cc0000"
      },
      {
        "time": "00:00",
        "title": "Discharge"
      },
      {
        "time": "02:00",
        "title": "Graveyard"
      }
    ],
    "saturday": [
      {
        "time": "21:00",
        "title": "Saturday movie",
        "color": "#ff0000"
      }
    ]
  }
}
  • Flexibility: Each template allows for default scheduling across all days while enabling specific day-based customizations.
  • Styling: Attributes like color can be applied for enhanced visual distinction (e.g., "Saturday movie" uses a unique red highlight).

This enhancement provides a more intuitive and user-friendly approach to managing weekly schedules. Feedback and suggestions are welcome!

@martastain martastain linked an issue Nov 25, 2024 that may be closed by this pull request
@martastain martastain self-assigned this Nov 25, 2024
@martastain martastain added the feature New feature or request label Nov 25, 2024
@martastain martastain changed the title Scheduling templates Scheduling: Apply Weekly Plans via Web Interface Nov 30, 2024
@martastain martastain merged commit aeefa2a into develop Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scheduler templates
1 participant