mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-08 17:51:20 +02:00
more rename
This commit is contained in:
parent
bbbd7a0682
commit
8ed82557df
14
.gitattributes
vendored
14
.gitattributes
vendored
@ -1,10 +1,10 @@
|
|||||||
* text=auto eol=lf
|
* text=auto eol=lf
|
||||||
|
|
||||||
# Ignore all JavaScript files in a directory
|
# Ignore all JavaScript files in a directory
|
||||||
stirling-pdf/src/main/resources/static/pdfjs/* linguist-vendored
|
core/src/main/resources/static/pdfjs/* linguist-vendored
|
||||||
stirling-pdf/src/main/resources/static/pdfjs/** linguist-vendored
|
core/src/main/resources/static/pdfjs/** linguist-vendored
|
||||||
stirling-pdf/src/main/resources/static/pdfjs-legacy/* linguist-vendored
|
core/src/main/resources/static/pdfjs-legacy/* linguist-vendored
|
||||||
stirling-pdf/src/main/resources/static/pdfjs-legacy/** linguist-vendored
|
core/src/main/resources/static/pdfjs-legacy/** linguist-vendored
|
||||||
stirling-pdf/src/main/resources/static/css/bootstrap-icons.css linguist-vendored
|
core/src/main/resources/static/css/bootstrap-icons.css linguist-vendored
|
||||||
stirling-pdf/src/main/resources/static/css/bootstrap.min.css linguist-vendored
|
core/src/main/resources/static/css/bootstrap.min.css linguist-vendored
|
||||||
stirling-pdf/src/main/resources/static/css/fonts/* linguist-vendored
|
core/src/main/resources/static/css/fonts/* linguist-vendored
|
||||||
|
36
.github/labeler-config-srvaroa.yml
vendored
36
.github/labeler-config-srvaroa.yml
vendored
@ -36,34 +36,34 @@ labels:
|
|||||||
|
|
||||||
- label: 'Translation'
|
- label: 'Translation'
|
||||||
files:
|
files:
|
||||||
- 'stirling-pdf/src/main/resources/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}.properties'
|
- 'core/src/main/resources/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}.properties'
|
||||||
- 'scripts/ignore_translation.toml'
|
- 'scripts/ignore_translation.toml'
|
||||||
- 'stirling-pdf/src/main/resources/templates/fragments/languages.html'
|
- 'core/src/main/resources/templates/fragments/languages.html'
|
||||||
- '.github/scripts/check_language_properties.py'
|
- '.github/scripts/check_language_properties.py'
|
||||||
|
|
||||||
- label: 'Front End'
|
- label: 'Front End'
|
||||||
files:
|
files:
|
||||||
- 'stirling-pdf/src/main/resources/templates/.*'
|
- 'core/src/main/resources/templates/.*'
|
||||||
- 'proprietary/src/main/resources/templates/.*'
|
- 'proprietary/src/main/resources/templates/.*'
|
||||||
- 'stirling-pdf/src/main/resources/static/.*'
|
- 'core/src/main/resources/static/.*'
|
||||||
- 'proprietary/src/main/resources/static/.*'
|
- 'proprietary/src/main/resources/static/.*'
|
||||||
- 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/web/.*'
|
- 'core/src/main/java/stirling/software/SPDF/controller/web/.*'
|
||||||
- 'stirling-pdf/src/main/java/stirling/software/SPDF/UI/.*'
|
- 'core/src/main/java/stirling/software/SPDF/UI/.*'
|
||||||
- 'proprietary/src/main/java/stirling/software/proprietary/security/controller/web/.*'
|
- 'proprietary/src/main/java/stirling/software/proprietary/security/controller/web/.*'
|
||||||
|
|
||||||
- label: 'Java'
|
- label: 'Java'
|
||||||
files:
|
files:
|
||||||
- 'common/src/main/java/.*.java'
|
- 'common/src/main/java/.*.java'
|
||||||
- 'proprietary/src/main/java/.*.java'
|
- 'proprietary/src/main/java/.*.java'
|
||||||
- 'stirling-pdf/src/main/java/.*.java'
|
- 'core/src/main/java/.*.java'
|
||||||
|
|
||||||
- label: 'Back End'
|
- label: 'Back End'
|
||||||
files:
|
files:
|
||||||
- 'stirling-pdf/src/main/java/stirling/software/SPDF/config/.*'
|
- 'core/src/main/java/stirling/software/SPDF/config/.*'
|
||||||
- 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/.*'
|
- 'core/src/main/java/stirling/software/SPDF/controller/.*'
|
||||||
- 'stirling-pdf/src/main/resources/settings.yml.template'
|
- 'core/src/main/resources/settings.yml.template'
|
||||||
- 'stirling-pdf/src/main/resources/application.properties'
|
- 'core/src/main/resources/application.properties'
|
||||||
- 'stirling-pdf/src/main/resources/banner.txt'
|
- 'core/src/main/resources/banner.txt'
|
||||||
- 'scripts/png_to_webp.py'
|
- 'scripts/png_to_webp.py'
|
||||||
- 'split_photos.py'
|
- 'split_photos.py'
|
||||||
- 'application.properties'
|
- 'application.properties'
|
||||||
@ -77,10 +77,10 @@ labels:
|
|||||||
|
|
||||||
- label: 'API'
|
- label: 'API'
|
||||||
files:
|
files:
|
||||||
- 'stirling-pdf/src/main/java/stirling/software/SPDF/config/OpenApiConfig.java'
|
- 'core/src/main/java/stirling/software/SPDF/config/OpenApiConfig.java'
|
||||||
- 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/web/MetricsController.java'
|
- 'core/src/main/java/stirling/software/SPDF/controller/web/MetricsController.java'
|
||||||
- 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/api/.*'
|
- 'core/src/main/java/stirling/software/SPDF/controller/api/.*'
|
||||||
- 'stirling-pdf/src/main/java/stirling/software/SPDF/model/api/.*'
|
- 'core/src/main/java/stirling/software/SPDF/model/api/.*'
|
||||||
- 'proprietary/src/main/java/stirling/software/proprietary/security/controller/api/.*'
|
- 'proprietary/src/main/java/stirling/software/proprietary/security/controller/api/.*'
|
||||||
- 'scripts/png_to_webp.py'
|
- 'scripts/png_to_webp.py'
|
||||||
- 'split_photos.py'
|
- 'split_photos.py'
|
||||||
@ -121,7 +121,7 @@ labels:
|
|||||||
files:
|
files:
|
||||||
- 'common/src/test/.*'
|
- 'common/src/test/.*'
|
||||||
- 'proprietary/src/test/.*'
|
- 'proprietary/src/test/.*'
|
||||||
- 'stirling-pdf/src/test/.*'
|
- 'core/src/test/.*'
|
||||||
- 'testing/.*'
|
- 'testing/.*'
|
||||||
- '.github/workflows/scorecards.yml'
|
- '.github/workflows/scorecards.yml'
|
||||||
- 'exampleYmlFiles/test_cicd.yml'
|
- 'exampleYmlFiles/test_cicd.yml'
|
||||||
@ -139,4 +139,4 @@ labels:
|
|||||||
- 'build.gradle'
|
- 'build.gradle'
|
||||||
- 'common/build.gradle'
|
- 'common/build.gradle'
|
||||||
- 'proprietary/build.gradle'
|
- 'proprietary/build.gradle'
|
||||||
- 'stirling-pdf/build.gradle'
|
- 'core/build.gradle'
|
||||||
|
8
.github/scripts/check_language_properties.py
vendored
8
.github/scripts/check_language_properties.py
vendored
@ -197,7 +197,7 @@ def check_for_differences(reference_file, file_list, branch, actor):
|
|||||||
if len(file_list) == 1:
|
if len(file_list) == 1:
|
||||||
file_arr = file_list[0].split()
|
file_arr = file_list[0].split()
|
||||||
base_dir = os.path.abspath(
|
base_dir = os.path.abspath(
|
||||||
os.path.join(os.getcwd(), "stirling-pdf", "src", "main", "resources")
|
os.path.join(os.getcwd(), "core", "src", "main", "resources")
|
||||||
)
|
)
|
||||||
|
|
||||||
for file_path in file_arr:
|
for file_path in file_arr:
|
||||||
@ -219,13 +219,13 @@ def check_for_differences(reference_file, file_list, branch, actor):
|
|||||||
# only local windows command
|
# only local windows command
|
||||||
not file_normpath.startswith(
|
not file_normpath.startswith(
|
||||||
os.path.join(
|
os.path.join(
|
||||||
"", "stirling-pdf", "src", "main", "resources", "messages_"
|
"", "core", "src", "main", "resources", "messages_"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
and not file_normpath.startswith(
|
and not file_normpath.startswith(
|
||||||
os.path.join(
|
os.path.join(
|
||||||
os.getcwd(),
|
os.getcwd(),
|
||||||
"stirling-pdf",
|
"core",
|
||||||
"src",
|
"src",
|
||||||
"main",
|
"main",
|
||||||
"resources",
|
"resources",
|
||||||
@ -389,7 +389,7 @@ if __name__ == "__main__":
|
|||||||
file_list = glob.glob(
|
file_list = glob.glob(
|
||||||
os.path.join(
|
os.path.join(
|
||||||
os.getcwd(),
|
os.getcwd(),
|
||||||
"stirling-pdf",
|
"core",
|
||||||
"src",
|
"src",
|
||||||
"main",
|
"main",
|
||||||
"resources",
|
"resources",
|
||||||
|
12
.github/workflows/check_properties.yml
vendored
12
.github/workflows/check_properties.yml
vendored
@ -4,7 +4,7 @@ on:
|
|||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
paths:
|
paths:
|
||||||
- "stirling-pdf/src/main/resources/messages_*.properties"
|
- "core/src/main/resources/messages_*.properties"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read # Allow read access to repository content
|
contents: read # Allow read access to repository content
|
||||||
@ -67,7 +67,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Get changed files and filter for properties files, handle case where no matches are found
|
# Get changed files and filter for properties files, handle case where no matches are found
|
||||||
gh pr view ${{ steps.get-pr-data.outputs.pr_number }} --json files -q ".files[].path" | grep -E '^stirling-pdf/src/main/resources/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}\.properties$' > changed_files.txt || echo "No matching properties files found in PR"
|
gh pr view ${{ steps.get-pr-data.outputs.pr_number }} --json files -q ".files[].path" | grep -E '^core/src/main/resources/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}\.properties$' > changed_files.txt || echo "No matching properties files found in PR"
|
||||||
# Check if any files were found
|
# Check if any files were found
|
||||||
if [ ! -s changed_files.txt ]; then
|
if [ ! -s changed_files.txt ]; then
|
||||||
echo "No properties files changed in this PR"
|
echo "No properties files changed in this PR"
|
||||||
@ -117,7 +117,7 @@ jobs:
|
|||||||
const changedFiles = files
|
const changedFiles = files
|
||||||
.filter(file =>
|
.filter(file =>
|
||||||
file.status !== "removed" &&
|
file.status !== "removed" &&
|
||||||
/^stirling-pdf\/src\/main\/resources\/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}\.properties$/.test(file.filename)
|
/^core\/src\/main\/resources\/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}\.properties$/.test(file.filename)
|
||||||
)
|
)
|
||||||
.map(file => file.filename);
|
.map(file => file.filename);
|
||||||
|
|
||||||
@ -157,12 +157,12 @@ jobs:
|
|||||||
|
|
||||||
// Determine reference file
|
// Determine reference file
|
||||||
let referenceFilePath;
|
let referenceFilePath;
|
||||||
if (changedFiles.includes("stirling-pdf/src/main/resources/messages_en_GB.properties")) {
|
if (changedFiles.includes("core/src/main/resources/messages_en_GB.properties")) {
|
||||||
console.log("Using PR branch reference file.");
|
console.log("Using PR branch reference file.");
|
||||||
const { data: fileContent } = await github.rest.repos.getContent({
|
const { data: fileContent } = await github.rest.repos.getContent({
|
||||||
owner: prRepoOwner,
|
owner: prRepoOwner,
|
||||||
repo: prRepoName,
|
repo: prRepoName,
|
||||||
path: "stirling-pdf/src/main/resources/messages_en_GB.properties",
|
path: "core/src/main/resources/messages_en_GB.properties",
|
||||||
ref: branch,
|
ref: branch,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ jobs:
|
|||||||
const { data: fileContent } = await github.rest.repos.getContent({
|
const { data: fileContent } = await github.rest.repos.getContent({
|
||||||
owner: repoOwner,
|
owner: repoOwner,
|
||||||
repo: repoName,
|
repo: repoName,
|
||||||
path: "stirling-pdf/src/main/resources/messages_en_GB.properties",
|
path: "core/src/main/resources/messages_en_GB.properties",
|
||||||
ref: "main",
|
ref: "main",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
4
.github/workflows/licenses-update.yml
vendored
4
.github/workflows/licenses-update.yml
vendored
@ -57,11 +57,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Move and rename license file
|
- name: Move and rename license file
|
||||||
run: |
|
run: |
|
||||||
mv build/reports/dependency-license/index.json stirling-pdf/src/main/resources/static/3rdPartyLicenses.json
|
mv build/reports/dependency-license/index.json core/src/main/resources/static/3rdPartyLicenses.json
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
run: |
|
run: |
|
||||||
git add stirling-pdf/src/main/resources/static/3rdPartyLicenses.json
|
git add core/src/main/resources/static/3rdPartyLicenses.json
|
||||||
git diff --staged --quiet || echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
|
git diff --staged --quiet || echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
|
2
.github/workflows/multiOSReleases.yml
vendored
2
.github/workflows/multiOSReleases.yml
vendored
@ -86,7 +86,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir ./binaries
|
mkdir ./binaries
|
||||||
mv ./build/launch4j/Stirling-PDF.exe ./binaries/win-Stirling-PDF-portable-Server${{ matrix.file_suffix }}.exe
|
mv ./build/launch4j/Stirling-PDF.exe ./binaries/win-Stirling-PDF-portable-Server${{ matrix.file_suffix }}.exe
|
||||||
mv ./stirling-pdf/build/libs/stirling-pdf-${{ needs.read_versions.outputs.version }}.jar ./binaries/Stirling-PDF${{ matrix.file_suffix }}.jar
|
mv ./core/build/libs/stirling-pdf-${{ needs.read_versions.outputs.version }}.jar ./binaries/Stirling-PDF${{ matrix.file_suffix }}.jar
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
18
Dockerfile
18
Dockerfile
@ -4,8 +4,8 @@ FROM alpine:3.22.0@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be02
|
|||||||
# Copy necessary files
|
# Copy necessary files
|
||||||
COPY scripts /scripts
|
COPY scripts /scripts
|
||||||
COPY pipeline /pipeline
|
COPY pipeline /pipeline
|
||||||
COPY stirling-pdf/src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/
|
COPY core/src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/
|
||||||
COPY stirling-pdf/build/libs/*.jar app.jar
|
COPY core/build/libs/*.jar app.jar
|
||||||
|
|
||||||
ARG VERSION_TAG
|
ARG VERSION_TAG
|
||||||
|
|
||||||
@ -34,10 +34,10 @@ ENV DISABLE_ADDITIONAL_FEATURES=true \
|
|||||||
UNO_PATH=/usr/lib/libreoffice/program \
|
UNO_PATH=/usr/lib/libreoffice/program \
|
||||||
URE_BOOTSTRAP=file:///usr/lib/libreoffice/program/fundamentalrc \
|
URE_BOOTSTRAP=file:///usr/lib/libreoffice/program/fundamentalrc \
|
||||||
PATH=$PATH:/opt/venv/bin \
|
PATH=$PATH:/opt/venv/bin \
|
||||||
STIRLING_TEMPFILES_DIRECTORY=/tmp/stirling-pdf \
|
STIRLING_TEMPFILES_DIRECTORY=/tmp/core \
|
||||||
TMPDIR=/tmp/stirling-pdf \
|
TMPDIR=/tmp/core \
|
||||||
TEMP=/tmp/stirling-pdf \
|
TEMP=/tmp/core \
|
||||||
TMP=/tmp/stirling-pdf
|
TMP=/tmp/core
|
||||||
|
|
||||||
|
|
||||||
# JDK for app
|
# JDK for app
|
||||||
@ -85,7 +85,7 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a
|
|||||||
ln -s /usr/lib/libreoffice/program/unohelper.py /opt/venv/lib/python3.12/site-packages/ && \
|
ln -s /usr/lib/libreoffice/program/unohelper.py /opt/venv/lib/python3.12/site-packages/ && \
|
||||||
ln -s /usr/lib/libreoffice/program /opt/venv/lib/python3.12/site-packages/LibreOffice && \
|
ln -s /usr/lib/libreoffice/program /opt/venv/lib/python3.12/site-packages/LibreOffice && \
|
||||||
mv /usr/share/tessdata /usr/share/tessdata-original && \
|
mv /usr/share/tessdata /usr/share/tessdata-original && \
|
||||||
mkdir -p $HOME /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders /tmp/stirling-pdf && \
|
mkdir -p $HOME /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders /tmp/core && \
|
||||||
# Configure URW Base 35 fonts
|
# Configure URW Base 35 fonts
|
||||||
ln -s /usr/share/fontconfig/conf.avail/69-urw-*.conf /etc/fonts/conf.d/ && \
|
ln -s /usr/share/fontconfig/conf.avail/69-urw-*.conf /etc/fonts/conf.d/ && \
|
||||||
fc-cache -f -v && \
|
fc-cache -f -v && \
|
||||||
@ -93,11 +93,11 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a
|
|||||||
chmod +x /scripts/init.sh && \
|
chmod +x /scripts/init.sh && \
|
||||||
# User permissions
|
# User permissions
|
||||||
addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \
|
addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \
|
||||||
chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/stirling-pdf && \
|
chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/core && \
|
||||||
chown stirlingpdfuser:stirlingpdfgroup /app.jar
|
chown stirlingpdfuser:stirlingpdfgroup /app.jar
|
||||||
|
|
||||||
EXPOSE 8080/tcp
|
EXPOSE 8080/tcp
|
||||||
|
|
||||||
# Set user and run command
|
# Set user and run command
|
||||||
ENTRYPOINT ["tini", "--", "/scripts/init.sh"]
|
ENTRYPOINT ["tini", "--", "/scripts/init.sh"]
|
||||||
CMD ["sh", "-c", "java -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/tmp/stirling-pdf -jar /app.jar & /opt/venv/bin/unoserver --port 2003 --interface 127.0.0.1"]
|
CMD ["sh", "-c", "java -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/tmp/core -jar /app.jar & /opt/venv/bin/unoserver --port 2003 --interface 127.0.0.1"]
|
||||||
|
@ -28,10 +28,10 @@ RUN apt-get update && apt-get install -y \
|
|||||||
|
|
||||||
# Setze die Environment Variable für setuptools
|
# Setze die Environment Variable für setuptools
|
||||||
ENV SETUPTOOLS_USE_DISTUTILS=local \
|
ENV SETUPTOOLS_USE_DISTUTILS=local \
|
||||||
STIRLING_TEMPFILES_DIRECTORY=/tmp/stirling-pdf \
|
STIRLING_TEMPFILES_DIRECTORY=/tmp/core \
|
||||||
TMPDIR=/tmp/stirling-pdf \
|
TMPDIR=/tmp/core \
|
||||||
TEMP=/tmp/stirling-pdf \
|
TEMP=/tmp/core \
|
||||||
TMP=/tmp/stirling-pdf
|
TMP=/tmp/core
|
||||||
|
|
||||||
# Installation der benötigten Python-Pakete
|
# Installation der benötigten Python-Pakete
|
||||||
RUN python3 -m venv --system-site-packages /opt/venv \
|
RUN python3 -m venv --system-site-packages /opt/venv \
|
||||||
@ -44,10 +44,10 @@ ENV PATH="/opt/venv/bin:$PATH"
|
|||||||
|
|
||||||
COPY . /workspace
|
COPY . /workspace
|
||||||
|
|
||||||
RUN mkdir -p /tmp/stirling-pdf \
|
RUN mkdir -p /tmp/core \
|
||||||
&& fc-cache -f -v \
|
&& fc-cache -f -v \
|
||||||
&& adduser --disabled-password --gecos '' devuser \
|
&& adduser --disabled-password --gecos '' devuser \
|
||||||
&& chown -R devuser:devuser /home/devuser /workspace /tmp/stirling-pdf
|
&& chown -R devuser:devuser /home/devuser /workspace /tmp/core
|
||||||
RUN echo "devuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/devuser \
|
RUN echo "devuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/devuser \
|
||||||
&& chmod 0440 /etc/sudoers.d/devuser
|
&& chmod 0440 /etc/sudoers.d/devuser
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ COPY build.gradle .
|
|||||||
COPY settings.gradle .
|
COPY settings.gradle .
|
||||||
COPY gradlew .
|
COPY gradlew .
|
||||||
COPY gradle gradle/
|
COPY gradle gradle/
|
||||||
COPY stirling-pdf/build.gradle stirling-pdf/.
|
COPY core/build.gradle core/.
|
||||||
COPY common/build.gradle common/.
|
COPY common/build.gradle common/.
|
||||||
COPY proprietary/build.gradle proprietary/.
|
COPY proprietary/build.gradle proprietary/.
|
||||||
RUN ./gradlew build -x spotlessApply -x spotlessCheck -x test -x sonarqube || return 0
|
RUN ./gradlew build -x spotlessApply -x spotlessCheck -x test -x sonarqube || return 0
|
||||||
@ -27,8 +27,8 @@ FROM alpine:3.22.0@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be02
|
|||||||
# Copy necessary files
|
# Copy necessary files
|
||||||
COPY scripts /scripts
|
COPY scripts /scripts
|
||||||
COPY pipeline /pipeline
|
COPY pipeline /pipeline
|
||||||
COPY stirling-pdf/src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/
|
COPY core/src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/
|
||||||
COPY --from=build /app/stirling-pdf/build/libs/*.jar app.jar
|
COPY --from=build /app/core/build/libs/*.jar app.jar
|
||||||
|
|
||||||
ARG VERSION_TAG
|
ARG VERSION_TAG
|
||||||
|
|
||||||
@ -47,10 +47,10 @@ ENV DISABLE_ADDITIONAL_FEATURES=true \
|
|||||||
UNO_PATH=/usr/lib/libreoffice/program \
|
UNO_PATH=/usr/lib/libreoffice/program \
|
||||||
URE_BOOTSTRAP=file:///usr/lib/libreoffice/program/fundamentalrc \
|
URE_BOOTSTRAP=file:///usr/lib/libreoffice/program/fundamentalrc \
|
||||||
PATH=$PATH:/opt/venv/bin \
|
PATH=$PATH:/opt/venv/bin \
|
||||||
STIRLING_TEMPFILES_DIRECTORY=/tmp/stirling-pdf \
|
STIRLING_TEMPFILES_DIRECTORY=/tmp/core \
|
||||||
TMPDIR=/tmp/stirling-pdf \
|
TMPDIR=/tmp/core \
|
||||||
TEMP=/tmp/stirling-pdf \
|
TEMP=/tmp/core \
|
||||||
TMP=/tmp/stirling-pdf
|
TMP=/tmp/core
|
||||||
|
|
||||||
|
|
||||||
# JDK for app
|
# JDK for app
|
||||||
@ -97,7 +97,7 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a
|
|||||||
ln -s /usr/lib/libreoffice/program/unohelper.py /opt/venv/lib/python3.12/site-packages/ && \
|
ln -s /usr/lib/libreoffice/program/unohelper.py /opt/venv/lib/python3.12/site-packages/ && \
|
||||||
ln -s /usr/lib/libreoffice/program /opt/venv/lib/python3.12/site-packages/LibreOffice && \
|
ln -s /usr/lib/libreoffice/program /opt/venv/lib/python3.12/site-packages/LibreOffice && \
|
||||||
mv /usr/share/tessdata /usr/share/tessdata-original && \
|
mv /usr/share/tessdata /usr/share/tessdata-original && \
|
||||||
mkdir -p $HOME /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders /tmp/stirling-pdf && \
|
mkdir -p $HOME /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders /tmp/core && \
|
||||||
# Configure URW Base 35 fonts
|
# Configure URW Base 35 fonts
|
||||||
ln -s /usr/share/fontconfig/conf.avail/69-urw-*.conf /etc/fonts/conf.d/ && \
|
ln -s /usr/share/fontconfig/conf.avail/69-urw-*.conf /etc/fonts/conf.d/ && \
|
||||||
fc-cache -f -v && \
|
fc-cache -f -v && \
|
||||||
@ -105,10 +105,10 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a
|
|||||||
chmod +x /scripts/init.sh && \
|
chmod +x /scripts/init.sh && \
|
||||||
# User permissions
|
# User permissions
|
||||||
addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \
|
addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \
|
||||||
chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/stirling-pdf && \
|
chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/core && \
|
||||||
chown stirlingpdfuser:stirlingpdfgroup /app.jar
|
chown stirlingpdfuser:stirlingpdfgroup /app.jar
|
||||||
|
|
||||||
EXPOSE 8080/tcp
|
EXPOSE 8080/tcp
|
||||||
# Set user and run command
|
# Set user and run command
|
||||||
ENTRYPOINT ["tini", "--", "/scripts/init.sh"]
|
ENTRYPOINT ["tini", "--", "/scripts/init.sh"]
|
||||||
CMD ["sh", "-c", "java -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/tmp/stirling-pdf -jar /app.jar & /opt/venv/bin/unoserver --port 2003 --interface 127.0.0.1"]
|
CMD ["sh", "-c", "java -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/tmp/core -jar /app.jar & /opt/venv/bin/unoserver --port 2003 --interface 127.0.0.1"]
|
||||||
|
@ -12,17 +12,17 @@ ENV DISABLE_ADDITIONAL_FEATURES=true \
|
|||||||
PUID=1000 \
|
PUID=1000 \
|
||||||
PGID=1000 \
|
PGID=1000 \
|
||||||
UMASK=022 \
|
UMASK=022 \
|
||||||
STIRLING_TEMPFILES_DIRECTORY=/tmp/stirling-pdf \
|
STIRLING_TEMPFILES_DIRECTORY=/tmp/core \
|
||||||
TMPDIR=/tmp/stirling-pdf \
|
TMPDIR=/tmp/core \
|
||||||
TEMP=/tmp/stirling-pdf \
|
TEMP=/tmp/core \
|
||||||
TMP=/tmp/stirling-pdf
|
TMP=/tmp/core
|
||||||
|
|
||||||
# Copy necessary files
|
# Copy necessary files
|
||||||
COPY scripts/download-security-jar.sh /scripts/download-security-jar.sh
|
COPY scripts/download-security-jar.sh /scripts/download-security-jar.sh
|
||||||
COPY scripts/init-without-ocr.sh /scripts/init-without-ocr.sh
|
COPY scripts/init-without-ocr.sh /scripts/init-without-ocr.sh
|
||||||
COPY scripts/installFonts.sh /scripts/installFonts.sh
|
COPY scripts/installFonts.sh /scripts/installFonts.sh
|
||||||
COPY pipeline /pipeline
|
COPY pipeline /pipeline
|
||||||
COPY stirling-pdf/build/libs/*.jar app.jar
|
COPY core/build/libs/*.jar app.jar
|
||||||
|
|
||||||
# Set up necessary directories and permissions
|
# Set up necessary directories and permissions
|
||||||
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/apk/repositories && \
|
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/apk/repositories && \
|
||||||
@ -39,10 +39,10 @@ RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /et
|
|||||||
su-exec \
|
su-exec \
|
||||||
openjdk21-jre && \
|
openjdk21-jre && \
|
||||||
# User permissions
|
# User permissions
|
||||||
mkdir -p /configs /logs /customFiles /usr/share/fonts/opentype/noto /tmp/stirling-pdf && \
|
mkdir -p /configs /logs /customFiles /usr/share/fonts/opentype/noto /tmp/core && \
|
||||||
chmod +x /scripts/*.sh && \
|
chmod +x /scripts/*.sh && \
|
||||||
addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \
|
addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \
|
||||||
chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /configs /customFiles /pipeline /tmp/stirling-pdf && \
|
chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /configs /customFiles /pipeline /tmp/core && \
|
||||||
chown stirlingpdfuser:stirlingpdfgroup /app.jar
|
chown stirlingpdfuser:stirlingpdfgroup /app.jar
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
@ -52,4 +52,4 @@ EXPOSE 8080/tcp
|
|||||||
|
|
||||||
# Run the application
|
# Run the application
|
||||||
ENTRYPOINT ["tini", "--", "/scripts/init-without-ocr.sh"]
|
ENTRYPOINT ["tini", "--", "/scripts/init-without-ocr.sh"]
|
||||||
CMD ["java", "-Dfile.encoding=UTF-8", "-Djava.io.tmpdir=/tmp/stirling-pdf", "-jar", "/app.jar"]
|
CMD ["java", "-Dfile.encoding=UTF-8", "-Djava.io.tmpdir=/tmp/core", "-jar", "/app.jar"]
|
||||||
|
14
build.gradle
14
build.gradle
@ -228,14 +228,14 @@ static def getMacVersion(String version) {
|
|||||||
|
|
||||||
jpackage {
|
jpackage {
|
||||||
dependsOn(":stirling-pdf:bootJar")
|
dependsOn(":stirling-pdf:bootJar")
|
||||||
input = layout.projectDirectory.dir("stirling-pdf/build/libs")
|
input = layout.projectDirectory.dir("core/build/libs")
|
||||||
destination = layout.projectDirectory.dir("build/jpackage")
|
destination = layout.projectDirectory.dir("build/jpackage")
|
||||||
mainJar = "Stirling-PDF-${project.version}.jar"
|
mainJar = "Stirling-PDF-${project.version}.jar"
|
||||||
appName = "Stirling PDF"
|
appName = "Stirling PDF"
|
||||||
appVersion = project.version
|
appVersion = project.version
|
||||||
vendor = "Stirling PDF Inc"
|
vendor = "Stirling PDF Inc"
|
||||||
appDescription = "Stirling PDF - Your Local PDF Editor"
|
appDescription = "Stirling PDF - Your Local PDF Editor"
|
||||||
icon = layout.projectDirectory.file("stirling-pdf/src/main/resources/static/favicon.ico")
|
icon = layout.projectDirectory.file("core/src/main/resources/static/favicon.ico")
|
||||||
verbose = true
|
verbose = true
|
||||||
// mainClass = "org.springframework.boot.loader.launch.JarLauncher"
|
// mainClass = "org.springframework.boot.loader.launch.JarLauncher"
|
||||||
|
|
||||||
@ -277,7 +277,7 @@ jpackage {
|
|||||||
// MacOS-specific configuration
|
// MacOS-specific configuration
|
||||||
mac {
|
mac {
|
||||||
appVersion = getMacVersion(project.version.toString())
|
appVersion = getMacVersion(project.version.toString())
|
||||||
icon = layout.projectDirectory.file("stirling-pdf/src/main/resources/static/favicon.icns")
|
icon = layout.projectDirectory.file("core/src/main/resources/static/favicon.icns")
|
||||||
type = ImageType.DMG
|
type = ImageType.DMG
|
||||||
macPackageIdentifier = "Stirling PDF"
|
macPackageIdentifier = "Stirling PDF"
|
||||||
macPackageName = "Stirling PDF"
|
macPackageName = "Stirling PDF"
|
||||||
@ -299,7 +299,7 @@ jpackage {
|
|||||||
// Linux-specific configuration
|
// Linux-specific configuration
|
||||||
linux {
|
linux {
|
||||||
appVersion = project.version
|
appVersion = project.version
|
||||||
icon = layout.projectDirectory.file("stirling-pdf/src/main/resources/static/favicon.png")
|
icon = layout.projectDirectory.file("core/src/main/resources/static/favicon.png")
|
||||||
type = ImageType.DEB // Can also use "rpm" for Red Hat-based systems
|
type = ImageType.DEB // Can also use "rpm" for Red Hat-based systems
|
||||||
|
|
||||||
// Debian package configuration
|
// Debian package configuration
|
||||||
@ -371,12 +371,12 @@ tasks.register('jpackageMacX64') {
|
|||||||
commandLine 'jpackage',
|
commandLine 'jpackage',
|
||||||
'--type', 'dmg',
|
'--type', 'dmg',
|
||||||
'--name', 'Stirling PDF (x86_64)',
|
'--name', 'Stirling PDF (x86_64)',
|
||||||
'--input', 'stirling-pdf/build/libs',
|
'--input', 'core/build/libs',
|
||||||
'--main-jar', "Stirling-PDF-${project.version}.jar",
|
'--main-jar', "Stirling-PDF-${project.version}.jar",
|
||||||
'--main-class', 'org.springframework.boot.loader.launch.JarLauncher',
|
'--main-class', 'org.springframework.boot.loader.launch.JarLauncher',
|
||||||
'--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"),
|
'--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"),
|
||||||
'--dest', 'build/jpackage/x86_64',
|
'--dest', 'build/jpackage/x86_64',
|
||||||
'--icon', 'stirling-pdf/src/main/resources/static/favicon.icns',
|
'--icon', 'core/src/main/resources/static/favicon.icns',
|
||||||
'--app-version', getMacVersion(project.version.toString()),
|
'--app-version', getMacVersion(project.version.toString()),
|
||||||
'--mac-package-name', 'Stirling PDF (x86_64)',
|
'--mac-package-name', 'Stirling PDF (x86_64)',
|
||||||
'--mac-package-identifier', 'Stirling PDF (x86_64)',
|
'--mac-package-identifier', 'Stirling PDF (x86_64)',
|
||||||
@ -462,7 +462,7 @@ tasks.register('cleanTempJre') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
launch4j {
|
launch4j {
|
||||||
icon = "${projectDir}/stirling-pdf/src/main/resources/static/favicon.ico"
|
icon = "${projectDir}/core/src/main/resources/static/favicon.ico"
|
||||||
|
|
||||||
outfile="Stirling-PDF.exe"
|
outfile="Stirling-PDF.exe"
|
||||||
|
|
||||||
|
2
core/.gitignore
vendored
2
core/.gitignore
vendored
@ -124,7 +124,7 @@ SwaggerDoc.json
|
|||||||
*.rar
|
*.rar
|
||||||
*.db
|
*.db
|
||||||
/build/*
|
/build/*
|
||||||
/stirling-pdf/build/*
|
/core/build/*
|
||||||
|
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
@ -332,7 +332,7 @@ Thymeleaf is a server-side Java HTML template engine. It is used in Stirling-PDF
|
|||||||
|
|
||||||
### Thymeleaf overview
|
### Thymeleaf overview
|
||||||
|
|
||||||
In Stirling-PDF, Thymeleaf is used to create HTML templates that are rendered on the server side. These templates are located in the `stirling-pdf/src/main/resources/templates` directory. Thymeleaf templates use a combination of HTML and special Thymeleaf attributes to dynamically generate content.
|
In Stirling-PDF, Thymeleaf is used to create HTML templates that are rendered on the server side. These templates are located in the `core/src/main/resources/templates` directory. Thymeleaf templates use a combination of HTML and special Thymeleaf attributes to dynamically generate content.
|
||||||
|
|
||||||
Some examples of this are:
|
Some examples of this are:
|
||||||
|
|
||||||
@ -384,7 +384,7 @@ This would generate n entries of tr for each person in exampleData
|
|||||||
### Adding a New Feature to the Backend (API)
|
### Adding a New Feature to the Backend (API)
|
||||||
|
|
||||||
1. **Create a New Controller:**
|
1. **Create a New Controller:**
|
||||||
- Create a new Java class in the `stirling-pdf/src/main/java/stirling/software/SPDF/controller/api` directory.
|
- Create a new Java class in the `core/src/main/java/stirling/software/SPDF/controller/api` directory.
|
||||||
- Annotate the class with `@RestController` and `@RequestMapping` to define the API endpoint.
|
- Annotate the class with `@RestController` and `@RequestMapping` to define the API endpoint.
|
||||||
- Ensure to add API documentation annotations like `@Tag(name = "General", description = "General APIs")` and `@Operation(summary = "Crops a PDF document", description = "This operation takes an input PDF file and crops it according to the given coordinates. Input:PDF Output:PDF Type:SISO")`.
|
- Ensure to add API documentation annotations like `@Tag(name = "General", description = "General APIs")` and `@Operation(summary = "Crops a PDF document", description = "This operation takes an input PDF file and crops it according to the given coordinates. Input:PDF Output:PDF Type:SISO")`.
|
||||||
|
|
||||||
@ -411,7 +411,7 @@ This would generate n entries of tr for each person in exampleData
|
|||||||
```
|
```
|
||||||
|
|
||||||
2. **Define the Service Layer:** (Not required but often useful)
|
2. **Define the Service Layer:** (Not required but often useful)
|
||||||
- Create a new service class in the `stirling-pdf/src/main/java/stirling/software/SPDF/service` directory.
|
- Create a new service class in the `core/src/main/java/stirling/software/SPDF/service` directory.
|
||||||
- Implement the business logic for the new feature.
|
- Implement the business logic for the new feature.
|
||||||
|
|
||||||
```java
|
```java
|
||||||
@ -463,7 +463,7 @@ This would generate n entries of tr for each person in exampleData
|
|||||||
### Adding a New Feature to the Frontend (UI)
|
### Adding a New Feature to the Frontend (UI)
|
||||||
|
|
||||||
1. **Create a New Thymeleaf Template:**
|
1. **Create a New Thymeleaf Template:**
|
||||||
- Create a new HTML file in the `stirling-pdf/src/main/resources/templates` directory.
|
- Create a new HTML file in the `core/src/main/resources/templates` directory.
|
||||||
- Use Thymeleaf attributes to dynamically generate content.
|
- Use Thymeleaf attributes to dynamically generate content.
|
||||||
- Use `extract-page.html` as a base example for the HTML template, which is useful to ensure importing of the general layout, navbar, and footer.
|
- Use `extract-page.html` as a base example for the HTML template, which is useful to ensure importing of the general layout, navbar, and footer.
|
||||||
|
|
||||||
@ -507,7 +507,7 @@ This would generate n entries of tr for each person in exampleData
|
|||||||
```
|
```
|
||||||
|
|
||||||
2. **Create a New Controller for the UI:**
|
2. **Create a New Controller for the UI:**
|
||||||
- Create a new Java class in the `stirling-pdf/src/main/java/stirling/software/SPDF/controller/ui` directory.
|
- Create a new Java class in the `core/src/main/java/stirling/software/SPDF/controller/ui` directory.
|
||||||
- Annotate the class with `@Controller` and `@RequestMapping` to define the UI endpoint.
|
- Annotate the class with `@Controller` and `@RequestMapping` to define the UI endpoint.
|
||||||
|
|
||||||
```java
|
```java
|
||||||
@ -537,7 +537,7 @@ This would generate n entries of tr for each person in exampleData
|
|||||||
|
|
||||||
3. **Update the Navigation Bar:**
|
3. **Update the Navigation Bar:**
|
||||||
- Add a link to the new feature page in the navigation bar.
|
- Add a link to the new feature page in the navigation bar.
|
||||||
- Update the `stirling-pdf/src/main/resources/templates/fragments/navbar.html` file.
|
- Update the `core/src/main/resources/templates/fragments/navbar.html` file.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
@ -551,7 +551,7 @@ When adding a new feature or modifying existing ones in Stirling-PDF, you'll nee
|
|||||||
|
|
||||||
### 1. Locate Existing Language Files
|
### 1. Locate Existing Language Files
|
||||||
|
|
||||||
Find the existing `messages.properties` files in the `stirling-pdf/src/main/resources` directory. You'll see files like:
|
Find the existing `messages.properties` files in the `core/src/main/resources` directory. You'll see files like:
|
||||||
|
|
||||||
- `messages.properties` (default, usually English)
|
- `messages.properties` (default, usually English)
|
||||||
- `messages_en_GB.properties`
|
- `messages_en_GB.properties`
|
||||||
|
@ -10,7 +10,7 @@ Fork Stirling-PDF and create a new branch out of `main`.
|
|||||||
|
|
||||||
Then add a reference to the language in the navbar by adding a new language entry to the dropdown:
|
Then add a reference to the language in the navbar by adding a new language entry to the dropdown:
|
||||||
|
|
||||||
- Edit the file: [languages.html](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/stirling-pdf/src/main/resources/templates/fragments/languages.html)
|
- Edit the file: [languages.html](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/core/src/main/resources/templates/fragments/languages.html)
|
||||||
|
|
||||||
|
|
||||||
For example, to add Polish, you would add:
|
For example, to add Polish, you would add:
|
||||||
@ -25,7 +25,7 @@ The `data-bs-language-code` is the code used to reference the file in the next s
|
|||||||
|
|
||||||
Start by copying the existing English property file:
|
Start by copying the existing English property file:
|
||||||
|
|
||||||
- [messages_en_GB.properties](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/stirling-pdf/src/main/resources/messages_en_GB.properties)
|
- [messages_en_GB.properties](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/core/src/main/resources/messages_en_GB.properties)
|
||||||
|
|
||||||
Copy and rename it to `messages_{your data-bs-language-code here}.properties`. In the Polish example, you would set the name to `messages_pl_PL.properties`.
|
Copy and rename it to `messages_{your data-bs-language-code here}.properties`. In the Polish example, you would set the name to `messages_pl_PL.properties`.
|
||||||
|
|
||||||
@ -62,15 +62,15 @@ Make sure to place the entry under the correct language section. This helps main
|
|||||||
#### Windows command
|
#### Windows command
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
python .github/scripts/check_language_properties.py --reference-file stirling-pdf\src\main\resources\messages_en_GB.properties --branch "" --files stirling-pdf\src\main\resources\messages_pl_PL.properties
|
python .github/scripts/check_language_properties.py --reference-file core\src\main\resources\messages_en_GB.properties --branch "" --files core\src\main\resources\messages_pl_PL.properties
|
||||||
|
|
||||||
python .github/scripts/check_language_properties.py --reference-file stirling-pdf\src\main\resources\messages_en_GB.properties --branch "" --check-file stirling-pdf\src\main\resources\messages_pl_PL.properties
|
python .github/scripts/check_language_properties.py --reference-file core\src\main\resources\messages_en_GB.properties --branch "" --check-file core\src\main\resources\messages_pl_PL.properties
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Linux command
|
#### Linux command
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 .github/scripts/check_language_properties.py --reference-file stirling-pdf/src/main/resources/messages_en_GB.properties --branch "" --files stirling-pdf/src/main/resources/messages_pl_PL.properties
|
python3 .github/scripts/check_language_properties.py --reference-file core/src/main/resources/messages_en_GB.properties --branch "" --files core/src/main/resources/messages_pl_PL.properties
|
||||||
|
|
||||||
python3 .github/scripts/check_language_properties.py --reference-file stirling-pdf/src/main/resources/messages_en_GB.properties --branch "" --check-file stirling-pdf/src/main/resources/messages_pl_PL.properties
|
python3 .github/scripts/check_language_properties.py --reference-file core/src/main/resources/messages_en_GB.properties --branch "" --check-file core/src/main/resources/messages_pl_PL.properties
|
||||||
```
|
```
|
||||||
|
@ -207,7 +207,7 @@ def compare_files(
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
directory = os.path.join(os.getcwd(), "stirling-pdf", "src", "main", "resources")
|
directory = os.path.join(os.getcwd(), "core", "src", "main", "resources")
|
||||||
messages_file_paths = glob.glob(os.path.join(directory, "messages_*.properties"))
|
messages_file_paths = glob.glob(os.path.join(directory, "messages_*.properties"))
|
||||||
reference_file = os.path.join(directory, "messages_en_GB.properties")
|
reference_file = os.path.join(directory, "messages_en_GB.properties")
|
||||||
|
|
||||||
|
@ -29,10 +29,10 @@ fi
|
|||||||
|
|
||||||
echo "Setting permissions and ownership for necessary directories..."
|
echo "Setting permissions and ownership for necessary directories..."
|
||||||
# Ensure temp directory exists and has correct permissions
|
# Ensure temp directory exists and has correct permissions
|
||||||
mkdir -p /tmp/stirling-pdf || true
|
mkdir -p /tmp/core || true
|
||||||
# Attempt to change ownership of directories and files
|
# Attempt to change ownership of directories and files
|
||||||
if chown -R stirlingpdfuser:stirlingpdfgroup $HOME /logs /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/stirling-pdf /app.jar; then
|
if chown -R stirlingpdfuser:stirlingpdfgroup $HOME /logs /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/core /app.jar; then
|
||||||
chmod -R 755 /logs /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/stirling-pdf /app.jar || true
|
chmod -R 755 /logs /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/core /app.jar || true
|
||||||
# If chown succeeds, execute the command as stirlingpdfuser
|
# If chown succeeds, execute the command as stirlingpdfuser
|
||||||
exec su-exec stirlingpdfuser "$@"
|
exec su-exec stirlingpdfuser "$@"
|
||||||
else
|
else
|
||||||
|
@ -29,8 +29,8 @@ if [[ -n "$TESSERACT_LANGS" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Ensure temp directory exists with correct permissions before running main init
|
# Ensure temp directory exists with correct permissions before running main init
|
||||||
mkdir -p /tmp/stirling-pdf || true
|
mkdir -p /tmp/core || true
|
||||||
chown -R stirlingpdfuser:stirlingpdfgroup /tmp/stirling-pdf || true
|
chown -R stirlingpdfuser:stirlingpdfgroup /tmp/core || true
|
||||||
chmod -R 755 /tmp/stirling-pdf || true
|
chmod -R 755 /tmp/core || true
|
||||||
|
|
||||||
/scripts/init-without-ocr.sh "$@"
|
/scripts/init-without-ocr.sh "$@"
|
@ -56,11 +56,11 @@ capture_file_list() {
|
|||||||
-not -path '/logs/*' \
|
-not -path '/logs/*' \
|
||||||
-not -path '*/home/stirlingpdfuser/.config/libreoffice/*' \
|
-not -path '*/home/stirlingpdfuser/.config/libreoffice/*' \
|
||||||
-not -path '*/home/stirlingpdfuser/.pdfbox.cache' \
|
-not -path '*/home/stirlingpdfuser/.pdfbox.cache' \
|
||||||
-not -path '*/tmp/stirling-pdf/PDFBox*' \
|
-not -path '*/tmp/core/PDFBox*' \
|
||||||
-not -path '*/tmp/stirling-pdf/hsperfdata_stirlingpdfuser/*' \
|
-not -path '*/tmp/core/hsperfdata_stirlingpdfuser/*' \
|
||||||
-not -path '*/tmp/hsperfdata_stirlingpdfuser/*' \
|
-not -path '*/tmp/hsperfdata_stirlingpdfuser/*' \
|
||||||
-not -path '*/tmp/stirling-pdf/lu*' \
|
-not -path '*/tmp/core/lu*' \
|
||||||
-not -path '*/tmp/stirling-pdf/tmp*' \
|
-not -path '*/tmp/core/tmp*' \
|
||||||
2>/dev/null | xargs -I{} sh -c 'stat -c \"%n %s %Y\" \"{}\" 2>/dev/null || true' | sort" > "$output_file"
|
2>/dev/null | xargs -I{} sh -c 'stat -c \"%n %s %Y\" \"{}\" 2>/dev/null || true' | sort" > "$output_file"
|
||||||
|
|
||||||
# Check if the output file has content
|
# Check if the output file has content
|
||||||
@ -79,7 +79,7 @@ capture_file_list() {
|
|||||||
-not -path '*/home/stirlingpdfuser/.pdfbox.cache' \
|
-not -path '*/home/stirlingpdfuser/.pdfbox.cache' \
|
||||||
-not -path '*/tmp/PDFBox*' \
|
-not -path '*/tmp/PDFBox*' \
|
||||||
-not -path '*/tmp/hsperfdata_stirlingpdfuser/*' \
|
-not -path '*/tmp/hsperfdata_stirlingpdfuser/*' \
|
||||||
-not -path '*/tmp/stirling-pdf/hsperfdata_stirlingpdfuser/*' \
|
-not -path '*/tmp/core/hsperfdata_stirlingpdfuser/*' \
|
||||||
-not -path '*/tmp/lu*' \
|
-not -path '*/tmp/lu*' \
|
||||||
-not -path '*/tmp/tmp*' \
|
-not -path '*/tmp/tmp*' \
|
||||||
2>/dev/null | sort" > "$output_file"
|
2>/dev/null | sort" > "$output_file"
|
||||||
|
Loading…
Reference in New Issue
Block a user