• Stars
    star
    368
  • Rank 115,958 (Top 3 %)
  • Language
    Rust
  • License
    Creative Commons ...
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A command-line utility for BitTorrent torrent file creation, verification, and more

Intermodal

A 40' shipping container for the Internet

crate build book chat

Intermodal is a user-friendly and featureful command-line BitTorrent metainfo utility. The binary is called imdl and runs on Linux, Windows, and macOS.

At the moment, creation, viewing, and verification of .torrent files is supported. See the book for examples and usage information.

For more about the project and its goals, check out this post.

demonstration animation

Table of Contents

Installation

Supported Operating Systems

imdl supports Linux, MacOS, and Windows, and should work on other unix OSes. If it does not, please open an issue!

Packages

Operating System Package Manager Package Command
Various Cargo imdl cargo install imdl
Arch Linux Yay intermodal-binAUR yay -S intermodal-bin
Arch Linux Yay intermodalAUR yay -S intermodal
Arch Linux Manual Installation intermodalAUR wiki
Void Linux XBPS intermodal xbps-install -S intermodal
Windows Scoop intermodal scoop install intermodal

Pre-built binaries

Pre-built binaries for Linux, macOS, and Windows can be found on the releases page.

Linux and MacOS Install Script

You can use the following command on Linux and MacOS to download the latest binary, just replace DEST with the directory where you'd like to install the imdl binary:

curl --proto '=https' --tlsv1.2 -sSf https://imdl.io/install.sh | bash -s -- --to DEST

A good place to install personal binaries is ~/bin, which install.sh uses when --to is not supplied. To create the ~/bin directory and install imdl there, do:

curl --proto '=https' --tlsv1.2 -sSf https://imdl.io/install.sh | bash

Additionally, you'll have to add ~/bin to the PATH environment variable, which the system uses to find executables. How to do this depends on the shell.

For sh, bash, and zsh, it should be done in ~/.profile:

echo 'export PATH=$HOME/bin:$PATH' >> ~/.profile

For fish, it should be done in ~/.config/fish/config.fish:

echo 'set -gx PATH ~/bin $PATH' >> ~/.config/fish/config.fish

Cargo

imdl is written in Rust and can be built from source and installed with cargo install imdl. To get Rust, use the rustup installer.

Shell Completion Scripts

Shell completion scripts for Bash, Zsh, Fish, PowerShell, and Elvish are included in all binary releases.

For Bash, move imdl.bash to $XDG_CONFIG_HOME/bash_completion or /etc/bash_completion.d/.

For Fish, move imdl.fish to $HOME/.config/fish/completions/.

For the Z shell, move _imdl to one of your $fpath directories.

For PowerShell, add . _imdl.ps1 to your PowerShell profile (note the leading period). If the _imdl.ps1 file is not on your PATH, do . /path/to/_imdl.ps1 instead.

The imdl binary can also generate the same completion scripts at runtime, using the completions command:

$ imdl completions --shell bash > imdl.bash

The --dir argument can be used to write a completion script into a directory with a filename that's appropriate for the shell. For example, the following command will write the Z shell completion script to $fpath[0]/_imdl:

$ imdl completions --shell zsh --dir $fpath[0]

Usage

Online documentation is available in the book, hosted here.

Commands

Adding --help to any command will print help text about how to use that command, including detailed information about any command-line arguments it accepts.

So, to get information about imdl torrent create, run imdl torrent create --help.

Additionally, the same help text is available online in the book.

Examples

The intro to the book has a few simple examples. Check the FAQ for more complex usage examples.

FAQ

The FAQ covers a variety of specific use-cases. If there's a use case you think should be covered, feel free to open an issue.

Notes for Packagers

First off, thank you very much! If I can do anything to make packaging Intermodal easier, please don't hesistate to open an issue.

The Intermodal binary is called imdl, and the suggested name for the package is intermodal.

Intermodal is written in Rust, and can be built with cargo build --release.

