-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
38 changed files
with
3,457 additions
and
1,055 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: github-pages | ||
run-name: GitHub Pages | ||
on: | ||
pull_request: | ||
branches: [main] | ||
types: | ||
- closed | ||
push: | ||
branches: [ci/gh-pages] | ||
|
||
jobs: | ||
|
||
build-ui: | ||
name: Build UI | ||
# if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ui | ||
env: | ||
CARGO_TERM_COLOR: always | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Cache Dist | ||
id: cache-dist | ||
uses: actions/cache@v4 | ||
with: | ||
path: dist | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('./**') }} | ||
- name: Cache Dependencies | ||
if: steps.cache-dist.outputs.cache-hit != 'true' | ||
id: cache-target | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('./Cargo.lock') }} | ||
- name: Install wasm32-unknown-unknown Target | ||
if: steps.cache-dist.outputs.cache-hit != 'true' | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: Install Trunk | ||
if: steps.cache-dist.outputs.cache-hit != 'true' | ||
uses: jetli/[email protected] | ||
- name: Build UI | ||
if: steps.cache-dist.outputs.cache-hit != 'true' | ||
run: | | ||
trunk --verbose build --release --features demo | ||
- name: Upload Pages Artifact | ||
if: github.ref_name == 'main' | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ui/dist/ | ||
|
||
deploy-pages: | ||
name: Deploy Pages | ||
if: github.ref_name == 'main' | ||
needs: build-ui | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: todo-check | ||
run-name: TODO Check | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
# Fails the action if TODOs are present in | ||
# critical files | ||
find-todos: | ||
name: Find TODOs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- run: | | ||
grep -r 'TODO' .github && exit 0 | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# TODO.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"rust-analyzer.rustfmt.overrideCommand": ["leptosfmt", "--stdin", "--rustfmt"] | ||
"rust-analyzer.rustfmt.overrideCommand": ["leptosfmt", "--stdin", "--rustfmt"], | ||
// "rust-analyzer.cargo.features": ["demo"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# TODOs | ||
|
||
## Architecture | ||
|
||
### UI | ||
|
||
- [ ] Better reactive design | ||
- [x] Select should preserve scroll | ||
- [ ] Query and view instead of total sync | ||
- [ ] Filter media in selector by query | ||
|
||
### API | ||
|
||
- [ ] Persist storage on server | ||
- [x] storage abstraction | ||
- [x] in-mem kv storage | ||
- [ ] on-disk kv storage | ||
- [ ] sqlite storage | ||
- [ ] garbage collection instead of deletion | ||
- [ ] Improve metadata automation | ||
- [ ] `ffprobe` to mine metadata | ||
- [ ] Use collections for nested directories | ||
|
||
## Maintenance | ||
|
||
- [ ] Split resumable uploads into a separate crate | ||
|
||
## Greenfield | ||
|
||
- [ ] Job manager | ||
- [ ] Display `ffmpeg` progress | ||
- [ ] Resumable conversions | ||
- [ ] Confirmation for anything destructive | ||
- [ ] Upload manager | ||
- [ ] Resumable | ||
- [ ] Use object storage | ||
- [ ] Alternative protocols (ws,quic) | ||
|
||
## PR | ||
|
||
- [x] Dry demo | ||
- [ ] User docs | ||
- [x] GitHub pages automation | ||
|
||
## Under Consideration | ||
|
||
- [x] better data model and sync procedure (CRDT?) | ||
- [x] database in browser storage | ||
- [x] only pull out-of-date items from server | ||
- [ ] ~~treat browser storage as write-back cache~~ | ||
- [ ] ~~Consider HTTP/2 for event streams~~ |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package main | ||
|
||
// import ( | ||
// "bufio" | ||
// "bytes" | ||
// "errors" | ||
// "fmt" | ||
// "log" | ||
// "os" | ||
// "os/exec" | ||
// "path/filepath" | ||
// ) | ||
|
||
// type ConvertOptions struct { | ||
// MediaID string | ||
// Format string | ||
// Hardsub bool | ||
// Overwrite bool | ||
// } | ||
|
||
// func convert( | ||
// path string, | ||
// format string, | ||
// hardsub bool, | ||
// overwrite bool, | ||
// ) (logs chan LogEntry, err_ch chan error, err error) { | ||
// path, err = filepath.EvalSymlinks(path) | ||
// if err != nil { | ||
// return | ||
// } | ||
// root := "/dir" | ||
// if filepath.Dir(path) != root { | ||
// return nil, nil, fmt.Errorf("file is not in root `%s`: %s", root, path) | ||
// } | ||
// in_basename := filepath.Base(path) | ||
// out_basename := in_basename[:len(in_basename)-len(filepath.Ext(path))] + "." + format | ||
// out := filepath.Join(root, out_basename) | ||
// _, err = os.Stat(out) | ||
// if !os.IsNotExist(err) && !overwrite { | ||
// return nil, nil, errors.New("file exists and `overwrite` set to `false`") | ||
// } | ||
// log.Printf("%s", out) | ||
// var cmd *exec.Cmd | ||
// if hardsub { | ||
// cmd = exec.Command( | ||
// "ffmpeg", | ||
// "-y", | ||
// "-i", path, | ||
// "-c:a", "libopus", | ||
// "-vf", fmt.Sprintf("subtitles='%s'", path), | ||
// out, | ||
// ) | ||
// } else { | ||
// cmd = exec.Command( | ||
// "ffmpeg", | ||
// "-y", | ||
// "-i", path, | ||
// "-c:a", "libopus", | ||
// out, | ||
// ) | ||
// } | ||
// cmd.Stdout = scan_logs(logs) | ||
// cmd.Stderr = scan_logs(logs) | ||
// err_ch = make(chan error) | ||
// go func() { err_ch <- cmd.Run() }() | ||
// return | ||
// } | ||
|
||
// func scan_logs(logs chan LogEntry) *bytes.Buffer { | ||
// buf := bytes.Buffer{} | ||
// go func() { | ||
// scanner := bufio.NewScanner(&buf) | ||
// for scanner.Scan() { | ||
// logs <- LogEntry{ | ||
// message: scanner.Text(), | ||
// } | ||
// } | ||
// }() | ||
// return &buf | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.