From 2de9f8f9b34bbf4d91be04e3d0faeb424abd3666 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Mon, 20 Dec 2021 16:03:21 -0600 Subject: [PATCH] added all variables available for template objects --- src/sessions/twitter/templates.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sessions/twitter/templates.py b/src/sessions/twitter/templates.py index 3dcaddfa..8d6929d0 100644 --- a/src/sessions/twitter/templates.py +++ b/src/sessions/twitter/templates.py @@ -5,6 +5,13 @@ import languageHandler from string import Template from . import utils +# Define variables that would be available for all template objects. +# This will be used for the edit template dialog. +# Available variables for tweet objects. +tweet_variables = ["date", "display_name", "screen_name", "source", "lang", "text", "image_descriptions"] +dm_variables = ["date", "sender_display_name", "sender_screen_name", "recipient_display_name", "recipient_display_name", "text"] +person_variables = ["display_name", "screen_name", "location", "description", "followers", "following", "listed", "likes", "tweets", "created_at"] + def process_date(field, relative_times=True, offset_seconds=0): original_date = arrow.get(field, locale="en") if relative_times == True: