Skip to content

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
iyear:masterfrom
powerfulsaber:add-dl-filters2
Closed

feat: database support, expr filtering, and skip-name flag when downloading & an update flag when exporting#915
powerfulsaber wants to merge 0 commit into
iyear:masterfrom
powerfulsaber:add-dl-filters2

Conversation

@powerfulsaber
Copy link
Copy Markdown
Contributor

@powerfulsaber powerfulsaber commented Mar 27, 2025

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/1
tdl dl --db PATH -f JSON

Filtering support

Similar to -f when exporting a chat, but for downloading instead. Filters based on values available in a JSON file
of 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 JSON

Skip-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 JSON

Update 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-content flag to be used for timestamps to be included in the JSON file.

Example:
tdl chat export --with-content --update -c CHANNEL -o JSON

Prettier JSON

Formats the JSON output with indentation for readability.

@powerfulsaber powerfulsaber requested a review from iyear as a code owner March 27, 2025 03:32
@powerfulsaber powerfulsaber changed the title feat: add expr filtering for jsons when downloading & skip-name flag feat: adds expr filter and skip-name flags for downloading & append flag for exports Apr 5, 2025
@powerfulsaber powerfulsaber changed the title feat: adds expr filter and skip-name flags for downloading & append flag for exports feat: adds databse support, expr filtering, and a skip-name flag when downloading & an append flag when exporting Apr 17, 2025
@powerfulsaber powerfulsaber changed the title feat: adds databse support, expr filtering, and a skip-name flag when downloading & an append flag when exporting feat: adds database support, expr filtering, and a skip-name flag when downloading & an append flag when exporting Apr 17, 2025
@powerfulsaber powerfulsaber changed the title feat: adds database support, expr filtering, and a skip-name flag when downloading & an append flag when exporting feat: database support, expr filtering, and skip-name flag when downloading & an update flag when exporting Jun 2, 2025
@iyear iyear force-pushed the master branch 4 times, most recently from df8690c to 2797e6e Compare June 9, 2025 17:14
@powerfulsaber
Copy link
Copy Markdown
Contributor Author

I plan on eventually splitting this apart to separate pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant