diff --git a/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/CardDocumentFormat.cs b/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/CardDocumentFormat.cs index 490852be..e983272d 100644 --- a/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/CardDocumentFormat.cs +++ b/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/CardDocumentFormat.cs @@ -4,6 +4,7 @@ public enum CardDocumentFormat { AlternateFaceAndBack, BackFirstOneDocPerBack, - PrintAndPlay - } + PrintAndPlay, + FacesOnly + } } \ No newline at end of file diff --git a/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/Cardpen/CardSetDocumentConfig.cs b/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/Cardpen/CardSetDocumentConfig.cs index 9ee02187..3b379832 100644 --- a/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/Cardpen/CardSetDocumentConfig.cs +++ b/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/Cardpen/CardSetDocumentConfig.cs @@ -22,7 +22,6 @@ public class CardSetDocumentConfig: DocumentConfig public string PageSize { get; set; } = "A4"; public string Header { get; set; } = ""; - - - + public int Padding { get; set; } + public int NbColumns { get; internal set; } } \ No newline at end of file diff --git a/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/Cardpen/HarvestManager.cs b/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/Cardpen/HarvestManager.cs index fc2fb274..e7a867e8 100644 --- a/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/Cardpen/HarvestManager.cs +++ b/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/Cardpen/HarvestManager.cs @@ -77,12 +77,12 @@ public IBrowser Browser var funcBrowser = () => Browser; - var parallelOptionsCardset = new ParallelOptions { MaxDegreeOfParallelism = Config.MaxDegreeOfParallelismCardpen }; + var parallelOptionsCardset = new ParallelOptions { MaxDegreeOfParallelism = Config.EnableParallelism? Config.MaxDegreeOfParallelismCardpen : 1 }; await Parallel.ForEachAsync(targetCardSets, parallelOptionsCardset, async (configCardSet, token) => { var targetLanguages = AssetConverterConfig.LocalizationConfig.BuildLanguageList(configCardSet.Translations); - var parallelOptionsCardsetLanguage = new ParallelOptions { MaxDegreeOfParallelism = Config.MaxDegreeOfParallelismCardpenTranslations }; + var parallelOptionsCardsetLanguage = new ParallelOptions { MaxDegreeOfParallelism = Config.EnableParallelism? Config.MaxDegreeOfParallelismCardpenTranslations : 1 }; await Parallel.ForEachAsync(targetLanguages, parallelOptionsCardsetLanguage, async (currentLanguage, newToken) => { await ProcessLocalizedHarvest(configCardSet, currentLanguage, harvestDictionary, funcBrowser); diff --git a/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/ImageFileGenerator.cs b/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/ImageFileGenerator.cs index a024a545..44989d05 100644 --- a/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/ImageFileGenerator.cs +++ b/Generation/Converters/Argumentum.AssetConverter/WebBasedGenerator/ImageFileGenerator.cs @@ -30,7 +30,7 @@ public class ImageFileGenerator Logger.LogExplanations("In its second stage, Argumentum creates individual image files from the harvested collections. Images are processed with Magick.Net according to configuration parameters. This is the more taxing stage, the degree of parallelism of which can also be configured."); var toReturn = new ConcurrentDictionary<(CardSetDocumentConfig document, string language), List>(); - var parallelOptionsDocuments = new ParallelOptions { MaxDegreeOfParallelism = Config.MaxDegreeOfParallelismImages }; + var parallelOptionsDocuments = new ParallelOptions { MaxDegreeOfParallelism = Config.EnableParallelism? Config.MaxDegreeOfParallelismImages : 1 }; Parallel.ForEach(Config.CardSetDocuments.Where(d => d.Enabled), parallelOptionsDocuments, configDocument => //foreach (var configDocument in Config.Documents.Where(d => d.Enabled)) @@ -41,7 +41,7 @@ public class ImageFileGenerator { targetLanguages.AddRange(configDocument.Translations.Select(t => t.targetLanguage)); } - var parallelOptionsDocumentsTranslations = new ParallelOptions { MaxDegreeOfParallelism = Config.MaxDegreeOfParallelismImageTranslations }; + var parallelOptionsDocumentsTranslations = new ParallelOptions { MaxDegreeOfParallelism = Config.EnableParallelism ? Config.MaxDegreeOfParallelismImageTranslations : 1 }; Parallel.ForEach(targetLanguages, parallelOptionsDocumentsTranslations, currentLanguage => //foreach (var currentLanguage in targetLanguages) {