Skip to content

Commit

Permalink
dev(narugo): add more docs in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
narugo1992 committed Dec 28, 2023
1 parent 0d363db commit 6916d14
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,19 @@ hfutils download -h

```

## Supported Formats

By default, we support the `zip` and `tar` formats, including `.zip`, `.tar`, `.tar.gz`, `.tar.bz2`, and `.tar.xz`.

If you require support for `rar` and `7z` files, install the extra dependencies using the following command:

```shell
pip install hfutils[rar,7z]
```

**NOTE:** Creating RAR archive files is not supported. We use the [rarfile](https://github.com/markokr/rarfile) library,
which lacks the functionality for creating RAR files.

## How to Access Private Repositories

Simply configure the `HF_TOKEN` environment variable by using your HuggingFace access token.
Expand Down
11 changes: 11 additions & 0 deletions hfutils/archive/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
Supported Formats:
.. include:: supported_types.demo.py.txt
.. note::
If you require support for 7z and RAR formats, simply install ``hfutils`` using the following code:
.. code:: shell
pip install hfutils[7z]
pip install hfutils[rar]
.. warning::
The creation of archive files in the RAR format is not supported, as we utilize the `rarfile <https://github.com/markokr/rarfile>`_ library, which does not offer functionality for creating RAR files.
"""
from .base import register_archive_type, archive_pack, archive_unpack, get_archive_type, get_archive_extname
from .rar import _rar_pack, _rar_unpack
Expand Down

0 comments on commit 6916d14

Please sign in to comment.