skar404 / hoba-hoba Goto Github PK
View Code? Open in Web Editor NEWHoba bot by Hoba podcast
License: Apache License 2.0
Hoba bot by Hoba podcast
License: Apache License 2.0
Идея потестить кейсы на Хоба подкасте и расширить функционал бота для автоматического добавления новых подкастов.
План:
Идеи:
Лучший подкаст по номером: {number}.mp3
, и также с сообщением и будет ли оноПоменять формат постов,
В телеграме есть метод чтобы закрепить сообщения
https://core.telegram.org/bots/api#pinchatmessage
Parameter | Type | Required | Description |
---|---|---|---|
chat_id | Integer or String | Yes | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
message_id | Integer | Yes | Identifier of a message to pin |
disable_notification | Boolean | Optional | Pass True, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. |
Telegram не подерживает часть HTML тегов и нужно их убирать:
подерживаемые теги:
https://core.telegram.org/bots/api#html-style
решение покап вырезать все теги и заменять <br>
на \n
Пример HTML:
<p>Форма для ваших вопросов: <a href="https://forms.gle/WqCy4DTAwHbvvpM67" target="_blank">https://forms.gle/WqCy4DTAwHbvvpM67</a>. В одном из выпусков мы на него, возможно, ответим.</p><p>***<br />Темы выпуска<br />02:38 <a href="https://reminder.media/super/14-priemov-kotorye-pomogayut-razobratsya-v-sebe-prinyat-reshenie-ili-povysit-effektivnost" target="_blank">14 приёмов, которые помогают разобраться в себе: от некролога до часа в полной тишине</a><br />15:28 <a href="https://twitter.com/Twitter/status/1334542969530183683" target="_blank">Твиттер предложил людям описать 2020-й одним словом</a><br />25:13 <a href="https://theguardian.com/world/2020/dec/08/mount-everest-china-and-nepal-agree-on-new-taller-height" target="_blank">Эверест «подрос» почти на метр</a><br />38:16 Рубрика «Вечная тема»: романтизация переработок</p><p>Отвечаем на ваши вопросы:<br />53:18 Как работать с мудаками<br />01:01:19 Про то, когда интересы партнеров различаются и кого-то в паре это начинает напрягать</p><p>***<br />Упоминали в выпуске<br />— <a href="https://blog.mann-ivanov-ferber.ru/2018/10/25/dnevnik-i-utrennie-stranicy-pismennye-praktiki-kotorye-pomogayut-ne-sojti-s-uma/" target="_blank">Про утренние страницы и другие письменные практики</a><br />— <a href="https://youtu.be/FSBYf_fCJUk" target="_blank">Вебинар про конфликты на Хабре с Милой Кудряковой</a><br />— <a href="https://www.ozon.ru/context/detail/id/147394385/" target="_blank">Книга «Кровь, пот и пиксели»</a><br />— <a href="https://worldexpeditions.com/everest-base-camp-trek-guide" target="_blank">Про трек к базовому лагерю Эвереста</a></p><p>***<br />Вступайте в наш чат в Телеграме: <a href="https://t.me/hobacast" target="_blank">https://t.me/hobacast</a></p><p>Подписывайтесь на наш Патреон: <a href="https://www.patreon.com/hoba">https://www.patreon.com/hoba</a></p><p>Чтобы поддержать нас и стать частью сообщества Хобы!</p><p>***<br />Участники выпуска<br />— Аня Линская, <a href="https://t.me/shel_sneg" target="_blank">https://t.me/shel_sneg</a><br />— Ваня Звягин, <a href="http://anchor.fm/omfg-podcast" target="_blank">http://anchor.fm/omfg-podcast</a><br />— Далер Алиёров, <a href="https://t.me/dalerblog" target="_blank">https://t.me/dalerblog</a><br />— Адель Мубаракшин, <a href="https://t.me/exarg" target="_blank">https://t.me/exarg</a></p><p>***<br />Спасибо нашим патронам!</p><p>— Евгению Звягину<br />— Анастасии Смирновой<br />— Паше Пастернаку<br />— Роману Далинкевичу<br />— Евгению Васкивскому</p>
Нужно сделать для групп планировких когда постить, то есть бот спит все время и просыпается в нужный день и время и не спит пока не запостит пост в группу.
telegram не позволяет делать отложенные постя через bot api
Возможно нужно отолженные посты по ~15 минут
то есть пока бот может отдавать поломанный Markdown чтобы можно было скорретировать до момента отправки
Нужно все ссылки пропускать через bitly
Важно что если ссылка [новости](https://url.ru)
то нужно сохранять контекст в []
Игнорировать ссылки с telegram например: [https://t.me/shel\_sneg](https://t.me/shel_sneg)
, но сокрашать и учитывать \_
В коде есть FIXME коменты их нужон поправить
По какой-то странной причине в https://t.me/test_014 не становяться ссылками
1. Изменить формат на: 00:00:00
Нужно подчишать соодщение с timecode чтобы оно было меньши 1025 символов
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.