Skip to content

Commit

Permalink
Describe in FAQ creating torrent from git repo
Browse files Browse the repository at this point in the history
type: documentation
  • Loading branch information
casey committed Apr 21, 2020
1 parent 9b72873 commit 838167c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog

UNRELEASED - 2020-04-21
-----------------------
- :sparkles: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Optionally respect `.gitignore` in `imdl torrent create` - Fixes [#378](https://github.com/casey/intermodal/issues/378) - _Celeo <celeodor@gmail.com>_
- :books: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Describe in FAQ creating torrent from git repo - _Casey Rodarmor <casey@rodarmor.com>_
- :sparkles: [`9b72873ed13e`](https://github.com/casey/intermodal/commit/9b72873ed13e8f0ae747714545c48c6e37c67dd0) Optionally respect `.gitignore` in `imdl torrent create` - Fixes [#378](https://github.com/casey/intermodal/issues/378) - _Celeo <celeodor@gmail.com>_
- :books: [`9f480624616b`](https://github.com/casey/intermodal/commit/9f480624616b77995befec722effda22cc2d06ad) Improve FAQ template - _Casey Rodarmor <casey@rodarmor.com>_
- :wrench: [`1380290eb8e2`](https://github.com/casey/intermodal/commit/1380290eb8e222605f368bc8346a1e63c83d9af7) Make `publish-check` recipe stricter - _Casey Rodarmor <casey@rodarmor.com>_

Expand Down
16 changes: 16 additions & 0 deletions bin/gen/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,19 @@ faq:
This can be used to, for example, preview the torrents in a directory:
find . -name '*.torrent' | fzf --preview='imdl -c always -t torrent show -i {}'
- title: Can intermodal be used to create a torrent from a Git repo?
anchor: git-repo
text: |-
Yes! The `--ignore` flag, contributed by [@Celeo](https://github.com/Celeo), can be used
to make `imdl torrent create` respect `.gitignore` files:
imdl torrent create --ignore --include-hidden --include-junk --glob '!.git/*' --input .
In addition to `--ignore`, `--include-hidden`, `--include-junk`, and `--glob '!.git/*'`
are used to include files, like `.gitignore`, that are present in the repo but would
otherwise be skipped, and to skip the contents of the `.git` directory.
Equivalently, with short flags:
imdl torrent create --ignore -hjg '!.git/*' -i .
19 changes: 19 additions & 0 deletions book/src/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ FAQ

- [Can intermodal be used to preview torrents with `fzf`?](#fzf-preview)

- [Can intermodal be used to create a torrent from a Git repo?](#git-repo)



<a name="fzf-preview"></a>
Expand All @@ -19,3 +21,20 @@ _Note the use of `--color always` and `--terminal` to force colored, human reada
This can be used to, for example, preview the torrents in a directory:

find . -name '*.torrent' | fzf --preview='imdl -c always -t torrent show -i {}'

<a name="git-repo"></a>
## Can intermodal be used to create a torrent from a Git repo?
</h2>

Yes! The `--ignore` flag, contributed by [@Celeo](https://github.com/Celeo), can be used
to make `imdl torrent create` respect `.gitignore` files:

imdl torrent create --ignore --include-hidden --include-junk --glob '!.git/*' --input .

In addition to `--ignore`, `--include-hidden`, `--include-junk`, and `--glob '!.git/*'`
are used to include files, like `.gitignore`, that are present in the repo but would
otherwise be skipped, and to skip the contents of the `.git` directory.

Equivalently, with short flags:

imdl torrent create --ignore -hjg '!.git/*' -i .

0 comments on commit 838167c

Please sign in to comment.