With a little bit of OOP and a monster commit, I too can make a an ssg, Ka-chow... Changes: - ➕ added class to represent SiteFile - ➕ enabled conversion semi-automatic based on file type. - ➕ added template to Testing. - ➖ Removed awful code for dependency search - ➖ Removed awful code for enumerating directory - ➕ arguments to a class to allow for easier passing to other parts of the code. TODO: - 🐞Test and debug with a copy of a live site, - ✍️ Add handling for Pandoc errors on stderr - ❓Look into parallelising as much as possible.
30 lines
841 B
C#
30 lines
841 B
C#
namespace csSiteGen;
|
|
|
|
|
|
/// <summary>
|
|
/// Class <c>RuntimeSettings</p> Contains all the settings that could be loaded from the commandline.
|
|
/// </summary>
|
|
public class RuntimeSettings {
|
|
public DirectoryInfo InputDirectory {get; private set;}
|
|
public DirectoryInfo OutputDirectory {get; private set;}
|
|
|
|
|
|
public RuntimeSettings(string inputDirectory, string outputDirectory){
|
|
InputDirectory = new DirectoryInfo(inputDirectory);
|
|
OutputDirectory = new DirectoryInfo(outputDirectory);
|
|
|
|
/* NOTE: it is the responisbility of the UI code to check the values passed are good.
|
|
*/
|
|
}
|
|
|
|
|
|
public RuntimeSettings(DirectoryInfo inputDirectory, DirectoryInfo outputDirectory){
|
|
InputDirectory = inputDirectory;
|
|
OutputDirectory = outputDirectory;
|
|
|
|
/* NOTE: it is the responisbility of the UI code to check the values passed are good.
|
|
*/
|
|
}
|
|
|
|
}
|