feat: database support, expr filtering, and skip-name flag when downloading & an update flag when exporting#915
Closed
powerfulsaber wants to merge 0 commit into
Closed
Conversation
This was referenced Mar 27, 2025
58fd817 to
411b459
Compare
df8690c to
2797e6e
Compare
27ddb79 to
1c24ae8
Compare
1c24ae8 to
3088b12
Compare
3088b12 to
f4115d6
Compare
Contributor
Author
|
I plan on eventually splitting this apart to separate pull requests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds multiple features:
Database support
Saves a message's channel ID and message ID to an SQLite3 database once it completes downloading. If the same message is encoutered again, it'll skip over it even if it's been moved or deleted.
Examples:
tdl dl --db PATH -u https://t.me/tdl/1tdl dl --db PATH -f JSONFiltering support
Similar to
-fwhen exporting a chat, but for downloading instead. Filters based on values available in a JSON fileof an exported chat. Useful when you plan on using different filters on the same chat, but don't want to repeatedly export it every time.
Example:
tdl dl --filter FILTER -f JSONSkip-name flag
Similar to
skip-same, but skips only based on filename. It relies only on a JSON file of an exported chat, so it's significantly faster than its counterpart. If used with the database flag, it'll automatically add the skipped files to the database.Example:
tdl dl --skip-name -f JSONUpdate flag
Adds/prepends new messages to a JSON file of an exported chat. It looks for messages past the latest message in the JSON file based on its timestamp. Requires the
with-contentflag to be used for timestamps to be included in the JSON file.Example:
tdl chat export --with-content --update -c CHANNEL -o JSONPrettier JSON
Formats the JSON output with indentation for readability.