Update README fix meson build
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Project cannot be built until https://github.com/mesonbuild/meson/pull/7458 lands.
This commit is contained in:
parent
bde99e3ede
commit
c842c02c6f
3 changed files with 75 additions and 20 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,6 +2,8 @@
|
||||||
build/
|
build/
|
||||||
target/
|
target/
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
|
.vscode
|
||||||
|
.ccls-cache
|
||||||
|
|
||||||
# Created by https://www.gitignore.io/api/vim,c++,emacs,ninja
|
# Created by https://www.gitignore.io/api/vim,c++,emacs,ninja
|
||||||
# Edit at https://www.gitignore.io/?templates=vim,c++,emacs,ninja
|
# Edit at https://www.gitignore.io/?templates=vim,c++,emacs,ninja
|
||||||
|
|
72
README.md
72
README.md
|
@ -5,9 +5,9 @@ Do What I Mean Extractor
|
||||||
|
|
||||||
![https://xkcd.com/1168/](https://imgs.xkcd.com/comics/tar.png)
|
![https://xkcd.com/1168/](https://imgs.xkcd.com/comics/tar.png)
|
||||||
|
|
||||||
Continuing the emacs tradition of "Do What I Mean" tools, dtrx is a replacement
|
Continuing the emacs tradition of "Do What I Mean" tools, xwim is a replacement
|
||||||
for the excellent, but unfortunately unmaintained,
|
for the excellent, but unfortunately unmaintained,
|
||||||
[dtrx](https://github.com/brettcs/dtrx). `xwim` is a command line tool that
|
[dtrx](https://github.com/brettcs/dtrx). xwim is a command line tool that
|
||||||
targets two problems with archives:
|
targets two problems with archives:
|
||||||
|
|
||||||
- Command line tools for extracting archives are often archaic and differ
|
- Command line tools for extracting archives are often archaic and differ
|
||||||
|
@ -19,13 +19,12 @@ targets two problems with archives:
|
||||||
Invoking `xwim` is as simple as:
|
Invoking `xwim` is as simple as:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
xim archive.tar.gz
|
xwim archive.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
This will extract the archive `archive.tar.gz` to the current folder. If the
|
This will extract the archive to the current folder. If the archive contains a
|
||||||
archive contains a single root folder named like the archive, it is just
|
single root folder it is just extracted as is. Otherwise xwim first creates a
|
||||||
extracted as is. Otherwise `xwim` first creates a folder named after the archive
|
folder named after the archive and extracts the contents there.
|
||||||
and extracts the contents there.
|
|
||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
|
@ -41,7 +40,7 @@ archive.tar.gz
|
||||||
-- file2.txt
|
-- file2.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
`xwim` will just extract the archive to the current directory.
|
xwim will just extract the archive to the current directory.
|
||||||
|
|
||||||
## Multiple files/folders in archive root
|
## Multiple files/folders in archive root
|
||||||
|
|
||||||
|
@ -59,9 +58,7 @@ archive.tar.gz
|
||||||
archive contents there.
|
archive contents there.
|
||||||
|
|
||||||
# Supported formats
|
# Supported formats
|
||||||
`xwim` is indifferent to the actual extraction backend. However, currently only
|
xwim supports most formats supported by [libarchive](https://libarchive.org/):
|
||||||
[libarchive](https://libarchive.org/) is supported. `xwim` supports most formats
|
|
||||||
supported by `libarchive`:
|
|
||||||
|
|
||||||
- 7-zip: 7z, 7zip
|
- 7-zip: 7z, 7zip
|
||||||
- zip: jar, zip
|
- zip: jar, zip
|
||||||
|
@ -70,3 +67,56 @@ supported by `libarchive`:
|
||||||
- xzip: xz
|
- xzip: xz
|
||||||
- rar: rar
|
- rar: rar
|
||||||
- tar with compression: tgz, tar.gz, tar.bz2, tar.xz
|
- tar with compression: tgz, tar.gz, tar.bz2, tar.xz
|
||||||
|
|
||||||
|
# Install
|
||||||
|
xwim is currently released as a dynamically linked glibc binary only. The
|
||||||
|
releases can be downloaded from https://git.friedl.net/incubator/xwim/releases
|
||||||
|
and should run on most glibc based GNU/Linux distributions. The following
|
||||||
|
dependencies have to be installed:
|
||||||
|
- [spdlog](https://github.com/gabime/spdlog)
|
||||||
|
- [fmt](https://github.com/fmtlib/fmt)
|
||||||
|
- [libarchive](https://github.com/libarchive/libarchive)
|
||||||
|
|
||||||
|
Approaching the first stable release we will release for more platforms.
|
||||||
|
|
||||||
|
# Build
|
||||||
|
xwim is built with [meson](https://mesonbuild.com/). To compile xwim from source
|
||||||
|
you need:
|
||||||
|
- [meson](https://mesonbuild.com/)
|
||||||
|
- [ninja](https://ninja-build.org/)
|
||||||
|
- GCC or Clang (others may work too) supporting C++17
|
||||||
|
|
||||||
|
Additionally you need some libraries installed:
|
||||||
|
- [spdlog](https://github.com/gabime/spdlog)
|
||||||
|
- [fmt](https://github.com/fmtlib/fmt)
|
||||||
|
- [libarchive](https://github.com/libarchive/libarchive)
|
||||||
|
|
||||||
|
|
||||||
|
``` shell
|
||||||
|
# Get the source
|
||||||
|
git clone https://git.friedl.net/incubator/xwim.git
|
||||||
|
|
||||||
|
# Build xwim executable
|
||||||
|
cd xwim
|
||||||
|
meson build
|
||||||
|
cd build
|
||||||
|
meson compile
|
||||||
|
|
||||||
|
# Run executable on the test archive
|
||||||
|
# This will extract root.tar.gz to
|
||||||
|
# the current working directory
|
||||||
|
src/xwim test/archives/root.tar.gz
|
||||||
|
```
|
||||||
|
|
||||||
|
# Contributing
|
||||||
|
While xwim is still in incubator phase (i.e. before version 1.0) it's main
|
||||||
|
repository is hosted on https://git.friedl.net/incubator/xwim with a mirror on
|
||||||
|
https://github.com/arminfriedl/xwim. With the first stable release it will most
|
||||||
|
likely move to GitHub as it's main repository.
|
||||||
|
|
||||||
|
If you want to contribute, you can either issue a pull request on it's Github
|
||||||
|
mirror (will be cherry picked into the main repository) or send patches to
|
||||||
|
`dev [at] friedl [dot] net`.
|
||||||
|
|
||||||
|
If you are interested in a long-term co-maintainership you can also drop me a
|
||||||
|
mail for an account on https://git.friedl.net.
|
||||||
|
|
|
@ -25,10 +25,13 @@ doxyfile = configure_file(input: 'Doxyfile.in',
|
||||||
|
|
||||||
datadir = join_paths(get_option('datadir'), 'doc','xwim')
|
datadir = join_paths(get_option('datadir'), 'doc','xwim')
|
||||||
|
|
||||||
html_target = custom_target('doc',
|
# Must be disabled for now until https://github.com/mesonbuild/meson/pull/7458
|
||||||
build_always_stale : not meson.is_subproject(),
|
# lands
|
||||||
input: doxyfile,
|
# html_target = custom_target('doc',
|
||||||
output: 'html',
|
# build_always_stale : not meson.is_subproject(),
|
||||||
command: [doxygen, doxyfile],
|
# input: doxyfile,
|
||||||
install: not meson.is_subproject(),
|
# output: 'html',
|
||||||
install_dir: datadir)
|
# command: [doxygen, '@INPUT@'],
|
||||||
|
# install: not meson.is_subproject(),
|
||||||
|
# install_dir: datadir,
|
||||||
|
# compilers: doxygen)
|
||||||
|
|
Loading…
Reference in a new issue