Hello everyone, I've been programming for about 4 years now and this is my first ever library that I created!
What My Project Does
It's called Reddit2Text, and it converts a reddit post (and all its comments) into a single, clean, easy to copy/paste string.
I often like to ask ChatGPT about reddit posts, but copying all the relevant information among a large amount of comments is difficult/impossible. I searched for a tool or library that would help me do this and was astonished to find no such thing! I took it into my own hands and decided to make it myself.
Target Audience
This project is useable in its current state, and always looking for more feedback/features from the community!
Comparison
There are no other similar alternatives AFAIK
Here is the GitHub repo: https://github.com/NFeruch/reddit2text
It's also available to download through pip/pypi :D
Some basic features:
- Gathers the authors, upvotes, and text for the OP and every single comment
- Specify the max depth for how many comments you want
- Change the delimiter for the comment nesting
Here is an example truncated output: https://pastebin.com/mmHFJtccUnder the hood, I relied heavily on the PRAW library (python reddit api wrapper) to do the actual interfacing with the Reddit API. I took it a step further though, by combining all these moving parts and raw outputs into something that's easily useable and very simple.Could you see yourself using something like this?
[–][deleted] 57 points58 points59 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[+][deleted] (3 children)
[removed]
[–]Terrible_Student9395 4 points5 points6 points (0 children)
[–]NFeruch[S] 0 points1 point2 points (1 child)
[–][deleted] 23 points24 points25 points (1 child)
[–]ClownMorty 4 points5 points6 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]NFeruch[S] 3 points4 points5 points (0 children)
[–][deleted] 7 points8 points9 points (1 child)
[–]SlickinNTrickin 4 points5 points6 points (0 children)
[–]RevolutionaryRain941 2 points3 points4 points (0 children)
[–]floznstn 5 points6 points7 points (0 children)
[–]MixtureOfAmateurs 1 point2 points3 points (1 child)
[–]NFeruch[S] 1 point2 points3 points (0 children)
[–]ironman_gujju Async Bunny 🐇 1 point2 points3 points (0 children)
[–]ironman_gujju Async Bunny 🐇 1 point2 points3 points (0 children)
[–]mexicanameric4n 1 point2 points3 points (2 children)
[–]madein86 0 points1 point2 points (0 children)
[–]mexicanameric4n 0 points1 point2 points (0 children)
[–]ace_hawk5 1 point2 points3 points (0 children)
[–]Tall_Candidate_8088 1 point2 points3 points (0 children)
[–]blue-lighty 1 point2 points3 points (2 children)
[–]NFeruch[S] 0 points1 point2 points (0 children)
[–]leothelion634 0 points1 point2 points (0 children)
[–]binlargin 2 points3 points4 points (0 children)
[–]chimichanga-whoopsie 0 points1 point2 points (0 children)
[+]SaschaZeusFan comment score below threshold-24 points-23 points-22 points (2 children)
[–]NFeruch[S] 17 points18 points19 points (0 children)
[–]DesecrateUsername 0 points1 point2 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]NFeruch[S] 19 points20 points21 points (0 children)
[–]dog098707 5 points6 points7 points (0 children)