Intermodal is distributed under the Creative Commons Zero, a public domain dedication with a fallback all-permissive license. The SPDX identifier of the CC0 is CC0-1.0.

Build Artifacts

There are a number of build artifacts: the binary, the man pages, the changelog, and the shell completion scripts.

The binary is built with cargo, and the other artifacts are built gen, located in bin/gen.

The binary can be built with:

cargo build --release

gen requires help2man to be installed, which is used to generate man pages from subcommand --help strings.

The rest of the build artifacts can be built with gen:

cargo run --package gen -- --bin target/release/imdl all

The path to the built imdl executable should be passed to gen with the --bin flag.

After running the above commands, the following table shows the location of the built artifacts.

Artifact Location
Binary target/release/imdl
Man Pages target/gen/man/*
Completion Scripts target/gen/completions/*
Changelog target/gen/CHANGELOG.md
Readme target/gen/README.md

Release Updates

If you'd like to receive an update whenever a new version is released, you can watch the intermodal repository in "Releases only" mode.

Chat

The primary chat is on Discord.

Contributing

Your bug reports, feature requests, pull requests, and design help are much appreciated!

Check out issues with the "good first issue" label for some ideas.

Quite a few files are generated by the program in bin/gen. Some files are generated from templates, so those templates should be edited to make changes to those files:

  • bin/gen/templates/SUMMARY.md -> book/src/SUMMARY.md
  • bin/gen/templates/README.md -> README.md
  • bin/gen/templates/introduction.md -> book/src/introduction.md

Some files are completely generated, and so shouldn't be manually edited at all:

  • CHANGELOG.md
  • book/src/commands/*
  • completions/*
  • man/*

All files can be regenerated by running cargo run --package gen all, or just gen, if you have just installed.

The changelog is generated from YAML metadata in commit messages. Here is an example commit message, with metadata:

Upgrade foo

Upgrade foo to v7.5, which is much better.

type: changed
pr:
- https://github.com/casey/intermodal/pull/1
fixes:
- https://github.com/intermodal/issues/2
- https://github.com/intermodal/issues/3

The only required field is type. To see the possible values for type, run cargo run --package gen commit-types.

Benchmarks

Performance benchmarks can be run with:

$ cargo bench --features bench

The benchmark framework used is criterion.

The bench targets themselves are in the benches directory. These targets call benchmarking functions in src/benches.rs, which are only enabled when the bench feature is enabled.

Semantic Versioning

Intermodal follows semantic versioning.

In particular:

  • v0.0.X: Breaking changes may be introduced at any time.
  • v0.X.Y: Breaking changes may only be introduced with a minor version number bump.
  • vX.Y.Z: Breaking changes may only be introduced with a major version number bump

Unstable Features

To avoid premature stabilization and excessive version churn, unstable features are unavailable unless the --unstable / -u flag is passed, for example imdl --unstable torrent create .. Unstable features may be changed or removed at any time.

Acknowledgments

The formatting of imdl torrent show is entirely copied from torf, an excellent command-line torrent creator, editor, and viewer.

More Repositories

1

just

๐Ÿค– Just a command runner
Rust
13,324
star
2

ord

๐Ÿ‘โ€๐Ÿ—จ Rare and exotic sats
Rust
1,435
star
3

runestone

Runes: terrible idea or idรฉe terrible?
207
star
4

degenerate

A generative art computer
Rust
107
star
5

dotfiles

๐Ÿ“œ Dotfiles & Scripts
Shell
39
star
6

boilerplate

Statically-checked Rust template engine
Rust
26
star
7

blaster

โœฏ Audio reactive visuals engine in C++/OpenGL
C++
19
star
8

janus

๐ŸงJustfile ecosystem analysis tool
Rust
15
star
9

reap.vim

๐ŸงRead, evaluate, and annotate code in vim
Python
15
star
10

iota

A meditation on why there will never be an Internet of Toasters โ€“ https://casey.github.io/iota
HTML
13
star
11

tokio-by-hand

My attempt to understand Rust futures
Rust
13
star
12

dotify

โ ™โ •โ žโ Šโ ‹โ ฝ / convert bytes to braille and back again
Rust
12
star
13

edmv

๐Ÿ”„ Rename files with your favorite editor
Python
12
star
14

resume

A simple Rust resume generator
Rust
10
star
15

boot

boot / โ ›โ •โ žโ žโ โ €โ ƒโ •โ •โ žโ €โ ฎโ €โ โ ‘โ žโ โ โ โ กโ ”โ ‘
Shell
9
star
16

oi

๐Ÿ“ Location-annotated Errors
Rust
7
star
17

cargo-quickfix

Populate Vim quickfix files with Cargo messages
Rust
7
star
18

imglife

โขฅ Play Conway's Game of Life with images
Rust
7
star
19

nftparty

HTML
6
star
20

lexiclean

Rust library to lexically clean paths
Rust
6
star
21

dotbot-user-study

Python
5
star
22

brev

๐Ÿ’€ Do or die: quick and dirty utility functions in rust
Rust
4
star
23

9x

Plan 9 for Unix
4
star
24

ideas

Ideas, schemes, and half-baked notions
4
star
25

err-with

๐Ÿค” A simple Rust crate for adding context to errors
Rust
4
star
26

clap-config

Generate a config parser from a clap argument parser
Rust
4
star
27

glium-screenshot

Synchronous screenshot with glium
Rust
3
star
28

pd0

3
star
29

bak

๐Ÿ“ฆ Move files out of the way
Rust
3
star
30

unisearch

๐‘ผ Search unicode character descriptions
Rust
3
star
31

puzzlebox

๐Ÿ’Ž a tiny treasure
Python
3
star
32

src

ไทฏ Manage your personal repository zoo
Rust
3
star
33

remote

๐Ÿ“ก Generate remote repository strings
Rust
3
star
34

gossamer

Rust
3
star
35

position

โ˜ž Source position objects for Rust
Rust
2
star
36

nice-wallet

Wallet Desiderata
2
star
37

dotenv-compare

โฆฟ Compare and contrast dotenv implementations
Ruby
2
star
38

colour-lovers-rs

๐ŸŽจTools for interacting with COLOURlovers
Rust
2
star
39

e

Expression evaluator
C
2
star
40

temptree

Temporary trees of files
Rust
2
star
41

bitcoind-rpc-unavailable

Rust
2
star
42

warpwallet-rs

Rust
2
star
43

g

a better go
Shell
2
star
44

rust-bin-template

Rust Binary Project Template
Rust
2
star
45

ordinal-presentation

Ordinal Presentation
HTML
2
star
46

bips-chronological

Rust
2
star
47

bulb

Tulip Farm Discord bot
Rust
2
star
48

flotilla

โ›ต๏ธ Itty-bitty services
Go
2
star
49

edmunge

โ“ Use ed to munge your files
Rust
1
star
50

whim

An adventure in capitalism
Rust
1
star
51

powercycle

Rust
1
star
52

homebrew-bitcoind-build-logs

C++
1
star
53

bitcoind-rpc-timeout

Rust
1
star
54

target

Information about the current compilation target
Rust
1
star
55

bootstrap

Invoke `x.py` slightly more conveniently
Rust
1
star
56

annotated-torrents

Rich, structured content metadata for BitTorrent
1
star
57

rmr

โœ–๏ธŽ Audio reactive visuals engine in JavaScript/WebGL
JavaScript
1
star
58

uniblocks

A to ฮฉ: Print unicode blocks and the characters therein
Rust
1
star
59

blog

Rust
1
star
60

x-serialization-format

Rust
1
star
61

computer.txt

1
star
62

hosts

๐Ÿ’โ€โ™€๏ธ Manage your hosts file
Rust
1
star
63

nuketab

๐Ÿด Let fly the tabs of anarchy
HTML
1
star
64

worm

Write once read many key value storage service
Go
1
star