riverscuomo / spotkin_server

A python package that updates one or more of your Spotify playlists every day with a random selection of songs from any playlists you specify. Here's mine: https://open.spotify.com/playlist/1HaQfSGjNzIsiC5qOsCUcW?si=ddc16d3e9524410c . This repo also contains the backend server for Spotkin webapp.
GNU General Public License v3.0
83 stars 8 forks source link

Script to copy template sheet #15

Closed eiln closed 1 year ago

eiln commented 1 year ago

Re riverscuomo/spotkin#13

Tiny script to copy the template sheet to a user-specified gmail. The function can be imported:

from copy_sheet import copy_sheet
copy_sheet("/path/to/credentials.json", "myemail@gmail.com")

Or ran standalone:

python3 copy_sheet.py "/path/to/credentials.json" "myemail@gmail.com"

TLDR: fetches the template sheet from your URL, duplicates it, optionally deletes the "validation" sheet, and shares the duplicated sheet to a gmail.

Pulls in pygsheets as a dependency, but it does the job in 4 lines. pygsheets uses the same Google authorization backend as gspread (service_file should equal GSPREADER_GOOGLE_CREDS_PATH), so the transition shouldn't be too hard.

Let me know of any issues.

riverscuomo commented 1 year ago

Very cool. seems to not be editable though.

image

maybe this:

image

Yep, that did it.