Skip to content

Commit

Permalink
Import screenplays from PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
iljukhaput committed Aug 29, 2024
1 parent 6f4ea39 commit cec0764
Show file tree
Hide file tree
Showing 8 changed files with 583 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/3rd_party/pdfhummus
3 changes: 3 additions & 0 deletions src/core/management_layer/content/import/import_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <business_layer/import/screenplay/screenplay_fountain_importer.h>
#include <business_layer/import/screenplay/screenplay_import_options.h>
#include <business_layer/import/screenplay/screenplay_kit_scenarist_importer.h>
#include <business_layer/import/screenplay/screenplay_pdf_importer.h>
#include <business_layer/import/screenplay/screenplay_trelby_importer.h>
#include <business_layer/import/stageplay/stageplay_fountain_importer.h>
#include <data_layer/storage/settings_storage.h>
Expand Down Expand Up @@ -231,6 +232,8 @@ void ImportManager::Implementation::importScreenplay(
} else if (importFilePath.endsWith(ExtensionHelper::fountain())
|| importFilePath.endsWith(ExtensionHelper::plainText())) {
importer.reset(new BusinessLayer::ScreenplayFountainImporter);
} else if (importFilePath.endsWith(ExtensionHelper::pdf())) {
importer.reset(new BusinessLayer::ScreenplayPdfImporter);
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/core/ui/import/import_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ void ImportDialog::updateTranslations()
//
if (fileIs(ExtensionHelper::msOfficeOpenXml()) || fileIs(ExtensionHelper::openDocumentXml())) {
d->setImportDocumentTypes({ screenplay });
} else if (fileIs(ExtensionHelper::pdf())) {
d->setImportDocumentTypes({ screenplay });
}
//
// Текстовые форматы
Expand Down
Loading

0 comments on commit cec0764

Please sign in to comment.