Commit Graph

264 Commits

Author SHA1 Message Date
ea3b22fccc public API 2022-10-11 16:15:03 +02:00
Casey Rodarmor
984543fcb9
Don't export rustflags
type: fixed
2021-10-13 19:47:49 -07:00
Casey Rodarmor
6c4805890b
Pass rustflags consistently
type: fixed
2021-10-11 18:49:10 -07:00
Casey Rodarmor
b82ccf1882
Add --base-directory to imdl torrent verify
type: added
2021-10-01 22:23:00 -07:00
Casey Rodarmor
379a001f47
Fix warnings and clippy errors
type: reform
2021-07-02 21:02:53 -07:00
Pika
2346c30fec
Add Scoop package to README
type: documentation
2021-05-02 22:26:27 -07:00
Casey Rodarmor
452486a782
Placate clippy
type: reform
2021-05-02 22:00:43 -07:00
Casey Rodarmor
61bbd3bad5
Skip generating changelog in tests
Changelog generation requires annotating commits with a commit type,
otherwise the tests will fail. This is annoying for contributors, since
it's unusual, and I often myself forget to do it, causing a round-trip
with tests.

So, skip generating the changelog during the tests. Also, change the
`--no-git` option for `gen book` and `gen all` to `--no-changelog`, so
it's clearer what it does.

I think I'll wind up just making a YAML file that contains commit types,
for changelog generation, so it doesn't have to be done in the commit
message.

type: testing
2021-01-08 22:10:07 -08:00
Casey Rodarmor
76ea6e5ed7
Tweak MetainfoDecode error message
Tweak the `MetainfoDecode` error message to make it different from the
`MetainfoDeserialize` error message. It's a fine distinction, but the
`MetainfoDeserialize` error message happens on any serde error when
deserializing, whereas the `MetainfoDecode` error message happens when
encountering invalid bencode.

Also placate Clippy by disabling `clippy::needless_lifetimes` lint.

type: reform
2021-01-06 17:10:22 -08:00
Casey Rodarmor
a7e0995c7d
Replace deprecated add path command
Also consolidate cache steps

type: development
2020-11-20 23:39:40 -08:00
Pika
05ba87039b
Add Void Linux package to README
type: documentation
2020-10-20 13:35:27 -07:00
Thomas Gardner
97ab785b7c
Implement FromStr for MagnetLink
type: added
2020-10-17 17:27:10 -07:00
Thomas Gardner
a787d6a964
Update clippy restrictions
type: changed
2020-10-10 16:41:12 -07:00
Casey Rodarmor
fa78cba0a5
Fix build fix
Fix the conditional that gates installing GNU Tar. This should actually
fix the build errors we've been seeing.

type: development
2020-10-04 13:16:31 -07:00
Casey Rodarmor
1e4d224dcb
Fix publish recipe
Previously, the release branch would be merged after pushing a tag to
github. This would cause the merge to fail, because github would kick
off a CI run after pushing the tag, and block the merge because it
wasn't finished.

This changes the publish recipe to merge before pushing the tag, which
aboves the above problem.

type: development
2020-10-02 20:25:28 -07:00
Casey Rodarmor
164a87d7ad
Release v0.1.12
- Bump version: 0.1.11 → 0.1.12
- Update dependencies

type: release
2020-10-02 19:54:29 -07:00
Celeo
0c17c3da49
Optionally print torrent details as JSON
Adds `--json` flag to `imdl torrent show` to print torrent details as
JSON.

type: added
2020-10-01 22:28:40 -07:00
Celeo
70c1f4e57c
Center README header items
type: documentation
2020-10-01 19:54:57 -07:00
Casey Rodarmor
06b6d22005
Switch mdbook version back to latest
mdbook v0.4.3 release binaries were corrupted, but have been fixed.

type: development
2020-09-10 14:17:59 -07:00
Casey Rodarmor
42e20a4a6a
Suppress stderr output if --quiet is passed
Instead of checking if `options.quiet` is set whenever printing, disable
all printing to stderr if the `--quiet` flag is passed.

Although it isn't strictly necessary, I still don't construct a progress
bar if `options.quiet` is true, since progress bars might be a little
more expensive than just printing error messages.

A future diff might add checking to the `errln` and `outln` macros, so
that they don't print at all if the respective output stream is
inactive.

type: reform
2020-09-08 16:10:51 -07:00
Casey Rodarmor
39dcb5e183
Don't treat head as special in changelog
The changelog is no longer comitted, so we no longer need to avoid
including the commit hash.

type: documentation
2020-09-06 23:21:01 -07:00
Casey Rodarmor
2d226cf016
Make changelog author more concise
If both author name and email are present for a commit, format as a
link. If one is absent, format as the other. If both are absent, format
as "Anonymous".

type: documentation
2020-09-06 22:54:34 -07:00
Casey Rodarmor
8ca2765259
Release v0.1.11
- Bump version: 0.1.10 → 0.1.11
- Update dependencies
- Remove deprecated lto flag from package script
- Invalidate github cache

type: release
2020-09-06 22:04:12 -07:00
Casey Rodarmor
7ca9ed62d5
Mark Info::infohash as potentially lossy
`Info::infohash` will discard fields not present in the `Info` struct,
and can thus produce an erronous infohash.

To try to prevent this function from being called in those
circumstances, rename it to `Info::infohash_lossy`, and add a comment
explaining why it is dangerous.

Embarassingly, `Info::infohash` was called in
`TorrentSummary::from_input`, and thus transitively by the torrent show
subcommand, where it is definitely not safe, since torrent show is
intended to be used with arbitrary torrents. This is now fixed.

There was also a build failure caused by a cache issue, so change the
cache keys to invalidate the caches.

type: fixed
2020-09-06 20:23:45 -07:00
Casey Rodarmor
dbb0eac96d
Update clippy lint names
type: changed
2020-09-06 14:26:19 -07:00
Casey Rodarmor
a2a4ea1430
Mark tags that start with v as releases
type: development
2020-07-01 23:52:48 -07:00
Casey Rodarmor
a53c2bc5db
Remove Keybase and IRC links from readme
Keybase and IRC chat never got any users, and since I never check them
and they get no traffic, it's probably best to remove them from the
readme.

type: documentation
2020-06-25 18:48:11 -07:00
Casey Rodarmor
705014c87e
Release v0.1.10
- Bump version: 0.1.9 → 0.1.10

type: release
2020-06-24 03:44:11 -07:00
Casey Rodarmor
04b58464c9
Add --no-git flag to gen book
Skip generating the changelog for the book when `--no-git` is passed to
`gen book` or `gen all`.

type: added
2020-06-24 03:33:50 -07:00
Casey Rodarmor
5951139fdf
Release v0.1.9
- Bump version: 0.1.8 → 0.1.9
- Update dependencies
- Publish to cargo as last step in publish recipe

type: release
2020-06-23 22:04:53 -07:00
Casey Rodarmor
047b36639d
Add --no-git flag to gen all
The flag skips steps whichr require a git checkout, currently only the
changelog generator.

type: added
2020-06-23 21:51:13 -07:00
Casey Rodarmor
6f4f8e7595
Improve verification performance
Port the hashing performance improvements to the verifier:

- Wrap file in a BufReader
- Hash all read data at the same time

type: performance
2020-05-26 21:02:33 -07:00
Casey Rodarmor
9dea195694
Release v0.1.8
- Bump version: 0.1.7 → 0.1.8
- Update dependencies

type: release
2020-05-26 14:04:15 -07:00
Casey Rodarmor
f832605d81
Document benchmarks in readme
type: documentation
2020-05-26 13:56:42 -07:00
Casey Rodarmor
4e6b475470
Benchmark and improve hashing performance
- Add a `bench` feature that exposes a hasher benchmark.

- Make the hasher read up to the next piece end and hash everything it
  reads, instead of hashing one byte at a time. This was a 4x
  improvement on the benchmark. (Terrible code == easy wins!)

