{"id":25497206,"url":"https://github.com/vbalalian/littlefield","last_synced_at":"2026-05-14T13:35:56.978Z","repository":{"id":278067529,"uuid":"863202740","full_name":"vbalalian/littlefield","owner":"vbalalian","description":"Combined web-scraping, loading, and reporting tool for Littlefield simulation, built for use with Google Cloud Run functions and Google Cloud Scheduler","archived":false,"fork":false,"pushed_at":"2025-02-17T19:52:34.000Z","size":89,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T11:45:39.192Z","etag":null,"topics":["bigquery","cloud-functions","extraction","google-cloud-platform","littlefield-simulation-game","loading","python","reporting","sql","webscraping"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vbalalian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-25T22:31:16.000Z","updated_at":"2025-02-17T19:52:37.000Z","dependencies_parsed_at":"2025-02-17T20:46:28.604Z","dependency_job_id":null,"html_url":"https://github.com/vbalalian/littlefield","commit_stats":null,"previous_names":["vbalalian/littlefield"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vbalalian/littlefield","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalalian%2Flittlefield","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalalian%2Flittlefield/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalalian%2Flittlefield/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalalian%2Flittlefield/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vbalalian","download_url":"https://codeload.github.com/vbalalian/littlefield/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbalalian%2Flittlefield/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259594270,"owners_count":22881630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigquery","cloud-functions","extraction","google-cloud-platform","littlefield-simulation-game","loading","python","reporting","sql","webscraping"],"created_at":"2025-02-19T01:18:47.032Z","updated_at":"2025-10-27T18:42:01.086Z","avatar_url":"https://github.com/vbalalian.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image](https://github.com/user-attachments/assets/b127135b-f907-45c1-849b-70dd3ad9e612)\n\n# Littlefield simulation tools\n#### Scrape, save, load, and report data from Littlefield factory simulation, using Google Cloud [Functions](https://cloud.google.com/functions), [Scheduler](https://cloud.google.com/scheduler), and [BigQuery](https://cloud.google.com/bigquery).\n\n## Options:\n#### Load data to an existing BigQuery table\n#### Automatically post snapshot reports and useful charts to Discord\n\n## Examples:\n#### Daily Report:\n![daily_report](https://github.com/user-attachments/assets/83725763-8daf-4999-ba91-2566ed7b88f5)\n#### Demand Chart:\n![demand_chart](https://github.com/user-attachments/assets/29d3dabf-af10-45db-b03a-83c383086e9b)\n#### Utilization Chart:\n![utilization_chart](https://github.com/user-attachments/assets/aa2d0e2c-c337-44c8-9b80-7be046499f2e)\n#### Standings Chart:\n![team_standings](https://github.com/user-attachments/assets/97d1193d-2857-42d2-853b-a3cfbd632b0d)\n\n## Requirements:\n- Existing Google Cloud Project\n- Existing Google BigQuery dataset\n- Existing Discord Webhook(s)\n\n## To Run:\n\n#### Part 1: Set Up Clound Function\nStep 1: Create a Google Cloud Function (1st gen) with an HTTP trigger, with the following runtime environment variables:\n- GROUP_ID: Group/team name\n- GROUP_PW: Group/team password\n- CLASS_URL: Littlefield login page url\n- GCP_PROJECT_ID: Google Cloud Project ID\n- BIGQUERY_DATASET_NAME: Google BigQuery Dataset name\n- DISCORD_REPORT_WEBHOOK: Discord webhook url for quick report\n- DISCORD_EXCEL_WEBHOOK: Discord webhook url for updated excel files\n- DISCORD_DEMAND_UTIL_WEBHOOK: Discord webhook url for demand and utilization charts\n- DISCORD_STANDINGS_WEBHOOK: Discord webhook url for standings chart\n\nStep 2: Set runtime to **Python 3.11+** and entry point to **main**\n\nStep 3: Copy [main.py](main.py) and [requirements.txt](requirements.txt) to function code\n\nStep 4: Deploy the function\n\nStep 5: Copy Trigger URL for use with Google Cloud Scheduler\n\n#### Part 2: Set Up Cloud Scheduler\nStep 1: Create a Google Cloud Scheduler job\n\nStep 2: Set desired job run frequency using a [cron expression](https://crontab.guru/)\n\nStep 3: Set the Target type to **HTTP** and copy the **Trigger URL** as the execution URL\n\nStep 4: Copy the following into the body ('avg' = desired period count for discord report moving averages)\n```\n{\n  \"bigquery_factory\": true,\n  \"bigquery_standings\": true,\n  \"bigquery_settings\": true,\n  \"discord_report\": true,\n  \"discord_demand_chart\": true,\n  \"discord_util_chart\": true,\n  \"discord_standings_chart\": true,\n  \"discord_excel\": true,\n  \"avg\": 5\n}\n```\n\nStep 5: Adjust the parameters based on desired usage\n\nStep 6: Create the job\n\n## Success!\n...hopefully. Please let me know if you have any issues.\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbalalian%2Flittlefield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvbalalian%2Flittlefield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbalalian%2Flittlefield/lists"}