mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2025-04-30 01:35:34 +00:00
Event key passed as CLI argument and use live project
This commit is contained in:
parent
4968769ba7
commit
2a6adc46d1
10
README.md
10
README.md
@ -9,3 +9,13 @@ Run the following command to install
|
|||||||
```sh
|
```sh
|
||||||
cd ~ && git clone git@github.com:AquaMorph/dotfiles.git && sh ~/dotfiles/scripts/install.sh
|
cd ~ && git clone git@github.com:AquaMorph/dotfiles.git && sh ~/dotfiles/scripts/install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Scripts
|
||||||
|
|
||||||
|
### frc-photo-checklist.py
|
||||||
|
|
||||||
|
Python script to generate a Todoist checklist for taking photos at an FRC event.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
python frc-photo-checklist.py [Event Key]
|
||||||
|
```
|
||||||
|
@ -7,6 +7,7 @@ import datetime as dt
|
|||||||
import re
|
import re
|
||||||
import operator
|
import operator
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import tbapy
|
import tbapy
|
||||||
import todoist
|
import todoist
|
||||||
|
|
||||||
@ -105,12 +106,12 @@ todoistToken = configParser.get('Settings', 'TodoistToken')
|
|||||||
# Setup Todoist
|
# Setup Todoist
|
||||||
api = todoist.TodoistAPI(todoistToken)
|
api = todoist.TodoistAPI(todoistToken)
|
||||||
api.sync()
|
api.sync()
|
||||||
projectID = getProjectID(api, 'Test01')
|
projectID = getProjectID(api, '🤖 Robotics')
|
||||||
items = api.state['items']
|
items = api.state['items']
|
||||||
|
|
||||||
# Setup the Blue Alliance
|
# Setup the Blue Alliance
|
||||||
tba = tbapy.TBA(tbaKey)
|
tba = tbapy.TBA(tbaKey)
|
||||||
eventKey = '2020ncpem'
|
eventKey = sys.argv[1]
|
||||||
event = tba.event(eventKey)
|
event = tba.event(eventKey)
|
||||||
setupDay = event['start_date']
|
setupDay = event['start_date']
|
||||||
day1 = (dt.datetime.strptime(setupDay, '%Y-%m-%d') + dt.timedelta(days=1)).strftime('%Y-%m-%d')
|
day1 = (dt.datetime.strptime(setupDay, '%Y-%m-%d') + dt.timedelta(days=1)).strftime('%Y-%m-%d')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user