You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After getting these up and running there are some setup tasks to do. Rename config.py-default to config.py and open the file in a text editor. You need to add:
23
+
After getting these up and running there are some setup tasks to do. Rename config.py-default to config.py and open the file in a text editor. You need to:
24
24
25
-
1)Your Twitter access tokens: You can find a good guide for doing this here - https://iag.me/socialmedia/how-to-create-a-twitter-app-in-8-easy-steps/ You will need to pick a unique name for the app. Which is annoying. Pick anything you want that isn't taken. Maybe add your name at the end.
25
+
1)Add your Twitter access tokens: You can find a good guide for doing this here - https://iag.me/socialmedia/how-to-create-a-twitter-app-in-8-easy-steps/ You will need to pick a unique name for the app. Which is annoying. Pick anything you want that isn't taken. Maybe add your name at the end.
26
26
2) Check where your pages will be saved to: Change the tti_path line too if you've changed your Teefax location. You can also customise the page number.
27
27
3) Change the theme if you want: Theme support is detailed below
28
28
@@ -34,7 +34,7 @@ When you've setup your config.py you can run the script like this example that g
34
34
35
35
The script will constantly update your chosen page number (default is 153 - chosen because it used to be used for this purpose on Teefax in the past) in the main teletext folder (which defaults in VBIT2 to /home/pi/teletext/).
36
36
37
-
All of the files in that folder are sent across to the TV every so often, therefore the script constantly overwrites it with new tweets (up to 5 - space permitting!) so that it will update on your screen.
37
+
All of the files in that folder are sent across to the TV every so often, therefore the script constantly overwrites it with new tweets (up to 5 - space permitting!) so that it will update on your screen. Up to 99 subpages of tweets will be displayed.
38
38
39
39
## Theme support
40
40
In the config.py file you can see a theme section. The teletext level I am using supports 7 colours:
@@ -53,7 +53,6 @@ You can also change the colours of a tweet poster's username, timestamp, and the
53
53
Finally, the title text at the top can be changed, although there is a 30 character limit or things look wonky.
54
54
55
55
## Notes
56
-
* At this moment in time the script reads 5 tweets. Further versions will improve on this by writing multiple tweets, possibly in subpages :-O
57
56
* New tweets are grabbed every 60 seconds by default. This is configurable with the -d option, but you do have be aware of the Twitter API limits.
58
57
* Emoji stripping is now included. Mostly.
59
58
* Due to the limited teletext character set substitutions are implemented. Things like replacing underscores with hyphens and also making sure # works correctly. You also have to replace curly apostrophes with straight ones, as that's all the specification allows
Copy file name to clipboardExpand all lines: teletext-twitter/__main__.py
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -23,17 +23,18 @@ def parse_args():
23
23
24
24
parser.add_argument("-m", "--mode", type=str, help="choose between different modes - home, user or search")
25
25
parser.add_argument("-q", "--query", type=str, help="a search query, either a search term or a username. hashtags supported if you put quotes around the string")
26
-
parser.add_argument("-d", "--delay", type=int, default=60, help="seconds between timeline scrapes (minimum is 60 seconds - lower values have no effect)")
parser.add_argument("-c", "--count", type=int, default=5, help="number of tweets to download (default is 5, maximum is 800)")
27
+
parser.add_argument("-d", "--delay", type=int, default=60, help="seconds between timeline scrapes (default is 60 seconds - lower values have no effect)")
0 commit comments