Commit Graph

78 Commits

Author SHA1 Message Date
Casey Rodarmor
21a87a46f3
Improve imdl torrent create flags
Add short flags and make some long flags shorter.

type: added
2020-04-07 19:01:15 -07:00
Casey Rodarmor
3276f2d043
Add short flags to imdl torrent {show,verify}
type: added
2020-04-07 19:01:15 -07:00
Casey Rodarmor
027b229df1
Test piece-hashing edge cases
- Uneven last piece
- Even last piece
- Piece that spans multiple files
- Multiple pieces in one file

type: testing
2020-04-07 19:01:14 -07:00
Casey Rodarmor
2b19a62134
Test creating torrents from . and ..
Test that torrent gets actual name of directory, and is created in the
correct location.

type: testing
2020-04-07 19:01:14 -07:00
Casey Rodarmor
fa6d4e6ad0
Revise command line value names
Make command line value names make sense in context. For example,
`--announce URL` instead of `--announce ANNOUNCE`.

type: documentation
2020-04-07 19:01:14 -07:00
Casey Rodarmor
cba238470d
Remove long_help in favor of help
Maintaining two help strings in order to have a shorter help message
doesn't seem worth it.

type: documentation
2020-04-07 19:01:14 -07:00
Casey Rodarmor
4fffa777b4
Refactor Opt into Arguments, Options, and Subcommand
type: reform
2020-04-07 19:01:14 -07:00
RJ Rybarczyk
eb8efaf528
Fix hidden method unused arg warning
type: fixed
2020-04-07 19:01:13 -07:00
Casey Rodarmor
1c22623df4
Trigger GitHub actions build on either push and PR to master
type: development
2020-04-07 19:01:13 -07:00
Casey Rodarmor
f2a5f13729
Format with unstable rustfmt options
- Format with nightly rustfmt
- Enable unstable options in rustfmt.toml
- Turn off git text file detection, so newlines are always unix newlines

type: reform
2020-04-07 19:01:07 -07:00
Casey Rodarmor
d71bdffda1
Refactor tests and improve verification
Improve verification somewhat, but mostly refactor tests
to use test tree, and be nicer to read and write.

type: changed
2020-04-07 19:01:07 -07:00
Casey Rodarmor
2fb5bdb933
Test that metainfo bencode representation is correct
Check that metadata is serialized to expected bencode representation.

type: testing
2020-04-07 19:01:06 -07:00
Casey Rodarmor
fdb18bb8d8
Update discord invite link
type: documentation
2020-04-07 19:01:06 -07:00
Casey Rodarmor
55f2fcc738
Add discord badge to readme
type: documentation
2020-04-07 19:01:06 -07:00
Casey Rodarmor
355f76b86d
Update badges
- Add crates.io badge
- Make build badge link to actions page

type: documentation
2020-04-07 19:01:06 -07:00
Casey Rodarmor
b0962722c7
Add Github Actions build badge to readme
Also change the name of the main workflow from Main to Build, since I'd
like the badge to say "Build | Passing".

type: documentation
2020-04-07 19:01:06 -07:00
Casey Rodarmor
1227628306
Use list of SHA1 digests for piece list
type: reform
2020-04-07 19:01:06 -07:00
Casey Rodarmor
9787344d9e
Fix torrent verify about message
type: fixed
2020-04-07 19:01:05 -07:00
Casey Rodarmor
165a7ea444
Support adding DHT bootstrap nodes to created torrents
The --dht-node flag can be used to add DHT bootstrap nodes to new torrents.

This is the only piece of metainfo-related functionality in BEP 5, so we can mark BEP
5 as implemented.

