GithubHelp home page GithubHelp logo

maxbroome / prompty Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 384 KB

Automatically import a Google Document into a teleprompter web interface!

Python 5.43% CSS 21.70% JavaScript 69.42% HTML 3.45%
google-docs python teleprompter

prompty's Introduction

prompty logo

Automatically import a google document into a web-based teleprompter app!

screenshot

Teleprompter interface screenshot

๐Ÿšจ This is super barebones, and not recomened for production! ๐Ÿšจ

Web interface is a modifed version from Peter Schmalfeldt

๐Ÿ“ Requirements

๐Ÿš€ Installing

Copy the project to your system using Git or downloading and extracting the zip file.

Using Git

git clone https://github.com/MaxBroome/prompty.git

Then naviagate to the prompty directory.

Installing the necessary packages for the Python script

pip install -r requirements.txt

Getting our Google Cloud Platform service account

  1. Log in to console.cloud.google.com
  2. Go to APIs & Services
  3. Create a new credential in the "Credentials" tab
  4. Choose a Service Account for the type of credential, and Viewer for the role
  5. Click Done
  6. Navigate to the Service Account you just created, click on the keys tab, anc create a new key in JSON
  7. Download it to your machine, open it, and copy it's contents to your clipboard

Now that we have our GCP credentials, we can go back to the prompty folder.

  1. Create a file called creds.json in the main directory
  2. Paste the previously copied data into that file and save it

Go back to the GCP Console and copy the email address for the service account

The Service Account email address should look like [email protected]

  1. Open the Google Document you wish to import to prompty
  2. Click the share tab; and share the document with the Service Account email address, with viewer permissions
  3. While you're still at the Google Document, copy the Document ID from the URL. It should look like this docs.google.com/document/d/DOCUMENT_ID/edit
  4. Open the get-script.py file and replace <GOOGLE DOCUMENT ID> with your own Document ID
  5. Save the edited Python script

You're done! ๐ŸŽ‰

โœจ Using Prompty

  1. Run the get-script.py Python script
python3 get-script.py
  1. Inside of the web-interface folder, open index.html in your favorite web browser

That's it!

Warning

The teleprompter web interface does not automatically update after you have ran the script again. So to see the updated version of the Google Doc after you have ran the python script, you can just refresh the tab.

Tip

If you need the text flipped either horizontally or vertically (shuch as use on a teleprompter). You can do this by editing the defaultConfig variable in web-interface/assets/js/script.v122.js and changing flipX or flipy to true.

๐Ÿ‘ท What's next

  • Dockerizing the entire thing ๐Ÿ‹
  • Auto-updating web interface
  • A button or hotkey to run the Python 'get' script in the backround, and update the text

prompty's People

Contributors

maxbroome avatar

Watchers

 avatar

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.