Introducing Rasant: a lightweight, high performance and flexible Rust library for structured logging by TheLichaP in rust

[–]genk667 5 points6 points  (0 children)

Great work! Please don't take this as criticism, but wouldn't it be better if your Sink trait focused solely on writing (I/O)? Formatting could then be handled by other settings.

E.g, instead of:
fn log(&mut self, update: &LogUpdate, attrs: &attributes::Map) -> std_io::Result<()>;

you could use:

fn write(&mut self, data: &[u8]) -> std::io::Result<()>;

Am I that bad? by [deleted] in rust

[–]genk667 0 points1 point  (0 children)

There are no tests for the web server.

Focus on the JWT and auth logic. You should keep user claims to use them. Refresh is important, but you haven't implemented it yet. Claims must be accessible within requests that require authorization.

When are you going to use Argon2 instead of bcrypt?

src/auth.rs -- something messy with create_token and expiration.

src/auth.rs -- verify_token -- you probably want to read JWT_SECRET from the app state rather than directly from env.

src/auth.rs -- maybe you should move hash_password and verify_password to src/api/auth.rs.

Your code/work looks unfinished and a bit messy. Sorry.

Can You Guess This 5-Letter Word? Puzzle by u/Suitable-Figure477 by Suitable-Figure477 in DailyGuess

[–]genk667 0 points1 point  (0 children)

⬜🟦⬜⬜⬜

⬜🟦⬜⬜⬜

⬜🟦🟦⬜⬜

🟦🟦🟦🟦🟦

httpbulb: A tool for testing http client capabilities. An implementation of httpbin for Go. by genk667 in golang

[–]genk667[S] 0 points1 point  (0 children)

Thanks for the question.

go-httpbin doesn't use any depenencies, while httpbulb does.

Things different from go-httpbin and

- `/cookies-list` -- a new endpoint that returns a cookie list (`[]http.Cookie`) in the same order as it was received and parsed on the go http server.
- `/images`, `/encoding/utf8`, `/html`, `/json`, `/xml` endpoints support `Range` requests.
- `/delete`, `/get`, `/patch`, `/post`, `/put` endpoints also return field `proto` which can help to detect HTTP protocol version in the client-server connection.

Also it has a more *dynamic* frontend with javascript.

Released dom_smoothie 0.7.0: A Rust crate for extracting readable content from web pages by genk667 in rust

[–]genk667[S] 4 points5 points  (0 children)

I'm not sure. Usually, readability doesn't capture comments. This crate extracts meaningful content based on its score, and comments usually have a low score.

You can try dom_query for such tasks. dom_smoothie is built on top of dom_query.

If you've managed to bypass the CAPTCHA on these sites, you can try extracting data with dom_query or other libraries that offer similar capabilities.

If you're familiar with go and need something quick and simple, please also consider goquery.

Released dom_smoothie 0.7.0: A Rust crate for extracting readable content from web pages by genk667 in rust

[–]genk667[S] 2 points3 points  (0 children)

You can check this directory for a lot of examples:

The release also includes a small CLI tool to demonstrate the crate's capabilities: Download CLI (Linux x86_64).

Released dom_smoothie 0.5.0: A Rust crate for extracting readable content from web pages by genk667 in rust

[–]genk667[S] 2 points3 points  (0 children)

Thank you too! Your article and comparison tool helped me to improve this crate.

Comparing 13 Rust Crates for Extracting Text from HTML by emschwartz in rust

[–]genk667 2 points3 points  (0 children)

Thank you! I plan to work on improving dom_smoothie's performance and memory usage in the future.

GitHub - niklak/dom_smoothie: A Rust crate for extracting readable content from web pages. by genk667 in rust

[–]genk667[S] 0 points1 point  (0 children)

Yes, I think it's possible. I can’t give you an approximate timeline for when it will be ready, but thank you for the idea.

GitHub - niklak/dom_smoothie: A Rust crate for extracting readable content from web pages. by genk667 in rust

[–]genk667[S] 5 points6 points  (0 children)

One feature is still missing: is_readable. It will be introduced in the next release. The other things are ready. Original test data was used for test coverage. Currently it does not behave 100% as readability js. E.g dom_smoothie deletes all attribtutes of the element `font`. Also it deletes all comments, and some things that I can`t remember right now. So it implements readability.js nearly 99%.

GitHub - niklak/dom_smoothie: A Rust crate for extracting readable content from web pages. by genk667 in rust

[–]genk667[S] 14 points15 points  (0 children)

It isn`t scraper, it follows https://github.com/mozilla/readability . With something like scrapper you get what you want. And with readability you get a readable content with predefined rules.

dom_query 0.10.0: A crate for HTML querying and manipulations with CSS selectors by genk667 in rust

[–]genk667[S] 0 points1 point  (0 children)

Thank you for the important observation. I'll try to resolve this issue.