Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/add_new_contribution_to_yaml.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
given properties, add a new contribution to the contributions.yaml database file.
"""
from datetime import datetime
import json
from sys import argv

Expand Down Expand Up @@ -37,9 +38,11 @@

# append new contribution with next index
# add status, at top
datetime_today = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S%z')
contribution = {
'id': max_index + 1,
'status': 'VALID',
'date_added': datetime_today,
}
contribution.update(props)

Expand Down
5 changes: 4 additions & 1 deletion scripts/fetch_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@


def update_contribution(contribution, props):
datetime_today = datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S%z')
contribution['last_updated'] = datetime_today

# update from online
for field in props.keys():
# process category list
Expand All @@ -31,7 +34,7 @@ def log_broken(contribution, msg):
contribution['log'].append(msg)

def process_contribution(contribution):
date_today = datetime.today().strftime('%Y-%m-%d')
date_today = datetime.utcnow().strftime('%Y-%m-%d')
this_version = '0'

if contribution['status'] != 'DEPRECATED':
Expand Down