complete refactor see README for more info
This commit is contained in:
70
README.md
70
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.
|
||||
-- [boolean] whether to ignore updates
|
||||
pin = true,
|
||||
|
||||
-- [string] git branch to clone
|
||||
branch = "",
|
||||
|
||||
-- [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?
|
||||
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*
|
||||
|
||||
## TODO
|
||||
|
||||
~~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)
|
||||
|
Reference in New Issue
Block a user