Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/YoloSwagTeam/t2m
/ functions
Functions
33 in github.com/YoloSwagTeam/t2m
⨍
Functions
33
◇
Types & classes
1
↓ 11 callers
Function
_all_mocked
(tweets=None)
tests/test_t2m.py:54
↓ 7 callers
Function
_fake_tweet
(**kwargs)
tests/test_t2m.py:26
↓ 4 callers
Function
_get_db
Return the database content from `path` (defaults to "db.json"). It is stored on disk in the json format and as the following model: {
t2m/__init__.py:44
↓ 4 callers
Function
_save_db
Save given `db` python structure to a json file at `path` (defaults to "db.json")
t2m/__init__.py:64
↓ 4 callers
Method
read_db
(self)
tests/test_t2m.py:90
↓ 3 callers
Function
_check_complete_mastodon_handle
Print an error and exit if the given mastodon handle does not contain the instance name. The `twitter_handle` parameter is also required to d
t2m/__init__.py:108
↓ 2 callers
Function
_forward
Internal function that does the actual tweet forwarding job. This function modifies the given `db` parameter. See the `one` function doc for
t2m/__init__.py:267
↓ 2 callers
Function
_login_to_mastodon
Login to given Mastodon account, returning client id and access token. The client id file for this Mastodon account must pre-exist (named "t2
t2m/__init__.py:425
↓ 2 callers
Method
new_db
(self, db=None)
tests/test_t2m.py:82
↓ 1 callers
Function
_collect_toots
Return a list of dicts describing toots to be sent. Given `twitter_handle` and the `done` list of already sent tweet ids (defaults to the emp
t2m/__init__.py:127
↓ 1 callers
Function
_ensure_client_exists_for_instance
Create the client creds file if it does not exist, and return its path.
t2m/__init__.py:73
↓ 1 callers
Function
_fake_twitter_client
(configuration=None)
tests/test_t2m.py:36
↓ 1 callers
Function
_find_potential_content_warning
Based on cw.json, find a potential automatic content warning based on the toot content.
t2m/__init__.py:83
↓ 1 callers
Function
_get_content_warnings_db
()
t2m/__init__.py:37
↓ 1 callers
Function
_get_mastodon_client
Return a Mastodon client for the given handle.
t2m/__init__.py:256
↓ 1 callers
Function
_send_toot
Send a toot given its description in the `toot` parameter. See the `_collect_toots` function for the expected description format. This f
t2m/__init__.py:225
↓ 1 callers
Function
main
()
t2m/__init__.py:480
Function
_media_post
(fpath)
tests/test_t2m.py:48
Function
add
Add the link between given twitter and mastodon handles in the database.
t2m/__init__.py:453
Function
all
Forward the tweets of all known twitter accounts to Mastodon. Only not already forwarded tweets are forwarded. Note that you must preserve yo
t2m/__init__.py:394
Function
list
List known twitter accounts, which tweets can be forwarded to Mastodon.
t2m/__init__.py:473
Function
one
Forward tweets of *one* twitter account to Mastodon. If the `mastodon_handle` parameter is not specified, the given `twitter_handle` must be
t2m/__init__.py:338
Method
setUp
(self)
tests/test_t2m.py:68
Method
tearDown
(self)
tests/test_t2m.py:78
Method
test_all
(self)
tests/test_t2m.py:93
Method
test_complete_tweet
(self)
tests/test_t2m.py:172
Method
test_one_mark_1
Marking tweets as seen adds them to the db
tests/test_t2m.py:106
Method
test_one_mark_2
Marking tweets as seen adds the missing ones to the db
tests/test_t2m.py:115
Method
test_one_send_4_toots
(self)
tests/test_t2m.py:123
Method
test_private_tweet
(self)
tests/test_t2m.py:166
Method
test_quoted
(self)
tests/test_t2m.py:148
Method
test_retweet
(self)
tests/test_t2m.py:132
Method
test_strip
(self)
tests/test_t2m.py:189