From 2e8dcaf68e4b7e2e61fc188b84be616197bfef68 Mon Sep 17 00:00:00 2001 From: Raincloud Date: Fri, 8 Aug 2025 13:33:08 -0600 Subject: [PATCH] init --- .cursorindexingignore | 3 ++ .specstory/.gitignore | 2 ++ 0MoveToCurrent.bat | 64 +++++++++++++++++++++++++++++++++++++++++++ NewDaily.bat | 19 +++++++++++++ NewProject.bat | 60 ++++++++++++++++++++++++++++++++++++++++ PushAllToCurrent.bat | 48 ++++++++++++++++++++++++++++++++ RebuildDailies.bat | 39 ++++++++++++++++++++++++++ UpdateSequences.bat | 41 +++++++++++++++++++++++++++ 8 files changed, 276 insertions(+) create mode 100644 .cursorindexingignore create mode 100644 .specstory/.gitignore create mode 100644 0MoveToCurrent.bat create mode 100644 NewDaily.bat create mode 100644 NewProject.bat create mode 100644 PushAllToCurrent.bat create mode 100644 RebuildDailies.bat create mode 100644 UpdateSequences.bat diff --git a/.cursorindexingignore b/.cursorindexingignore new file mode 100644 index 0000000..953908e --- /dev/null +++ b/.cursorindexingignore @@ -0,0 +1,3 @@ + +# Don't index SpecStory auto-save files, but allow explicit context inclusion via @ references +.specstory/** diff --git a/.specstory/.gitignore b/.specstory/.gitignore new file mode 100644 index 0000000..53b537f --- /dev/null +++ b/.specstory/.gitignore @@ -0,0 +1,2 @@ +# SpecStory explanation file +/.what-is-this.md diff --git a/0MoveToCurrent.bat b/0MoveToCurrent.bat new file mode 100644 index 0000000..de3c981 --- /dev/null +++ b/0MoveToCurrent.bat @@ -0,0 +1,64 @@ +@echo off +setlocal enabledelayedexpansion + +rem Get current directory +set "srcDir=%CD%" +echo Current directory: %srcDir% + +rem Get parent directory +for %%I in ("%srcDir%\..") do set "parentDir=%%~fI" +echo Parent directory: %parentDir% + +rem Set the _CURRENT directory +set "currentDir=%parentDir%\_CURRENT" +echo Target directory: %currentDir% + +rem Create _CURRENT directory if it doesn't exist +if not exist "%currentDir%" ( + echo Creating _CURRENT directory... + mkdir "%currentDir%" +) + +echo. +echo Looking for files in: %srcDir% +echo. + +set "fileFound=false" +for %%F in ("%srcDir%\*.*") do ( + rem Skip directories and the batch file itself + if not "%%~dpnxF"=="%~f0" if not "%%~aF:~0,1"=="d" ( + set "fileFound=true" + echo Found file: %%~nxF + + if not exist "%currentDir%\%%~nxF" ( + echo [NEW] Copying to _CURRENT... + copy "%%F" "%currentDir%\" + ) else ( + echo [EXISTS] Comparing dates... + for %%A in ("%%F") do set "sourceDate=%%~tA" + for %%B in ("%currentDir%\%%~nxF") do set "targetDate=%%~tB" + + echo Source date: !sourceDate! + echo Target date: !targetDate! + + rem Use PowerShell to properly compare file timestamps + powershell -Command "if ((Get-Item '%%F').LastWriteTime -gt (Get-Item '%currentDir%\%%~nxF').LastWriteTime) { exit 1 } else { exit 0 }" + if !errorlevel! equ 1 ( + echo [UPDATED] Source is newer, copying... + copy "%%F" "%currentDir%\" + ) else ( + echo [SKIP] Target is up to date or newer. + ) + ) + echo. + ) +) + +if "%fileFound%"=="false" ( + echo No files found in %srcDir% to process. + echo Make sure you're running this from the correct directory. +) + +echo. +echo Done! Press any key to exit. +pause > nul diff --git a/NewDaily.bat b/NewDaily.bat new file mode 100644 index 0000000..59334b9 --- /dev/null +++ b/NewDaily.bat @@ -0,0 +1,19 @@ +@echo off +setlocal + +:: Get current date in YYMMDD format +for /f "tokens=2-4 delims=/ " %%a in ('date /t') do ( + set mm=%%a + set dd=%%b + set yy=%%c +) +set yy=%yy:~-2% + +:: Create daily folder +mkdir "daily_%yy%%mm%%dd%" +echo Daily folder created: daily_%yy%%mm%%dd% + +:: Copy A:\1 Amazon_Active_Projects\A:\1 Amazon_Active_Projects\0MoveToCurrent.bat from master .batches folder +copy "A:\1 Amazon_Active_Projects\A:\1 Amazon_Active_Projects\A:\1 Amazon_Active_Projects\0MoveToCurrent.bat" "daily_%yy%%mm%%dd%\A:\1 Amazon_Active_Projects\A:\1 Amazon_Active_Projects\0MoveToCurrent.bat" + +pause diff --git a/NewProject.bat b/NewProject.bat new file mode 100644 index 0000000..e751c74 --- /dev/null +++ b/NewProject.bat @@ -0,0 +1,60 @@ +@echo off +setlocal + +:: Get current date in YYMMDD format +for /f "tokens=2-4 delims=/ " %%a in ('date /t') do ( + set mm=%%a + set dd=%%b + set yy=%%c +) +set yy=%yy:~-2% + +:: Ask for project name +set /p projectName="Enter project name (press Enter for default 'NewProject'): " +if "%projectName%"=="" set projectName=NewProject +set projectRoot=%yy%%mm%%dd%_%projectName% + +:: Create main project directory +mkdir "%projectRoot%" + +:: Create Assets structure +mkdir "%projectRoot%\Assets\ElevenLabs" +mkdir "%projectRoot%\Assets\Blends" +mkdir "%projectRoot%\Assets\VO" + + +:: Create Blends structure +mkdir "%projectRoot%\Blends\animations\_CURRENT" +mkdir "%projectRoot%\Blends\stills\_CURRENT" +mkdir "%projectRoot%\Blends\stills\img-BG" + +:: Create Deliverable structure +mkdir "%projectRoot%\Deliverable\" + +:: Create Mocap structure +mkdir "%projectRoot%\Mocap\1 Recording" +mkdir "%projectRoot%\Mocap\2 Export" + +:: Create Pr structure +mkdir "%projectRoot%\Pr\RnR\RIFE" + +:: Create Reference structure +mkdir "%projectRoot%\Reference\Translation Scripts" +mkdir "%projectRoot%\Reference\VO clips" + +:: Create Translations Google Drive shortcut +echo [InternetShortcut] > "%projectRoot%\Reference\Translation Scripts\Translations Google Drive.url" +echo URL=https://drive.google.com/drive/folders/1lND5207vl-qf5RbTQ2eejeXJCc4r5rUo >> "%projectRoot%\Reference\Translation Scripts\Translations Google Drive.url" + +:: Create Amazon folder shortcut +powershell -Command "$folder='%projectRoot%\Deliverable'; $WS = New-Object -ComObject WScript.Shell; $SC = $WS.CreateShortcut([System.IO.Path]::Combine($folder, 'Amazon - for Elizabeth.lnk')); $SC.TargetPath = 'D:\Amazon - for Elizabeth'; $SC.WorkingDirectory = 'D:\Amazon - for Elizabeth'; $SC.IconLocation = 'shell32.dll,3'; $SC.Save()" + +:: Copy NewDaily.bat to the right folders +copy "NewDaily.bat" "%projectRoot%\Blends\animations\NewDaily.bat" +copy "NewDaily.bat" "%projectRoot%\Blends\stills\NewDaily.bat" +copy "NewDaily.bat" "%projectRoot%\Deliverable\NewDaily.bat" +copy "NewDaily.bat" "%projectRoot%\Assets\ElevenLabs\NewDaily.bat" +copy "NewDaily.bat" "%projectRoot%\Assets\VO\NewDaily.bat" + +echo Project structure created successfully in folder: %projectRoot% +pause diff --git a/PushAllToCurrent.bat b/PushAllToCurrent.bat new file mode 100644 index 0000000..2535326 --- /dev/null +++ b/PushAllToCurrent.bat @@ -0,0 +1,48 @@ +@echo off +setlocal enabledelayedexpansion +echo PushAllToCurrent - Running all 0MoveToCurrent.bat files in daily_ folders... +echo. + +echo Searching for daily_ folders and 0MoveToCurrent.bat files... +echo. + +REM Find all daily_ folders and check for 0MoveToCurrent.bat +set /a count=0 +set /a found=0 + +echo Found the following daily_ folders with 0MoveToCurrent.bat: +for /d %%D in (daily_*) do ( + if exist "%%D\0MoveToCurrent.bat" ( + echo - %%D + set /a found+=1 + ) +) + +if !found!==0 ( + echo No daily_ folders with 0MoveToCurrent.bat found! + pause + exit /b 1 +) + +echo. +echo Found !found! folders with 0MoveToCurrent.bat files. +echo. +echo Starting execution... +echo. + +REM Execute each 0MoveToCurrent.bat found in daily_ folders +for /d %%D in (daily_*) do ( + if exist "%%D\0MoveToCurrent.bat" ( + set /a count+=1 + echo [!count!/!found!] Running 0MoveToCurrent.bat in %%D... + pushd "%%D" + call "0MoveToCurrent.bat" + popd + echo Completed: %%D + echo. + ) +) + +echo. +echo Operation completed. Successfully executed !count! batch files. +pause \ No newline at end of file diff --git a/RebuildDailies.bat b/RebuildDailies.bat new file mode 100644 index 0000000..f3ec307 --- /dev/null +++ b/RebuildDailies.bat @@ -0,0 +1,39 @@ +@echo off +echo RebuildDailies - Copying 0MoveToCurrent.bat to all daily_* folders... +echo. + +REM Check if source file exists +if not exist "A:\1 Amazon_Active_Projects\0MoveToCurrent.bat" ( + echo ERROR: Source file "A:\1 Amazon_Active_Projects\0MoveToCurrent.bat" not found! + pause + exit /b 1 +) + +REM Search for daily_* folders recursively +echo Searching for daily_* folders in all subfolders... +echo. + +REM Show which folders will be updated +echo Found the following daily_* folders: +for /f "delims=" %%D in ('dir /s /b /ad "*daily_*" 2^>nul') do echo - %%D + +echo. +echo Copying 0MoveToCurrent.bat to each folder... +echo. + +REM Copy the file to each daily_* folder found recursively +set /a count=0 +for /f "delims=" %%D in ('dir /s /b /ad "*daily_*" 2^>nul') do ( + echo Copying to %%D... + copy /Y "A:\1 Amazon_Active_Projects\0MoveToCurrent.bat" "%%D\" >nul + if errorlevel 1 ( + echo ERROR: Failed to copy to %%D + ) else ( + echo SUCCESS: Copied to %%D + set /a count+=1 + ) +) + +echo. +echo Operation completed. Successfully copied to %count% folders. +pause \ No newline at end of file diff --git a/UpdateSequences.bat b/UpdateSequences.bat new file mode 100644 index 0000000..4a12c3d --- /dev/null +++ b/UpdateSequences.bat @@ -0,0 +1,41 @@ +@echo off +setlocal EnableExtensions EnableDelayedExpansion + +set "rootDir=%CD%" +set "currentDir=%rootDir%\_CURRENT" +if not exist "%currentDir%" ( + mkdir "%currentDir%" >nul 2>&1 + if not exist "%currentDir%" ( + echo ERROR: Cannot create "%currentDir%" (permission denied?). + echo Run the script with sufficient rights or choose a writable location. + exit /b 1 + ) +) + +set "logFile=%currentDir%\_UpdateSequences.log" +echo [%date% %time%] === UpdateSequences run started in "%rootDir%" ===>> "%logFile%" + +set "processedList=|" + +for /f "delims=" %%D in ('dir /b /ad 2^>nul ^| findstr /R /I /B /E "daily_[0-9][0-9][0-9][0-9][0-9][0-9]" ^| sort /R') do ( + if exist "%%D" ( + for /f "delims=" %%S in ('dir /b /ad "%%D" 2^>nul') do ( + set "notSeen=!processedList:|%%S|=!" + if "!notSeen!"=="!processedList!" ( + echo [%%S] <= %%D + echo [%date% %time%] Sequence: "%%S" from daily: "%%D" >> "%logFile%" + set "src=%%D\%%S" + set "dst=%currentDir%\%%S" + set "srcLong=\\?\%rootDir%\%%D\%%S" + set "dstLong=\\?\%currentDir%\%%S" + robocopy "!srcLong!" "!dstLong!" /MIR /MT:32 /R:1 /W:1 /COPY:DAT /DCOPY:DAT /FFT /NFL /NDL /NP /NJH /NJS >> "%logFile%" 2>&1 + set "processedList=!processedList!%%S|" + ) + ) + ) +) + +echo Done. Press any key to exit. +echo [%date% %time%] === UpdateSequences run completed ===>> "%logFile%" +pause >nul +exit /b 0 \ No newline at end of file