Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
I just set up flame and am liking it so far. Care to share your scripts?
Keep in mind they are hacked together and were not meant for mass consumption. Here is an example of one of the scripts that contacts the gitea api and inserts the most recent 10 issues into Flames database with a specific category.
`import sqlite3 from datetime import datetime import requests import re import json from datetime import datetime, timezone
def insert_bookmark(name, url, category_id, order_id): conn = sqlite3.connect('/app/db.sqlite') cursor = conn.cursor()
def delete_bookmark(category_id): conn = sqlite3.connect('/app/db.sqlite') cursor = conn.cursor() cursor.execute("DELETE FROM bookmarks WHERE categoryId = ?", (category_id,)) # Commit the changes and close the connection conn.commit() conn.close()
def get_recently_updated_issues(repo_urls, user_name, api_token): headers = { "Authorization": f"token {api_token}", "Content-Type": "application/json" }
repo_urls = [ ("https://gitea.example.com/api/v1/repos/user1/repo1/issues", "repo1"), ("https://gitea.example.com/api/v1/repos/user1/repo2/issues", "repo2") ] user_name = "user1" api_token = "example token"
delete_bookmark(8) order_id = 1
recent_issue_titles, recent_issue_links, recent_timestamps = get_recently_updated_issues(repo_urls, user_name, api_token)
for title, link, timestamp in zip(recent_issue_titles, recent_issue_links, recent_timestamps): print("Issue Title:", title) print("Issue Link:", link) print("Last Updated:", timestamp) print() bookmark_id = insert_bookmark(title, link, 8, order_id) order_id += 1`