Skip to content

Commit

Permalink
Move core parts into git submodules
Browse files Browse the repository at this point in the history
Many of my scripts reuse these parts, and it's tidier to keep the files in their own repo.
  • Loading branch information
TheAMM committed May 10, 2018
1 parent 8bd5fc7 commit c641946
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 1,973 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "libs"]
path = libs
url = [email protected]:TheAMM/mpv_script_libs.git
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Tricky examples of the property expansion:
| Name | Type | Notes |
| ---- | ---- | ----- |
| `filename` | `string` | Original filename with the extension stripped off |
| `file_ext` | `string` | Original extension, dot included |
| `file_ext` | `string` | Original extension, without leading dot |
| `path` | `string` | full source path - may be a network path, so beware |
| `pos` | `number` | Current playback position (float), format it with `${#pos:TIMEFORMAT}`! |
| `unique` | `number` | A sequence number. The script will choose the first available filename, starting with `unique` as 1 and counting up. Use with `${%...}` |
Expand All @@ -146,6 +146,8 @@ Tricky examples of the property expansion:

## Development

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.

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!

The script requires Python 3, so install that. Nothing more, though. Call it with `concat_files.py concat.json`.
Expand Down
10 changes: 5 additions & 5 deletions concat.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"files" : [
"src/license_blurb.lua",
"<version>",
"src/helpers.lua",
"src/option_parser.lua",
"libs/helpers.lua",
"libs/option_parser.lua",
"src/options.lua",
"src/display_state.lua",
"src/asscropper.lua",
"src/property_expander.lua",
"libs/display_state.lua",
"libs/asscropper.lua",
"libs/property_expander.lua",
"src/main.lua"
],

Expand Down
1 change: 1 addition & 0 deletions libs
Submodule libs added at ce7533
Loading

0 comments on commit c641946

Please sign in to comment.