From a4ddb78126835f2e4d4a33500fc19977d4be8d60 Mon Sep 17 00:00:00 2001 From: Tuan Date: Wed, 3 Feb 2021 20:10:40 +0000 Subject: [PATCH] mediaremove.sh --- .gitignore | 3 --- README.md | 5 +++++ cacheclear.sh | 5 +++++ cal.py | 2 +- cal.txt | 2 ++ kafe | 0 kafe.txt | 5 +++++ kafeterya.py | 2 +- 8 files changed, 19 insertions(+), 5 deletions(-) create mode 100755 cacheclear.sh delete mode 100644 kafe create mode 100644 kafe.txt diff --git a/.gitignore b/.gitignore index a4f9bb4..5222ff1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,3 @@ # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile '~/.gitignore_global' - -# Bot harici dosyalari gormezden gel -cacheclear.sh diff --git a/README.md b/README.md index 1124687..c923970 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,8 @@ Bu depo, [metu.life](https://metu.life) botlarının kaynak kodlarını barınd + [akademik_bot@metu.life](https://metu.life/@akademik_bot) - cal.sh takvim kesitini cal.txt dosyasına yazar - cal.py içeriği platformda paylaşır + +## Scriptler + ++ cacheclear.sh + - Diğer mastodon temsillerinden gelen bir haftadan eski medyayı temizler diff --git a/cacheclear.sh b/cacheclear.sh new file mode 100755 index 0000000..9077b87 --- /dev/null +++ b/cacheclear.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# Remove locally cached copies of media attachments older than 7 days from other servers. +cd /home/mastodon/live +PATH=/home/mastodon/bin:/home/mastodon/.local/bin:/home/mastodon/.rbenv/plugins/ruby-build/bin:/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/bin:/usr/bin:/bin +RAILS_ENV=production bin/tootctl media remove --days 7 > log/media_remove.log 2>&1 diff --git a/cal.py b/cal.py index d0814e9..05fd874 100644 --- a/cal.py +++ b/cal.py @@ -1,7 +1,7 @@ from mastodon import Mastodon mastodon = Mastodon( - access_token = 'top-secret', + access_token = 'LwtBGTgMZbUhDjCvd2_2tc4n6KQi5AkIrDnjwEUg9sM', api_base_url = 'https://metu.life/' ) diff --git a/cal.txt b/cal.txt index e69de29..067cd13 100644 --- a/cal.txt +++ b/cal.txt @@ -0,0 +1,2 @@ +05/02/21: + + Lisansüstü başvuruların Enstitü Müdürlükleri tarafından Enstitü Anabilim Dalı Başkanlıklarına iletilmesi diff --git a/kafe b/kafe deleted file mode 100644 index e69de29..0000000 diff --git a/kafe.txt b/kafe.txt new file mode 100644 index 0000000..d746730 --- /dev/null +++ b/kafe.txt @@ -0,0 +1,5 @@ +Günün yemeği: ++ Sardalya tava ++ Z.y. barbunya pilaki ++ Tahin helva ++ Meşrubat diff --git a/kafeterya.py b/kafeterya.py index 38d1c4e..5418126 100644 --- a/kafeterya.py +++ b/kafeterya.py @@ -1,7 +1,7 @@ from mastodon import Mastodon mastodon = Mastodon( - access_token = 'top-secret', + access_token = 'riY0Y4oyCIiHjEuNMSvEQTDKgT2gYsbTSAkeUpsG-Ps', api_base_url = 'https://metu.life/' )