From 6450a7719c5165af8a0ac20318e3a5cb8254fb08 Mon Sep 17 00:00:00 2001 From: cheb0chik Date: Sun, 1 Nov 2026 17:55:14 +0300 Subject: [PATCH] Add an easy example plugin A ready .ltp that hides #fyp videos, with a short readme and the five-line source. Co-Authored-By: Claude Sonnet 5.5 --- plugins/examples/README.md | 20 ++++++++++++++++++++ plugins/examples/vasya.bez-fyp.ltp | Bin 0 -> 408 bytes sdk/lihont-ltp/examples/01_hide_hashtag.py | 16 ++++++++-------- 3 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 plugins/examples/README.md create mode 100644 plugins/examples/vasya.bez-fyp.ltp diff --git a/plugins/examples/README.md b/plugins/examples/README.md new file mode 100644 index 0000000..6a48873 --- /dev/null +++ b/plugins/examples/README.md @@ -0,0 +1,20 @@ +# Пример лёгкого плагина + +`vasya.bez-fyp.ltp` — готовый плагин «Без fyp»: он скрывает в ленте видео с хэштегами `#fyp` и `#foryou`. +Права ему нужны только одни: скрывать видео. В интернет он не ходит. + +Как поставить: отправьте файл на телефон, откройте его в LihonT (Настройки мода → Плагины) и включите. +Мод покажет, что плагин делает, прежде чем вы его включите. + +Как сделать такой же самому: исходник лежит в `sdk/lihont-ltp/examples/01_hide_hashtag.py`, это пять строк: + +```python +from lihont_ltp import * + +plugin = Plugin("Без fyp", author="Вася", description="Скрывает видео с хэштегами fyp и foryou", license="MIT") +plugin.video(hashtag("fyp", "foryou"), hide) +plugin.save() +``` + +Библиотека ставится так: `pip install "git+https://git.lihont.space/lihont/LihonT.git#subdirectory=sdk/lihont-ltp"`. +Полный разбор — в `docs/plugins-guide.md`. diff --git a/plugins/examples/vasya.bez-fyp.ltp b/plugins/examples/vasya.bez-fyp.ltp new file mode 100644 index 0000000000000000000000000000000000000000..8370c04abaeffda8525f2e8e415b1bdf461da710 GIT binary patch literal 408 zcmWIWW@Zs#U|`^2xZRf+8xtlHq`=6)@EwS`fuaRDrRkY@dRfK!d7%NPy^a`&-2JYt z7n!~B_P<8%@^?$Rt@dth+~;v=qLoM*8;hgM7xp9e8jFuQrtW+AtY5`5ccyPq@wta{ zsyBUNh**~;=2VcBHgAK#4WntfZ{i={&AfH(j8JOKf`u=1( z^wiKptKwH)m;U?a1ItsV4^h2URm=1DUhChocplqc)>{|n*<~(Ze!=^q`tK6?FVon5 zEtprAnICj8W@^UjW0lWp8kcTa9Xlu9YK>c9LFTndIxX7#3=K;=I_H06naM5?IX9zd zj;MAulflu@cf0nzH2qq(THeYb;qKZeX3o(EXBD*`_4zoZb+S0a>7X;I-TwdYH$jAk15-D+Ln(ky(vck*WA^(S8cV+inOWD;S(9hAV(1cL@((4quv SfHx}}NQe;#ErGNrSOEa`pr%Ox literal 0 HcmV?d00001 diff --git a/sdk/lihont-ltp/examples/01_hide_hashtag.py b/sdk/lihont-ltp/examples/01_hide_hashtag.py index faa1dc9..e307a11 100644 --- a/sdk/lihont-ltp/examples/01_hide_hashtag.py +++ b/sdk/lihont-ltp/examples/01_hide_hashtag.py @@ -1,8 +1,8 @@ -# Пример 1: скрыть видео с хэштегом #fyp (самый простой плагин). -from lihont_ltp import * - -plugin = Plugin("Без fyp", author="Вася", description="Скрывает видео с хэштегами fyp и foryou") - -plugin.video(hashtag("fyp", "foryou"), hide) - -plugin.save() +# Пример 1: скрыть видео с хэштегом #fyp (самый простой плагин). +from lihont_ltp import * + +plugin = Plugin("Без fyp", author="Вася", description="Скрывает видео с хэштегами fyp и foryou", license="MIT") + +plugin.video(hashtag("fyp", "foryou"), hide) + +plugin.save()