Compare commits

..

No commits in common. "7999cb488f20105b749cf779065de9998914d817" and "5989d8800253837edeb794bcd50ad344bf3ef8ea" have entirely different histories.

3 changed files with 2 additions and 24 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
__pycache__/

View File

@ -1,14 +1,11 @@
"""
title: Reddit
title: Reddit Feeds
author: @nathanwindisch
author_url: https://git.wnd.sh/owui-tools/reddit
author_url: https://github.com/nathanwindisch
funding_url: https://patreon.com/NathanWindisch
version: 0.0.1
changelog:
- 0.0.1 - Initial upload to openwebui community.
- 0.0.2 - Renamed from "Reddit Feeds" to just "Reddit".
- 0.0.3 - Updated author_url in docstring to point to
git repo.
"""

View File

@ -1,18 +0,0 @@
# First, we need to add the src to the path so we can import the class
import sys, os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../src")))
# Unfortunately, we don't get any type hinting, but this does work :)
from reddit import Tools
async def main():
__user__ = {
"valves": Tools.UserValves(
USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
)
}
async def mock_event_emitter(event: dict): print("Event Emitted:", event["data"])
await Tools().get_subreddit_feed("sysadmin", mock_event_emitter, __user__)
await Tools().get_user_feed("NathanWindisch", mock_event_emitter, __user__)
import asyncio
if __name__ == "__main__": asyncio.run(main())