-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] include files linked in the README #5
Comments
Thanks for this wonderfully written issue! I agree, this is definitely something it should be able to do, especially knowing that it already tries very hard to pickup files mentioned in build.rs, lib.rs and all binaries mentioned in the Cargo.toml. Skipping configured README files is an oversight. As The capability would have to be implemented in this function, probably somewhat similar to what it does to handle build scripts. (In the latter, paths are extracted using a regex, ignoring false positives). In order to get started, it would be beneficial to have another unit test for this kind of package, which makes iterating on the code very fast and convenient. Currently there is no nice way of getting these binary packages though, but I will add one using The implementation can probably use leverage a 'stupid' regex and ignore false positives similarly to how it's done in case of build scripts or lib.rs and binaries code files. |
Alright, the respective feature was added, and I wrote down everything I could imagine useful if somebody would want contribute in the corresponding guide. Please let me know if you feel like giving it a shot, and I am happy to provide further assistance. |
It sounds interesting, I might well giving it a shot but not in the near future: I got injured yesterday, I won't be coding stuff for a little while until it's healed. |
clicked "close issue" instead of "comment" |
Thanks for letting me know, and all the best for the healing process! As I find making cargo-diet better so very rewarding, I will probably end up implementing it myself 😅, will keep you posted here! |
Hello,
given the following dummy cargo layout:
and the following
README.md
:Cargo diet does not keep the
img/dummy.png
.Assuming the readme field is set to
README.md
it means the crate's README on crates.io will have a broken link.Would it be possible to also include local files linked in the README?
It would require tokenizing the README, extract urls, filter out non local urls, add those urls to "include".
What do you think?
The text was updated successfully, but these errors were encountered: