GithubHelp home page GithubHelp logo

brainwo / yatta Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 2.0 572 KB

Organize your on-demand video playlist

Home Page: https://github.com/brainwo/yatta

License: GNU General Public License v3.0

Dart 72.59% CMake 12.26% C++ 12.60% C 0.92% Kotlin 0.06% Swift 0.75% Objective-C 0.02% HTML 0.81%
flutter linux youtube hjkl hacktoberfest

yatta's Introduction

Application preview showing search result

Yatta ヤッタ

Made with Fluent Design Discord

An on-demand videos client for searching, browsing, managing videos from your favorite on-demand video platforms.

Warning

This application is currently under development, changes on application behavior is expected without notice nor migration guide.

Features

  • Search videos from your favorite platform (YouTube, Peertube, etc) 🔎
  • Video playlist (history, saved, etc) 🗃️
  • Plain text database for easy scripting 📃
  • Modal navigation for keyboard user 🇭 🇯 🇰 🇱
  • Middle click autoscrolling, just like web browsers 🖱️

Supported video platforms

User guide

YouTube API key

Read the guide here. Once you obtain the API key, go to Settings > YouTube API Settings > API key and add the API key.

Note

This API key will be good daily personal usage. For detailed breakdown on how YouTube Data API quota is calculated, read YouTube Data API (v3) - Quota Calculator. You can adjust how the app consume this quota in Settings > YouTube API Settings by disabling/limiting few features.

Playing videos

Example below shows a guide to play video from Chromium web browser:

Go to Setting > Video play command, edit the command to:

chromium $url

You can also add extra command to run after the other command by pressing Add more button. For example you can add notification:

chromium $url
notify-send Playing video $title\n$description

Available variable to use includes:

Name Description Example
url - https://www.youtube.com/watch?v=qWNQUvIk954
title - Rick Astley - Never Gonna Stop (Official Video)
description - Never Gonna Stop (Official Video) Listen here: https://rickastley.lnk.to/NeverGonnaStopID The new album 'Are We There Yet?
type Object type (possible value: video, channel, playlist) video
preview Large size image https://i.ytimg.com/vi/qWNQUvIk954/hqdefault.jpg
thumbnail Medium size image https://i.ytimg.com/vi/qWNQUvIk954/mqdefault.jpg
icon Small size image https://i.ytimg.com/vi/qWNQUvIk954/default.jpg

Keyboard Navigation

Key Function
h, j, k, l Move right, down, up, left
p Play video
o Listen video
ctrl k / ctrl l / F2 Focus on search bar
? #21

Configuring Yatta from a text editor #20

Looking for editing your Yatta configuration from a text editor? We got you covered.

Yatta uses YAML for the configuration file. Which is compatible with JSON, meaning you can use JSON if you prefer it over YAML.

Configuration file will be read based on this prority list:

$XDG_CONFIG_HOME/yatta/config.yaml
$XDG_CONFIG_HOME/yatta/config.json
$HOME/.config/yatta/config.yaml
$HOME/.config/yatta/config.json
/etc/yatta/config.yaml
/etc/yatta/config.json

A user configuration file should be created if you changed the application configuration within the application. If you need to make a new user configuration file, simply create a new file in $XDG_CONFIG_HOME)/yatta/config.yaml*.

(Optional) Setup your language server

Install and configure yaml-languague-server for your editor.

Add this line to the top of your configuration file:

# yaml-language-server: $schema=https://gist.githubusercontent.com/brainwo/7eeddb3b5ae171ed1c86c28df1ff6c01/raw/schema.json

Documentation

#22

Building from source

This program is written using Flutter. For installation guide, please refer to official Flutter's setup guide. No additional build dependencies required beside the dependencies required by Flutter.

If you have a problem when building, check pubspec.lock file to find compatible Flutter SDK version to use, for example the snippet below indicating Flutter SDK version 3.19.X:

sdks:
  dart: ">=3.3.0 <4.0.0"
  flutter: ">=3.19.0"

Contributing

This project uses conventional commit. git-cc plugin is recommended.

How do I add support for a new video platform? First please confirm the platform you are adding has an official search API support, otherwise your request will be rejected. Other than that, piracy sites will also be rejected.

License

GNU General Public License, version 3

yatta's People

Contributors

asif4318 avatar brainwo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

yatta's Issues

Handle error when search result is empty

Search query:

lorem ipsum dolor sit amet asd jkl

Expected output: show result page saying it's empty
Actual output: showing error page saying "Null check operator used on a null value"

Drag and Drop support on list item

The app should allow drag and drop and behave like YouTube Thumbnail: it opens the video if you drop it to Firefox and paste the link anywhere else in a textbox.

Tray Icon support

There should be a tray icon with these context menu options:

  • Play/pause
  • Next song
  • Previous song
  • Open settings menu
  • Quit

TSV database

Ideally the database should be located in different file. Using TSV would be much helpful for personal data processing.
SQLite should support writing to TSV, however I'm not sure if it would be the best fit.

Why TSV?

Easiest format to process. All you need is GNU coreutils:

cat data.tsv | tail -n +2 | cut -d$'\t' -f2 | sort

This example reads second column of a TSV file without its header and sort them.

Other considerations:

JSON

JSON is also easy, there is jq. But it requires installation.

CSV

Can be easy, but parsing quoted field adds extra works.

Setup CD/CI for this repo

It should automate the following things:

  • Code checking on pull requests
  • Bundle source code into single compressed file and upload as an artifact
  • Build application and upload as an artifact

Migrate configuration file from SharedPreferences package to YAML

I have done a small research that led the decision to pick YAML.

The criteria I was looking for is that the configuration is language is that it must has a Dart library, not difficult to write, and is self-documented. The self documented part is basically what schema is for.

As someone whose edit their configuration file everyday, I find it's often annoying to go back and forth to check a manual for some program just to change a value in the configuration file, hence why I need it to be self-documented.

Alacritty seems to be the only program I use to support schema out of the box, their schema is listed on https://www.schemastore.org/json/ which picked up by my extension. I might consider adding my schema there if there is a possibility.

Here is comparison of popular configuration languages based on my limited time of researching them:

Name LSP support Schema Additional features
YAML Yes Yes Compatible with JSON
JSON Yes Yes -
TOML Yes(?) Limited* -
Pkl Not ready - -
RON - - -

* IntelliJ TOML plugin doesn't seems to support JSON Schema. However there are schema support for VS Code and coc.nvim.

While JSON comes for free in Dart. I find YAML is better suited since it's also compatible with JSON. Opening the possibility to use YAML/JSON based on user's preferences.

If there is any suggestion for a better language, leave a comment so I might consider it. Do keep in mind I will only keep one language at a time to be supported.

Improve keyboard scrolling

  • Determine in which position the selected container is drawn
  • On certain position, it starts to scroll up or down based on the container size

Redundant release name

image

Delete this line from .github/workflows/build.yml

release_name: Release ${{ github.ref_name }}

RSS feed support

Subscribe to a YouTube channel via RSS.

YouTube RSS doesn't seems to have video duration.

Improve local playlist search algorithm

Currently the search algorithm in Saved Playlist and History only checks for matching substring. While this feature is functioning, there are still many rooms for improvements. Such improvement includes:

  • Multi keyword search: take spaces as new keyword to compare, perhaps in the way that resembles fuzzy finder.
  • Non alphabetical tokens: support typing romanjinized keywords for non-alphabetical words. This will also allows furigana, katakana, and hiragana to be matched to any Japanese words.
  • Data clean up: as for now, there are too many noises from just transforming the search object into comparable strings. Data should be only relevant to the searching algorithm.

Blocked by:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.