Commit Graph

232 Commits

Author SHA1 Message Date
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
Casey Rodarmor
c75ec39b14
Remove watch dropdown image from readme
It's big and ugly and doesn't add much.

type: documentation
2020-04-23 15:27:35 -07:00
Casey Rodarmor
8fbe39726f
Add notes for packagers to readme
type: documentation
2020-04-23 14:59:49 -07:00
Casey Rodarmor
43788cac9a
Fix bin/package
Also, To more easily test the `bin/package` script, build and publish
packages for all tags, not just those that start with `v`.

type: fixed
2020-04-23 01:20:24 -07:00
Casey Rodarmor
f217ac659a
Release v0.1.7
- Bump version: 0.1.6 → 0.1.7
- Update dependencies

type: release
2020-04-22 13:15:28 -07:00
Casey Rodarmor
25ac072985
Allow positional input to imdl torrent show
Input can now be passed to `imdl torrent show` without a flag:

  imdl torrent show foo.torrent

Passing input by flag continues to work.

type: changed
fixes:
- https://github.com/casey/intermodal/issues/375
2020-04-22 00:38:00 -07:00
Casey Rodarmor
cecd2f66a5
Fix help strings
Fix inconsistent argument value names in help strings.

type: fixed
2020-04-22 00:29:14 -07:00
Casey Rodarmor
ebec2d591a
Allow positional shell to imdl completions
The shell can now be passed to `imdl completions` without a flag:

  imdl completions bash

Passing the shell by flag continues to work.

type: changed
fixes:
- https://github.com/casey/intermodal/issues/375
2020-04-21 23:57:53 -07:00
Casey Rodarmor
134c241ae7
Use lexiclean crate for lexical path cleaning
I moved all the lexical path cleaning functionality into a separate
crate, so it can be used by other projects.

type: reform
2020-04-21 23:10:34 -07:00
Casey Rodarmor
323434d0aa
Allow positional input to imdl torrent verify
Input can now be passed to `imdl torrent verify` without a flag:

  imdl torrent verify foo.torrent

Passing input by flag continues to work.

type: changed
fixes:
- https://github.com/casey/intermodal/issues/375
2020-04-21 22:35:41 -07:00
Casey Rodarmor
5ba885dbc4
Take input to imdl torrent create as positional
Allow taking the `--input` argument to `imdl torrent create` as a
positional argument, so the following now works:

    imdl torrent create foo

Taking input by flag `--input` still works.

type: changed
fixes:
- https://github.com/casey/intermodal/issues/375
2020-04-21 22:23:39 -07:00
Casey Rodarmor
c22df5a083
Don't commit man pages
Don't commit man pages, since that bloats commits.

Attempt to build them in `bin/package`. This is fraught, since we need
`help2man`. Hopefully this works!

type: development
2020-04-21 00:52:06 -07:00
Casey Rodarmor
4d67d3a10d
Don't commit the book
To avoid bloating commits, don't commit any auto generated from the
book.

type: development
2020-04-21 00:36:48 -07:00
Casey Rodarmor
28114c3d64
Don't commit shell completion scripts
Committing the completion scripts bloats diffs, so stop committing them.

Before copying release files, generate the scripts in `bin/package`.

type: development
2020-04-21 00:29:26 -07:00
Casey Rodarmor
4f4464e3a2
Get st_flags from MetadataExt on MacOS
I missed that `st_flags` is available on `MetadataExt` on MacOS, so get
them from there, instead of calling `libc::stat`.

type: reform
2020-04-21 00:03:16 -07:00
Celeo
deca555ac3
Allow suppressing output with --quiet
Add a global flag `--quiet`, which allows supressing output from
`imdl torrent create` and `imdl torrent verify`.

Since it's a global option, it should be given before the subcommand,
e.g.:

    imdl --quiet torrent create --input .

type: added
fixes:
- https://github.com/casey/intermodal/issues/174
2020-04-20 21:37:07 -07:00
Casey Rodarmor
838167c4d3
Describe in FAQ creating torrent from git repo
type: documentation
2020-04-20 20:10:26 -07:00
Celeo
9b72873ed1
Optionally respect .gitignore in imdl torrent create
Add a '--ignore' flag that, when passed, causes `imdl torretn create` to
skip files listed in `.gitignore`, `.ignore`, `.git/info/exclude`, and
`git config --get core.excludesFile`.

Also switches from the `walkdir` crate to the `ignore` crate, which uses
`walkdir` internally, and which handles `.gitignore` and `.ignore`
files.

This changes the behavior of `-include-hidden` on MacOS to no longer
skip entries with the hidden attribute set, due to `ignore` not exposing
`walkdir`'s filter functionality.

A PR[0] is pending to add filtering to `ignore`, so hopefully this
functionality can be re-implemented soon.

[0] https://github.com/BurntSushi/ripgrep/pull/1557

type: added
fixes:
- https://github.com/casey/intermodal/issues/378
2020-04-20 19:20:12 -07:00
Casey Rodarmor
9f48062461
Improve FAQ template
Use separate anchor tags, so FAQ entry titles are properly rendered.

type: documentation
2020-04-20 00:17:57 -07:00
Casey Rodarmor
1380290eb8
Make publish-check recipe stricter
Check that version appears at the beginning of the line, in a link.

type: development
2020-04-20 00:10:56 -07:00
Casey Rodarmor
85246d816c
Release v0.1.6
- Bump version: 0.1.5 → 0.1.6
- Update dependencies
- Regenerate documentation

type: release
2020-04-19 23:27:32 -07:00
Casey Rodarmor
1cb1178672
Create FAQ
Add an FAQ section to the book. Include information about how to use
imdl with `fzf --preview`.

type: documentation
fixes:
- https://github.com/casey/intermodal/issues/397
2020-04-19 23:19:29 -07:00
Casey Rodarmor
65597c9851
Add --terminal override terminal autodetection
The `--terminal` flag can be used to override terminal autodetection and
force `imdl` to behave as if standard error and standard output are
connected to a terminal.

type: added
fixes:
- https://github.com/casey/intermodal/issues/398
2020-04-19 22:51:18 -07:00
Casey Rodarmor
70dbe93c6a
Note install script only works on Linux and MacOS
Unfortunately, the install script doesn't work on windows, due to:

- Powershell defining an alias that maps `curl` to `Invoke-WebRequest`,
  which is incompatible with `curl`.

- The absence of the `rev` command.

type: documentation
fixes:
- https://github.com/casey/intermodal/issues/371
2020-04-19 19:56:54 -07:00
Casey Rodarmor
b67a2f1885
Fix 404.css link
type: documentation
2020-04-18 23:58:01 -07:00
Casey Rodarmor
87687f4dec
Add custom 404 page to site
type: documentation
2020-04-18 23:43:24 -07:00
Casey Rodarmor
09b0ee316c
Document piece length selection algorithm
Add a page to the book discussing factors in piece length selection, and
Intermodal's piece length selection algorithm.

type: documentation
pr: https://github.com/casey/intermodal/pull/392
fixes:
- https://github.com/casey/intermodal/issues/367
2020-04-18 23:12:31 -07:00
Casey Rodarmor
3ed449ce93
Generate reference sections with bin/gen
type: documentation
2020-04-18 19:14:54 -07:00
Casey Rodarmor
a6bf752791
Use invariant instead of unwrap and expect
Add the `Invariant` trait, which provides `Invariant::invariant` and
`Invariant::invariant_unwrap` methods, and use them instead of unwrap
and expect.

I think these methods are a bit clearer than `unwrap` and `expect`,
since they more clearly document intent, i.e. that the thing passed to
`invariant` should be a description of an invariant that should always
be true, and should provide better error messages.

Replace uses of `unwrap` and `expect` with `invariant`.

type: reform
fixes:
- https://github.com/casey/intermodal/issues/167
2020-04-18 14:41:27 -07:00
Casey Rodarmor
faf46c0f0e
Test that globs match torrent contents
Globs should match paths within the torrent root, not including the
torrent root. Test that this is the case.

type: testing
fixes:
- https://github.com/casey/intermodal/issues/377
2020-04-18 13:46:50 -07:00
Casey Rodarmor
0a754d0bcf
Add manual Arch install link
Add a link to the arch wiki for manual installation from AUR.

type: documentation
fixes:
- https://github.com/casey/intermodal/issues/373
2020-04-18 13:33:09 -07:00
Casey Rodarmor
0a870ed2ee
Get current time early when creating torrents
Since getting the system time is fallible, do it early when creating a
torrent, so as to avoid potentially wasting time searching and hashing.

type: reform
fixes:
- https://github.com/casey/intermodal/issues/207
2020-04-18 13:24:44 -07:00
Casey Rodarmor
9098d36840
Readme improvements
- Mention various chat channels
- Add `intermodal-bin` package to package table
- Document `bin/gen`
- Add contributing section
- Link to book

type: documentation
2020-04-17 23:28:08 -07:00