type: added
2020-04-07 19:01:05 -07:00
Casey Rodarmor
6549850dac
Add initial implementation of imdl torrent verify
Adds the command `imdl` torrent verify` to verify the contents of torrents.

This implementation is extremely naive. It does successfully verify torrents,
but it will produce unsatisfying results when a torrent fails verification. In
particular, it won't give any information about which pieces in a file were
corrupt.

type: added
2020-04-07 19:01:05 -07:00
Casey Rodarmor
b0f449b6ae
Drop serde_bencode in favor of bendy
For now depend on my branch on Github, until serde support and the value
type land in the main repo.

type: reform
2020-04-07 19:01:05 -07:00
Casey Rodarmor
9b696f78a7
Don't display tier labels if tiers only contain a single entry
type: changed
2020-04-07 19:01:05 -07:00
Casey Rodarmor
f7e9e80f97
Show files in single-file mode
Since it may be useful for scripting purposes, show file list, even for
single-file torrents.

type: changed
2020-04-07 19:01:04 -07:00
Casey Rodarmor
43d87c06b6
Display torrent file tree
Display the contents of torrents as tree of files when showing torrents
with `imdl torrent show` and after `imdl torrent create`.

The formatting and structure of the code was lifted entirely from torf.

type: added
2020-04-07 19:01:04 -07:00
Casey Rodarmor
a574368ffc
Allow including and excluding files from torrent with globs
To include only files that match a glob, pass `--glob GLOB`. To exclude
files that match a glob, pass `--glob GLOB`. Multiple globs may be
passed, with later globs taking precedence over earlier ones.

type: added
2020-04-07 19:01:04 -07:00
Casey Rodarmor
9158c230df
Skip hidden files, symlinks, and junk in created torrents
By default, skip the following when creating a torrent:

- Junk files, like `Thumbs.db`
- Files and directories that begin with a `.`
- Files and directories that have the OS or Windows hidden attribute set
- Symlinks

These can be overridden with, respectively:
- `--include-junk`
- `--include-hidden`
- `--include-hidden`
- `--follow-symlinks`

type: changed
2020-04-07 19:01:04 -07:00
Casey Rodarmor
3739a92857
Support creating multi-file torrents
type: added
2020-04-07 19:01:04 -07:00
Casey Rodarmor
551617de4f
Don't overwrite destination torrent without --force
type: changed
2020-04-07 19:01:04 -07:00
Casey Rodarmor
df3326510c
Write torrent to stdout if - is passed to --output
type: added
2020-04-07 19:01:03 -07:00
Casey Rodarmor
5a1de1acd2
Select piece length when none is provided
When no piece length is provided to imdl torrent create, a piece
length is selected based on the size of the input. The hueristic is
lifted directly from libtorrent.

Also adds a imdl torrent piece-length command, which prints a table
of the piece lengths chosen at different content sizes, which is useful
for understanding and debugging the piece length selection algorithm.

type: added
2020-04-07 19:01:03 -07:00
Casey Rodarmor
35a0e8f9b7
Improve torrent display formatting
- Use colors
- Use cut-friendly formatting when not writing to terminal
- Show sizes as number of bytes when not writing to terminal

type: changed
2020-04-07 19:01:03 -07:00
Casey Rodarmor
5c5dac1fe5
Add source to generated torrent with --source
Support adding a `source` key under the `info` dictionary. The `source`
key is commonly used to create distinct torrents for different trackers.

type: added
2020-04-07 19:01:03 -07:00
Casey Rodarmor
b9ca02fbaa
Show information about torrents after creation
type: changed
2020-04-07 19:01:03 -07:00
Casey Rodarmor
3971854eaa
Check for outdated dependencies before publishing
type: testing
2020-04-07 19:01:02 -07:00
Casey Rodarmor
99a069a021
Add imdl torrent show
The `imdl torrent show` command displays information about on-disk
torrent files. The formatting of the command's output is copied from
torf, an excellent command-line torrent creator, editor, and viewer.

type: added
2020-04-07 19:01:02 -07:00
Casey Rodarmor
6df45e0244
Restrict piece length
- Must be greater than zero
- Must be a power of two (but can override with `--allow uneven-piece-length`
- Must be greater than 16KiB (but can override with `--allow small-piece-length`
- Must be less than u32 max

type: changed
2020-04-07 19:01:02 -07:00
Casey Rodarmor
85f02d9f29
Add pyrocore to prior art section of readme
Pyrocore is an extensive suite of both general bittorrent and rtorrent
specific tools.

type: documentation
2020-04-07 19:01:02 -07:00
Casey Rodarmor
635692fdfa
Accept --piece-length arguments with SI units
Valid units include MiB, KiB, and GiB.

type: changed
2020-04-07 19:01:02 -07:00
Casey Rodarmor
eb6556ae6a
Replace favicon with pixel art rainbow text version
type: documentation
2020-04-07 19:01:02 -07:00
Casey Rodarmor
5611f35968
Add favicon to github pages
type: documentation
2020-04-07 19:01:01 -07:00
Casey Rodarmor
3f91f042c7
Fix github pages table jitter
Use grid, since tables are old and janky.

type: documentation
2020-04-07 19:01:01 -07:00
Casey Rodarmor
9ff627c29f
Make homepage A E S T H E T I C
type: documentation
2020-04-07 19:01:01 -07:00
Casey Rodarmor
460cf9ee0e
Disable bors
Nits with bors:
- Replaced my name with my username
- Doesn't show merge requests as merged
- Adds "merged by bors" to PRs
- Generates tons of spam
- Doesn't sign commits
- Creates tons of spam CI runs

type: development
2020-04-07 19:01:01 -07:00
Casey Rodarmor
2512b05ece
Fix Bors
type: development
2020-04-07 19:01:01 -07:00
Casey Rodarmor
e2c1f29160
Center symbols in BEP support table key in readme
type: documentation
2020-04-07 19:01:01 -07:00
Casey Rodarmor
48ca86c67c
Add Alternatives & Prior Art section to readme
type: documentation
2020-04-07 19:01:00 -07:00
Casey Rodarmor
ef5be39f9b
Update install instructions to new domain
Install script location is now https://imdl.io/install.sh

type: distribution
2020-04-07 19:01:00 -07:00
Casey Rodarmor
6461a00ba3
Test that wss:// trackers are accepted
type: testing
2020-04-07 19:01:00 -07:00
Casey Rodarmor
a6745e2a41
Configure Bors
Bors: I'll save you Meguca!

type: development
2020-04-07 19:01:00 -07:00
Casey Rodarmor
dc95bc53b2
Add github pages homepage
type: documentation
2020-04-07 19:01:00 -07:00