Skip to content

Commit c83afc6

Browse files
committed
Merge remote-tracking branch 'origin/main' into gsoc-ocr-tess4j-initial-implementation
2 parents c5894a0 + 0795cfa commit c83afc6

File tree

160 files changed

+5344
-493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+5344
-493
lines changed

.dockerignore

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1+
.git
12
.gitignore
23
.dockerignore
34

45
Dockerfile
56
Dockerfile.*
67
.github/
78

9+
.devcontainer/
10+
11+
*/bin
12+
*/build
13+
*/out
14+
15+
docs/
16+
17+
gg.cmd
18+
gradlew.bat
19+
820
# no generated files in version control
921
src/main/gen/
1022
src/main/generated/
1123
src-gen/
1224

13-
src/main/resources/csl-styles
14-
src/main/resources/csl-locales
15-
buildres/abbrv.jabref.org
16-
17-
jablib/src/main/resources/csl-styles
18-
jablib/src/main/resources/csl-locales
19-
2025
.lycheecache
2126

2227
.kotlin

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ updates:
44
directories:
55
- "/build-logic" # versions of 3rd party gradle plugins
66
- "/versions" # versions of 3rd party dependencies of all JabRef modules
7+
- "/" # plugins
78
schedule:
89
interval: weekly
910
labels:

.github/workflows/automerge.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
id: shouldrun
1515
shell: bash
1616
run: |
17-
actor="${{ github.actor }}"
18-
title="${{ github.event.pull_request.title }}"
17+
actor='${{ github.actor }}'
18+
title='${{ github.event.pull_request.title }}'
1919
2020
if [[ "$actor" == "renovate-bot" ]]; then
2121
echo "✅ from renote-bot"

.github/workflows/dockerimages.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Docker Images
33
on:
44
pull_request:
55
paths:
6+
- '.dockerignore'
67
- '.github/workflows/dockerimages.yml'
78
- 'Dockerfile.*'
89
push:
@@ -51,6 +52,19 @@ jobs:
5152
uses: docker/setup-qemu-action@v3
5253
- name: Set up Docker Buildx
5354
uses: docker/setup-buildx-action@v3
55+
- name: Fetch all history for all tags and branches
56+
uses: actions/checkout@v4
57+
with:
58+
fetch-depth: 0
59+
submodules: 'true'
60+
show-progress: 'false'
61+
- name: Install GitVersion
62+
uses: gittools/actions/gitversion/setup@v3.2.1
63+
with:
64+
versionSpec: "5.x"
65+
- name: Run GitVersion
66+
id: gitversion
67+
uses: gittools/actions/gitversion/execute@v3.2.1
5468
- name: Build and push
5569
uses: docker/build-push-action@v6
5670
with:
@@ -63,3 +77,6 @@ jobs:
6377
tags: ${{ steps.meta.outputs.tags }}
6478
labels: ${{ steps.meta.outputs.labels }}
6579
file: Dockerfile.${{ matrix.component }}
80+
build-args: |
81+
VERSION=${{ steps.gitversion.outputs.AssemblySemVer }}
82+
VERSION_INFO=${{ steps.gitversion.outputs.InformationalVersion }}

.github/workflows/tests.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,24 @@ jobs:
6666
distribution: 'zulu'
6767
- name: Setup Gradle
6868
uses: gradle/actions/setup-gradle@v4
69+
- name: Generate JBang cache key
70+
id: cache-key
71+
shell: bash
72+
run: |
73+
echo "cache_key=jbang-$(date +%F)" >> $GITHUB_OUTPUT
74+
- name: Use cache
75+
uses: actions/cache@v4
76+
with:
77+
lookup-only: true
78+
path: ~/.jbang
79+
key: ${{ steps.cache-key.outputs.cache_key }}
80+
restore-keys:
81+
jbang-
82+
- name: Setup JBang
83+
uses: jbangdev/setup-jbang@main
6984
- name: Run OpenRewrite
7085
run: |
71-
./gradlew rewriteDryRun
86+
./gradlew --no-configuration-cache :rewriteDryRun
7287
7388
modernizer:
7489
name: Modernizer
@@ -135,7 +150,7 @@ jobs:
135150
- name: Lint CHANGELOG.md
136151
run: |
137152
# run heylogs verification
138-
jbang com.github.nbbrd.heylogs:heylogs-cli:0.9.3:bin check CHANGELOG.md > heylogs.txt || true
153+
jbang com.github.nbbrd.heylogs:heylogs-cli:0.10.0:bin check CHANGELOG.md > heylogs.txt || true
139154
140155
# improve output
141156
sed -i 's/all-h2-contain-a-version/all-h2-contain-a-version (ignored)/' heylogs.txt
@@ -465,7 +480,8 @@ jobs:
465480

