[add] bxs
This commit is contained in:
parent
0b8d565dac
commit
7447ca92be
3 changed files with 17 additions and 3 deletions
|
@ -36,8 +36,8 @@ jobs:
|
|||
|
||||
- name: Build package
|
||||
run: |
|
||||
basex scripts/make-fat-jar.xq
|
||||
basex scripts/install.bxs
|
||||
|
||||
- name: Run BaseX Tests
|
||||
run: |
|
||||
bin/basex -t src/test
|
||||
basex -t src/test
|
5
scripts/install.bxs
Normal file
5
scripts/install.bxs
Normal file
|
@ -0,0 +1,5 @@
|
|||
# run query
|
||||
RUN make-fat-jar.xq
|
||||
REPO INSTALL dist/pdfbox-3.0.4.fat.jar
|
||||
XQUERY file:copy("dist/pdfbox-3.0.4.fat.jar","/usr/local/basex/lib/custom/")
|
||||
TEST src/test
|
|
@ -28,7 +28,7 @@ declare namespace PDFRenderer="java:org.apache.pdfbox.rendering.PDFRenderer";
|
|||
declare namespace RandomAccessReadBufferedFile = "java:org.apache.pdfbox.io.RandomAccessReadBufferedFile";
|
||||
declare namespace File ="java:java.io.File";
|
||||
|
||||
(:~ version of this package
|
||||
(:~ SemVer version of this package
|
||||
with build metadata for Apacke Pdfbox in use e.g. "0.1.0+pdfbox3.0.4"
|
||||
:)
|
||||
declare function pdfbox:version()
|
||||
|
@ -36,6 +36,15 @@ as xs:string{
|
|||
"0.1.0+pdfbox" || Q{java:org.apache.pdfbox.util.Version}getVersion()
|
||||
};
|
||||
|
||||
(: open pdf,apply function, close pdf
|
||||
with-document pattern, creates local pdfobject and ensures it is closed
|
||||
e.g "path..." => pdfbox:with-pdf("path...",pdfbox:page-text(?,5))
|
||||
:)
|
||||
declare function pdfbox:with-pdf($src as xs:string,$fn as function(*)*)
|
||||
as item()*{
|
||||
"@TODO"
|
||||
};
|
||||
|
||||
(:~ open pdf, returns pdf object :)
|
||||
declare function pdfbox:open($pdfpath as xs:string)
|
||||
as item(){
|
||||
|
|
Loading…
Add table
Reference in a new issue