Package: yeoboseyo
여보세요DescriptionFrom your favorite RSS feeds, spread/share those news to services of your choiceServices coveredRSSMastodonMattermostSlackDiscordTelegramWallabagLocal Markdown filesused cases:With Yeoboseyo you set an RSS URL and the "local storage" (the folder where to store news in markdown) then you synchronize those files withsyncthingon any of your devices and read them withEspilon Notes,Notable,markor. Any markdown editor/reader can open/import those files.
This use case can be extended to any application that is able to import markdown file, use file manager or has import function, likeTagSpacesYou want to publish news from your favorite news websites toMastodon, Yeoboseyo will do that without any problemYou need to spread news from your project onMattermost/Slack/Discord, just set the URL of theWebhookof one of those services and the news will be published as expected on thechannelof your choiceIf you prefer to publish that onTelegram, set theTELEGRAM_CHAT_IDof the group or channelLet see how to setup all of that below:package: Installationpre requisistespython 3.8+starlette(the web application)feedparser(for RSS support)pypandoc(to convert html to markdown)wallabag APIforWallabagreadit later applicationsInstallationcreate a virtualenvpython3-mvenvyeoboseyocdyeoboseyosourcebin/activatethenpipinstall-rrequirements.txtorpipinstallyeoboseyo:wrench: Settingscopy or rename the config filemvenv.sample.envset the correct values for your own environmentDATABASE_URL=sqlite:///db.sqlite3TIME_ZONE=Europe/ParisFORMAT_FROM=markdown_githubFORMAT_TO=htmlBYPASS_BOZO=False# if you don't want to get the malformed RSS Feeds set it to FalseLOG_LEVEL=logging.INFOMASTODON_USERNAME=your username@<domain instance of mastodon>MASTODON_PASSWORD=your passMASTODON_INSTANCE=https://<domain instance of mastodon>MASTODON_VISIBILITY=unlisted# default is 'public', can be 'unlisted', 'private', 'direct'TOKEN=''TELEGRAM_TOKEN=0123456789:AZERTYUIOPQSDFGHJKLMWXCVBN123456789TELEGRAM_CHAT_ID=-NNNNNNNNNWALLABAG_URL=http://wallabag/WALLABAG_CLIENTID=your idWALLABAG_CLIENTSECRET=your secretWALLABAG_PASSWORD=wallabagWALLABAG_USERNAME=wallabagMastodonto create the app on mastodon :onhttps://yourmastoinstance/settings/applications/newApplication name :YeoboseyoScopes : check :read/write/push/followthensubmitthen select Yeoboseyo again to retreive the access token, and fill the fileyeoboseyo_clientcred.secretput on the first line the value of "Your access token" and on the second line the https url of your masto instance egAzdfghy5678hefdsgghjuju09knb
https://framapiaf.orgthis file will be read each time something will be posted on mastoSlack/Mattermost/Discord: Webhookin the 'integrations' page set an "incoming webhooks" (eg fromhttps://mattermost/teamname/integrations) and copy the URL into the field 'webhook' of the Yeoboseyo formTelegramyou will need to create aTelegram Botby invoking@BotFather.
Once the bot is created, create a group / channel, and invite your bot on that group/channel and give it admin rights.Now you need to get the ID of the group / channel where the bot can "speak"for that : access to your bot history urlhttps://api.telegram.org/botXXXXX:YYYYY/getUpdatesand spot this kind of datachat:id:-NNNNNNtitle:"my group name"pick up the-NNNNNNand put it as theTELEGRAM_CHAT_IDin the.envconfig fileWallabagCreate a client API like explain herehttps://doc.wallabag.org/fr/developer/api/oauth.htmlthis will give you something like thisThen replace the client_id / client_secret / login / pass in the .env fileWALLABAG_URL=http://wallabag/WALLABAG_CLIENTID=your idWALLABAG_CLIENTSECRET=your secretWALLABAG_PASSWORD=wallabagWALLABAG_USERNAME=wallabag:dvd: Databasecreate the database (to execute only once)pythonmodels.py:mega: Running the Web applicationstart the applicationcdyeoboseyo
pythonapp.py&여보세요!
INFO:Startedserverprocess[13588]INFO:Waitingforapplicationstartup.
INFO:Uvicornrunningonhttp://0.0.0.0:8000(PressCTRL+Ctoquit):eyes: Adding some Feeds to trackGo onhttp://0.0.0.0:8000and fill the form to add new Feeds to trackIf you plan to publish RSS Feedsinto alocal folder, fill thelocal storagefield with the complet path of that folder, if not leave it empty.on yourMastodonaccount, tick the checkboxPublish on Mastodon?, if not, leave it uncheckedon yourTelegramgroup/channel tick the checkboxPublish on Telegram?, if not, leave it uncheckedon yourMattermost/Slack/Discordgroup/channel, just set the URL of theWebhookof one of those services, if not, leave it empty.:dizzy: Running the enginenow that you fill settings, and form, launch the command and see how many feeds are comming여보세요!
usage:pythonrun.py[-h]-a{report,go,switch}[-trigger_idTRIGGER_ID]Yeoboseyo

