Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.95 KB

README.md

File metadata and controls

43 lines (30 loc) · 1.95 KB

Sharing Scores with Google Drive

The aim of this project is to have a tool to automatize the process of generating an HTML code containing a music score, just ready to be shared in Wordpress.

This project has been desinged to be used together with the Wordpress Plugin: Restricted User Access. More details in how to use in the setup section.

A score is composed by:

  • Title.
  • Link to the song of it.
  • A list of instruments with their corresponding Dropbox link.

Setup

Google Cloud API

This project uses the Google Cloud API for Java. You will need to create an application and setup the following environments variables:

$env:AUTH_URI = "https://accounts.google.com/o/oauth2/auth"
$env:CLIENT_ID = "<CLIENT_ID>"
$env:CLIENT_SECRET = "<CLIENT_SECRET>"
$env:TOKEN_URI = "https://oauth2.googleapis.com/token"

Restrict User Access

As mentioned before, this project has been designed to be used with the Wordpress Plugin Restricted User Access. Basically, the plugins offers the possibility to add access rules to the users, allowing them to see or not specific content by specifiying restrict-levels.

Config

The instruments-config.json contains a JSON object that contains a list of items. Each item have the following properties:

  • name. Represents the name that will be used to identify in the folder the correct file/folder to be shared.
  • restrict-level. Represents the restrict level defined in the plugin that reffers to this item. It will be necessary to use the same values as defined in the plugin.
  • publishName. Represents the name that will appear in the Wordpress entry.

Run

> ./gradlew sharing-scores