diff --git a/lib/render.py b/lib/render.py index a22c301..8bd0a6c 100644 --- a/lib/render.py +++ b/lib/render.py @@ -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) @@ -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 @@ -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): diff --git a/lib/reports/shorts.py b/lib/reports/shorts.py index 359004b..ba9fc2b 100644 --- a/lib/reports/shorts.py +++ b/lib/reports/shorts.py @@ -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') diff --git a/tests/golden/shorts.png b/tests/golden/shorts.png index 3b0ff99..332f478 100644 Binary files a/tests/golden/shorts.png and b/tests/golden/shorts.png differ