diff --git a/README.md b/README.md index 2ad34fc..c773ea3 100644 --- a/README.md +++ b/README.md @@ -2,39 +2,51 @@ Эта ветка содержит прототип клиента, где взаимодействие с статусами\постами будет происходить через файлы -Just for fun. Simple "Client" API script for Pleroma (or maybe also Mastodon) instances. - -Features: -* Write longreads in Your default $EDITOR -* List timelines -* Switch instance from public list in config.json or manual input. Also recent used instance list. -* All others futures maybe working 50/50 - -Note about proxy: -Proxy by default autodetect i2p and onion (not tested) instances address. -If provided main_proxy in config.json is disable i2p and onion instances autodetection. -Also: don't forget change connect_protocol_via_main_proxy if set http proxy or any proxy without support https. - -Note about auth: -i2p and onion instances may no support (or disabled) OAuth2. -Workaround: if instance have clearweb address, make auth and copy-paste token in .auth.json, example: +## Схема дерева файлов-постов сгруппированных по аккаунтам ``` -{ - "your.authorized.instance": "xxx", - "abc123instance.i2p": "xxx", - "abc123instance.onion": "xxx" -} +[statuses] +| +|-[instance] +| |---[acct] +| | | +| | |--- [status_id] +| | | | +| | | |---content +| | | |---status-id.json +| | | |---media_attachments.m3u8 +| |... |--- ... +|... +``` +На данный момент статусы теперь линкуются из папки all_statuses/$instance, где содержатся не сгруппированные посты +Время папок с постами соотвествует постам + + +## Что доступно: + +### Режим мониторинга файлов и автообновление ленты (пока только home) +``` +daemon_mode=yes ./pleroma-cli.sh ``` -Depends: -* [jj](http://gitea.phreedom.club/localhost_frssoft/jj) -* [curl](https://curl.se/) -* [fzy](https://github.com/jhawthorn/fzy) -* Any browser (links set by default) - for authorization on instances +### Частичное взаимодействие с постами: +Чтобы добавить в избранное или бустануть пост нужно в папке с постом создать файл favourite и\или share +``` +touch favourite +touch share +``` -Opt. Depends: -* gpg - for decrypt PGP messages -* awk - parse PGP standart messages -* Any media player +### Чтение +Учитывая то, что каждый пост-статус это файл, то вы можете вывести все посты за раз например так: +``` +# все тексты постов +cat all_statuses/instance.example/*/content -Also, thk Tolstoevsky for Pleroma instance (set by default instance) +# все тексты постов пользователя +cat statuses/instance.example/nick@abc/*/content + +# Посмотреть все мультимедия вложения +cat all_statuses/instance.example/*/media_attachments.m3u8 | mpv --playlist=- + +# Прочие "игры" с постами, например узнать кто более активен в вашем инстансе среди загруженных постов +cat all_statuses/instance.example/*/*.json | jj -l '..#.account.acct' | sort | uniq -c | sort -r +``` diff --git a/utils/statuses2files_acct.sh b/utils/statuses2files_acct.sh index 2528f1c..cf51108 100755 --- a/utils/statuses2files_acct.sh +++ b/utils/statuses2files_acct.sh @@ -1,13 +1,6 @@ #!/bin/sh # Move statuses to acct dirs -# [statuses] -# | -# |---[acct] -# | | -# | |--- [status_id] -# | |--- ... -# |... json=$(cat)