Good bot.
idle
Obtanium is just awesome. Can't believe i went this long without it.
Good idea, ill look into that. Been meaning to learn ansible for some time now anyways.
If you can convince my friends to switch to Matrix I'd appreciate it. Until then I guess im lazy.
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()
cursor.execute("SELECT MAX(id) FROM bookmarks")
result = cursor.fetchone()
max_id = result[0] if result[0] else 0
current_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f %z')
values = (name, url, category_id, "", current_time, current_time, 0, order_id)
cursor.execute("INSERT INTO bookmarks (name, url, categoryId, icon, createdAt, updatedAt, isPublic, orderId) VALUES (?, ?, ?, ?, ?, ?, ?, ?);", values)
max_id += 1
conn.commit()
conn.close()
return max_id
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" }
all_issues = []
for repo_url, repo_name in repo_urls:
api_url = repo_url
# Query the Gitea API to get the issues
response = requests.get(api_url, headers=headers, params={"state": "all"})
response.raise_for_status()
issues = response.json()
sorted_issues = sorted(issues, key=lambda x: x["updated_at"], reverse=True)
all_issues.extend(sorted_issues[:5])
sorted_all_issues = sorted(all_issues, key=lambda x: x["updated_at"], reverse=True)
recent_issue_titles = []
recent_issue_links = []
recent_timestamps = []
for issue in sorted_all_issues[:10]:
title = issue["title"]
link = issue["html_url"]
timestamp = issue["updated_at"]
recent_issue_titles.append(title)
recent_issue_links.append(link)
recent_timestamps.append(timestamp)
return recent_issue_titles, recent_issue_links, recent_timestamps
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`
As long as you are using it on multiple devices you are ok. If the server goes down the app still works. So absolute worst case scenario, you can just export your vaults from your phone, then sign up for Bitwarden and import it.
I periodically take proactive exports every few months and put them on an external hard drive still though.
Really? Any proof of this?
Bitwarden, bonus points if you self host it. I use the Vaultwarden variation.
I had no idea...
And also it appears i didnt know how to spell it either.
Oh ya im addicted for sure
I use Flame Dashboard for something similar to this. It uses a simple sqllite database, so i just whipped together a few python scripts that gather information such as my to do list, calendar, gir repos, etc and update the database table it uses.
I do push ups while im waiting.