This repository has been archived by the owner on May 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusage.txt
48 lines (43 loc) · 3.07 KB
/
usage.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{Usage}
{node ./TwitToMast.js} [{-htqrspmbc}] [{-u} ~username~] [{-n} ~tweetcount~] [{-d} ~debuglevel~] [{-w} ~timeout~]
{node ./multi.js} [{-htqrspmbc}] [{-n} ~tweetcount~] [{-d} ~debuglevel~] [{-w} ~timeout~]
{Arguments}
{-h:} - show help screen (you made it here!)
{-u:} ~username~
- the twitter handle of the user whose account will be scraped
<- defaults to 'Twitter' (@twitter)>
{-n:} ~tweetcount~
- the number of enabled tweets that will be scraped from the targeted account
<- defaults to 5>
{-t:} - tweets that are part of threads will be included in the scan
{-q:} - quote tweets will be included in the scan
{-r:} - Link to quoted tweet will appear in the header, preceded by "re: "
- default behavior posts link at bottom of Mastodon post preceded by "Quoting "
{-s:} - Enable content warning/spoiler prefixes
- tweets beginning with a certain string (defined in config.txt) will use following text on the same line as Mastodon content warning
{-p:} - enable/disable posting to Mastodon
{-m:} - include user's name, handle, and link to tweet
{-b:} - display browser (disable headless mode)
{-c:} - force URL to be logged to file if posts are disabled
{-d:} ~debuglevel~
- amount of information to print to console
<0: only errors>
<1: current task + tweet Text (default)>
<2: pretty much everything>
{-w:} ~timeout~
- length of time (in ms) to wait for page elements to load
<- defaults to 30000 (30 seconds)>
{config.txt}
{Line 1: API_KEY}
- Your Access Token obtained from Mastodon > Preferences > Development > Application
{Line 2: API_URL}
- https://~your mastodon server url~/api/v1/
{Line 3: CONTENT_WARNING_PREFIX}
- if enabled, tweets beginning with this string will use following text on the same line as Mastodon content warning
- Commonly used content warning prefixes on twitter are "CW//", "TW//", and "SPOILER//"
- Starting a tweet with "SPOILER// Endgame Spoilers" with hide the contents of the crossposted toot behind a warning reading "Endgame Spoilers"
{Examples}
{Scrape 10 most recent tweets, quote tweets, and thread tweets from @twitter account, and post to Mastodon}
$node ./TwitToMast.js -qtp -u twitter -n 10
{Scrape 10 most recent tweets, quote tweets, and thread tweets from accounts listed in usernameslist.txt, and post to Mastodon}
$node ./multi.js -qtp -n 10