A CLI interface to create a new Capture One project and log it in Google sheets. It will:
- read sheets data
- update sheets with new record
- create new folder and open Capture One in it
In order for this app to be able to communicate with Google API, you need to do the initial setup. This will result in a credentials file which is needed for Google Sheets API to work.
Follow this Google Sheets API quickstart guide when you first clone the repo - if you haven't already. (Note to self: check if you have maker-one
project in Google API console.)
Breakdown:
- Create a new project
- Enable Google Sheets API (in that project)
- Configure the OAuth consent screen
- Publishing status: Testing (just don't publish it)
- User Type: External
- Test Users: add your email and emails of people that will be using it
- Scopes can be ignored because it's not published (Testing status)
- Create credentials
- Create: OAuth client ID
- Application type: Desktop app
- Name: whatever (e.g. client-1)
The credentials you made can be used for metrics and analytics. So if you create multiple credentials, Google will be able to differentiate clients when reporting response, latency, errors, etc. It is also possible to create a single credential and use it for all clients.
If you decide to use more than one OAuth credential, PRIVACY.md
file should probably be updated.
First step is for the developer to:
- make sure the user has a Google account and it is added to the test users list
- send the user a
credentials.json
file
After that, the user should:
- receive from the developer a
credentials.json
file and put it in~/.maker-one
- create
targets.json
file in~/.maker-one
- copy
template.cosessiondb
to~/.maker-one
After the first run, they should also have a token.json
file in ~/.maker-one
.
This is done by creating a targets.json
file in ~/.maker-one
directory. The file should contain the following:
{
"sheetId": "<sheet-id>",
"sheetRange": "<sheet-range>",
"projectsFolder": "<projects-folder>"
}
sheet-id
is the ID of the Google Sheet you want to use (e.q.1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z
)sheet-range
is the range of the sheet you want to use (e.g.Sheet1!A1:B
will use columns A and B of the first sheet)projects-folder
is the path to the folder where your Capture One projects are stored (e.g./Users/username/Pictures/Capture One/Projects
) - this is where the new project will be created
When you first run the script, it will ask you to authorize the app to access your Google account. This will create a token.json
file in your ~/.maker-one
directory. The token file is used to authenticate the app when it tries to access Google API and is specific to your Google account. Keep it safe and don't share it with anyone.
Once installed (and all credentials and targets are set up), you can update the app via included bin/install.sh
script. It will:
- download the latest release from github
- replace the binary
~/bin/maker-one
- delete the
~/.maker-one/token.json
file (as it is no longer valid and you will have to re-authorize the app to access your Google account)
Inside of your home directory, you should end up with a .maker-one
directory with the following files:
~/.maker-one/
├── credentials.json
├── targets.json
├── template.cosessiondb
└── token.json
credentials.json
is the file you received from the developer that lets the app access Google APItargets.json
is the file you created that tells the app which Google Sheet to use and where to create the new projecttemplate.cosessiondb
is a template file that is used to create a new Capture One sessiontoken.json
is the file that is created when you first run the app and authorize it to access your Google account (and subsequently your Google Sheet you specified intargets.json
)
Command | Action |
---|---|
maker-one |
Start the app and new project creation flow |
- Read Google Sheets data to get the next project number
- Ask user for new project name
- Write new project name and number to Google Sheets
- Create new folder in Capture One projects folder
- Copy template session file to new folder
- Update template session file with new project name
- Open Capture One in new folder
- Update Readme
- Setup Google Projects / OAuth credentials
- Refactor flow
- Create package and publishing flow
- Publish binary to github
- Add tests