diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..dac925d --- /dev/null +++ b/.ignore @@ -0,0 +1,4 @@ +.git/ +.github/ +screenshots/ +README.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index db9e88b..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -repos: - - repo: https://github.com/astral-sh/ruff-pre-commit - # Ruff version. - rev: v0.9.0 - hooks: - # Run the linter. - - id: ruff - args: [--fix] - # Run the formatter. - - id: ruff-format diff --git a/.sqlfluff b/.sqlfluff deleted file mode 100644 index 02e9b24..0000000 --- a/.sqlfluff +++ /dev/null @@ -1,11 +0,0 @@ -[sqlfluff] -exclude_rules = L016,L039,L031,L034 - -# Data Types - -extended_capitalisation_policy = lower -# Comma separated list of words to ignore for this rule - -ignore_words = None - -ignore_words_regex = None diff --git a/README.md b/README.md index 41905a0..9eb22e7 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,16 @@ -# GitHub Blueprint +# Nearest Earthquake — Screenly Edge App -Blueprint for GitHub repos. +Shows the single nearest earthquake to this screen and how far away it is. -## Usage +Two files: `screenly.yml` and `index.html`. No stylesheet, no libraries, no +settings. Distances in kilometres. Data from the public USGS feed (all magnitudes, +past 24 hours), refreshed every 5 minutes. -```bash -$ rsync -aP .github /path/to/repo/ -``` - -## Repo Configuration +Needs a player: it reads the screen's coordinates and the CORS proxy from the +injected `screenly.js` bridge, so it will not run in a plain browser. -* Default branch should be `master` -* If relevant, `production` is used as the production branc h -* Branch protection should be enabled on master and production with: - * `Require a pull request before merging`, `Require approvals` and `Require review from Code Owners` - * `Require status checks to pass before merging` +## Deploy -## Code Owner - -Adjust `.github/CODEOWNERS` to the squad that owns the repo. \ No newline at end of file +```bash +screenly edge-app deploy +``` diff --git a/index.html b/index.html new file mode 100644 index 0000000..9622dd7 --- /dev/null +++ b/index.html @@ -0,0 +1,32 @@ + +

+ + diff --git a/pyrightconfig.json b/pyrightconfig.json deleted file mode 100644 index c9bd27d..0000000 --- a/pyrightconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "include": [ - "screenly", - "libs" - ], - "exclude": [ - "**/node_modules", - "**/__pycache__", - "tests" - ], - "typeCheckingMode": "standard", -} diff --git a/ruff.toml b/ruff.toml deleted file mode 100644 index 0754cb2..0000000 --- a/ruff.toml +++ /dev/null @@ -1,57 +0,0 @@ -exclude = [ - "libs", - ".bzr", - ".direnv", - ".eggs", - ".git", - ".git-rewrite", - ".hg", - ".ipynb_checkpoints", - ".mypy_cache", - ".nox", - ".pants.d", - ".pyenv", - ".pytest_cache", - ".pytype", - ".ruff_cache", - ".svn", - ".tox", - ".venv", - ".vscode", - "__pypackages__", - "_build", - "buck-out", - "build", - "dist", - "node_modules", - "site-packages", - "venv", -] - -line-length = 120 -indent-width = 4 - -target-version = "py310" - -[lint] -select = ["E4", "E7", "E9", "F"] -ignore = [] - -fixable = ["ALL"] -unfixable = [] - -# Allow unused variables when underscore-prefixed. -dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" - -[format] -# Like Black, use double quotes for strings. -quote-style = "double" - -# Like Black, indent with spaces, rather than tabs. -indent-style = "space" - -# Like Black, respect magic trailing commas. -skip-magic-trailing-comma = false - -# Like Black, automatically detect the appropriate line ending. -line-ending = "auto" diff --git a/screenly.yml b/screenly.yml new file mode 100644 index 0000000..76f6537 --- /dev/null +++ b/screenly.yml @@ -0,0 +1,11 @@ +--- +syntax: manifest_v1 +id: 01KZ77RN8V1GWCGTYG53HP1V0T +description: Shows the nearest earthquake to this screen and how far away it is. +author: Will Cornforth +homepage_url: https://earthquake.usgs.gov +categories: + - Dashboards +entrypoint: + type: file +ready_signal: false