mirror of
https://github.com/rust-unofficial/awesome-rust.git
synced 2025-03-03 14:32:38 +02:00
Merge pull request #1097 from palfrey/fix-other-issues
Fix all the other issues with README
This commit is contained in:
commit
3f04e1ea79
20
README.md
20
README.md
@ -113,7 +113,7 @@ See also [Rust — Production](https://www.rust-lang.org/production) organizatio
|
||||
* [Factotum](https://github.com/snowplow/factotum) — [A system to programmatically run data pipelines](https://snowplowanalytics.com/blog/2016/04/09/introducing-factotum-data-pipeline-runner/) [](https://travis-ci.org/snowplow/factotum)
|
||||
* [fcsonline/drill](https://github.com/fcsonline/drill) — A HTTP load testing application inspired by Ansible syntax [](https://travis-ci.org/fcsonline/drill)
|
||||
* [Fractalide](https://github.com/fractalide/fractalide) — Simple Rust Microservices
|
||||
* [habitat](https://community.chef.io/products/chef-habitat/) — An tool created by [Chef](https://www.chef.io/) to build, deploy, and manage applications.
|
||||
* [habitat](https://community.chef.io/tools/chef-habitat) — An tool created by [Chef](https://www.chef.io/) to build, deploy, and manage applications.
|
||||
* [Herd](https://github.com/imjacobclark/Herd) — an experimental HTTP load testing application
|
||||
* [intecture/api](https://github.com/intecture/api) — an API-driven server management and configuration tool [](https://travis-ci.org/intecture/api)
|
||||
* [ivanceras/diwata](https://github.com/ivanceras/diwata) — A database administration tool for postgresql [](https://travis-ci.org/ivanceras/diwata)
|
||||
@ -245,7 +245,7 @@ See also [Games Made With Piston](https://github.com/PistonDevelopers/piston/wik
|
||||
* [Thinkofname/rust-quake](https://github.com/Thinkofname/rust-quake) — Quake map renderer in Rust
|
||||
* [rhex](https://github.com/dpc/rhex) — hexagonal ascii roguelike
|
||||
* [garkimasera/rusted-ruins](https://github.com/garkimasera/rusted-ruins) — Extensible open world rogue like game with pixel art [](https://travis-ci.org/garkimasera/rusted-ruins)
|
||||
* [Veloren](https://gitlab.com/veloren/veloren) — An open world, open source multiplayer voxel RPG game currently in alpha development [](https://gitlab.com/veloren/veloren/commits/master)
|
||||
* [Veloren](https://gitlab.com/veloren/veloren) — An open world, open source multiplayer voxel RPG game currently in alpha development [](https://gitlab.com/veloren/veloren/-/pipelines)
|
||||
* [swatteau/sokoban-rs](https://github.com/swatteau/sokoban-rs) — A Sokoban implementation
|
||||
* [aleshaleksey/TGWM](https://github.com/aleshaleksey/TGWM) — An RPG with turned-based mechanics (work in progress) [](https://travis-ci.org/aleshaleksey/TGWM)
|
||||
* [ozkriff/zemeroth](https://github.com/ozkriff/zemeroth) — A small 2D turn-based hexagonal strategy game [](https://travis-ci.org/ozkriff/zemeroth)
|
||||
@ -291,7 +291,7 @@ See also [A comparison of operating systems written in Rust](https://github.com/
|
||||
|
||||
### Security tools
|
||||
|
||||
* [kpcyrd/badtouch](https://github.com/kpcyrd/badtouch) — A scriptable network authentication cracker [](https://travis-ci.org/kpcyrd/badtouch)
|
||||
* [kpcyrd/authoscope](https://github.com/kpcyrd/authoscope) — A scriptable network authentication cracker [](https://travis-ci.org/kpcyrd/authoscope)
|
||||
* [lethe](https://github.com/kostassoid/lethe) — A secure cross-platform drive wiping utility [](https://crates.io/crates/lethe) [](https://travis-ci.org/kostassoid/lethe)
|
||||
* [arvancloud/libinjection-rs](https://github.com/arvancloud/libinjection-rs) — Rust bindings for [libinjection](https://github.com/client9/libinjection) [](https://travis-ci.org/arvancloud/libinjection-rs)
|
||||
* [ripasso](https://github.com/cortex/ripasso/) — A password manager, filesystem compatible with pass
|
||||
@ -905,7 +905,7 @@ See also [About Rust’s Machine Learning Community](https://medium.com/@autumn_
|
||||
* Scirust
|
||||
* [indigits/scirust](https://github.com/indigits/scirust) — scientific computing library in Rust [](https://travis-ci.org/indigits/scirust)
|
||||
* Statrs
|
||||
* [boxtown/statrs](https://github.com/boxtown/statrs) — Robust statistical computation library in Rust [](https://travis-ci.org/boxtown/statrs)
|
||||
* [statrs-dev/statrs](https://github.com/statrs-dev/statrs) — Robust statistical computation library in Rust [](https://travis-ci.org/boxtown/statrs)
|
||||
* Rustimization [[rustimization](https://crates.io/crates/rustimization)]
|
||||
* [noshu/rustimization](https://github.com/noshu/rustimization) — A rust optimization library which includes L-BFGS-B and Conjugate Gradient algorithm
|
||||
* [calebwin/emu](https://github.com/calebwin/emu) — A language for GPGPU numerical computing from a Rust macro
|
||||
@ -937,7 +937,7 @@ See also [About Rust’s Machine Learning Community](https://medium.com/@autumn_
|
||||
* [sodiumoxide/sodiumoxide](https://github.com/sodiumoxide/sodiumoxide) — [libsodium](https://github.com/jedisct1/libsodium) bindings [](https://travis-ci.org/sodiumoxide/sodiumoxide)
|
||||
* [doublify/libblockchain](https://github.com/doublify/libblockchain) — A Blockchain implementation [](https://travis-ci.org/doublify/libblockchain)
|
||||
* [exonum/exonum](https://github.com/exonum/exonum) [[exonum](https://crates.io/crates/exonum)] — extensible framework for blockchain projects [](https://travis-ci.org/exonum/exonum)
|
||||
* [klutzy/suruga](https://github.com/klutzy/suruga) — A Rust implementation of [TLS 1.2](https://tools.ietf.org/html/rfc5246)
|
||||
* [klutzy/suruga](https://github.com/klutzy/suruga) — A Rust implementation of [TLS 1.2](https://datatracker.ietf.org/doc/html/rfc5246)
|
||||
* [libOctavo/octavo](https://github.com/libOctavo/octavo) — Modular hash and crypto library in Rust [](https://travis-ci.org/libOctavo/octavo)
|
||||
* [novifinancial/opaque-ke](https://github.com/novifinancial/opaque-ke) — Pure Rust implementation of the recent [OPAQUE](https://datatracker.ietf.org/doc/draft-krawczyk-cfrg-opaque/) password-authenticated key exchange. [](https://github.com/novifinancial/opaque-ke)
|
||||
* [RustCrypto/hashes](https://github.com/RustCrypto/hashes) — Collection of cryptographic hash functions written in pure Rust [](https://travis-ci.org/RustCrypto/hashes)
|
||||
@ -1024,7 +1024,7 @@ See also [About Rust’s Machine Learning Community](https://medium.com/@autumn_
|
||||
* [amv-dev/yata](https://github.com/amv-dev/yata) — high perfomance technical analysis library [](https://github.com/amv-dev/yata/actions?query=workflow%3ARust)
|
||||
* [bluss/ndarray](https://github.com/rust-ndarray/ndarray) — N-dimensional array with array views, multidimensional slicing, and efficient operations
|
||||
* [kernelmachine/utah](https://github.com/kernelmachine/utah) — Dataframe structure and operations in Rust
|
||||
* [ritchie46/polars](https://github.com/ritchie46/polars) - Fast feature complete DataFrame library [](https://travis-ci.com/ritchie46/polars)
|
||||
* [pola-rs/polars](https://github.com/pola-rs/polars) - Fast feature complete DataFrame library 
|
||||
* [weld-project/weld](https://github.com/weld-project/weld) — High-performance runtime for data analytics applications
|
||||
|
||||
### Data structures
|
||||
@ -1222,7 +1222,7 @@ See also [Are we game yet?](https://arewegameyet.rs)
|
||||
|
||||
* [DaveKram/coord_transforms](https://github.com/DaveKram/coord_transforms) [[coord_transforms](https://crates.io/crates/coord_transforms)] — coordinate transformations (2-d, 3-d, and geospatial) [](https://travis-ci.org/DaveKram/coord_transforms)
|
||||
* [Georust](https://github.com/georust) — geospatial tools and libraries written in Rust
|
||||
* [rust-reverse-geocoder](https://github.com/ggcode1/rrgeo) — A fast, offline reverse geocoder in Rust, inspired by https://github.com/thampiman/reverse-geocoder
|
||||
* [rust-reverse-geocoder](https://github.com/gx0r/rrgeo) — A fast, offline reverse geocoder in Rust, inspired by https://github.com/thampiman/reverse-geocoder
|
||||
* [vlopes11/geomorph](https://github.com/vlopes11/geomorph) [[geomorph](https://crates.io/crates/geomorph)] — conversion between UTM, LatLon and MGRS coordinates [](https://travis-ci.org/vlopes11/geomorph)
|
||||
|
||||
### Graphics
|
||||
@ -1245,7 +1245,7 @@ See also [Are we game yet?](https://arewegameyet.rs)
|
||||
* [fschutt/printpdf](https://github.com/fschutt/printpdf) — PDF writing library [](https://travis-ci.org/fschutt/printpdf)
|
||||
* [J-F-Liu/lopdf](https://github.com/J-F-Liu/lopdf) — PDF document manipulation [](https://travis-ci.org/J-F-Liu/lopdf)
|
||||
* [WASM-PDF](https://github.com/jussiniinikoski/wasm-pdf) – Generates PDF files with JavaScript and WASM (WebAssembly) [](https://travis-ci.org/jussiniinikoski/wasm-pdf)
|
||||
* [Vulkan](https://www.khronos.org/vulkan/) [[vulkan](https://crates.io/keywords/vulkan)]
|
||||
* [Vulkan](https://www.vulkan.org/) [[vulkan](https://crates.io/keywords/vulkan)]
|
||||
* [vulkano](https://github.com/vulkano-rs/vulkano) [[vulkano](https://crates.io/crates/vulkano)] — [](https://travis-ci.org/vulkano-rs/vulkano)
|
||||
|
||||
### Graph processing
|
||||
@ -1387,7 +1387,7 @@ See also [Are we game yet?](https://arewegameyet.rs)
|
||||
* ZeroMQ
|
||||
* [erickt/rust-zmq](https://github.com/erickt/rust-zmq) — [ZeroMQ](https://zeromq.org/) bindings [](https://travis-ci.org/erickt/rust-zmq)
|
||||
* CoAP
|
||||
* [Covertness/coap-rs](https://github.com/Covertness/coap-rs) — A [Constrained Application Protocol(CoAP)](https://tools.ietf.org/html/rfc7252) library for Rust. [](https://travis-ci.org/Covertness/coap-rs)
|
||||
* [Covertness/coap-rs](https://github.com/Covertness/coap-rs) — A [Constrained Application Protocol(CoAP)](https://datatracker.ietf.org/doc/html/rfc7252) library for Rust. [](https://travis-ci.org/Covertness/coap-rs)
|
||||
* Docker
|
||||
* [fussybeaver/bollard](https://github.com/fussybeaver/bollard) — Docker daemon API in Rust
|
||||
* RPC
|
||||
@ -1440,7 +1440,7 @@ See also [Are we game yet?](https://arewegameyet.rs)
|
||||
* [arvancloud/nginx-rs](https://github.com/arvancloud/nginx-rs) — [Nginx](https://www.nginx.com) bindings [](https://travis-ci.org/arvancloud/nginx-rs)
|
||||
* [yaa110/rust-iptables](https://github.com/yaa110/rust-iptables) — [iptables](https://www.netfilter.org/projects/iptables/index.html) bindings [](https://travis-ci.org/yaa110/rust-iptables)
|
||||
* Unix-like
|
||||
* [nix-rust/nix](https://github.com/nix-rust/nix) — Unix-like API bindings [](https://travis-ci.org/nix-rust/nix)
|
||||
* [nix-rust/nix](https://github.com/nix-rust/nix) — Unix-like API bindings [](https://cirrus-ci.com/github/nix-rust/nix)
|
||||
* [zargony/fuse-rs](https://github.com/zargony/fuse-rs) — [FUSE](https://github.com/libfuse/libfuse) bindings
|
||||
* Windows
|
||||
* [retep998/winapi-rs](https://github.com/retep998/winapi-rs) — Windows API bindings [](https://github.com/retep998/winapi-rs/actions/workflows/rust.yml)
|
||||
|
15
src/main.rs
15
src/main.rs
@ -155,7 +155,9 @@ fn get_url_core(url: String) -> BoxFuture<'static, (String, Result<(), CheckerEr
|
||||
if status != StatusCode::OK {
|
||||
lazy_static! {
|
||||
static ref ACTIONS_REGEX: Regex = Regex::new(r"https://github.com/(?P<org>[^/]+)/(?P<repo>[^/]+)/actions(?:\?workflow=.+)?").unwrap();
|
||||
static ref YOUTUBE_REGEX: Regex = Regex::new(r"https://www.youtube.com/watch\?v=(?P<video_id>.+)").unwrap();
|
||||
static ref YOUTUBE_VIDEO_REGEX: Regex = Regex::new(r"https://www.youtube.com/watch\?v=(?P<video_id>.+)").unwrap();
|
||||
static ref YOUTUBE_PLAYLIST_REGEX: Regex = Regex::new(r"https://www.youtube.com/playlist\?list=(?P<playlist_id>.+)").unwrap();
|
||||
static ref YOUTUBE_CONSENT_REGEX: Regex = Regex::new(r"https://consent.youtube.com/m\?continue=.+").unwrap();
|
||||
static ref AZURE_BUILD_REGEX: Regex = Regex::new(r"https://dev.azure.com/[^/]+/[^/]+/_build").unwrap();
|
||||
}
|
||||
if status == StatusCode::NOT_FOUND && ACTIONS_REGEX.is_match(&url) {
|
||||
@ -164,15 +166,22 @@ fn get_url_core(url: String) -> BoxFuture<'static, (String, Result<(), CheckerEr
|
||||
let (_new_url, res) = get_url_core(rewritten.to_string()).await;
|
||||
return (url, res);
|
||||
}
|
||||
if status == StatusCode::FOUND && YOUTUBE_REGEX.is_match(&url) {
|
||||
if status == StatusCode::FOUND && YOUTUBE_VIDEO_REGEX.is_match(&url) {
|
||||
// Based off of https://gist.github.com/tonY1883/a3b85925081688de569b779b4657439b
|
||||
// Guesswork is that the img feed will cause less 302's than the main url
|
||||
// See https://github.com/rust-unofficial/awesome-rust/issues/814 for original issue
|
||||
let rewritten = YOUTUBE_REGEX.replace_all(&url, "http://img.youtube.com/vi/$video_id/mqdefault.jpg");
|
||||
let rewritten = YOUTUBE_VIDEO_REGEX.replace_all(&url, "http://img.youtube.com/vi/$video_id/mqdefault.jpg");
|
||||
warn!("Got 302 with Youtube, so replacing {} with {}", url, rewritten);
|
||||
let (_new_url, res) = get_url_core(rewritten.to_string()).await;
|
||||
return (url, res);
|
||||
};
|
||||
if status == StatusCode::FOUND && YOUTUBE_PLAYLIST_REGEX.is_match(&url) {
|
||||
let location = ok.headers().get("LOCATION").map(|h| h.to_str().unwrap()).unwrap_or_default();
|
||||
if YOUTUBE_CONSENT_REGEX.is_match(location) {
|
||||
warn!("Got Youtube consent link for {}, so assuming playlist is ok", url);
|
||||
return (url, Ok(()));
|
||||
}
|
||||
};
|
||||
if status == StatusCode::FOUND && AZURE_BUILD_REGEX.is_match(&url) {
|
||||
// Azure build urls always redirect to a particular build id, so no stable url guarantees
|
||||
let redirect = ok.headers().get(header::LOCATION).unwrap().to_str().unwrap();
|
||||
|
Loading…
x
Reference in New Issue
Block a user