genuinetools / apk-file Goto Github PK
View Code? Open in Web Editor NEWSearch apk package contents via the command line.
License: MIT License
Search apk package contents via the command line.
License: MIT License
What about adding a test for the HTML parsing in case that the search results page change?.
I was thinking that we can make the test actually hit https://pkgs.alpinelinux.org/contents to retrieve the page but that would require tests to run with a working inet connection.
Otherwise, we can just hardcode the html so we can test the parsing code.
Thoughts?
๐
for each row, the repo and arch fields (regardless of how long the row is) seem to move to their own newline. I've tested that in a terminal emulator and tty for an ssh session, and in a chroot. In all cases it's the same behaviour.
Running without -arch
:
> apk-file bin/dig
FILE PACKAGE BRANCH REPOSITORY ARCHITECTURE
/usr/bin/dig bind-tools edge main aarch64
/usr/bin/dig bind-tools edge main armhf
/usr/bin/dig bind-tools edge main ppc64le
/usr/bin/dig bind-tools edge main s390x
/usr/bin/dig bind-tools edge main armv7
/usr/bin/dig bind-tools edge main x86_64
/usr/sbin/digest-service heimdal-libs edge main x86_64
/usr/sbin/digest-service heimdal-libs edge main x86
/usr/sbin/digest-service heimdal-libs edge main aarch64
/usr/sbin/digest-service heimdal-libs edge main armhf
/usr/sbin/digest-service heimdal-libs edge main ppc64le
/usr/sbin/digest-service heimdal-libs edge main s390x
/usr/sbin/digest-service heimdal-libs edge main armv7
/usr/bin/dighosts 3proxy edge testing x86_64
/usr/bin/dighosts 3proxy edge testing aarch64
/usr/bin/dighosts 3proxy edge testing armhf
/usr/bin/dighosts 3proxy edge testing armv7
/usr/bin/dighosts 3proxy edge testing x86
/usr/bin/dighosts 3proxy edge testing ppc64le
/usr/bin/dighosts 3proxy edge testing s390x
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph.beam erlang-stdlib edge community x86_64
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph.beam erlang-stdlib edge community x86
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph.beam erlang-stdlib edge community armhf
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph.beam erlang-stdlib edge community armv7
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph.beam erlang-stdlib edge community aarch64
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph.beam erlang-stdlib edge community ppc64le
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph.beam cloudi edge community ppc64le
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph.beam cloudi edge community s390x
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph.beam cloudi edge community x86_64
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph.beam cloudi edge community x86
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph.beam cloudi edge community armv7
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph.beam cloudi edge community aarch64
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph.beam cloudi edge community armhf
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph.beam erlang-stdlib edge community s390x
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph_utils.beam erlang-stdlib edge community x86_64
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph_utils.beam erlang-stdlib edge community x86
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph_utils.beam erlang-stdlib edge community armhf
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph_utils.beam erlang-stdlib edge community armv7
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph_utils.beam erlang-stdlib edge community aarch64
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph_utils.beam erlang-stdlib edge community ppc64le
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph_utils.beam cloudi edge community ppc64le
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph_utils.beam cloudi edge community s390x
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph_utils.beam cloudi edge community x86_64
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph_utils.beam cloudi edge community x86
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph_utils.beam cloudi edge community armv7
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph_utils.beam cloudi edge community aarch64
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph_utils.beam cloudi edge community armhf
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph_utils.beam erlang-stdlib edge community s390x
With -arch x86_64
:
> apk-file -arch x86_64 bin/dig
FILE PACKAGE BRANCH REPOSITORY ARCHITECTURE
/usr/sbin/digest-service heimdal-libs edge main x86_64
/usr/bin/dighosts 3proxy edge testing x86_64
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph.beam erlang-stdlib edge community x86_64
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph.beam cloudi edge community x86_64
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph_utils.beam erlang-stdlib edge community x86_64
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph_utils.beam cloudi edge community x86_64
/usr/bin/dig
from the bind-tools package is not shown in the results, even though clearly stated it exists for the specified architecture when not using the -arch
option.
Expected output:
FILE PACKAGE BRANCH REPOSITORY ARCHITECTURE
/usr/bin/dig bind-tools edge main x86_64
/usr/sbin/digest-service heimdal-libs edge main x86_64
/usr/bin/dighosts 3proxy edge testing x86_64
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph.beam erlang-stdlib edge community x86_64
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph.beam cloudi edge community x86_64
/usr/lib/erlang/lib/stdlib-3.9.2/ebin/digraph_utils.beam erlang-stdlib edge community x86_64
/usr/lib/cloudi-1.7.5/lib/stdlib-3.9.2/ebin/digraph_utils.beam cloudi edge community x86_64
Hi. I'm a graphic designer. I wanted to contribute to your project for free, i'm waiting your feedback. Thanks .. Best Regard. Mirza Zulfan.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.