shreddit icon indicating copy to clipboard operation
shreddit copied to clipboard

[request] Only scramble words

Open sommerper opened this issue 2 years ago • 4 comments

Hi!

I thought maybe it would be an idea to only rearrange words and/or letters as to not attract attention by any automated processes by reddits back-end.

Would that require a lot of work?

Also, thanks for providing a great tool in these times :+1:

sommerper avatar Jun 27 '23 09:06 sommerper

Hi, you're welcome 😁

That should be a fairly easy feature to add, and I'd be open to a PR for it. I haven't had a ton of free time lately though so not sure when I could get to it.

andrewbanchich avatar Jun 27 '23 11:06 andrewbanchich

I can understand that. I'll see what I can do once I've learned Rust 🙂

sommerper avatar Jun 28 '23 12:06 sommerper

Rust is a lot easier than people make it out to be. If you're interested in giving it a shot, just install the compiler, pull the Shreddit project, try making some changes, and run cargo run.

All you'd need for this is to add a dependency for rand (a random number generator), then split the comment string by the space character, and re-sort the vector of words based on the random number. You can do that by calling the shuffle method here.

Then just add a --shuffle-replacement-comment option to the CLI (also pretty easy) and that's it!

andrewbanchich avatar Jun 28 '23 12:06 andrewbanchich

Thanks for the tips! I'll see what I can do 👍🏽

sommerper avatar Jun 28 '23 12:06 sommerper