-
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.
- Loading branch information
Showing
4 changed files
with
159 additions
and
11 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
add_executable(${PROJECT_NAME}Test "test.cpp") | ||
|
||
target_include_directories(${PROJECT_NAME}Test PRIVATE ${VapourSynthSDK}/include ${PROJECT_SOURCE_DIR}/csv-parser/include) | ||
target_link_libraries(${PROJECT_NAME}Test csv) | ||
|
||
set_property(TARGET ${PROJECT_NAME}Test PROPERTY CXX_STANDARD 20) |
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,35 @@ | ||
#include <iostream> | ||
#include <memory> | ||
#include <set> | ||
#include <map> | ||
#include <string> | ||
#include <filesystem> | ||
#include "csv.hpp" | ||
|
||
void tlog(unsigned first, unsigned second) { | ||
std::cout << first << '\t' << second << '\n'; | ||
} | ||
|
||
int main() { | ||
const std::string scfile{R"(C:\Users\jilig\Downloads\Suzume.2022.1080p.WEB.Rip.5.1.YTS.M.X\Suzume.2022.1080p.WEBRip.x264.AAC5.1-YTS.MX.origin-Scenes-contant.csv)"}; | ||
std::filesystem::path scfilepath{scfile}; | ||
const std::filesystem::directory_entry scfileEntry{scfilepath}; | ||
|
||
csv::CSVReader reader(scfilepath.generic_string()); | ||
|
||
for (csv::CSVRow& row : reader) { | ||
unsigned target{ row["End Frame"].get<unsigned>() - 1 }; | ||
if (target % 2 == 0) { | ||
unsigned _target{ static_cast<unsigned>(target * 2.5f) }; | ||
tlog(_target, target); | ||
tlog(_target + 1, target); | ||
tlog(_target + 2, target + 1); | ||
} | ||
else { | ||
unsigned _target{ static_cast<unsigned>((target + 1) * 2.5f) }; | ||
tlog(_target, target + 1); | ||
tlog(_target - 1, target + 1); | ||
tlog(_target - 2, target); | ||
} | ||
} | ||
} |