optionalarguments:-h,--helpshowthishelpmessageandexit-a{report,go,switch}choose-areportor-agoor-aswtch-trigger_id<id>-trigger_idTRIGGER_IDtriggeridtoswitchofstatus


pythonrun.py-ago

여보세요!RUNandGO
TriggerFoxMasKblogEntriescreated1/Read1get the listget the list of your feeds to check which one provided articles or not$pythonrun.py-areport
여보세요!Report
┏━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ID┃Name┃MdFolder┃Tags┃Status┃Triggered┃
┡━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│1│MonBlog│test│News│Ok│2021-03-1822:35:21│
│2│KBSCulture│test│News│Ok│2021-04-0509:59:03│
│3│KBSjournaldujour│test│News│Ok│2021-04-0509:59:05│
│4│KBSShowbiz│test│News│Ok│2021-04-0509:59:06│
│5│JuxVideo│test│jeux│Ok│2021-04-0122:22:15.113871│
│6│PlayStationBlog│test│jeux│Ok│2021-04-0122:22:57.189312│
│7│GameKult│test│jeux│Ok│2021-04-0122:23:21.049307│
│8│Gameblog│test│jeux│Ok│2021-04-0122:23:48.350934│
│9│NoFrag│test│jeux│Ok│2021-04-0122:24:15.721174│
│10│Frandroid│test│android│Ok│2021-04-0122:24:47.324475│
│11│LesNumeriques│test│android│Ok│2021-04-0122:25:09.740677│
│12│VueJSNews│test│vuejs│Ok│2021-04-0122:25:34.307735│
│13│CacktusBlog│test│python│Ok│2021-04-0122:26:02.412688│
│14│PythonNews│test│python│Ok│2021-04-0122:26:41.975564│
│15│nedbatchelder│test│python│Ok│2021-04-0122:28:21.838166│
│16│DjangoNews│test│Python│Ok│2021-04-0122:28:47.804644│
│17│PythonInsider│test│Python│Ok│2021-04-0122:29:18.791661│
│18│PyCharmBlog│test│Python│Ok│2021-04-0122:29:44.568828│
│19│RealPython│test│Python│Ok│2021-04-0122:30:10.952486│
│20│VueJS│test│VueJS│Ok│2021-04-0122:30:34.507337│
│21│OdieuxConnard│test│Humour│Ok│2021-04-0122:31:03.458147│
└────┴─────────────────────┴───────────┴─────────┴────────┴────────────────────────────┘switch the status of a triggerswitch the status of trigger to on/offpythonrun.py-aswitch-trigger_id1여보세요!Switch
SuccessfullydisabledTrigger'Mon Blog'and check it again to see the status moving09:00$pythonrun.py-areport
여보세요!Report
┏━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ID┃Name┃MdFolder┃Tags┃Status┃Triggered┃
┡━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│1│MonBlog│test│News│Disabled│2021-05-1509:00:27│
│2│KBSCulture│test│News│Ok│2021-04-0509:59:03│
│3│KBSjournaldujour│test│News│Ok│2021-04-0509:59:05│
│4│KBSShowbiz│test│News│Ok│2021-04-0509:59:06│
│5│JuxVideo│test│jeux│Ok│2021-04-0122:22:15.113871│
│6│PlayStationBlog│test│jeux│Ok│2021-04-0122:22:57.189312│
│7│GameKult│test│jeux│Ok│2021-04-0122:23:21.049307│
│8│Gameblog│test│jeux│Ok│2021-04-0122:23:48.350934│
│9│NoFrag│test│jeux│Ok│2021-04-0122:24:15.721174│
│10│Frandroid│test│android│Ok│2021-04-0122:24:47.324475│
│11│LesNumeriques│test│android│Ok│2021-04-0122:25:09.740677│
│12│VueJSNews│test│vuejs│Ok│2021-04-0122:25:34.307735│
│13│CacktusBlog│test│python│Ok│2021-04-0122:26:02.412688│
│14│PythonNews│test│python│Ok│2021-04-0122:26:41.975564│
│15│nedbatchelder│test│python│Ok│2021-04-0122:28:21.838166│
│16│DjangoNews│test│Python│Ok│2021-04-0122:28:47.804644│
│17│PythonInsider│test│Python│Ok│2021-04-0122:29:18.791661│
│18│PyCharmBlog│test│Python│Ok│2021-04-0122:29:44.568828│
│19│RealPython│test│Python│Ok│2021-04-0122:30:10.952486│
│20│VueJS│test│VueJS│Ok│2021-04-0122:30:34.507337│
│21│OdieuxConnard│test│Humour│Ok│2021-04-0122:31:03.458147│
└────┴─────────────────────┴───────────┴─────────┴──────────┴────────────────────────────┘Migrationsif you had the version 0.5.0:runmigrations/alter_table_trigger_add_telegram.sqlmigrations/alter_table_trigger_add_wallabag.sqlif you had the version 0.4.0:runmigrations/alter_table_trigger_add_webhook.sql(Image credits toEmojipedia)