Skip to content

Commit c641946

Browse files
committed
Move core parts into git submodules
Many of my scripts reuse these parts, and it's tidier to keep the files in their own repo.
1 parent 8bd5fc7 commit c641946

10 files changed

+14
-1973
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "libs"]
2+
path = libs
3+
url = [email protected]:TheAMM/mpv_script_libs.git

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Tricky examples of the property expansion:
130130
| Name | Type | Notes |
131131
| ---- | ---- | ----- |
132132
| `filename` | `string` | Original filename with the extension stripped off |
133-
| `file_ext` | `string` | Original extension, dot included |
133+
| `file_ext` | `string` | Original extension, without leading dot |
134134
| `path` | `string` | full source path - may be a network path, so beware |
135135
| `pos` | `number` | Current playback position (float), format it with `${#pos:TIMEFORMAT}`! |
136136
| `unique` | `number` | A sequence number. The script will choose the first available filename, starting with `unique` as 1 and counting up. Use with `${%...}` |
@@ -146,6 +146,8 @@ Tricky examples of the property expansion:
146146

147147
## Development
148148

149+
This project uses git submodules. After cloning (or fetching updates), run `git submodule update --init` to update the `libs` submodule, which contains parts most of my scripts share and use.
150+
149151
Included in the repository is the `concat_files.py` tool I use for automatically concatenating files upon their change, and also mapping changes to the output file back to the source files. It's really handy on stack traces when mpv gives you a line and column on the output file - no need to hunt down the right place in the source files!
150152

151153
The script requires Python 3, so install that. Nothing more, though. Call it with `concat_files.py concat.json`.

concat.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"files" : [
55
"src/license_blurb.lua",
66
"<version>",
7-
"src/helpers.lua",
8-
"src/option_parser.lua",
7+
"libs/helpers.lua",
8+
"libs/option_parser.lua",
99
"src/options.lua",
10-
"src/display_state.lua",
11-
"src/asscropper.lua",
12-
"src/property_expander.lua",
10+
"libs/display_state.lua",
11+
"libs/asscropper.lua",
12+
"libs/property_expander.lua",
1313
"src/main.lua"
1414
],
1515

libs

Submodule libs added at ce75339

0 commit comments

Comments
 (0)