Skip to content
Open
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
8 changes: 7 additions & 1 deletion transcriptic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
import json
from os.path import expanduser
import locale
import os

import click
import requests

if os.name == 'posix':
loc = 'en_US.UTF-8'
else:
loc = 'usa_usa'


class Config:
def __init__(self, api_root, email, token, organization):
Expand Down Expand Up @@ -147,7 +153,7 @@ def count(thing, things, num):
result = response.json()
count("instruction", "instructions", len(result['instructions']))
count("container", "containers", len(result['refs']))
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
locale.setlocale(locale.LC_ALL, loc)
click.echo(" %s" %
locale.currency(float(result['total_cost']), grouping=True))
for w in result['warnings']:
Expand Down