type: performance
2020-05-26 00:15:09 -07:00
Casey Rodarmor
1b2d79b4a5
Split crate into a binary and a library
Split imdl into a binary, `src/main.rs`, and a library, `src/lib.rs`.

This will enable benchmarking, fuzz testing, and anything that requires
making `imdl` functions accessible another crate.

type: reform
2020-05-25 21:46:20 -07:00
Casey Rodarmor
c1c8d3cb89
Move data crate to its own repo
I suspect that the `data` crate will get more review, use, and
contributors if it lives in its own repository, so move it to
casey/data.

type: removed
2020-05-24 05:30:42 -07:00
Casey Rodarmor
173c0e5ac5
Initial commit of the data crate
The `data` crate is intended to be used as the manifest serialization
and deserialization format.

This blog post describes the motivation and goals for this crate:

    https://rodarmor.com/blog/data

type: added
2020-05-10 21:38:59 -07:00
Casey Rodarmor
213624cf8e
Metainfo refactoring
- Combine test Metainfo values into a small number of globally available
  values.
- Serialize update URLs as `URL` insted of `String`.
- Add additional `show` tests

type: reform
2020-05-04 03:10:21 -07:00
Casey Rodarmor
f4f7a69069
Add co-authored-by field to commit metadata
This field is used by GitHub to credit co-authors.

type: development
co-authored-by: y7y <pair@rodarmor.com>
2020-05-01 01:28:40 -07:00
Casey Rodarmor
e7872f56f2
Move all output from bin/gen to target/gen
To make it clearer what is and isn't generated content, make gen place
all generated output in `target/gen`.

Also, try to make the readme clearer about the location of build
artifacts.

type: development
2020-05-01 00:29:40 -07:00
Casey Rodarmor
bf29d74b3e
Add changelog to book
Add the changelog to the book. It's no longer comitted, so it's good to
have the current version available somewhere.

type: documentation
2020-04-30 00:22:43 -07:00
Casey Rodarmor
60a72cf057
Add color to bin/gen error messages
type: development
2020-04-29 22:58:07 -07:00
Casey Rodarmor
8dfdbe43df
Add bin/gen command to diff generated content
The following command will print a diff between HEAD and HEAD^:

    cargo run --package gen diff

type: development
2020-04-29 22:46:32 -07:00
Casey Rodarmor
342266853e
Improve bin/gen error messages
Create an error enum with actual error messages.

type: development
2020-04-29 00:36:25 -07:00
Casey Rodarmor
e396b7f071
Don't commit changelog
It's pretty annoying to have to ammend commits with the contents of the
changelog, so top committing it.

type: development
2020-04-28 22:58:48 -07:00
Annie Cherkaev
f1514dd301
Add support for BEP 39.
Add update-url field to info struct.

See BEP 39 for more details:
http://bittorrent.org/beps/bep_0039.html

type: added
fixes:
- https://github.com/casey/intermodal/issues/98
2020-04-27 17:47:40 -07:00
Casey Rodarmor
d077da405e
Improve documentation
- Document the various ways files can be included and excluded from
  torrents in the book.

- Make links to the book more prominent in the readme, by including them
  in sections with obvious names.

type: documentation
2020-04-24 23:32:24 -07:00
Casey Rodarmor
f8711a79a3
Improve the done and merge recipes
- Rebase master branch without checking it out
- Don't check for no changes, since we're using `-d`, which will fail on
  an unmerge branch.
- Make merge take an argument, so it can be used with something other
  than the current branch.

type: development
2020-04-23 17:05:41 -07:00
Casey Rodarmor
97ee5684f8
Don't invalid build cache when Cargo.lock changes
I copied the gihub actions caching configuration from examples, and I'm
not sure it's optimal. In particular, it causes a cache miss whenever
any `Cargo.lock` changes. I suspect that it would be better to always
hit the cache, and let cargo figure out what it needs to rebuild.

type: development
2020-04-23 16:49:03 -07:00