Giter Site home page Giter Site logo

kippnorcal / school_profile_batch_print Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 8.96 MB

Batch prints PDFs of the Tableau Student Profile Report

Dockerfile 4.84% Python 95.16%
bulk-printing tableauserverclient docker sqlsorcery google-drive pydrive pypdf2

school_profile_batch_print's Introduction

Student Profile Batch Printer

Uses tabcmd to batch print PDFs of the Student Profile Report for an entire school.

Dependencies:

Getting Started

Setup environment

  1. Clone this repo
$ git clone https://github.com/kippnorcal/school_profile_batch_print.git
  1. Install Docker
  1. Get service account key file Save the file as service_account_credentials.json.

  2. Build Docker Image

$ docker build -t school_profile .
  1. Create .env file with project secrets Create a .env file in the root of the project that has the following variables:
# Tableau Server variables
TABLEAU_SERVER=
TABLEAU_SITE=
TABLEAU_USER=
TABLEAU_PWD=

# Google Developer Service Account
ACCOUNT_EMAIL=

# Database variables
DB_SERVER=
DB=
DB_USER=
DB_PWD=
DB_QUERY=

# Mailgun variables
MG_API_KEY=
MG_API_URL=
MG_DOMAIN=

# Email Variables
ENABLE_MAILER=1                                                                   
SENDER_EMAIL=
SENDER_PWD= 
RECIPIENT_EMAIL=

GDRIVE_FOLDER=""

Running the Job

Run in detached mode (runs as background process) with the output folder mapped to the host directory.

Run for entire school (production use):

$ docker run -d -v ${PWD}/output:/app/output school_profile --school "School Name"

Run for a subset of records at a school (testing purposes)

$ docker run -d -v ${PWD}/output:/app/output school_profile --school "School Name" --grade "10"

School Names

In order to run the job, you need to pass a school name in the exact format the SQL query expects. Here is a list of possible school names:

  • Bayview ES
  • Bayview MS
  • Bridge K-8
  • Bridge Rising
  • Bridge Upper
  • Esperanza
  • Excelencia K-8
  • Excelencia Lower
  • Excelencia Upper
  • Heartwood
  • Heritage
  • King
  • Navigate
  • Prize
  • SF Bay
  • SFCP
  • SJC
  • Summit
  • Valiant K-8
  • Valiant Lower
  • Valiant Upper

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.