tootgroup.py Emulate group accounts on Mastodon an开源项目

我要开发同款
匿名用户2021年11月08日
115阅读

技术信息

开源地址
https://github.com/esl/elarm
授权协议
GPL-3.0 License

作品详情

tootgroup.py-emulategroupaccoutsoMastodoadPleromaWhatisthis?

Somesocialmediaplatformsallowgroupsofuserstopostitoauified"group"timelie/istace/whateveryouwattocallit.ThisiscurretlyotpossibleoMastodoorPleromawithoutgivigallmembersfulllogicredetialstoagroup.tootgroup.pyisaattempttosolvethisspecificusecase.

Howdoesitwork?

tootgroup.pyhastobesetupoacomputeradruperiodically.ItreadstheotificatiosfromtheMastodo/Pleromaaccoutitiscoectedtoadfiltersthemformessagestorepost.Therearetwomethodsofcreatigagrouppost.Oeorbothofthemcabeeableddurigthesetupprocedure.

Publicmetiosofgroupmembersareboostediftheypreceedthegroup'samewithaExclamatioMarklike"!@mastodo"

tootgroup.pycaalsolookfordirectmessagesfromgroupmembers.Ifthegroupis@metioedattheverybegiig,Themessagewillberepostedasaewpublictootorigiatigdirectlyfromthegroupaccout.Thestatustextaswellasmediafilesareicluded.Theorigiatiguserwillotbeshowpublicly.(Itcastillbeseebyallgroupadistaceadmiistratorstough!)

Ifbothrepostmethodsaredisabled,tootgroup.pywillstillrubutotrepostaythig.

Buthowtosimplyuseit?

Writeamessagethatshouldbeboostedbythegroup:Justiclude"!@group_ame"aywhereithetoot.EXAMPLE:"OHAI!justfoudthat!@mastodothigie!"

Writeamessagethatshouldappearasaewpostfromthegroup:Put"@group_ame"attheverybegiigofadirect/privatemessage.EXAMPLE:"@mastodoHEREBETHEMESSAGETEXT"

Howtosetup?

Theeasiestwaytoistalltootgroup.pyisviaPyPI,thePythoPackageIdex.Usepip3istalltootgroup.pytoistallitaswellasallitsdepedecies.

ItisalsopossibletodowloadthescriptmauallyfromtheGitHubrepositoryathttps://github.com/oe4ds/tootgroup.pyIthatcasetheecessarydepedecieshavetobeprovidedtoo:

tootgroup.pyrequireshttps://github.com/halcy/Mastodo.pyaswellashttps://github.com/ActiveState/appdirstoru.Istallthemviayouroperatigsystem'spackagemaager,piporevemaually.

tootgroup.pywillguideyouthroughsetupbyaskigalliformatioiteedswheyouruitfromthecommadlieforthefirsttime.BeigsomewhatcomfortablewithPythoscriptigadthecommadlieigeeralmighthelpifdifficultiesshouldappear.

YoueedaaccoutoayMastodoorPleromaistacethatwillactasyourgroupaccout.Thikaboutifyoushouldmarkitasa"Bot".

Rutootgroup.pyfromthecommadlie.

tootgroup.pywillaskyouforalleededsetupdataadtrytogetthemrightbycoectigtotheMastodo/Pleromaserver.Ifitcaotdoso,itwilltellyouadyoucaretry.Whesuccessful,tootgroup.pywillwritethecofiguratiotoitstootgroup.coffileadreaditfromthereexttimeyouruthescript.

Theplaceforstorigcofiguratioisoperatigsystemdepedetbutwillbeshowdurigthefirst-ru/setupphase.Alocaltootgroup.coffileplacedexttothetootgroup.pyscriptwilloverridethesesettigsthoughadcabeusedfordevelopmetortestigpurposes.

Ifyouwattosetuptootgroup.pyformorethaoegroup,youcaruitagaiwhilespecifyigthe"--groupGROUP_HANDLE"flag.Thiswillthegeerateaidepedetcofiguratiothatwillbereadeachtimeyoucalltootgroup.pyusigthisame.Ifyoudo'tspecifyaygroupame,thehadle"default"iscreatedadusedautomatically

Testthefucioalitybysedigdirectmessagesad"!@metios"toyourgroupwhileruigtootgroup.pymaually.Seeifthigsworkasexpected.Thescriptwillpritaaccordigmessageaftereachsuccessfulru.Ifeverythigworks,ruthescriptperiodicallyviacroadejoygroop-tootig!

Hereisaexampleforacrotabetrythatrustootgroup.pyeverytwomiutes:

*/2****/path/to/tootgroup.py--groupdefault

Thereisalsothe"-d"or"--dry-ru"commadlieflagthatprevetsaytoots.Youcauseittotestwhatwouldbepostedbythescript.

Use"-h"or"--help"formoreiformatioaboutallavailableoptios

功能介绍

tootgroup.py - emulate group accounts on Mastodon and Pleroma What is this? Some social media pla...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论