Skip to content

Commit

Permalink
Automate README.md updates on Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Phaeton committed Oct 27, 2023
1 parent 9eb701d commit b778bc5
Show file tree
Hide file tree
Showing 6 changed files with 318 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
documentation: readme.md
documentation: readme.mustache
images: plane_images.csv
ukraine: plane-alert-ukraine.csv
twitter: plane-alert-twitter.csv
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/update_readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Update README.md for Changes

permissions:
contents: write # Allow action to write back changes to repository.

on:
push:
branches: ["main"]
paths:
- "plane-alert-db.csv"
- "plane-alert-ukraine.csv"
- "plane-alert-pia.csv"
- "plane_images.csv"
- "scripts/update_readme.py"

jobs:
updateREADME.md:
if: github.repository == 'sdr-enthusiasts/plane-alert-db' || ${{ vars.CREATE_DERIVATIVES }}
name: Update README.md documentation for Changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- run: pip install -r ./scripts/requirements.txt

- name: Update README.md for changes in the database files
run: python ./scripts/update_readme.py

- name: Commit README.md
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "refactor: update README.md documentation."
18 changes: 9 additions & 9 deletions plane-alert-db.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2727,7 +2727,7 @@ A00E20,N102WK,Willis Knighton Medical Center,F90 King Air,BE9L,Civ,Air Ambo,Medi
406CBC,G-WLTS,Wiltshire Air Ambulance,Bell 429 GlobalRanger,B429,Civ,Air Ambo,Medical Evac,Saving Lives,Flying Doctors,https://www.wiltshireairambulance.co.uk
407045,G-YOAA,Yorkshire Air Ambulance,Eurocopter EC145,EC45,Civ,Air Ambo,Medical Evac,Saving Lives,Flying Doctors,https://www.yorkshireairambulance.org.uk
407046,G-YAAC,Yorkshire Air Ambulance,MBB-Kawasaki BK 117 D-2,BK17,Civ,Air Ambo,Medical Evac,Saving Lives,Flying Doctors,https://www.yorkshireairambulance.org.uk/
43EA62,M-LCFC,Leicester City Football Club,Boeing 737-BBJ,B737,Civ,Jumpers For Goalposts,Boeing Business Jet,LCFC,Football ,https://www.lcfc.com
43EA62,M-LCFC,Leicester City Football Club,Boeing 737-BBJ,B737,Civ,Jumpers For Goalposts,Boeing Business Jet,LCFC,Football,https://www.lcfc.com
48434F,P4-MES,Roman Abramovitch,Boeing 767-ER,B763,Civ,Jumpers For Goalposts,The Bandit,Chelsea,Football ,https://youtu.be/jAG4XXCOj48
43C33B,ZJ700,BAE Systems,Eurofighter Typhoon,EUFI,Mil,Delta Wing,Danger Zone,Luftwaffe,GAF,https://www.bundeswehr.de/de/organisation/luftwaffe
3F851B,10+27,German Air Force,Airbus A310-304,A310,Mil,Not a Bus,Troop Transport,Luftwaffe,GAF,https://www.bundeswehr.de/de/organisation/luftwaffe
Expand Down Expand Up @@ -13139,14 +13139,14 @@ A6A904,N5280F,Houston Police Department,MD Helicopters 369 E,H500,Pol,Police Squ
A6A990,N5284F,Houston Police Department,MD Helicopters 369 E,H500,Pol,Police Squad,The Cops,Copper Chopper,Police Forces,https://www.houstontx.gov/police/divisions/air_support/index.htm
AB74FF,N8372F,Houston Police Department,MD Helicopters 369 E,H500,Pol,Police Squad,The Cops,Copper Chopper,Police Forces,https://www.houstontx.gov/police/divisions/air_support/index.htm
ABF8B4,N8700F,Houston Police Department,Schweizer 269 C,H269,Pol,Police Squad,The Cops,Copper Chopper,Police Forces,https://www.houstontx.gov/police/divisions/air_support/index.htm
AB4176,N824TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B3,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Force,https://www.dps.texas.gov/section/aircraft-operations-division
AC6E92,N90TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B2,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Force,https://www.dps.texas.gov/section/aircraft-operations-division
A4C0F3,N405TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B2,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Force,https://www.dps.texas.gov/section/aircraft-operations-division
A7C6A5,N60TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B2,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Force,https://www.dps.texas.gov/section/aircraft-operations-division
A16DA1,N191TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B3,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Force,https://www.dps.texas.gov/section/aircraft-operations-division
AB9074,N844TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B3,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Force,https://www.dps.texas.gov/section/aircraft-operations-division
A1A29E,N204TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B3,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Force,https://www.dps.texas.gov/section/aircraft-operations-division
AC9BE9,N911RR,Monroe County Sheriffs Office,Sikorsky S-76C,S76,Pol,Police Squad,The Cops,Copper Chopper,Police Force,https://www.keysso.net/
AB4176,N824TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B3,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Forces,https://www.dps.texas.gov/section/aircraft-operations-division
AC6E92,N90TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B2,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Forces,https://www.dps.texas.gov/section/aircraft-operations-division
A4C0F3,N405TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B2,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Forces,https://www.dps.texas.gov/section/aircraft-operations-division
A7C6A5,N60TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B2,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Forces,https://www.dps.texas.gov/section/aircraft-operations-division
A16DA1,N191TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B3,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Forces,https://www.dps.texas.gov/section/aircraft-operations-division
AB9074,N844TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B3,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Forces,https://www.dps.texas.gov/section/aircraft-operations-division
A1A29E,N204TX,Texas Department of Public Safety,Eurocopter Squirrel AS.350 B3,AS50,Pol,Police Squad,The Cops,Copper Chopper,Police Forces,https://www.dps.texas.gov/section/aircraft-operations-division
AC9BE9,N911RR,Monroe County Sheriffs Office,Sikorsky S-76C,S76,Pol,Police Squad,The Cops,Copper Chopper,Police Forces,https://www.keysso.net/
A4EE26,N417AE,Air Evac Lifeteam,Bell Jet Ranger,B06,Civ,Air Ambo,Medical Evac,Saving Lives,Flying Doctors,https://lifeteam.net/home
A03760,N113AH,TVPX Aircraft Solutions Inc Trustee,Eurocopter MBB-BK 117 C-2 (EC145),EC45,Civ,Air Ambo,Medical Evac,Saving Lives,Flying Doctors,https://www.helis.com/database/cn/55367/
A278F9,N259AM,Air Methods Corp,Eurocopter EC-130 B4,EC30,Civ,Air Ambo,Medical Evac,Saving Lives,Flying Doctors,https://www.airmethods.com/
Expand Down
158 changes: 158 additions & 0 deletions readme.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# plane-alert-db <!-- omit in toc -->

