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 copy url to clipboard #1393

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ apk del grep sed curl fzf git aria2 ffmpeg ncurses
- fzf - User interface
- ani-skip (optional)
- patch - Self updating
- [clipboard](https://github.com/Slackadays/Clipboard)

### Ani-Skip

Expand Down
14 changes: 13 additions & 1 deletion ani-cli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

version_number="4.8.11"
version_number="4.8.12"

# UI

Expand Down Expand Up @@ -41,6 +41,8 @@ help_info() {
Options:
-c, --continue
Continue watching from history
-C, --copyurl
Copy the currently playing anime URL to clipboard
-d, --download
Download the video instead of playing it
-D, --delete
Expand Down Expand Up @@ -278,6 +280,7 @@ play_episode() {
printf "\e]8;;vlc://%s\a~~~~~~~~~~~~~~~~~~~~\n~ Tap to open VLC ~\n~~~~~~~~~~~~~~~~~~~~\e]8;;\a\n" "$episode"
sleep 5
;;
cb*) nohup "$player_function" copy "$episode" >/dev/null 2>&1 & ;;
*) nohup "$player_function" "$episode" >/dev/null 2>&1 & ;;
esac
replay="$episode"
Expand Down Expand Up @@ -363,6 +366,15 @@ while [ $# -gt 0 ]; do
*) player_function="syncplay" ;;
esac
;;
-C | --copyurl) # Sorry for bad SH :3 <3
case "$(uname -s)" in
MINGW* | *Msys)
export PATH="$PATH":"/c/Users/$(whoami)/scoop/shims" # i hope you have "clipboard" installed using scoop (https://github.com/Slackadays/Clipboard)
player_function="cb.exe"
;;
*) player_function="cb" ;;
esac
;;
-q | --quality)
[ $# -lt 2 ] && die "missing argument!"
quality="$2"
Expand Down
3 changes: 3 additions & 0 deletions ani-cli.1
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Specify the episode numbers to watch. If range is specified it should be quoted
\fB\-c | --continue\fR
Continue watching anime from history.
.TP
\fB\-C | --copyurl\fR
Copy the currently playing anime URL to clipboard.
.TP
\fB\-d | --download\fR
Download episode.
.TP
Expand Down
Loading