diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..1524aed --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,40 @@ +# TRMNL Plugin Development Guidelines + +## Project Overview +This is a TRMNL platform plugin for displaying room data from Google Sheets on connected devices. The plugin uses Liquid templating for the frontend and YAML for configuration. + +## File Structure +- `full.liquid` - Main Liquid template file for rendering room data +- `settings.yml` - Plugin configuration including API endpoints and custom fields +- `MeetingRooms-sample-data.json` - Sample data structure reference + +## Code Style Guidelines + +### Liquid Templating +- Use Liquid syntax for data binding and conditional logic +- Follow existing naming conventions: use snake_case for variables +- Keep HTML structure clean and semantic +- Use TRMNL-specific classes for styling (layout, columns, grid, etc.) + +### YAML Configuration +- Use YAML format for all configuration files +- Follow existing key naming conventions (snake_case) +- Include proper descriptions for custom fields +- Use string quotes for all string values + +### General Development +- No build/test commands - this is a static plugin +- Validate Liquid syntax by testing in TRMNL platform +- Ensure Google Sheets API URLs are correct and accessible +- Test with various device IDs using TRMNL_ID matching + +### Testing +- Test by deploying to TRMNL platform with different device IDs +- Verify data loads from Google Sheets correctly +- Check responsive behavior on TRMNL devices +- Validate fallback logo displays when no data is available + +## Key Components +- Device ID matching via `trmnl.plugin_settings.custom_fields_values.device_id` +- Data filtering using `where` filter in Liquid +- Google Sheets integration via opensheet.elk.sh API \ No newline at end of file diff --git a/README.md b/README.md index ef6f713..03c1895 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Each display can now be marked as "Not In Use" by setting the `not_in_use` field ## Links - [Crossings Room Data Spreadsheet](https://docs.google.com/spreadsheets/d/1i9emEf-_b0pkZxP4G3_IivfqozJAb2k8TnK9HfRBDAQ/edit?gid=681330367#gid=681330367) - [List Of Plugins](https://usetrmnl.com/plugin_settings?keyname=private_plugin) -- [Framwork Design System](https://usetrmnl.com/framework) +- [Framework Design System](https://usetrmnl.com/framework) - [Liquid 101 Template System](https://help.usetrmnl.com/en/articles/10671186-liquid-101) - [Custom plugin filters](https://help.usetrmnl.com/en/articles/10347358-custom-plugin-filters) - [Advanced Liquid](https://help.usetrmnl.com/en/articles/10693981-advanced-liquid)