This project consists of lists of 'interesting' aircraft, formatted as CSV files. The list is designed to work with the excellent **<https://github.com/kx1t/docker-planefence>**.

> **Warning**
> Please only suggest/make any changes to the [plane-alert-db.csv](plane-alert-db.csv), [plane-alert-pia.csv](plane-alert-pia.csv), [plane-alert-ukraine.csv](plane-alert-ukraine.csv) and [plane_images.csv](plane_images.csv) files on GitHub - all other files (except PIA) are generated from this file, and if you do not make your changes there, they will be overwritten and lost. Additionally, it is **not recommended** to edit the CSV files in Microsoft Excel, as Excel will attempt to "fix" some ICAO hexes and other fields. It's better to use a code editor such as VS Studio Code—you can access the web version of Code by pressing the period key . when viewing the file you wish to edit.

## TOC <!-- omit in toc -->

- [Current Content](#current-content)
- [Description of Categories](#description-of-categories)
- [Planefence](#planefence)
- [Contributing](#contributing)
- [Disclaimer, excuses and dodges](#disclaimer-excuses-and-dodges)
- [Data Sources](#data-sources)

## Current Content

There currently are about **{{planes}}** unique aircraft in **{{categories}}** categories found in this repository. This [Dashboard](https://lookerstudio.google.com/reporting/46ff4328-09d3-4e65-ab5a-bd2ba27a18fd/page/4taCC) contains details of the main list and the most recent additions.
These aircraft are divided into four main databases:

- [plane-alert-db.csv](plane-alert-db.csv) - A list of interesting aircraft with tags, categories and links. ({{plane_alert_db}})
- [plane-alert-pia.csv](plane-alert-pia.csv): A list that contains PIA planes. ({{plane_alert_pia}})
- [plane-alert-ukraine.csv](plane-alert-ukraine.csv): A list with Ukrainian planes. ({{plane_alert_ukraine}})
- [plane_images.csv](plane_images.csv): A accompanying list that contains aircraft images. ({{plane_alert_images}})

Based on these main databases, several derivative databases are created using a [GitHub action](https://github.com/sdr-enthusiasts/plane-alert-db/actions/workflows/create_db_derivatives.yaml):

- [plane-alert-civ.csv](plane-alert-civ.csv) - Civilian Registered Aircraft, includes Historic and Distinctive. ({{civ_count}})
- [plane-alert-mil.csv](plane-alert-mil.csv) - Military Only. ({{mil_count}})
- [plane-alert-pol.csv](plane-alert-pol.csv) - Police Forces. ({{pol_count}})
- [plane-alert-gov.csv](plane-alert-gov.csv) - Governments, Gov Agencies and Dictators. ({{gov_count}})

A second version of each of the above lists contains up to 4 image links per aircraft. These lists are created in [GitHub action](https://github.com/sdr-enthusiasts/plane-alert-db/actions/workflows/create_db_derivatives.yaml) using the [plane_images.csv](plane_images.csv) database. **Please consider this experimental, do not come to rely on any of the image links**

- [plane-alert-db-images.csv](plane-alert-db-images.csv)
- [plane-alert-ukraine-images.csv](plane-alert-ukraine.csv)
- [plane-alert-civ-images.csv](plane-alert-civ-images.csv)
- [plane-alert-mil-images.csv](plane-alert-mil-images.csv)
- [plane-alert-pol-images.csv](plane-alert-pol-images.csv)
- [plane-alert-gov-images.csv](plane-alert-gov-images.csv)

Note, we used to create a seperate list, `plane-alert-twitter-blocked.csv`, for use with Planefence's Twitter posting functionality. This list would prevent certain aircraft from being posted to Twitter in an attempt to keep the posting bot account from being banned. Since Twitter has now made it all but impossible for users to make bots for free, we've stopped creating this list.

This [Dashboard](https://lookerstudio.google.com/reporting/46ff4328-09d3-4e65-ab5a-bd2ba27a18fd) contains details of the [main](https://github.com/sdr-enthusiasts/plane-alert-db/blob/main/plane-alert-db.csv) and [Ukraine](https://github.com/sdr-enthusiasts/plane-alert-db/blob/main/plane-alert-ukraine.csv) lists.

## Description of Categories

Think of categories like groups, with similar or related aircraft listed together. This allows you to easily select a subset of the list for your own use. The category names (and tags) come from my rather idiosyncratic sense of humour. If you have better suggestions I'm all ears.

- Aerobatic Teams - Red Arrows, Blue Angels etc. ({{aerobatic_count}})
- Army Air Corp - UK Army Air Corp. Mainly Helicopters ({{air_corp_count}})
- As Seen on TV - Companies and Brands ({{seen_on_tv_count}})
- Big Hello - Large Helicopters (sic) ({{big_hello_count}})
- Bizjets - Fancy pants planes for fancy pants people ({{bizjets_count}})
- Climate Crisis - Oil Companies, Large Business Jets - BBJs and ACJs ({{climate_crisis_count}})
- Coastguard - Coastguard, Customs and Border Patrols ({{coastguard_count}})
- Da Comrade - Russian or Soviet Aircraft. I love their design, so they get their own category ({{da_comrade_count}})
- Dictator Alert - People of potentially questionable morals and values ({{dictator_count}})
- Distinctive - Unique and/or special aircraft e.g. The AN-225 Myria, NASA aircraft, Testbeds ({{distinctive_count}})
- Dogs with Jobs - Aircraft with specific roles and/or modifications ({{dogs_jobs_count}})
- Don't you know who I am? - Famous People. I was going to say notable, but I'll go with Famous ({{celeb_count}})
- Flying Doctors - Air Ambulance and Medical Flights ({{flying_doctors_count}})
- Football - Actual, Aussie Rules or American. We don't discriminate. ({{football_count}})
- GAF - Aircraft of the German Air Force, thank to Rhodan76 ({{gaf_count}})
- Gas Bags - Would you like to ride in my beautiful balloon? ({{gas_bags_count}})
- Governments - Aircraft registered to Governments ({{governments_count}})
- Gunship - Brrrrrrrrrrrrrrrrrrrt ({{gunship_count}})
- Hired Gun - Why do the dirty work when someone else can do it for you? ({{hired_gun_count}})
- Historic - It's older than I am and most likely has a prop. ({{historic_count}})
- Jesus he Knows me - Aircraft owned and operated by Religious organisations ({{religious_count}})
- Joe Cool - Cool Planes. Or at least I think they are cool. ({{joe_cool_count}})
- Jump Johnny Jump - de Havilland Chipmunks. Air Cadets of a certain age will understand. ({{jump_johnny_count}})
- Nuclear - Nuclear Emergency Support Team etc. ({{nuclear_count}})
- Oligarch - I made this money all by myself. ({{oligarch_count}})
- Other Air Forces - Air Force aircraft that are not RAF or USAF ({{other_air_count}})
- Other Navies - Navy Aircraft that are not Royal Navy Fleet Air Arm or United States Navy ({{other_navies_count}})
- Oxcart - Intelligence gathering aircraft ({{oxcart_count}})
- Perfectly Serviceable Aircraft - Why do you keep jumping out of a Perfectly Serviceable Aircraft aka Skydiving planes ({{psa_count}})
- PIA - Privacy ICAO Address....you can run, but you cannot hide ({{pia_count}})
- Police Forces - Your friendly neighbourhood flying (insert local colloquialism here) ({{police_forces_count}})
- Ptolemy would be proud - Mapping and Aerial Survey aircraft. ({{ptolemy_count}})
- Quango - Nato, United Nations, World Bank etc. ({{quango_count}})
- Radiohead - Very Very special aircraft. Think VC25. ({{radiohead_count}})
- RAF - Aircraft of the Royal Air Force ({{raf_count}})
- Royal Aircraft - Aircraft used or owned by the UK Royal Family ({{royal_aircraft_count}})
- Royal Navy Fleet Air Arm - Aircraft of the Royal Navy Fleet Air Arm ({{royal_navy_count}})
- Sam Tân - Firefighting Aircraft. ({{aerial_firefighter_count}})
- Special Forces - The best of the best of the best. Sir. ({{special_forces_count}})
- Toy Soldiers - Armies from around the world ({{toy_soldiers_count}})
- UAV - It's not natural, I tell 'ya ({{uav_count}})
- UK National Police Air Service - Your friendly neighbourhood flying bobby ({{uk_police_count}})
- United States Navy - United States naval avaitors. Some say they are the best of the best. ({{us_navy_count}})
- USAF - Aircraft of the United States Air Force ({{usaf_count}})
- Vanity Plate - Distinctive registrations ({{vanity_plate_count}})
- Watch Me Fly - Flying and Training Schools ({{watch_fly_count}})
- You came here in that thing? - Microlights, tiny planes and helis..think Yakima Super Breezy (thanks skstrand). ({{that_thing_count}})
- Zoomies - Fast jets, fighters. Anything that moves fast. ({{zoomies_count}})

## Planefence

The list takes the form:

| $ICAO | $Registration | $Operator | $Type | $ICAO Type | #CMPG | $Tag 1 | $#Tag 2 | $#Tag 3 | Category | $#Link |
| ------ | ------------- | ------------------------ | -------------------- | ---------- | ----- | ---------------- | ------------ | ---------- | --------------- | ---------------------------------------------------- |
| 502C5C | YL-KSH | Baltic Bees display team | Aero L-39C Albatross | L39 | Civ | Do A Barrel Roll | Display Team | Aerobatics | Aerobatic Teams | <https://en.wikipedia.org/wiki/Baltic_Bees_Jet_Team> |

To use this list with Planefence, configure your `planefence.config` setup to include the following line:

```config
PF_ALERTLIST=https://raw.githubusercontent.com/sdr-enthusiasts/plane-alert-db/main/plane-alert-db.csv
```

If you want to add the list in addition to your local plane-alert-db.csv list, you can do the following:

```config
PF_ALERTLIST=plane-alert-db.csv,https://raw.githubusercontent.com/sdr-enthusiasts/plane-alert-db/main/plane-alert-gov.csv,https://raw.githubusercontent.com/sdr-enthusiasts/plane-alert-db/main/plane-alert-pol.csv
```

> **Note**
> The priority of use is first-to-last, so if you want your local list to be interpreted first, move it to the front of the list.

Add these characters to the column headers to control the behaviour of PlaneAlert

- `$` - Tweet this column as #hashtag.
- `#` - Don't show on the website (it will ignore this for the ICAO field, which is always shown).
- `$#` - Don't show on the website; tweet as a #hashtag.

## Contributing

Feel free to [open an issue](https://github.com/sdr-enthusiasts/plane-alert-db/issues) if you have ideas on improving this repository or want to report a bug! All contributions are welcome 🚀. Please consult the [contribution guidelines](CONTRIBUTING.md) for more information. You can also check out the [TODOS](TODOS.md) page if you want to contribute to this repository but need some ideas.

> **Warning**
> As also [explained above](#current-content), this repository contains four main databases to which people can contribute. The other databases are created automatically using [GitHub action](https://github.com/sdr-enthusiasts/plane-alert-db/actions/workflows/create_db_derivatives.yaml). As a result, please only suggest/make any changes to these main databases. Changes made to all other CSV files will be overwritten and lost. Additionally, it is **not recommended** to edit the CSV files in Microsoft Excel, as Excel will attempt to "fix" some ICAO hexes and other fields. It's better to use a code editor such as VS Studio Code—you can access the web version of Code by pressing the period key . when viewing the file you wish to edit.

If you're creating a pull request with additions, please add them to the end of the file. We may sort the list periodically to group like planes together.

## Disclaimer, excuses and dodges

This is not intended to be a definitive list, especially when it comes to aircraft models. Where the same model of aircraft is made by several manufacturers I won't always have the correct one. If you thought it was a Beechcraft King Air 200 and actually it was a Textron Super King Air B200GT, I won't be losing any sleep. There are other data sources (see below) if you want absolute accuracy.

## Data Sources

This data has been gathered from far too many sources to mention, but some sites have been _really_ useful:

- <https://github.com/iatacodes/whatisflying-db>
- <https://github.com/The-CFR-Project/whatisflying-db>
- <https://www.flightdb.net/index.php>
- <http://www.rotorspot.nl/>
- <http://www.dtvmovements.co.uk/>
- <http://www.ads-b.nl/>
- <https://www.live-military-mode-s.eu/>
- <https://dictatoralert.org/>
- <http://www.j-hangarspace.jp/>
- <https://scramble.nl/>
- <https://www.foxtrotcharlie.ovh/>
- <https://www.planelogger.com/>
- <https://www.jetphotos.com/>
1 change: 1 addition & 0 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ pandas
numpy
requests
gitpython
chevron
Loading

0 comments on commit b778bc5

Please sign in to comment.