mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-05 20:40:09 -08:00
chore: format
This commit is contained in:
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -3,7 +3,7 @@
|
|||||||
github: benexl # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
github: benexl # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||||
patreon: # Replace with a single Patreon username
|
patreon: # Replace with a single Patreon username
|
||||||
open_collective: # Replace with a single Open Collective username
|
open_collective: # Replace with a single Open Collective username
|
||||||
ko_fi: # Replace with a single Ko-fi username
|
ko_fi: benexl # Replace with a single Ko-fi username
|
||||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
liberapay: # Replace with a single Liberapay username
|
liberapay: # Replace with a single Liberapay username
|
||||||
|
|||||||
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"python.analysis.autoImportCompletions": true
|
"python.analysis.autoImportCompletions": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
The core aim of this project is to co-relate automation and efficiency to extract what is provided to a user on the internet. All content available through the project is hosted by external non-affiliated sources.
|
The core aim of this project is to co-relate automation and efficiency to extract what is provided to a user on the internet. All content available through the project is hosted by external non-affiliated sources.
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@@ -22,7 +22,6 @@ This project has no control on the content it is serving, using copyrighted cont
|
|||||||
|
|
||||||
</b>
|
</b>
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h2>DMCA and Copyright Infrigements</h3>
|
<h2>DMCA and Copyright Infrigements</h3>
|
||||||
@@ -34,7 +33,6 @@ This project has no control on the content it is serving, using copyrighted cont
|
|||||||
A browser is a tool, and the maliciousness of the tool is directly based on the user.
|
A browser is a tool, and the maliciousness of the tool is directly based on the user.
|
||||||
</b>
|
</b>
|
||||||
|
|
||||||
|
|
||||||
This project uses client-side content access mechanisms. Hence, the copyright infrigements or DMCA in this project's regards are to be forwarded to the associated site by the associated notifier of any such claims. This is one of the main reasons the sites are listed in this project.
|
This project uses client-side content access mechanisms. Hence, the copyright infrigements or DMCA in this project's regards are to be forwarded to the associated site by the associated notifier of any such claims. This is one of the main reasons the sites are listed in this project.
|
||||||
|
|
||||||
<b>Do not harass the developer. Any personal information about the developer is intentionally not made public. Exploiting such information without consent in regards to this topic will lead to legal actions by the developer themselves.</b>
|
<b>Do not harass the developer. Any personal information about the developer is intentionally not made public. Exploiting such information without consent in regards to this topic will lead to legal actions by the developer themselves.</b>
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ With the following extras available:
|
|||||||
- api - which installs dependencies required to use `fastanime serve`
|
- api - which installs dependencies required to use `fastanime serve`
|
||||||
- mpv - which installs python mpv
|
- mpv - which installs python mpv
|
||||||
- notifications - which installs plyer required for desktop notifications
|
- notifications - which installs plyer required for desktop notifications
|
||||||
|
|
||||||
#### Using uv
|
#### Using uv
|
||||||
|
|
||||||
Recommended method of installation is using [uv](https://docs.astral.sh/uv/).
|
Recommended method of installation is using [uv](https://docs.astral.sh/uv/).
|
||||||
@@ -813,12 +813,11 @@ player = mpv
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Other Terminal Browsers I Made
|
### Other Terminal Browsers I Made
|
||||||
|
|
||||||
[yt-x](https://github.com/Benexl/yt-x) - browse youtube and other yt-dlp sites from the terminal
|
[yt-x](https://github.com/Benexl/yt-x) - browse youtube and other yt-dlp sites from the terminal
|
||||||
|
|
||||||
[lib-x](https://github.com/Benexl/lib-x) - browse your calibre library from the terminal
|
[lib-x](https://github.com/Benexl/lib-x) - browse your calibre library from the terminal
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
pr's are highly welcome
|
pr's are highly welcome
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@ query (
|
|||||||
currentPage
|
currentPage
|
||||||
total
|
total
|
||||||
}
|
}
|
||||||
mediaList(userId: $userId, status: $status, type: $type,sort: $sort) {
|
mediaList(userId: $userId, status: $status, type: $type, sort: $sort) {
|
||||||
mediaId
|
mediaId
|
||||||
media {
|
media {
|
||||||
id
|
id
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ query ($id: Int) {
|
|||||||
}
|
}
|
||||||
description
|
description
|
||||||
episodes
|
episodes
|
||||||
duration
|
duration
|
||||||
trailer {
|
trailer {
|
||||||
site
|
site
|
||||||
id
|
id
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
query ($id: Int, $page: Int,$per_page:Int) {
|
query ($id: Int, $page: Int, $per_page: Int) {
|
||||||
Page(perPage: $per_page, page: $page) {
|
Page(perPage: $per_page, page: $page) {
|
||||||
recommendations(mediaRecommendationId: $id) {
|
recommendations(mediaRecommendationId: $id) {
|
||||||
media {
|
media {
|
||||||
|
|||||||
@@ -4,10 +4,9 @@
|
|||||||
# This script formats and displays episode information in the FZF preview pane.
|
# This script formats and displays episode information in the FZF preview pane.
|
||||||
# Some values are injected by python those with '{name}' syntax using .replace()
|
# Some values are injected by python those with '{name}' syntax using .replace()
|
||||||
|
|
||||||
|
|
||||||
draw_rule
|
draw_rule
|
||||||
|
|
||||||
echo "{TITLE}"| fold -s -w "$WIDTH"
|
echo "{TITLE}" | fold -s -w "$WIDTH"
|
||||||
|
|
||||||
draw_rule
|
draw_rule
|
||||||
|
|
||||||
@@ -30,4 +29,3 @@ print_kv "Start Date" "{START_DATE}"
|
|||||||
print_kv "End Date" "{END_DATE}"
|
print_kv "End Date" "{END_DATE}"
|
||||||
|
|
||||||
draw_rule
|
draw_rule
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
# This script formats and displays the textual information in the FZF preview pane.
|
# This script formats and displays the textual information in the FZF preview pane.
|
||||||
# Some values are injected by python those with '{name}' syntax using .replace()
|
# Some values are injected by python those with '{name}' syntax using .replace()
|
||||||
|
|
||||||
|
|
||||||
draw_rule
|
draw_rule
|
||||||
|
|
||||||
print_kv "Title" "{TITLE}"
|
print_kv "Title" "{TITLE}"
|
||||||
@@ -13,8 +12,8 @@ draw_rule
|
|||||||
|
|
||||||
# Emojis take up double the space
|
# Emojis take up double the space
|
||||||
score_multiplier=1
|
score_multiplier=1
|
||||||
if ! [ "{SCORE}" = "N/A" ];then
|
if ! [ "{SCORE}" = "N/A" ]; then
|
||||||
score_multiplier=2
|
score_multiplier=2
|
||||||
fi
|
fi
|
||||||
print_kv "Score" "{SCORE}" $score_multiplier
|
print_kv "Score" "{SCORE}" $score_multiplier
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
fetch_anime_for_fzf() {
|
fetch_anime_for_fzf() {
|
||||||
local search_term="$1"
|
local search_term="$1"
|
||||||
if [ -z "$search_term" ]; then exit 0; fi
|
if [ -z "$search_term" ]; then exit 0; fi
|
||||||
|
|
||||||
local query='
|
local query='
|
||||||
query ($search: String) {
|
query ($search: String) {
|
||||||
Page(page: 1, perPage: 25) {
|
Page(page: 1, perPage: 25) {
|
||||||
media(search: $search, type: ANIME, sort: [SEARCH_MATCH]) {
|
media(search: $search, type: ANIME, sort: [SEARCH_MATCH]) {
|
||||||
@@ -16,25 +16,28 @@ fetch_anime_for_fzf() {
|
|||||||
}
|
}
|
||||||
'
|
'
|
||||||
|
|
||||||
local json_payload
|
local json_payload
|
||||||
json_payload=$(jq -n --arg query "$query" --arg search "$search_term" \
|
json_payload=$(jq -n --arg query "$query" --arg search "$search_term" \
|
||||||
'{query: $query, variables: {search: $search}}')
|
'{query: $query, variables: {search: $search}}')
|
||||||
|
|
||||||
curl --silent \
|
curl --silent \
|
||||||
--header "Content-Type: application/json" \
|
--header "Content-Type: application/json" \
|
||||||
--header "Accept: application/json" \
|
--header "Accept: application/json" \
|
||||||
--request POST \
|
--request POST \
|
||||||
--data "$json_payload" \
|
--data "$json_payload" \
|
||||||
https://graphql.anilist.co | \
|
https://graphql.anilist.co |
|
||||||
jq -r '.data.Page.media[]? | select(.title.romaji) |
|
jq -r '.data.Page.media[]? | select(.title.romaji) |
|
||||||
"\(.title.english // .title.romaji) | Score: \(.meanScore // "N/A") | ID: \(.id)"'
|
"\(.title.english // .title.romaji) | Score: \(.meanScore // "N/A") | ID: \(.id)"'
|
||||||
}
|
}
|
||||||
fetch_anime_details() {
|
fetch_anime_details() {
|
||||||
local anime_id
|
local anime_id
|
||||||
anime_id=$(echo "$1" | sed -n 's/.*ID: \([0-9]*\).*/\1/p')
|
anime_id=$(echo "$1" | sed -n 's/.*ID: \([0-9]*\).*/\1/p')
|
||||||
if [ -z "$anime_id" ]; then echo "Select an item to see details..."; return; fi
|
if [ -z "$anime_id" ]; then
|
||||||
|
echo "Select an item to see details..."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
local query='
|
local query='
|
||||||
query ($id: Int) {
|
query ($id: Int) {
|
||||||
Media(id: $id, type: ANIME) {
|
Media(id: $id, type: ANIME) {
|
||||||
title { romaji english }
|
title { romaji english }
|
||||||
@@ -50,18 +53,18 @@ fetch_anime_details() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
'
|
'
|
||||||
local json_payload
|
local json_payload
|
||||||
json_payload=$(jq -n --arg query "$query" --argjson id "$anime_id" \
|
json_payload=$(jq -n --arg query "$query" --argjson id "$anime_id" \
|
||||||
'{query: $query, variables: {id: $id}}')
|
'{query: $query, variables: {id: $id}}')
|
||||||
|
|
||||||
# Fetch and format details for the preview window
|
# Fetch and format details for the preview window
|
||||||
curl --silent \
|
curl --silent \
|
||||||
--header "Content-Type: application/json" \
|
--header "Content-Type: application/json" \
|
||||||
--header "Accept: application/json" \
|
--header "Accept: application/json" \
|
||||||
--request POST \
|
--request POST \
|
||||||
--data "$json_payload" \
|
--data "$json_payload" \
|
||||||
https://graphql.anilist.co | \
|
https://graphql.anilist.co |
|
||||||
jq -r '
|
jq -r '
|
||||||
.data.Media |
|
.data.Media |
|
||||||
"Title: \(.title.english // .title.romaji)\n" +
|
"Title: \(.title.english // .title.romaji)\n" +
|
||||||
"Score: \(.meanScore // "N/A") | Episodes: \(.episodes // "N/A")\n" +
|
"Score: \(.meanScore // "N/A") | Episodes: \(.episodes // "N/A")\n" +
|
||||||
|
|||||||
Reference in New Issue
Block a user