Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
file_extractor
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
file_extractor
Commits
a713588f
Commit
a713588f
authored
2 years ago
by
Florent Torregrosa
Committed by
Florent Torregrosa
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3307783
by Grimreaper: Update docconv install and fix phpstan
parent
c5927769
No related branches found
No related tags found
1 merge request
!19
Issue #3307783: Update docconv install and fix phpstan
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
drupalci.yml
+11
-11
11 additions, 11 deletions
drupalci.yml
src/Plugin/Field/ExtractedFileFieldItemList.php
+2
-0
2 additions, 0 deletions
src/Plugin/Field/ExtractedFileFieldItemList.php
tests/scripts/install-extractors.sh
+11
-7
11 additions, 7 deletions
tests/scripts/install-extractors.sh
with
24 additions
and
18 deletions
drupalci.yml
+
11
−
11
View file @
a713588f
...
...
@@ -20,25 +20,25 @@ build:
container_command
:
commands
:
# Make a change to drupalci.yml when creating a new branch.
# Fix outdated apt key.
-
"
curl
-sS
https://dl.yarnpkg.com/debian/pubkey.gpg
|
sudo
apt-key
add
-"
-
"
apt-get
update"
-
"
apt-get
install
apt-utils
-y"
# Docconv.
# Install Go
and Docconv dependencies
.
# Install Go.
-
"
apt-get
install
curl
poppler-utils
wv
unrtf
tidy
-y"
-
"
curl
-O
https://dl.google.com/go/go1.13.linux-amd64.tar.gz"
-
"
tar
xvf
go1.13.linux-amd64.tar.gz"
-
"
chown
-R
root:root
./go"
-
"
mv
go
/usr/local"
-
"
/usr/local/go/bin/go
get
github.com/JalfResi/justext"
-
"
curl
-O
https://dl.google.com/go/go1.19.linux-amd64.tar.gz"
-
"
tar
-C
/usr/local
-xzf
go1.19.linux-amd64.tar.gz"
-
"
chown
-R
root:root
/usr/local/go"
# Install Docconv.
-
"
/usr/local/go/bin/go
get
code.sajari.com/docconv/..."
-
"
cp
/root/go/bin/docd
/usr/bin/"
-
"
/usr/local/go/bin/go
install
code.sajari.com/docconv@v1.2.1"
-
"
cd
/root/go/pkg/mod/code.sajari.com/docconv@v1.2.1/docd
&&
/usr/local/go/bin/go
build
."
-
"
cp
/root/go/pkg/mod/code.sajari.com/docconv@v1.2.1/docd/docd
/usr/bin/"
# Pdftotext.
-
"
apt-get
install
poppler-utils
-y"
# Python Pdf2txt.
-
"
apt-get
install
python3-pip
-y"
-
"
pip3
install
pdfminer.six"
# Used fixed version of pdfminer until CI environment will be updated
# to Debian 11 at least.
-
"
pip3
install
pdfminer.six==20220319"
# Common parts of Tika methods.
-
"
mkdir
-p
/usr/share/man/man1"
-
"
mkdir
-p
/var/apache-tika"
...
...
This diff is collapsed.
Click to expand it.
src/Plugin/Field/ExtractedFileFieldItemList.php
+
2
−
0
View file @
a713588f
...
...
@@ -45,6 +45,8 @@ class ExtractedFileFieldItemList extends FieldItemList {
/**
* {@inheritdoc}
*
* @phpstan-param int $index
*/
public
function
get
(
$index
)
{
if
(
$index
!==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
tests/scripts/install-extractors.sh
+
11
−
7
View file @
a713588f
...
...
@@ -3,16 +3,20 @@
apt-get update
# Docconv.
GO_VERSION
=
'1.13'
rm
-rf
/usr/local/go
rm
-rf
/root/go
GO_VERSION
=
'1.19'
DOCCONV_VERSION
=
'v1.2.1'
apt-get
install
curl poppler-utils wv unrtf tidy
-y
curl
-O
https://dl.google.com/go/go
${
GO_VERSION
}
.linux-amd64.tar.gz
tar
xvf go
${
GO_VERSION
}
.linux-amd64.tar.gz
chown
-R
root:root ./go
mv
go /usr/local
/usr/local/go/bin/go get github.com/JalfResi/justext
tar
-C
/usr/local
-xzf
go
${
GO_VERSION
}
.linux-amd64.tar.gz
chown
-R
root:root /usr/local/go
/usr/local/go/bin/go
install
code.sajari.com/docconv@
${
DOCCONV_VERSION
}
/usr/local/go/bin/go get code.sajari.com/docconv/...
cp
/root/go/bin/docd /usr/bin/
cd
/root/go/pkg/mod/code.sajari.com/docconv@
${
DOCCONV_VERSION
}
/docd
/usr/local/go/bin/go build
.
cd
-
cp
/root/go/pkg/mod/code.sajari.com/docconv@
${
DOCCONV_VERSION
}
/docd/docd /usr/bin/
# Pdftotext.
apt-get
install
poppler-utils
-y
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment