-
-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework the CLI commands to be more composable #1210
Comments
Sounds great |
How will this change affect Docker use? I am using Docker now because my OS is slightly too old for the minimum supported .net version |
Your commands will change in the same way, but instead of |
Hi! I experienced same problem When I try to export it using forum id - I get an error that this is a forum and threads should be exported separately Maybe you can add smth like --forum-id to export command? |
Currently, we have commands like
exportguild
,exportall
,exportdm
which allow the user to export batches of channels. There are some filtering options available in those commands (such as--include-vc
,--include-threads
, etc), but they are not very composable.If the user wants to have full control over which channels they want to export, the recommended approach is to use the
channels
command to fetch all channels (with some filtering available too), and then manually plug the IDs into theexport
command.We can streamline this flow by making the
channels
command more configurable in terms of filters and, most importantly, making its output pipe-able intoexport
. The idea is that theexport
command will not have any filtering options whatsoever (andexportguild
,exportall
,exportdm
will be completely removed), but instead the user can pipe the result ofchannels
directly.For example:
$ ./DiscordChatExporter.Cli channels --guild 123456 --token 123456 --include-threads --include-dm | ./DiscordChatExporter.Cli export --token 123456
(to avoid repeating the
--token
twice, you can set it as an environment variable)The
channels
command can detect if its output is being redirected and change the format to only produce channel IDs, separated by newlines. If the output is not redirected, then the current, info-rich and user-friendly format is used. We can also add command options to control this behavior explicitly.The text was updated successfully, but these errors were encountered: