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
6 changes: 3 additions & 3 deletions lib/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def png(self):
if cited := _source.get():
source, kind = cited
color = 'white' if kind == 'shorts' else palette()[2] # the shorts chart's foot is the sea: as its joke
self.text(0.03 * W, self.height - 0.012 * H, f"Source: {source}", 6.5, color, va='bottom')
self.text(0.03 * W, self.height - 0.012 * H, f"Source: {source}", 6, color, va='bottom')
for x, baseline, line, size, color, bold, italic in self.writing:
if italic:
_slanted(image, x, baseline, line, size, color)
Expand Down Expand Up @@ -577,7 +577,7 @@ def draw_bars(chart):
_heading(canvas, chart.title, subtitle)
return canvas.png()

DISCLAIMER = 'Past fashion not indicative of future fashion. Hopefully. For information only; not fashion advice.'
DISCLAIMER = 'Past fashion not indicative of future fashion. For information only; not fashion advice.'
PAIR = 5 # the percent of shares shorted that a pair of shorts stands for

@_drawn
Expand Down Expand Up @@ -682,7 +682,7 @@ def at(u, v):
cy = top + (i + 0.5) * row_h
canvas.text(x0 - 14, cy, label, size, ink, ha='right', bold=True)
canvas.text(x0 + (value / PAIR) * icon_w + 14, cy, f"{round(value)}%", size, ink, bold=True)
canvas.text(W - 0.03 * W, 784, DISCLAIMER, 7, 'white', ha='right', italic=True)
canvas.text(W - 0.03 * W, 784, DISCLAIMER, 6, 'white', ha='right', italic=True)
return canvas.png()

def _worst(row, side):
Expand Down
2 changes: 1 addition & 1 deletion lib/reports/shorts.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ def report(service, tickers, market_data, threshold, specific_stock):
return lines, None
return [service.bold(f'Tracked stocks shorted over {threshold:g}%')] + lines, render.Chart('shorts',
subtitle=formats.date_short(formats.today(), True), rows=tuple((code, percent) for percent, _, code in found),
threshold=threshold, source='shortman.com.au')
threshold=threshold, source='shortman.com.au, Yahoo Finance')
Binary file modified tests/golden/shorts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.