Skip to content
Snippets Groups Projects
Verified Commit 4c4e7795 authored by Dmytro Bogatov's avatar Dmytro Bogatov :two_hearts:
Browse files

Add PDF annot to latex. [ci-skip]

parent e3c80693
No related branches found
No related tags found
No related merge requests found
Pipeline #24981 skipped
......@@ -21,7 +21,7 @@ RUN wget https://github.com/carrois/Fira/archive/c503516bcb54412d540a2e33efd1cc2
# Install CMU fonts, ghostscript NodeJS + NPM and http-server
RUN apt-get update \
&& apt-get install -y fonts-cmu ghostscript nodejs npm imagemagick \
&& apt-get install -y fonts-cmu ghostscript nodejs npm imagemagick default-jre \
&& npm install -g http-server \
&& cp /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xml.bak \
&& head -n -7 /etc/ImageMagick-6/policy.xml.bak > /etc/ImageMagick-6/policy.xml \
......@@ -30,5 +30,10 @@ RUN apt-get update \
RUN echo 'alias pdfjoin="pdfjam --fitpaper true --rotateoversize true --suffix joined "' >> ~/.bashrc
ENV TEXMFVAR=/usr/local/texlive/2021/texmf-var
COPY install-annotator.sh /
RUN /install-annotator.sh
SHELL ["/bin/bash", "-c"]
CMD ["/bin/bash"]
......@@ -9,4 +9,5 @@ In this image:
* NodeJS + NPM
* http-server
* imagemagick
* PAX and JRE
* ARM64 arch will install `biber` and `pdfjam`
......@@ -210,174 +210,3 @@ else
echo "Done."
fi
# 1 vim my-build.sh
# 2 ./my-build.sh
# 3 vim my-build.sh
# 4 ./my-build.sh
# 5 ls -la /usr/lib/liblzma.so.5
# 6 vim my-build.sh
# 7 vim my-build.sh
# 8 ./my-build.sh
# 9 vim my-build.sh
# 10 ls -al /lib/aarch64-linux-gnu/libz.so
# 11 ls -al /lib/aarch64-linux-gnu/
# 12 vim my-build.sh
# 13 ./my-build.sh
# 14 vim my-build.sh
# 15 ./my-build.sh
# 16 vim my-build.sh
# 17 cpanm IO/Socket/SSL.pm
# 18 ./my-build.sh
# 19 echo $?
# 20 vim my-build.sh
# 21 vim my-build.sh
# 22 ls -la /usr/local/bin/biber
# 23 /usr/local/bin/biber
# 24 /usr/local/bin/biber -h
# 25 cp /usr/local/bin/biber my-biber
# 26 ./my-biber
# 27 ldd my-biber
# 28 ./my-build.sh
# 29 find -name site_perl .
# 30 find / -name site_perl
# 31 ls /usr/local/share/perl/5.32.1/
# 32 history
# 1 ls /usr/local/lib/libbtparse.so
# 2 ls -la /usr/local/lib/libbtparse.so
# 3 ls -al /usr/lib/libxml2.so.2
# 4 ls -al /usr/lib/aarch64-linux-gnu/libxml2.so.2
# 5 ls -al /usr/lib/aarch64-linux-gnu/libxml2.so.2.9.10
# 6 ls -al /usr/local/lib/
# 7 ls -al /usr/local/lib/aarch64-linux-gnu/
# 8 ls -al /usr/lib
# 9 ls -al /usr/lib/apt/
# 10 ls -al /usr/lib/aarch64-linux-gnu/
# 11 ls -al /usr/lib/aarch64-linux-musl/
# 12 apt install zlib
# 13 apt install zlib1g-dev
# 14 ls -al /usr/lib/aarch64-linux-musl/
# 15 ls -al /usr/lib/aarch64-linux-gnu/
# 16 ls -la /usr/lib/liblzma.so.5
# 17 apt install liblzma-dev
# 18 ls -al /usr/lib/aarch64-linux-gnu/
# 19 ls -al /usr/lib/aarch64-linux-gnu/
# 20 ls -al /usr/lib/aarch64-linux-gnu/
# 21 ls -al lib/aarch64-linux-gnu/
# 22 ls -al /lib/aarch64-linux-gnu/
# 23 ls -al /lib/aarch64-linux-gnu/
# 24 ls -al /usr/lib/aarch64-linux-gnu/
# 25 ls -al /lib/aarch64-linux-gnu/
# 26 ls -al /lib/aarch64-linux-gnu/
# 27 ls -al /usr/lib/aarch64-linux-gnu/
# 28 ls -al /lib/aarch64-linux-gnu/
# 29 ls -al /usr/lib/aarch64-linux-gnu/
# 30 apt install libexslt
# 31*
# 32 ls -al /lib/aarch64-linux-gnu/
# 33 ls -al /usr/lib/aarch64-linux-gnu/
# 34 history
# 1 cd ~
# 2 apt update
# 3 apt install wget perl perl-dev perl-app-cpanminus bash git curl make gcc musl-dev openssl openssl-dev libxslt libxslt-dev libgcrypt-dev unzip gnupg xz-libs
# 4 apt install wget perl perl-dev perl-app-cpanminus bash git curl make gcc musl-dev openssl libssl-dev libxslt libxslt-dev libgcrypt-dev unzip gnupg xz-libs
# 5 apt install wget perl perl-devel perl-app-cpanminus bash git curl make gcc musl-dev openssl libssl-dev libxslt libxslt-dev libgcrypt-dev unzip gnupg xz-libs
# 6 apt install wget perl cpanminus bash git curl make gcc musl-dev openssl libssl-dev libxslt libxslt-dev libgcrypt-dev unzip gnupg xz-libs
# 7 apt install wget perl cpanminus bash git curl make gcc musl-dev openssl libssl-dev libxslt-dev libgcrypt-dev unzip gnupg xz-libs
# 8 apt install wget perl cpanminus bash git curl make gcc musl-dev openssl libssl-dev libxslt-dev libgcrypt-dev unzip gnupg zlib
# 9 apt install wget perl cpanminus bash git curl make gcc musl-dev openssl libssl-dev libxslt-dev libgcrypt-dev unzip gnupg zlib1g
# 10 apt install wget perl cpanminus bash git curl make gcc musl-dev openssl libssl-dev libxslt-dev libgcrypt-dev unzip gnupg zlib1g
# 11 export PERL_CPANM_OPT --verbose --mirror https://cpan.metacpan.org --mirror-only
# 12 export PERL_CPANM_OPT="--verbose --mirror https://cpan.metacpan.org --mirror-only"
# 13 export PERL_TEST_POD=1
# 14 cpanm CPAN
# 15 cpanm CPAN Test::Regexp Test::Pod
# 16 cpanm CPAN Test::Regexp Test::Pod inc::latest Archive::Zip
# 17 git clone https://github.com/redhotpenguin/perl-Archive-Zip.git && cd perl-Archive-Zip/ && perl Makefile.PL && make && make test && make install && cd /
# 18 cd ~
# 19 cpanm Net::SSLeay IO::Socket::SSL LWP::Protocol::https Business::ISBN Business::ISMN Business::ISSN Class::Accessor Data::Compare Data::Dump Data::Uniqid Dist::CheckConflicts DateTime::Calendar::Julian DateTime::Format::Builder Encode::EUCJPASCII Encode::HanExtra Encode::JIS2K File::Slurper Lingua::Translit List::AllUtils List::MoreUtils List::MoreUtils::XS Log::Log4perl PerlIO::utf8_strict Parse::RecDescent Regexp::Common Sort::Key Text::BibTeX Text::CSV Text::CSV_XS Text::Roman Unicode::Collate Unicode::GCString Unicode::LineBreak XML::LibXML XML::LibXML::Simple XML::LibXSLT XML::Writer autovivification Config::AutoConf ExtUtils::LibBuilder File::Which Test::Differences IO::String Unicode::Normalize Getopt::ArgvFile Module::ScanDeps PAR PAR::Dist
# 20 perl -MCPAN -e 'my $c = "CPAN::HandleConfig"; $c->load(doit => 1, autoconfig => 1); $c->edit(recommends_policy => "0"); $c->commit'
# 21 cpanm PAR::Packer
# 22 apt install libperl-dev
# 23 cpanm PAR::Packer
# 24 git clone https://github.com/plk/biber
# 25 cd biber
# 26 perl ./Build.PL
# 27 ./Build installdeps
# 28 echo $?
# 29 ./Build test
# 30 ./Build install
# 31 /usr/local/bin/biber -h
# 32 cd dist/
# 33 ls
# 34 cd linux_armel/
# 35 ls
# 36 builtin
# 37 ./build.sh
# 38 perl -v
# 39 cat build.sh
# 40 which perl
# 41 ls -la /usr/bin/perl
# 42 which pp
# 43 vim build.sh
# 44 apt isntall vim
# 45 apt install vim
# 46 vim build.sh
# 47 ./build.sh
# 48 ls
# 49 cd ../
# 50 ls /usr/local/share/perl/5.32.1/
# 51 ls /usr/local/share/perl/5.32.1/Biber
# 52 vim build.sh
# 53 cd linux_armel/
# 54 ls
# 55 /usr/local/bin/biber
# 56 vim build.sh
# 57 ./build.sh
# 58 echo $?
# 59 /usr/local/bin/biber -h
# 60 ls /usr/lib/aarch64-linux-gnu/perl-base/
# 61 ls /usr/local/lib/aarch64-linux-gnu/perl/5.32.1/auto/Text/BibTeX/
# 62 vim /usr/lib/aarch64-linux-gnu/perl-base/DynaLoader.pm
# 63 vim /usr/lib/aarch64-linux-gnu/perl-base/DynaLoader.pm
# 64 ls /usr/local/lib/aarch64-linux-gnu/perl/5.32.1/auto/Text/BibTeX/BibTeX.so
# 65 /usr/local/bin/biber -h
# 66 cd /
# 67 ls
# 68 wget http://mirror.archlinuxarm.org/aarch64/community/biber-1:2.16-1-any.pkg.tar.xz
# 69 tar -xvf biber-1\:2.16-1-any.pkg.tar.xz
# 70 mv biber-1\:2.16-1-any.pkg.tar.xz biber.pkg.tar.xz
# 71 ls
# 72 tar -xvf biber.pkg.tar.xz
# 73 cd ~/biber/
# 74 lz
# 75 lz
# 76 ls
# 77 cd bin/
# 78 ls
# 79 ./biber -h
# 80 ls
# 81 ls /usr/local/lib/aarch64-linux-gnu/perl/5.32.1/auto/Text/BibTeX/BibTeX.so
# 82 ls -la /usr/local/lib/aarch64-linux-gnu/perl/5.32.1/auto/Text/BibTeX/BibTeX.so
# 83 cd ../dist/
# 84 ls
# 85 cd linux_aarch64-musl/
# 86 ls
# 87 ./build.sh
# 88 ls /usr/lib/libxml2.so.2
# 89 ls /usr/lib/libxml2.so
# 90 apt isntall libxml2
# 91 apt install libxml2
# 92 ls /usr/lib/
# 93 ls /usr/lib/aarch64-linux-musl/
# 94 ls /usr/lib/aarch64-linux-gnu/
# 95 ls
# 96 cat build.sh
# 97 cp build.sh my-build.sh
# 98 byobu
# 99 apt install byuobu
# 100 apt install byobu
# 101 byobu
# 102 history
#!/usr/bin/env bash
set -e
ARCH=$(uname -a | awk '{print $(NF-1)}')
echo "Arch: $ARCH"
cd /tmp/
wget http://mirrors.ctan.org/macros/latex/contrib/pax/pax-tds.zip
unzip pax-tds.zip
cd scripts/pax/
if [ "$ARCH" = "x86_64" ]
then
apt-get update
apt-get install -y cpanminus
cpanm File::Which
apt-get remove -y cpanminus
apt-get autoremove -y
fi
./pdfannotextractor.pl --install
cp ./pdfannotextractor.pl /
cd /
rm -rf /tmp/*
/pdfannotextractor.pl --version
echo "Done."
......@@ -15,3 +15,4 @@ npm -v
http-server -v
[ -d /usr/share/fonts/truetype/cmu/ ]
convert -version
/pdfannotextractor.pl --version
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment