MCPcopy Create free account

hub / github.com/YoloSwagTeam/t2m / functions

Functions33 in github.com/YoloSwagTeam/t2m

↓ 11 callersFunction_all_mocked
(tweets=None)
tests/test_t2m.py:54
↓ 7 callersFunction_fake_tweet
(**kwargs)
tests/test_t2m.py:26
↓ 4 callersFunction_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 callersFunction_save_db
Save given `db` python structure to a json file at `path` (defaults to "db.json")
t2m/__init__.py:64
↓ 4 callersMethodread_db
(self)
tests/test_t2m.py:90
↓ 3 callersFunction_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 callersFunction_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 callersFunction_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 callersMethodnew_db
(self, db=None)
tests/test_t2m.py:82
↓ 1 callersFunction_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 callersFunction_ensure_client_exists_for_instance
Create the client creds file if it does not exist, and return its path.
t2m/__init__.py:73
↓ 1 callersFunction_fake_twitter_client
(configuration=None)
tests/test_t2m.py:36
↓ 1 callersFunction_find_potential_content_warning
Based on cw.json, find a potential automatic content warning based on the toot content.
t2m/__init__.py:83
↓ 1 callersFunction_get_content_warnings_db
()
t2m/__init__.py:37
↓ 1 callersFunction_get_mastodon_client
Return a Mastodon client for the given handle.
t2m/__init__.py:256
↓ 1 callersFunction_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 callersFunctionmain
()
t2m/__init__.py:480
Function_media_post
(fpath)
tests/test_t2m.py:48
Functionadd
Add the link between given twitter and mastodon handles in the database.
t2m/__init__.py:453
Functionall
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
Functionlist
List known twitter accounts, which tweets can be forwarded to Mastodon.
t2m/__init__.py:473
Functionone
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
MethodsetUp
(self)
tests/test_t2m.py:68
MethodtearDown
(self)
tests/test_t2m.py:78
Methodtest_all
(self)
tests/test_t2m.py:93
Methodtest_complete_tweet
(self)
tests/test_t2m.py:172
Methodtest_one_mark_1
Marking tweets as seen adds them to the db
tests/test_t2m.py:106
Methodtest_one_mark_2
Marking tweets as seen adds the missing ones to the db
tests/test_t2m.py:115
Methodtest_one_send_4_toots
(self)
tests/test_t2m.py:123
Methodtest_private_tweet
(self)
tests/test_t2m.py:166
Methodtest_quoted
(self)
tests/test_t2m.py:148
Methodtest_retweet
(self)
tests/test_t2m.py:132
Methodtest_strip
(self)
tests/test_t2m.py:189