466481
checklist-checked:
467482
if: >
468-
github.event_name == 'pull_request' && !(
483+
(github.repository_owner != 'JabRef') &&
484+
(github.event_name == 'pull_request') && !(
469485
(github.actor == 'dependabot[bot]') ||
470486
(
471487
startsWith(github.event.pull_request.title, '[Bot] ') ||

.jbang/JabSrvLauncher.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,30 @@
99
//FILES tinylog.properties=../jabsrv-cli/src/main/resources/tinylog.properties
1010

1111
//SOURCES ../jabsrv/src/main/java/org/jabref/http/dto/BibEntryDTO.java
12+
//SOURCES ../jabsrv/src/main/java/org/jabref/http/dto/cayw/SimpleJson.java
1213
//SOURCES ../jabsrv/src/main/java/org/jabref/http/dto/GlobalExceptionMapper.java
1314
//SOURCES ../jabsrv/src/main/java/org/jabref/http/dto/GsonFactory.java
1415
//SOURCES ../jabsrv/src/main/java/org/jabref/http/JabrefMediaType.java
15-
//SOURCES ../jabsrv/src/main/java/org/jabref/http/JabRefResourceLocator.java
1616
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java
17+
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWQueryParams.java
1718
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CAYWEntry.java
1819
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/gui/SearchDialog.java
1920
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/gui/SearchField.java
2021
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/gui/SearchResultContainer.java
2122
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/gui/SelectedItemsContainer.java
23+
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/format/BibLatexFormatter.java
24+
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/format/CAYWFormatter.java
25+
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/format/FormatterService.java
26+
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/cayw/format/SimpleJsonFormatter.java
2227
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/CORSFilter.java
2328
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/LibrariesResource.java
2429
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/LibraryResource.java
2530
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/PreferencesFactory.java
2631
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/RootResource.java
2732
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/Server.java
33+
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/services/ContextsToServe.java
2834
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/services/FilesToServe.java
35+
//SOURCES ../jabsrv/src/main/java/org/jabref/http/server/services/ServerUtils.java
2936

3037
// REPOS mavencentral,snapshots=https://central.sonatype.com/repository/maven-snapshots/
3138
//REPOS mavencentral,mavencentralsnapshots=https://central.sonatype.com/repository/maven-snapshots/,s01oss=https://s01.oss.sonatype.org/content/repositories/snapshots/,oss=https://oss.sonatype.org/content/repositories,jitpack=https://jitpack.io,oss2=https://oss.sonatype.org/content/groups/public,ossrh=https://oss.sonatype.org/content/repositories/snapshots

.jbang/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# JBang scripts for JabRef
2+
3+
This directory contains JBang scripts for JabRef.
4+
[JBang](https://www.jbang.dev/) allows for running Java applications without having a JDK installed (before).
5+
6+
Three use cases:
7+
8+
- Try out any pull request with minimal installation. See [our blog entry](https://blog.jabref.org/2025/05/31/run-pr/) for details.
9+
- Run JabKit - JabRef's CLI tool.
10+
- Run JabSrv - JabRef's HTTP server.
11+
12+
## Running JabKit without installation
13+
14+
By using [gg.cmd](https://github.com/eirikb/gg#ggcmd) you can "just run" JabKit with minimal setup:
15+
16+
1. Download `gg.cmd` from: <https://github.com/eirikb/gg#ggcmd>. `gg.cmd` is a "binary" running on macOS, Linux, and Windows. No need for different binaries on different operating systems.
17+
2. Run `gg.cmd`. This will download and use JBang as wrapper around running JabKit:
18+
19+
- Linux/macOS: Run `sh ./gg.cmd jbang jabkit@jabref --help`.
20+
- Windows: Run `gg.cmd jbang jabkit@jabref --help`.
21+
22+
You can also put `gg.cmd` on your `PATH` and make it executable.
23+
Then you enable `alias jabkit='gg.cmd jbang jabkit@jabref`.
24+
25+
## Running JabKit with JBang
26+
27+
If you have JBang installed, just run
28+
29+
```terminal
30+
jbang jabkit@jabref --help
31+
```
32+
33+
You can also install `jabkit` permanently in your `PATH`:
34+
35+
1. [Install JBang](https://www.jbang.dev/download/). E.g., by `brew install jbangdev/tap/jbang` or `choco install jbang`
36+
2. Make `jabkit` available on the command line: `jbang app install jabkit@jabref`
37+
3. Run `jabkit --help`
38+
39+
[JBang takes care about updating JabKit automatically](https://github.com/orgs/jbangdev/discussions/1636#discussioncomment-6150992).
40+
41+
## Running JabSrv
42+
43+
If you have JBang installed, just run following command
44+
45+
```terminal
46+
jbang jabsrv@jabref --help
47+
```
48+
49+
With `gg.cmd`:
50+
51+
```terminal
52+
sh ./gg.cmd jbang jabsrv@jabref --help
53+
```

.vscode/ltex.dictionary.en-US.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
Checkstyle
22
CouchDB
33
JabDrive
4+
JabKit
45
JabRef
6+
JabSrv
7+
JBang
58
OpenFastTrace
69
OpenRewrite
710
Temurin
8-
9-
JabKit

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
1313

1414
- We introduced a settings parameter to manage citations' relations local storage time-to-live with a default value set to 30 days. [#11189](https://github.com/JabRef/jabref/issues/11189)
1515
- We distribute arm64 images for Linux. [#10842](https://github.com/JabRef/jabref/issues/10842)
16+
- When adding an entry to a library, a warning is displayed if said entry already exists in an active library. [#13261](https://github.com/JabRef/jabref/issues/13261)
1617
- We added the field `monthfiled` to the default list of fields to resolve BibTeX-Strings for [#13375](https://github.com/JabRef/jabref/issues/13375)
1718
- We added a new ID based fetcher for [EuropePMC](https://europepmc.org/). [#13389](https://github.com/JabRef/jabref/pull/13389)
1819
- We added an initial [cite as you write](https://retorque.re/zotero-better-bibtex/citing/cayw/) endpoint. [#13187](https://github.com/JabRef/jabref/issues/13187)
@@ -36,15 +37,14 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
3637
- We added an "Open example library" button to Welcome Tab. [#13014](https://github.com/JabRef/jabref/issues/13014)
3738
- We added automatic detection and selection of the identifier type (e.g., DOI, ISBN, arXiv) based on clipboard content when opening the "New Entry" dialog [#13111](https://github.com/JabRef/jabref/pull/13111)
3839
- We added support for import of a Refer/BibIX file format. [#13069](https://github.com/JabRef/jabref/issues/13069)
40+
- We added markdown rendering and copy capabilities to AI chat responses. [#12234](https://github.com/JabRef/jabref/issues/12234)
3941
- We added a new `jabkit` command `pseudonymize` to pseudonymize the library. [#13109](https://github.com/JabRef/jabref/issues/13109)
4042
- We added functionality to focus running instance when trying to start a second instance. [#13129](https://github.com/JabRef/jabref/issues/13129)
4143
- We added a highlighted diff regarding changes to the Group Tree Structure of a bib file, made outside JabRef. [#11221](https://github.com/JabRef/jabref/issues/11221)
4244
- We added a new setting in the 'Entry Editor' preferences to hide the 'File Annotations' tab when no annotations are available. [#13143](https://github.com/JabRef/jabref/issues/13143)
4345
- We added support for multi-file import across different formats. [#13269](https://github.com/JabRef/jabref/issues/13269)
46+
- We improved the detection of DOIs on the first page of a PDF. [#13487](https://github.com/JabRef/jabref/pull/13487)
4447
- We added support for dark title bar on Windows. [#11457](https://github.com/JabRef/jabref/issues/11457)
45-
46-
### Changed
47-
4848
- We moved some functionality from the graphical application `jabref` with new command verbs `generate-citation-keys`, `check-consistency`, `fetch`, `search`, `convert`, `generate-bib-from-aux`, `preferences` and `pdf` to the new toolkit. [#13012](https://github.com/JabRef/jabref/pull/13012) [#110](https://github.com/JabRef/jabref/issues/110)
4949
- We merged the 'New Entry', 'Import by ID', and 'New Entry from Plain Text' tools into a single 'Create New Entry' tool. [#8808](https://github.com/JabRef/jabref/issues/8808)
5050
- We renamed the "Body Text" CSL bibliography header format name to "Text body" as per internal LibreOffice conventions. [#13074](https://github.com/JabRef/jabref/pull/13074)

Dockerfile.jabkit

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
FROM gradle:jdk24-noble AS build
22

3-
WORKDIR /app
3+
LABEL org.opencontainers.image.title="jabkit"
4+
LABEL org.opencontainers.image.description="JabRef's CLI tool"
45

5-
COPY . .
6+
ARG VERSION="100.0.0"
7+
ARG VERSION_INFO="100.0.0"
8+
ARG TAG_BUILD="false"
9+
10+
WORKDIR /build
611

7-
RUN gradle --no-daemon :jabkit:jpackage
12+
COPY . .
813

9-
RUN find jabkit/build/distribution
14+
RUN gradle --no-daemon -PprojVersion="${VERSION}" -PprojVersionInfo="${VERSION_INFO}" -Ptagbuild="${TAG_BUILD}" :jabkit:jpackage
1015

1116
RUN mkdir /dist
1217

13-
RUN mv jabkit/build/distribution/jabkit /dist
18+
RUN mv jabkit/build/packages/*/* /dist
1419

1520
# jpackage needs glibc; alpine does not work
1621
FROM debian:bookworm-slim AS runtime

0 commit comments

Comments
 (0)