Skip to content
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

Add tootctl emoji export #13534

Merged
merged 8 commits into from
Apr 27, 2020
Merged

Add tootctl emoji export #13534

merged 8 commits into from
Apr 27, 2020

Conversation

lfuelling
Copy link
Contributor

@lfuelling lfuelling commented Apr 23, 2020

Hi,
this PR adds the tootctl emoji export command.
This command will export either all or only a specific category to a export.tar.gz file that can be imported using tootctl.

The usage (with all options) is as follows:

$ tootctl emoji export ~/foo --overwrite --shortcode --category bar
  • ~/foo will result in ~/foo/export.tar.gz (path has to exist)
  • -- overwrite will overwrite the export file if it exists
  • --shortcode will use the configured shortcode as file name
    • ie. thonking.png instead of 9f2bf533eb0a7165.png
  • --category <category> will only export a specific category. If no matching category can be found, all emoji will be exported.

Additionally a typo in the documentation of the import command was fixed.

@SuperSandro2000
Copy link
Contributor

If the category I want to export does not exist I think it should error and tell me this instead of silently ignoring it so that I maybe miss a typo.

Copy link
Contributor

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some thoughts. Let me know what you think.

@lfuelling
Copy link
Contributor Author

@SuperSandro2000 Thanks for the suggestions, I've updated the code accordingly :)

lib/mastodon/emoji_cli.rb Outdated Show resolved Hide resolved
lib/mastodon/emoji_cli.rb Outdated Show resolved Hide resolved
lib/mastodon/emoji_cli.rb Outdated Show resolved Hide resolved
lib/mastodon/emoji_cli.rb Outdated Show resolved Hide resolved
lib/mastodon/emoji_cli.rb Outdated Show resolved Hide resolved
lib/mastodon/emoji_cli.rb Outdated Show resolved Hide resolved
lib/mastodon/emoji_cli.rb Outdated Show resolved Hide resolved
lib/mastodon/emoji_cli.rb Outdated Show resolved Hide resolved
lib/mastodon/emoji_cli.rb Outdated Show resolved Hide resolved
lib/mastodon/emoji_cli.rb Outdated Show resolved Hide resolved
@Gargron Gargron changed the title add emoji export command to cli Add tootctl emoji export Apr 27, 2020
@lfuelling lfuelling requested a review from Gargron April 27, 2020 17:44
Y u always autoformat :c
@Gargron Gargron merged commit 1578505 into mastodon:master Apr 27, 2020
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.

3 participants