mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-04-16 23:08:38 +02:00
refactor: move modules under app/ directory and update file paths (#3938)
# Description of Changes - **What was changed:** - Renamed top-level directories: `stirling-pdf` → `app/core`, `common` → `app/common`, `proprietary` → `app/proprietary`. - Updated all path references in `.gitattributes`, GitHub workflows (`.github/workflows/*`), scripts (`.github/scripts/*`), `.gitignore`, Dockerfiles, license files, and template settings to reflect the new structure. - Added a new CI job `check-generateOpenApiDocs` to generate and upload OpenAPI documentation. - Removed redundant `@Autowired` annotations from `TempFileShutdownHook` and `UnlockPDFFormsController`. - Minor formatting and comment adjustments in YAML templates and resource files. - **Why the change was made:** - To introduce a clear `app/` directory hierarchy for core, common, and proprietary modules, improving organization and maintainability. - To ensure continuous integration and Docker builds continue to work seamlessly with the reorganized structure. - To automate OpenAPI documentation generation as part of the CI pipeline. --- ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing) for more details.
This commit is contained in:
@@ -9,7 +9,7 @@ import java.util.*;
|
||||
public class PropSync {
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
File folder = new File("C:\\Users\\systo\\git\\Stirling-PDF\\src\\main\\resources");
|
||||
File folder = new File("C:\\Users\\systo\\git\\Stirling-PDF\\app\\core\\src\\main\\resources");
|
||||
File[] files = folder.listFiles((dir, name) -> name.matches("messages_.*\\.properties"));
|
||||
|
||||
List<String> enLines = Files.readAllLines(Paths.get(folder + "\\messages_en_GB.properties"), StandardCharsets.UTF_8);
|
||||
|
||||
@@ -207,7 +207,7 @@ def compare_files(
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
directory = os.path.join(os.getcwd(), "stirling-pdf", "src", "main", "resources")
|
||||
directory = os.path.join(os.getcwd(), "app", "core", "src", "main", "resources")
|
||||
messages_file_paths = glob.glob(os.path.join(directory, "messages_*.properties"))
|
||||
reference_file = os.path.join(directory, "messages_en_GB.properties")
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ if [[ "$INSTALL_BOOK_AND_ADVANCED_HTML_OPS" == "true" && "$FAT_DOCKER" != "true"
|
||||
fi
|
||||
|
||||
if [[ "$FAT_DOCKER" != "true" ]]; then
|
||||
/scripts/download-security-jar.sh
|
||||
/scripts/download-security-jar.sh
|
||||
fi
|
||||
|
||||
if [[ -n "$LANGS" ]]; then
|
||||
|
||||
@@ -33,4 +33,4 @@ mkdir -p /tmp/stirling-pdf || true
|
||||
chown -R stirlingpdfuser:stirlingpdfgroup /tmp/stirling-pdf || true
|
||||
chmod -R 755 /tmp/stirling-pdf || true
|
||||
|
||||
/scripts/init-without-ocr.sh "$@"
|
||||
/scripts/init-without-ocr.sh "$@"
|
||||
|
||||
@@ -8,7 +8,7 @@ fi
|
||||
|
||||
key_to_remove="$1"
|
||||
|
||||
for file in ../src/main/resources/messages_*.properties; do
|
||||
for file in ../app/core/src/main/resources/messages_*.properties; do
|
||||
# If the key ends with a dot, remove all keys starting with it
|
||||
if [[ "$key_to_remove" == *. ]]; then
|
||||
sed -i "/^${key_to_remove//./\\.}/d" "$file"
|
||||
@@ -17,4 +17,4 @@ for file in ../src/main/resources/messages_*.properties; do
|
||||
sed -i "/^${key_to_remove//./\\.}=/d" "$file"
|
||||
fi
|
||||
echo "Updated $file"
|
||||
done
|
||||
done
|
||||
|
||||
@@ -4,7 +4,7 @@ translation_key="pdfToPDFA.credit"
|
||||
old_value="qpdf"
|
||||
new_value="liibreoffice"
|
||||
|
||||
for file in ../src/main/resources/messages_*.properties; do
|
||||
for file in ../app/core/src/main/resources/messages_*.properties; do
|
||||
sed -i "/^$translation_key=/s/$old_value/$new_value/" "$file"
|
||||
echo "Updated $file"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user