-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsync-data.ps1
68 lines (53 loc) · 2.01 KB
/
sync-data.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
function auto-git-commit() {
git add .
git commit -m "Auto commit"
git pull
git push
}
function GenerateM3U {
param(
[System.IO.DirectoryInfo] $directory,
[string] $destinationPath
)
# Ensure the destination path exists
if (-not (Test-Path $destinationPath)) {
New-Item -Path $destinationPath -ItemType Directory -Force
}
# Define the playlist file name
$playlistFileName = "Nulloy.m3u"
$playlistPath = Join-Path -Path $destinationPath -ChildPath $playlistFileName
# Remove old playlist file if it exists
if (Test-Path $playlistPath) {
Remove-Item $playlistPath
}
# Get all MP3 files in the directory and write to the playlist
$directory.GetFiles("*.mp3") |
ForEach-Object { $_.FullName } |
Sort-Object |
Out-File -Encoding UTF8 -FilePath $playlistPath
Write-Host "Created M3U Playlist: $playlistPath"
}
function syncPlaylist {
$musicDirectory = "E:\Music"
$musicDirInfo = Get-Item $musicDirectory
$destinationPath = "C:\Users\master\AppData\Roaming\Nulloy"
GenerateM3U -directory $musicDirInfo -destinationPath $destinationPath
}
function sync-music() {
cd E:\Music\
spotdl sync https://music.youtube.com/browse/VLPLg3vjVhK1vnYQWB26nwADGqEf2xHzgSZR --save-file data.spotdl --audio youtube-music --bitrate auto --sponsor-block
cd -
}
sync-music
syncPlaylist
cd C:\Users\master\repos\cutbypham\davinci-resolve
auto-git-commit
cd C:\Users\master\repos\cutbypham\obs-studio\
auto-git-commit
cp $profile ~\repos\cutbypham\dotfiles\
cp C:\Users\master\AppData\Local\nvim\init.lua ~\repos\cutbypham\dotfiles\nvim
cp C:\Users\master\.gitconfig ~\repos\cutbypham\dotfiles\
cp C:\Users\master\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json ~\repos\cutbypham\dotfiles\windows-terminal\
cp C:\Users\master\AppData\Roaming\Mozilla\Firefox\Profiles\3wr0grx7.default-release\user.js ~\repos\cutbypham\dotfiles\
cd C:\Users\master\repos\cutbypham\dotfiles
auto-git-commit