From 16f32bdcdd10c3dc95519b5f0ab4d6818b3a3bfe Mon Sep 17 00:00:00 2001 From: Squibid Date: Sat, 27 Jul 2024 09:26:54 -0400 Subject: complete refactor see README for more info --- README.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 54 insertions(+), 16 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 8d86744..c52bd30 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,63 @@ # Eat It -Eat It is a plugin manager for mpv which allows you to declare what files you -want from git repos. +Preface - eatit is a "plugin manager" for mpv it's sole purpose is to provide a +declerative way to install and update your plugins. Loading the plugins is done +by mpv itself. +## Installation +put this script into your ~/.config/mpv/scripts/ directory: +```lua +-- install eat-it on startup +local mp = require("mp") +local utils = require("mp.utils") +local path = mp.comand_native({ "expand-path", "~~/scripts/eat-it" }) -## Installing Eat It +if not utils.readdir(path) then + mp.command_native_async({ + name = "subprocess", + playback_only = false, + args = { "git", "clone", "--depth=1", "https://git.squi.bid/dep", path } + }) +end +``` +## Setup +in ~/.config/mpv/eatit-cfg.lua put: +```lua +return { + -- list of packages +} +``` +### Package Spec +```lua +{ + -- [string] Specifies the full name of the package (required) + "user/package", -### First time -To install eatit run these two commands [Make sure you know what it does](https://explainshell.com/explain?cmd=curl+-L+https%3A%2F%2Fgit.squi.bid%2Feat-it%2Fplain%2Featit.lua+-o+~%2F.config%2Fmpv%2Fscripts%2Featit.lua+curl+-L+https%3A%2F%2Fgit.squi.bid%2Feat-it%2Fplain%2Featit-cfg.lua+-o+~%2F.config%2Fmpv%2Featit-cfg.lua): - -curl -L https://git.squi.bid/eat-it/plain/eatit.lua -o ~/.config/mpv/scripts/eatit.lua -curl -L https://git.squi.bid/eat-it/plain/eatit-cfg.lua -o ~/.config/mpv/eatit-cfg.lua + -- [string] Overrides the url of the git repo to clone + -- by default eatit tries https://github.com/user/package.git + url = "", -### Bootstraping -The included bootstrap script will install and load eatit as soon as mpv starts. -## FAQ -Q: Where does the name 'Eat It' come from? -A: The plugin manager eats all the useless files and keeps the ones you want, -*and Weird Al is a funny guy* + -- [boolean] whether to ignore updates + pin = true, + + -- [string] git branch to clone + branch = "", -## TODO + -- [table] table of files to copy + files = { + [""] = "" + }, + -- [function] code to run when installing/updating the package note due to how + -- mpv works eatit cannot change the working directory while running the setup + -- function + setup = function() + end +} +``` +## FAQ +Q: Where does the name "Eat It" come from? +A: The plugin manager eats all the useless files and keeps the ones you want, +~~also a refrence to Weird Al's song "Eat It"~~ ## ALTERNATIVES -[email me](mailto:me@zacharyscheiman.com) if you know of any alternatives +[email me](mailto:me@zacharyscheiman.com) if you know of any other alternatives - [mpv_manager](https://github.com/po5/mpv_manager) -- cgit v1.2.1