Sign inSign up

austinchou0126/ics-event-filter

By austinchou0126

•Updated about 2 years ago

An Express.js application that filters events from an iCal (.ics) feed URL based on keywords

Image
Developer tools
0

370

austinchou0126/ics-event-filter repository overview

⁠iCal Filter API

This Express.js application provides an API to filter events from an iCal feed based on multiple keywords. The iCal feed URL is encoded in Base64 and passed as a query parameter, while keywords are provided as a comma-separated list.

⁠Features

  • Filter iCal Events: Retrieve and filter events from an iCal feed based on keywords.
  • Case-Insensitive Search: Keywords are matched in a case-insensitive manner.
  • Base64-Encoded URL: URL of the iCal feed is passed in Base64 encoding.

⁠Getting Started

⁠API Endpoint
⁠GET /filter-ical

Filters events from an iCal feed based on provided keywords.

Query Parameters:

  • url (Base64-encoded): The URL of the iCal feed.
  • keywords (comma-separated): The keywords to filter events by.

Example Request:

http://localhost:3000/filter-ical?url=aHR0cHM6Ly9leGFtcGxlLmNvbS9jYWxlbmRhci5pY3M=&keywords=meeting,holiday

Response:

The response will be a filtered iCal feed containing only the events that match the provided keywords.

⁠Example Usage
  1. Encode your iCal URL in Base64:

    const url = 'https://example.com/calendar.ics';
    const encodedUrl = Buffer.from(url).toString('base64');
    console.log(encodedUrl); // Outputs: aHR0cHM6Ly9leGFtcGxlLmNvbS9jYWxlbmRhci5pY3M=
    
  2. Call the API:

    curl "http://localhost:3000/filter-ical?url=aHR0cHM6Ly9leGFtcGxlLmNvbS9jYWxlbmRhci5pY3M=&keywords=meeting,holiday"
    
⁠Error Handling
  • 400 Bad Request: Missing required query parameters (url or keywords).
  • 500 Internal Server Error: Errors fetching or processing the iCal feed.

⁠License

This project is licensed under the MIT License - see the LICENSE⁠ file for details.

⁠Contributing

Feel free to open issues or pull requests if you have suggestions or improvements.

Tag summary

Content type

Image

Digest

sha256:b1fab1777…

Size

45.8 MB

Last updated

about 2 years ago

docker pull austinchou0126/ics-event-filter