Skip to content

Commit

Permalink
🚸 Aligh shorthand
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenWaygate committed Aug 21, 2024
1 parent 528aecd commit 0a03188
Show file tree
Hide file tree
Showing 27 changed files with 58 additions and 53 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ Use "yutu [command] --help" for more information about a command.

Please refer to [features.md](./features.md) for more information.

## Contributing

Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md) for more information.

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=eat-pray-ai/yutu&type=Date)](https://star-history.com/#eat-pray-ai/yutu&Date)
6 changes: 3 additions & 3 deletions cmd/activity/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ func init() {
)
listCmd.Flags().BoolVarP(&home, "home", "H", true, "true or false")
listCmd.Flags().Int64VarP(
&maxResults, "maxResults", "x", 5,
&maxResults, "maxResults", "n", 5,
"Specifies the maximum number of items that should be returned",
)
listCmd.Flags().BoolVarP(&mine, "mine", "m", true, "true or false")
listCmd.Flags().BoolVarP(&mine, "mine", "M", true, "true or false")
listCmd.Flags().StringVarP(
&publishedAfter, "publishedAfter", "a", "",
"Filter on activities published after this date",
Expand All @@ -50,6 +50,6 @@ func init() {
"Comma separated parts",
)
listCmd.Flags().StringVarP(
&output, "output", "o", "", "Output format: json or yaml",
&output, "output", "o", "", "json or yaml",
)
}
2 changes: 1 addition & 1 deletion cmd/caption/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func init() {
captionCmd.AddCommand(listCmd)

listCmd.Flags().StringVarP(&id, "id", "i", "", "ID of the caption")
listCmd.Flags().StringVarP(&videoId, "videoId", "I", "", "ID of the video")
listCmd.Flags().StringVarP(&videoId, "videoId", "v", "", "ID of the video")
listCmd.Flags().StringVarP(&onBehalfOf, "onBehalfOf", "b", "", "")
listCmd.Flags().StringVarP(&onBehalfOfContentOwner, "onBehalfOfContentOwner", "B", "", "")
listCmd.Flags().StringArrayVarP(&parts, "parts", "p", []string{"id", "snippet"}, "Comma separated parts")
Expand Down
10 changes: 5 additions & 5 deletions cmd/channel/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func init() {
channelCmd.AddCommand(listCmd)

listCmd.Flags().StringVarP(
&categoryId, "categoryId", "c", "",
&categoryId, "categoryId", "g", "",
"Return the channels within the specified guide category ID",
)
listCmd.Flags().StringVarP(
Expand All @@ -49,26 +49,26 @@ func init() {
&id, "id", "i", "", "Return the channels with the specified IDs",
)
listCmd.Flags().BoolVarP(
&managedByMe, "managedByMe", "M", false,
&managedByMe, "managedByMe", "E", false,
"Specify the maximum number of items that should be returned",
)
listCmd.Flags().Int64VarP(
&maxResults, "maxResults", "n", 5,
"The maximum number of items that should be returned",
)
listCmd.Flags().BoolVarP(
&mine, "mine", "m", true,
&mine, "mine", "M", true,
"Return the ids of channels owned by the authenticated user",
)
listCmd.Flags().BoolVarP(
&mySubscribers, "mySubscribers", "s", false,
&mySubscribers, "mySubscribers", "S", false,
"Return the channels subscribed to the authenticated user",
)
listCmd.Flags().StringVarP(
&onBehalfOfContentOwner, "onBehalfOfContentOwner", "b", "", "",
)
listCmd.Flags().StringVarP(
&output, "output", "o", "", "Output format: json or yaml",
&output, "output", "o", "", "json or yaml",
)
listCmd.Flags().StringArrayVarP(
&parts, "parts", "p", []string{"id", "snippet", "status"},
Expand Down
2 changes: 1 addition & 1 deletion cmd/channelSection/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func init() {
&channelId, "channelId", "c", "", " Return the ChannelSections owned by the specified channel ID",
)
listCmd.Flags().StringVarP(&hl, "hl", "l", "", "Return content in specified language")
listCmd.Flags().BoolVarP(&mine, "mine", "m", false, "Return the ChannelSections owned by the authenticated user")
listCmd.Flags().BoolVarP(&mine, "mine", "M", false, "Return the ChannelSections owned by the authenticated user")
listCmd.Flags().StringVarP(&onBehalfOfContentOwner, "onBehalfOfContentOwner", "b", "", "")
listCmd.Flags().StringArrayVarP(&parts, "parts", "p", []string{"id", "snippet"}, "Comma separated parts")
listCmd.Flags().StringVarP(&output, "output", "o", "json", "json or yaml")
Expand Down
4 changes: 2 additions & 2 deletions cmd/comment/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ func init() {

insertCmd.Flags().StringVarP(&authorChannelId, "authorChannelId", "a", "", "Channel ID of the comment author")
insertCmd.Flags().StringVarP(&channelId, "channelId", "c", "", "Channel ID of the video owner")
insertCmd.Flags().BoolVarP(&canRate, "canRate", "r", false, "Whether the viewer can rate the comment")
insertCmd.Flags().StringVarP(&parentId, "parentId", "p", "", "ID of the parent comment")
insertCmd.Flags().BoolVarP(&canRate, "canRate", "R", false, "Whether the viewer can rate the comment")
insertCmd.Flags().StringVarP(&parentId, "parentId", "P", "", "ID of the parent comment")
insertCmd.Flags().StringVarP(&textOriginal, "textOriginal", "t", "", "Text of the comment")
insertCmd.Flags().StringVarP(&videoId, "videoId", "v", "", "ID of the video")
insertCmd.Flags().StringVarP(&output, "output", "o", "", "json, yaml or silent")
Expand Down
2 changes: 1 addition & 1 deletion cmd/comment/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func init() {

listCmd.Flags().StringSliceVarP(&ids, "ids", "i", []string{}, "Comma separated ids of comments")
listCmd.Flags().Int64VarP(
&maxResults, "maxResults", "m", 5, "Specifies the maximum number of items that should be returned",
&maxResults, "maxResults", "n", 5, "Specifies the maximum number of items that should be returned",
)
listCmd.Flags().StringVarP(&parentId, "parentId", "P", "", "Returns replies to the specified comment")
listCmd.Flags().StringVarP(&textFormat, "textFormat", "t", "", "textFormatUnspecified, html(default) or plainText")
Expand Down
2 changes: 1 addition & 1 deletion cmd/comment/setModerationStatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ func init() {
setModerationStatusCmd.Flags().StringVarP(
&moderationStatus, "moderationStatus", "s", "", "heldForReview, published or rejected",
)
setModerationStatusCmd.Flags().BoolVarP(&banAuthor, "banAuthor", "b", false, "true or false")
setModerationStatusCmd.Flags().BoolVarP(&banAuthor, "banAuthor", "A", false, "true or false")
setModerationStatusCmd.Flags().StringVarP(&output, "output", "o", "", "json, yaml or silent")
}
4 changes: 2 additions & 2 deletions cmd/comment/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ func init() {
commentCmd.AddCommand(updateCmd)

updateCmd.Flags().StringSliceVarP(&ids, "id", "i", []string{}, "ID of the comment")
updateCmd.Flags().BoolVarP(&canRate, "canRate", "r", false, "Whether the viewer can rate the comment")
updateCmd.Flags().BoolVarP(&canRate, "canRate", "R", false, "Whether the viewer can rate the comment")
updateCmd.Flags().StringVarP(&textOriginal, "textOriginal", "t", "", "Text of the comment")
updateCmd.Flags().StringVarP(&viewerRating, "viewerRating", "v", "", "none, like or dislike")
updateCmd.Flags().StringVarP(&viewerRating, "viewerRating", "r", "", "none, like or dislike")
updateCmd.Flags().StringVarP(&output, "output", "o", "", "json, yaml or silent")
}
7 changes: 4 additions & 3 deletions cmd/commentThread/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ func init() {
&channelId, "channelId", "c", "", "Returns the comment threads for all the channel comments",
)
listCmd.Flags().Int64VarP(
&maxResults, "maxResults", "m", 5, "Specifies the maximum number of items that should be returned",
&maxResults, "maxResults", "n", 5, "Specifies the maximum number of items that should be returned",
)
listCmd.Flags().StringVarP(
&moderationStatus, "moderationStatus", "M", "", "published(default), heldForReview, likelySpam or rejected",
&moderationStatus, "moderationStatus", "m", "", "published(default), heldForReview, likelySpam or rejected",
)
listCmd.Flags().StringVarP(&order, "order", "o", "", "orderUnspecified, time(default) or relevance")
listCmd.Flags().StringVarP(&order, "order", "O", "", "orderUnspecified, time(default) or relevance")
listCmd.Flags().StringVarP(&searchTerms, "searchTerms", "s", "", "Search terms")
listCmd.Flags().StringVarP(&textFormat, "textFormat", "t", "", "textFormatUnspecified or html(default)")
listCmd.Flags().StringVarP(&videoId, "videoId", "v", "", "Returns the comment threads of the specified video")
listCmd.Flags().StringSliceVarP(&parts, "parts", "p", []string{"id", "snippet"}, "Parts to be fetched")
listCmd.Flags().StringVarP(&output, "output", "o", "", "json, yaml or silent")
}
2 changes: 1 addition & 1 deletion cmd/i18nLanguage/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ func init() {
&parts, "parts", "p", []string{"id", "snippet"}, "Comma separated parts",
)
listCmd.Flags().StringVarP(
&output, "output", "o", "", "Output format: json or yaml",
&output, "output", "o", "", "json or yaml",
)
}
2 changes: 1 addition & 1 deletion cmd/i18nRegion/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ func init() {
&parts, "parts", "p", []string{"id", "snippet"}, "Comma separated parts",
)
listCmd.Flags().StringVarP(
&output, "output", "o", "", "Output format: json or yaml",
&output, "output", "o", "", "json or yaml",
)
}
2 changes: 1 addition & 1 deletion cmd/member/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ func init() {
&parts, "parts", "p", []string{"snippet"}, "Comma separated parts",
)
listCmd.Flags().StringVarP(
&output, "output", "o", "", "Output format: json or yaml",
&output, "output", "o", "", "json or yaml",
)
}
2 changes: 1 addition & 1 deletion cmd/membershipsLevel/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ func init() {
&parts, "parts", "p", []string{"id, snippet"}, "Comma separated parts",
)
listCmd.Flags().StringVarP(
&output, "output", "o", "", "Output format: json or yaml",
&output, "output", "o", "", "format: json or yaml",
)
}
4 changes: 2 additions & 2 deletions cmd/playlist/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func init() {
&maxResults, "maxResults", "n", 5,
"Specifies the maximum number of items that should be returned",
)
listCmd.Flags().BoolVarP(&mine, "mine", "m", true, "Return the playlists owned by the authenticated user")
listCmd.Flags().BoolVarP(&mine, "mine", "M", true, "Return the playlists owned by the authenticated user")
listCmd.Flags().StringVarP(
&onBehalfOfContentOwner, "onBehalfOfContentOwner", "b", "", "",
)
Expand All @@ -54,6 +54,6 @@ func init() {
"Comma separated parts",
)
listCmd.Flags().StringVarP(
&output, "output", "o", "", "Output format: json or yaml",
&output, "output", "o", "", "json or yaml",
)
}
6 changes: 3 additions & 3 deletions cmd/playlistItem/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ func init() {
&kChannelId, "kChannelId", "C", "", "ID of the channel if kind is channel",
)
insertCmd.Flags().StringVarP(
&kPlaylistId, "kPlaylistId", "P", "",
&kPlaylistId, "kPlaylistId", "Y", "",
"ID of the playlist if kind is playlist",
)
insertCmd.Flags().StringVarP(
&playlistId, "playlistId", "p", "",
&playlistId, "playlistId", "y", "",
"The ID that YouTube uses to uniquely identify the playlist that the playlist item is in",
)
insertCmd.Flags().StringVarP(
&channelId, "channelId", "c", "",
"The ID that YouTube uses to uniquely identify the user that added the item to the playlist",
)
insertCmd.Flags().StringVarP(
&privacy, "privacy", "r", "", "public, private, or unlisted",
&privacy, "privacy", "p", "", "public, private, or unlisted",
)
insertCmd.Flags().StringVarP(&onBehalfOfContentOwner, "onBehalfOfContentOwner", "b", "", "")
insertCmd.Flags().StringVarP(&output, "output", "o", "", "json, yaml or silent")
Expand Down
4 changes: 2 additions & 2 deletions cmd/playlistItem/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func init() {

listCmd.Flags().StringVarP(&id, "id", "i", "", "ID of the playlist item")
listCmd.Flags().StringVarP(
&playlistId, "playlistId", "I", "",
&playlistId, "playlistId", "y", "",
"Return the playlist items within the given playlist",
)
listCmd.Flags().Int64VarP(
Expand All @@ -42,7 +42,7 @@ func init() {
&onBehalfOfContentOwner, "onBehalfOfContentOwner", "b", "", "",
)
listCmd.Flags().StringVarP(
&output, "output", "o", "", "Output format: json or yaml",
&output, "output", "o", "", "json or yaml",
)
listCmd.Flags().StringArrayVarP(
&parts, "parts", "p", []string{"id", "snippet", "status"},
Expand Down
2 changes: 1 addition & 1 deletion cmd/search/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,5 @@ func init() {
listCmd.Flags().StringSliceVar(
&parts, "parts", []string{"id", "snippet"}, "Comma separated parts",
)
listCmd.Flags().StringVar(&output, "output", "", "Output format: json or yaml")
listCmd.Flags().StringVar(&output, "output", "", "json or yaml")
}
8 changes: 4 additions & 4 deletions cmd/subscription/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ func init() {
&maxResults, "maxResults", "n", 5,
"Specifies the maximum number of items that should be returned",
)
listCmd.Flags().BoolVarP(&mine, "mine", "m", true, "Return the subscriptions of the authenticated user")
listCmd.Flags().BoolVarP(&mine, "mine", "M", true, "Return the subscriptions of the authenticated user")
listCmd.Flags().BoolVarP(
&myRecentSubscribers, "myRecentSubscribers", "r", false, "true or false",
&myRecentSubscribers, "myRecentSubscribers", "R", false, "true or false",
)
listCmd.Flags().BoolVarP(
&mySubscribers, "mySubscribers", "s", false, "Return the subscribers of the given channel owner",
&mySubscribers, "mySubscribers", "S", false, "Return the subscribers of the given channel owner",
)
listCmd.Flags().StringVarP(
&onBehalfOfContentOwner, "onBehalfOfContentOwner", "b", "", "",
Expand All @@ -64,7 +64,7 @@ func init() {
"subscriptionOrderUnspecified, relevance(default), unread or alphabetical",
)
listCmd.Flags().StringVarP(
&output, "output", "o", "", "Output format: json or yaml",
&output, "output", "o", "", "json or yaml",
)
listCmd.Flags().StringArrayVarP(
&parts, "parts", "p", []string{"id", "snippet"}, "Comma separated parts",
Expand Down
12 changes: 6 additions & 6 deletions cmd/video/insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ func init() {
videoCmd.AddCommand(insertCmd)

insertCmd.Flags().BoolVarP(
&autoLevels, "autoLevels", "a", true, "Should auto-levels be applied to the upload",
&autoLevels, "autoLevels", "A", true, "Should auto-levels be applied to the upload",
)
insertCmd.Flags().StringVarP(&file, "file", "f", "", "Path to the video file")
insertCmd.Flags().StringVarP(&title, "title", "t", "", "Title of the video")
insertCmd.Flags().StringVarP(
&description, "description", "d", "", "Description of the video",
)
insertCmd.Flags().StringArrayVarP(
&tags, "tags", "T", []string{}, "Comma separated tags",
&tags, "tags", "a", []string{}, "Comma separated tags",
)
insertCmd.Flags().StringVarP(
&language, "language", "l", "", "Language of the video",
Expand All @@ -74,18 +74,18 @@ func init() {
"Privacy status of the video: public, private, or unlisted",
)
insertCmd.Flags().BoolVarP(
&forKids, "forKids", "k", false, "Whether the video is for kids",
&forKids, "forKids", "K", false, "Whether the video is for kids",
)
insertCmd.Flags().BoolVarP(
&embeddable, "embeddable", "e", true, "Whether the video is embeddable",
&embeddable, "embeddable", "E", true, "Whether the video is embeddable",
)
insertCmd.Flags().StringVarP(
&publishAt, "publishAt", "U", "",
"Datetime when the video is scheduled to publish",
)
insertCmd.Flags().BoolVarP(&stabilize, "stabilize", "s", true, "Should stabilize be applied to the upload")
insertCmd.Flags().BoolVarP(&stabilize, "stabilize", "S", true, "Should stabilize be applied to the upload")
insertCmd.Flags().BoolVarP(
&notifySubscribers, "notifySubscribers", "n", true,
&notifySubscribers, "notifySubscribers", "N", true,
"Notify the channel subscribers about the new video",
)
insertCmd.Flags().BoolVarP(
Expand Down
8 changes: 4 additions & 4 deletions cmd/video/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ func init() {
&chart, "chart", "c", "", "chartUnspecified or mostPopular",
)
listCmd.Flags().StringVarP(
&hl, "hl", "L", "", "Specifies the localization language",
&hl, "hl", "l", "", "Specifies the localization language",
)
listCmd.Flags().StringVarP(&locale, "locale", "l", "", "")
listCmd.Flags().StringVarP(&locale, "locale", "L", "", "")
listCmd.Flags().StringVarP(
&categoryId, "videoCategoryId", "v", "",
&categoryId, "videoCategoryId", "g", "",
"Specific to the specified video category",
)
listCmd.Flags().StringVarP(
Expand All @@ -62,7 +62,7 @@ func init() {
"Return videos liked/disliked by the authenticated user",
)
listCmd.Flags().StringVarP(
&output, "output", "o", "", "Output format: json or yaml",
&output, "output", "o", "", "json or yaml",
)
listCmd.Flags().StringArrayVarP(
&parts, "parts", "p", []string{"id", "snippet", "status"}, "Comma separated parts",
Expand Down
2 changes: 1 addition & 1 deletion cmd/video/reportAbuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ func init() {
)
reportAbuseCmd.Flags().StringVarP(&comments, "comments", "c", "", "Additional comments regarding the abuse report")
reportAbuseCmd.Flags().StringVarP(&language, "language", "l", "", "The language that the content was viewed in")
reportAbuseCmd.Flags().StringVarP(&onBehalfOfContentOwner, "onBehalfOfContentOwner", "o", "", "")
reportAbuseCmd.Flags().StringVarP(&onBehalfOfContentOwner, "onBehalfOfContentOwner", "b", "", "")
}
4 changes: 2 additions & 2 deletions cmd/video/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func init() {
&license, "license", "L", "youtube", "youtube(default) or creativeCommon",
)
updateCmd.Flags().StringVarP(
&thumbnail, "thumbnail", "T", "", "Path to the thumbnail file",
&thumbnail, "thumbnail", "u", "", "Path to the thumbnail file",
)
updateCmd.Flags().StringVarP(
&playListId, "playlistId", "y", "", "Playlist ID of the video",
Expand All @@ -59,7 +59,7 @@ func init() {
"Privacy status of the video: public, private or unlisted",
)
updateCmd.Flags().BoolVarP(
&embeddable, "embeddable", "e", true, "Whether the video is embeddable",
&embeddable, "embeddable", "E", true, "Whether the video is embeddable",
)
updateCmd.Flags().StringVarP(&output, "output", "o", "", "json, yaml or silent")

Expand Down
2 changes: 1 addition & 1 deletion cmd/videoAbuseReportReason/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ func init() {
&parts, "parts", "p", []string{"id", "snippet"}, "Comma separated parts",
)
listCmd.Flags().StringVarP(
&output, "output", "o", "", "Output format: json or yaml",
&output, "output", "o", "", "json or yaml",
)
}
2 changes: 1 addition & 1 deletion cmd/videoCategory/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ func init() {
&parts, "parts", "p", []string{"id", "snippet"}, "Comma separated parts",
)
listCmd.Flags().StringVarP(
&output, "output", "o", "", "Output format: json or yaml",
&output, "output", "o", "", "json or yaml",
)
}
4 changes: 2 additions & 2 deletions cmd/watermark/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ var setCmd = &cobra.Command{
func init() {
wartermarkCmd.AddCommand(setCmd)

setCmd.Flags().StringVarP(&channelId, "channelId", "i", "", "ID of channel to set watermark")
setCmd.Flags().StringVarP(&channelId, "channelId", "c", "", "ID of channel to set watermark")
setCmd.Flags().StringVarP(&file, "file", "f", "", "Path to the watermark file")
setCmd.Flags().StringVarP(
&inVideoPosition, "inVideoPosition", "p", "", "topLeft, topRight, bottomLeft or bottomRight",
)
setCmd.Flags().Uint64VarP(
&durationMs, "durationMs", "d", 0, "Duration in milliseconds for which the watermark should be displayed",
)
setCmd.Flags().Uint64VarP(&offsetMs, "offsetMs", "o", 0, "Defines the time at which the watermark will appear")
setCmd.Flags().Uint64VarP(&offsetMs, "offsetMs", "m", 0, "Defines the time at which the watermark will appear")
setCmd.Flags().StringVarP(&offsetType, "offsetType", "t", "", "offsetFromStart or offsetFromEnd")
setCmd.Flags().StringVarP(&onBehalfOfContentOwner, "onBehalfOfContentOwner", "b", "", "")

Expand Down
Loading

0 comments on commit 0a03188

Please # to comment.