feat: add application draft saving modes and reminder grouping
This commit is contained in:
@@ -1223,6 +1223,7 @@ namespace JobTrackerApi.Controllers
|
||||
string? RecruiterMessageDraft);
|
||||
public sealed record SaveTailoredCvRequest(string? TailoredCvText);
|
||||
public sealed record GenerateApplicationPackageDto(string TailoredCvText, string? CoverLetterDraft, string? ApplicationAnswerDraft, string? RecruiterMessageDraft, List<string> KeyPoints);
|
||||
public sealed record SaveApplicationDraftsRequest(string? CoverLetterText, string? Notes);
|
||||
public sealed record InterviewPrepDto(string Summary, List<string> TalkingPoints, List<string> LikelyQuestions, List<string> WeakSpots);
|
||||
public sealed record ReadinessDto(int Score, string Level, List<string> Completed, List<string> Missing, List<string> Reminders);
|
||||
|
||||
|
||||
@@ -76,7 +76,13 @@ public sealed class ProfileCvController : ControllerBase
|
||||
if (string.Equals(extension, ".pdf", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var raw = Encoding.UTF8.GetString(bytes);
|
||||
var scrubbed = Regex.Replace(raw, @"[\x00-\x08\x0B\x0C\x0E-\x1F]", " ");
|
||||
var textMatches = Regex.Matches(raw, @"\((.*?)\)Tj", RegexOptions.Singleline)
|
||||
.Select(match => match.Groups[1].Value)
|
||||
.Where(value => !string.IsNullOrWhiteSpace(value))
|
||||
.ToList();
|
||||
|
||||
var joined = textMatches.Count > 0 ? string.Join(" ", textMatches) : raw;
|
||||
var scrubbed = Regex.Replace(joined, @"[\x00-\x08\x0B\x0C\x0E-\x1F]", " ");
|
||||
return Regex.Replace(scrubbed, @"\s+", " ").Trim();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user