Skip to main content

Useful towel-related stuff.

Project description

reddit2md

Turn your favorite reddit post to .md file... That's it.

Description

Put in praw.Submission object and get Markdown file of that post for printing/archiving stuff.

Getting Started

Dependencies

  • Praw
  • pytz (for Posted date timezone stuff)

Installing

  • pip install reddit2md

Quickstart

import praw, reddit2md, settings

reddit = praw.Reddit(
                client_id = settings.credentials['client_id'],
                client_secret = settings.credentials['client_secret'],
                user_agent = settings.credentials['user_agent'],
            )

# reddit.config.decode_html_entities = True # Consider decoding HTML as some of the HTML entities might show up undecoded.

posts = reddit.subreddit('learnpython').hot(limit=5)

for post in posts:
    reddit2md.r2md(post, file_name=post.title ,timezone='Asia/Seoul') # file_name and timezone are both optional.

Before you use

reddit2md does not do any file management. It will actually raise an Exception when the file already exists. It simply writes new file.

Author

Lewis Lee @lewisleedev

Version History

  • 0.1.0
    • Initial Release

License

This project is licensed under the MIT License - see the LICENSE file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reddit2md-0.2.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

reddit2md-0.2.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file reddit2md-0.2.0.tar.gz.

File metadata

  • Download URL: reddit2md-0.2.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for reddit2md-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f0a59475dbb59678f742222d7207bab392f8a37556426f95d5db8776f62ad351
MD5 28a8f7b95fcd607d17ab97ecacdb7575
BLAKE2b-256 ba33826ff239a700fd9418906b650c4eb363d8e3e287cb0e1c7bebd6e05d741d

See more details on using hashes here.

Provenance

File details

Details for the file reddit2md-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: reddit2md-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for reddit2md-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 566e9dc4bc17a7e1527de8fb87e1242514cdc0bea30875b024e2d70adb3dd745
MD5 0acf4eb7eaf45efc47dd1429c1283786
BLAKE2b-256 0ab1cb08077203ed443b5c9dfee763392adf1bbe2538cb74d46a56600a250cce

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page