forked from tvdstaaij/telegram-history-dump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
127 lines (96 loc) · 3.66 KB
/
config.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
---
## Backup targets ##
#
# Array of strings for each category
# Partial names are allowed, it doesn't have to be exact
# An empty array means "everything in this category"
# An array containing only null means "nothing in this category"
# Array of user dialogs to backup
backup_users: [
]
# Array of group dialogs to backup
backup_groups: [
]
# Array of supergroup dialogs to backup
backup_supergroups: [
null
]
# Array of broadcast channels to backup
# WARNING: using this can cause a crash when a channel has too many messages
# to fit in a single chunk (see https://github.com/vysheng/tg/issues/947)
backup_channels: [
null
]
# By default telegram-cli returns only the first 100 dialogs/channels
# If you have more than 100 dialogs, increase this value
maximum_dialogs: 100
## Output options ##
# Formatters export the JSON output to a different format
# To enable a formatter, uncomment it along with all of its options
# If no formatters are enabled, only JSON files are produced
formatters: {
# plaintext: {
# date_format: '%Y-%m-%d %H:%M:%S'
# },
# bare: {},
# pisg: {},
# html: {
# paginate: 1500, # messages per page
# use_utc_time: false,
# timestamps_every: 50, # messages
# loop_video: true, # loop and autoplay videos
# },
}
# Target directory for the backup files
# If this is a relative path it will be relative to the script's directory
# Absolute path starts with '/' or '~'
backup_dir: './output'
# Maximum number of messages to backup for each target (0 means unlimited)
backlog_limit: 0
# At the time of writing, telegram-cli does not properly detect audio/video
# These will be recognized as documents instead
# Stickers are also considered documents
download_media: {
photo: false,
document: false,
audio: false,
video: false,
}
# False to reference downloaded files in the telegram-cli cache
# True to copy downloaded media to a dedicated directory per dialog
copy_media: false
# True to delete media files from telegram-cli cache right after downloading
# Effectively turns copy_media into move_media
# Beware: this will cause media files to be redownloaded every backup run
delete_media: false
# When a user's real name is formatted, include their last name if possible
display_last_name: true
## Technical options ##
# Address of the machine you are running telegram-cli on
# If this is not localhost telegram-cli must be invoked with --accept-any-tcp
tg_host: 'localhost'
# Should match the port passed to telegram-cli with the -P option
tg_port: 9009
# Number of messages to request in one chunk
chunk_size: 100
# Time in seconds to wait between requesting chunks
chunk_delay: 1.0
# Time in seconds to wait before considering a request stuck (0 = infinite)
chunk_timeout: 10
# Number of times to retry getting one chunk
chunk_retry: 3
# Time in seconds to wait before considering a download stuck (0 = infinite)
# This setting is not very useful at the moment, it just skips to the next
# dialog if downloading a media file takes too long
media_timeout: 0
## Advanced behavior settings ##
# Enables incremental backups (progress is tracked in <outdir>/progress.json)
# Setting this to false will force a complete re-run of the backup every time
track_progress: true
# Replacement string for the characters in dialog names which are potentially
# problematic in filenames
# You can set this to '' if the dialog names are unique enough
character_substitute: '_'
# Skip messages if their text matches this Ruby regex
# Example: '/forbidden|words/i'
filter_regex: null