Skip to content

Fly Space-A Facebook flight schedule photo aggregator and processor back-end server.

License

Notifications You must be signed in to change notification settings

ansonl/flyspacea-backend

Repository files navigation

Fly Space-A Photo Processor Server

Fly Space-A logo

This the backend server running Fly Space-A. The backend downloads USAF AMC Space Available flight schedule photos from Facebook, processes flight schedule photos into text data, and provides the flight schedules to client applications over REST API. This code is fully functional. You will need to a free Facebook Graph API access token.

Please see the technical implementation slides also available in assets directory for more detailed information on how photos are processed into text.

highlight fsa

Why is this released? License? Can I use it for my own projects?

This backend used to provide the information needed for the free Fly Space-A service, but Facebook Graph API Page Public Content Access was revoked in mid-2018 during tightening of Graph API accesses due/related to the 2018 Cambridge Analytica news. Page Public Content Access became only available to approved to only verified "businesses" for reasons that make no sense as the name suggests: access to page content that is already public. "Individual" entities are only allowed the most limited accesses as of early-2019 and have no Page Public Content Access. When contacted, Facebook support equivalented sole propriertor entity to an "individual" entity. Subsequently, the new mid-2018 "App Review" process was never completed and Graph API access was blocked.

I am releasing the code in hope that this helps you with your projects. Also because Fly Space-A is not running due to the above issue.

All code produced by Anson Liu is released under MIT License. Linked libraries retain the licenses of their respective authors.

How to use

  1. Install Go

  2. go get https://github.com/ansonl/flyspacea-backend

  3. Paste your Facebook Graph API Access Token into constants.go.

  4. Set $DATABASE_URL to your PostgreSQL database URL.

  5. go install spacea

  6. spacea -procMode=all

Debug Mode Notes

All the constants mentioned below are located in constants.go.

  • To generate updated timezones for a set of terminals with latitude and longitude inputed into the terminal JSON file (set at TERMINAL_FILE, set DEBUG_EXPORT_TERMINAL_TZ to true.

  • To run photo processing on a single terminal's photos, set DEBUG_TERMINAL_SINGLE_FILE to true and place the individual terminal JSON data into the filename set at TERMINAL_SINGLE_FILE. This will download the terminal's photo from the associated Facebook page specified by Facebook ID and process the photos into flight data.

  • To run photo processing on local images, set DEBUG_MANUAL_IMAGE_FILE_TARGET to true. This will make Fly Space-A process images in the directory set as DEBUG_MANUAL_IMAGE_FILE_TARGET_TRAINING_DIRECTORY with the extension set as DEBUG_MANUAL_FILENAME.

*Recommend first skimming technical implementation slides also available in assets folder for an overview of the photo processing steps. More information on debug modes can be obtained by searching for occurences of the debug constants in the entire project directory to find instances of debug constant usage. *

Credits

jbowtie fork of gokogiri

latlng by bradfitz

pq - Golang PostgreSQL driver

Fuzzy by Sajari

Tesseract OCR by Google

goprocinfo by c9s

ImageMagick by ImageMagick Studios LLC

About

Fly Space-A Facebook flight schedule photo aggregator and processor back-end server.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published