Commit graph

36 commits

Author SHA1 Message Date
92ac6586de
Restructure CompressSingleIntent 2024-03-02 16:27:21 +01:00
c8e6f51e1b
Reformat UserIntent 2024-02-28 18:55:09 +01:00
1aea5cd924
Cleanup UserIntent 2024-02-28 01:06:20 +01:00
293ee6e1cc
Get interactive mode from correct argument 2024-02-27 22:44:00 +01:00
5d9856c658
Control log level via -v option
Allow the user to control the log level via the conventional `-v`
command line option. Multiplying this option-as per convention-increases
the verbosity.

This is an additional way to set the log level, in addition to the
existing:
- environment variable
- build type (debug vs release)

Given it is the most intentional and direct way to set the log level it
has precedence over all other options.
2024-02-27 21:48:07 +01:00
65053bbcb9
Cleanup some unused includes 2024-02-27 21:47:34 +01:00
c6e0e92db2
Add more formats, delete leftovers 2022-06-25 21:36:08 +02:00
e6a6e9268e
Refactor to new structure 2022-06-25 19:57:19 +02:00
70ae623a1d
Restructure to util add split Intent and Options 2022-04-09 18:23:18 +02:00
fe4a5f4460
Use default_library for static build toggle 2021-02-24 21:25:17 +01:00
c3d9dd6360
Fix multiple folder compression 2021-02-21 12:07:19 +01:00
24f1407ed9
Fix folder compression 2021-02-21 12:02:01 +01:00
12afa628d0
Empty trailing path, bump version 2021-02-21 11:17:42 +01:00
6a7e98dbf6
Move extraction output according to plan 2021-02-20 07:26:07 +01:00
4c1c5bf00f
Compression 2021-02-19 06:07:32 +01:00
189be660f5
Refactoring and extraction 2021-02-19 05:28:06 +01:00
f5cddbc0f3
Cleanup 2021-02-14 11:46:03 +01:00
4945bbd45c
Add Makefile 2021-02-07 19:59:05 +01:00
6c8f0cb6bb
Don't return void 2021-01-31 22:26:53 +01:00
d9cbf47036
Relative root path in archive, clang-format, refactoring
Compressed archives now contain a single root which consists of the file or
folder being compressed. Before, the archive root contained the full relative
path form the current working directory to the compressed file or folder. This
is unintuitive in most cases and not dwim.
2020-08-03 01:26:52 +02:00
cdb3775eb6
Compression of single folders/files
Platform specific compression (Windows: zip, Unix: tar.gz) for single files or
folders
2020-08-02 12:58:22 +02:00
9230a606ae
Prepare compression implementation
Remove bailout on non-archive argument. Extract extraction and compression into
two conditionally called methods.
2020-08-01 21:12:44 +02:00
7058c326c6
Add argument parser
- Provides better handling of invalid invocation
- Provides usage output
- More flexible for future extension (e.g. compression)
2020-08-01 20:20:27 +02:00
53a15e5a7f
Determine log level dynamically
The log level can now be set by environment variable `XWIM_LOGLEVEL`.
Alternatively a default log level per build type (determined by NDEBUG flag) is
used.
2020-08-01 11:41:49 +02:00
bde99e3ede
Fix archive_entry double free
archive_read_free also frees archive_entries. Avoid
double-free by removing manual free'ing of entry.
2020-03-21 23:56:30 +01:00
9cb65ce856
Add tests 2020-02-25 23:01:41 +01:00
6a2aa756ca
Switch to glibc build 2020-02-23 21:48:48 +01:00
e59968444e
[feat] Add known fileformats
Reliably stripping (multiple) archive extensions (e.g. .tar.gz) is not supported
by std::filesystem::path. Dots in the regular root folder name can cause issues.

fileformats.hpp adds well-known format extensions which are used for stripping
the extension.

Note that this is not used by libarchive or xwim to determine the
filters/formats for extraction. This is done by libarchive's `bidding`.
2020-02-23 15:28:16 +01:00
064c936f11
[fix] Extractor falls out of scope
Extractor was created and destroyed within the if scope, leading to
a dereference error when trying to call the virtual writer methods.
2020-02-23 09:56:33 +01:00
86ab4a5050
Clean up reader and writer 2020-02-23 01:27:43 +01:00
8249a2f017
archive_sys refactoring: ArchiveEntryView
Entries in libarchive archives are forward iterate only. Entries are owned by
the current archive. Reading the next header can hence invalidate the current
entry.

ArchiveEntrySys was replaced by ArchiveEntryView. ArchiveEntryView now only
guarantees a temporary view of the currently active archive entry.
2020-02-22 20:13:32 +01:00
351849e03f
Add documentation, archive_sys FFI
* Add doxygen documentation generator into build
* Create archive_sys low-level abstraction over libarchive
2020-02-22 13:49:27 +01:00
2b5e6a2659 Create ExtractSpec 2020-02-20 21:09:47 +01:00
008973a7e8 Determine extract spec 2020-02-18 23:42:19 +01:00
d33d0ba544 Read archive spec 2020-02-18 04:48:09 +01:00
da51040bde Init 2020-02-16 03:20:12 +01:00