Commit Graph

242 Commits

Author SHA1 Message Date
d8c7d1285b
add some bilibili av/bv example 2024-11-23 17:59:44 +08:00
54be96e511
fix #53 bilibili video description exceed the tg image caption size limit 2024-11-14 22:31:00 +08:00
bf41002d87
RELEASE 1.4.0*pocheng
## 📇 Function & Mechanisms

- Cha social share now will search all supported URLs in the inline query content, and process all of it.
  - for all the inline url format feature, it search all the URLs and export the output
  - for social preview share, it search all the URLs and export all the URLs output.
- Cha inline social share and social share URL format features changed its inline result description format, makes it easer to find out which URL it comes from.
- Cha inline social share now can select if to share one single image, or combined image with text contents.
- Add Bilibili share with preview content
- Add Xiaohongshu share url re-format & cleanup
- Add Morny's fediverse account URL to `/info` about page output.

## 🔌 for Trusted/Admin

- Now command `/exit` will only be triggered under private chat, or explicitly set current Morny's username.

## 🧯 Bug Fix

- Fix the EventEnv's StateSource records incorrect from stack trace.
2024-11-13 16:39:31 +08:00
487f1ffe51
add video length for Bilibili preview share
- also fixed bilibili.XWebView[cid] may decode failed
2024-11-13 14:42:22 +08:00
5f08408ccf
changed Dockerfile 2024-11-03 15:11:29 +08:00
2611ad702f
fix #50 xiaohongshu share link failed to parse 2024-11-02 22:38:19 +08:00
7c90b1f9af
cha inline social content results rules
now it follows the following rules:

1. If there contains images
  1.1 If there supports mosaic image, then provide a result with mosaic image with text content.
  1.2 If the previous one is not supported, then provide a result with the first image with text content.
  1.3 If the previous two are not supported, then provide a result with only text content.
  1.4 And for each image that supports, provide a image only (with a source url) result.
2. If there contains no image, just provide the text content result.
2024-09-11 22:11:46 +08:00
bd204a3cd7
disable inline query debug mode 2024-08-25 19:44:49 +08:00
409ad0f517
add better inline result preview for twitter and weibo
- cha Twitter URL reformatted added the description
- cha SocialContent and ShareToolSocialContent
  - add support for SocialContent to set the query result title and description
  - cha weibo and twitter's inline result shows
    - add the description, with original url and preview mode.
    - add the title to show a brief of the content
      - 35 chars max currently
      - if there are only medias with no text content, the author name will be used instead.
2024-08-24 20:34:26 +08:00
0b560180f4
add support for inline bilibili preview share. cha some social share query result names
- for Bilibili
  - from "[bilbili] Share video / avXXX/BVXXX" to "[Bilibili] Video avXXX/BVXXX", and also added description
  - from "[tweet] Share as VxTwitter/Fix-Tweet" to "[Twitter/X][VXTwitter/Fix-Tweet] $screenName/statusId"
  - from "[Xiaohongshu] Share Link [$id]" to "[Xiaohongshu] Note $id.
    - also added description.
    - if the note is from a share url, then the share url will be show in description
2024-08-23 22:30:27 +08:00
de522b2dd6
add bilibili video metadata api 2024-08-22 16:52:56 +08:00
50ca14f593
fix EventEnv's StateSource misaligned 2024-08-22 15:36:44 +08:00
c632df4cd8
fix /exit will mis-trigger on meant to be used on other bots 2024-08-22 15:32:57 +08:00
1230b9e6b5
inline get social content now can search all available links in query texts 2024-08-21 19:08:09 +08:00
02819a9069
cha make social url rewrite now search urls instead of match in queries
- ShareToolBilibili now searches all the urls in query string, include b23.tv share url, av/BV id, video url, then rewrites them all and outputs.
- ShareToolTwitter now searches all the urls instead of matches in the query string.
- ShareToolXhs now uses searchUrls, instead of old match url or search share text. Also supported multiple urls match in one query.
2024-08-12 23:06:41 +08:00
9c4e2e0ec8
refactor of Bilibili APIs 2024-08-08 19:35:52 +08:00
3c42738816
add inline share xhs url 2024-08-05 19:10:29 +08:00
46519138e1
bump resource-tools to 0.3.1 2024-08-05 11:59:13 +08:00
597e87f5fe
update fediverse 2024-06-25 21:48:17 +08:00
080ec1a912
update version and dependencies 2024-06-03 22:03:31 +08:00
d408fa2561
for UserRandom requires the surrounding space between 'or' to avoid mismatches. 2024-05-06 17:16:43 +08:00
7e8e66fcbb
deprecated ip186 (and command /ip /whois) 2024-05-06 17:12:52 +08:00
a07c0b1b18
fixed weibo m.weibo.cn/status/<id> unavailable 2024-03-07 18:50:21 +08:00
0310914632
update README to a newer version in 2.0.0 2024-02-15 22:38:49 +08:00
2ae1777a93
fix some BiliForm tests 2024-02-14 20:15:43 +08:00
35c9eeb9a4
Update the algorithm for 2^51 ranges AV/BV conversion. 2024-02-14 20:06:32 +08:00
9814b3ccab
fix Bilibili av/bv conversion failed when avid > 2^30 2024-02-13 14:04:49 +08:00
961edd93f3
[[release 1.3.0*guanggu]]
## 📇 Function & Mechanisms

- add daily event statistics, which collects event processed counts and average consumed time
  - can be found using `/info event` or newly added Morny Daily Report
  - will reset every 00:00 of report-zone
- add `/info tasks` to monitor current coeur task manager status
- cha Question Mark Reply support `⸘`
- cha bot output supported codeblock language tag (for event_hack output and exception report)
- for inline twittet tweet share
  - add FixTweet output format
  - removed c.vxtwitter output format (because the upstream default is changed to combined)
  - support x.com and fixvx.com and fixupx.com for input
- add some methods that can get social media status' content
  - currently support tweeter tweet, and weibo status
    - weibo with videos is not supported yet
  - add command `/get <status-url>` can get from a url
  - add private message listener that can automaticly search supported url from recieved private message and output the status content
  - add inline query can output status content by using `<supported-url> get` (or `get <supported-url> is also supported`)
    - weibo with pics and twitter with videos is not supported yet

## 🧯 Bug Fix

- fix Telegram User DC matching failure due to cdn domain changed to */cdn-telegram.org
- fix InputCommand throws OutOfBounds when input is empty (aka. only `/` in message text)
- fix wrong time parsing in OnCallMe-last_dinner

## 🔌 for Trusted/Admin

- add Morny Daily Report, will report at 00:00 of report-zone
  - now will report daily event statistics

## 🔩 for self-hosted/developer

- add --report-zone startup param to control which time-zone the Daily Report time should aligned to
  - default is system default zone
- add err handler for MornyCoeur#eventManager(UpdateListener), now error will not output to stderr but Morny's logger.
- add util.scheduler and MornyCoeur#tasks for task managering
- add MornyCoeur#watchDog
- add EventEnv#timeStartup
- add atEventPost and executeFilter in EventListener
- cha EventEnv#status
- add SttpPublic#mornyBasicRequest and make every Morny's HTTP request using it (eveny request now will take Morny UA)
2023-12-06 21:51:29 +08:00
c4632263de
make private url share can get from content 2023-12-02 21:11:33 +08:00
ad65ab7a73
SocialContent add non-pic alternative 2023-11-30 00:13:29 +08:00
20c9916535
add show retweet weibo 2023-11-29 21:08:08 +08:00
79d41d5e72
basic inline get social function
- Now supported get social content from inline
  - use a supported url with prefix or suffix "get"
  - only support twitter photos media
  - support all types of pure text content.
  - trying get non-supported medias may cause failure.
2023-11-29 17:16:02 +08:00
3d1699ea1d
move external API docking code to extra package from data 2023-11-29 00:15:13 +08:00
a9767ec1b0
change /tweet to /get and added support for weibo content 2023-11-27 18:58:35 +08:00
d602e1b366
set morny UA for all HTTP req, add twitter tests 2023-11-23 17:57:29 +08:00
43cdf221d9
fix request client failed caused unexpected exception 2023-11-22 16:06:15 +08:00
f8b2d056cc
FixTweet api implement, with a /tweet command 2023-11-21 23:35:12 +08:00
2687c3be88
add FixTweet, removed c.vxtwitter 2023-11-20 17:12:10 +08:00
c5c6683459
for event, fix wrong OK stats, add CANCELED tag
- Now the status of EventEnv is a State array that infers the state history
  - State can be OK or CANCELED, and can be set multiple times
  - state method can get the last state set, and status method can get the state history
  - Default EventListener.executeFilter implementation is changed to true if stats is null
- add consume[T](T=>Unit) for EventEnv, to simplifying the old consume[T](Class[T])(T=>Unit)
- changed execution sort of EventListener in EventListenerManager. Now atEventPost method will be run after all events' normal listeners complete.
- cha OnMedicationNotifyApply will only tag event as OK when the refresh function works (fixed part of the wrong OK state)
- cha MornyOnUpdateTimestampOffsetLock tag event CANCELED but not OK to fix part of the wrong OK state
2023-11-20 11:18:32 +08:00
7ee4a0d3c5
add code language support for event_hack and exception report 2023-11-17 01:19:22 +08:00
720771719e
add err handler for UpdateListener
- add err handler for UpdateListener in MornyCoeur
  - for network-related exception, will only output exception basic message and not report.
  - for other type of exception, will output all message of exception and do report.
- Scheduler's runnerName now is `$classBaseName@$hashCode`
2023-11-16 20:06:15 +08:00
2c30b5ec09
add event statistics, fix CronTask
- add for EventEnv a timeStartup field
- cha EventListener and EventListenerManager
  - add for EventListener a method executeFilter used to manager if an event should be run. This replaced the condition statement inside the EventListenerManager
  - add for EventListener a method atEventPost, this will run at current event listener is on complete
- add for MornyConfig a reportZone field
  - can be set by `--report-zone`
  - used for controlling Morny Report daemon uses the zoned time to send report. default is system default time zone.
- add for MornyReport new EventStatistics and DailyReportTask
- add for MornyInformation command new subcommand `event` to manually show MornyReport.EventStatistics info.
- add WatchDog and MornyCoeur.watchDog, used for checking if the machine is in sleep mode and notify the MornyCoeur.tasks to avoid timing problem
- fix CronTask frequency got initialize problem
- add slf4j-nop for project
2023-11-14 13:56:23 +08:00
3d44972233
add CronTask, tests optimize
- add lib cron-utils: v9.2.0
- add CronTask
  - add CronTask's test
- change MedicationTimer using cron as time calculation backend (not using CronTask)
- change OnQuestionMarkReply support `⸘`
- minor SchedulerTest "immediately" test logic changes
2023-11-09 22:07:10 +08:00
89c414e853
Merge branch 'master' into 1.3.0 2023-11-08 18:33:42 +08:00
81ba776c7d
fix InputCommand throws OutOfBounds while input is empty 2023-11-05 19:47:33 +08:00
d5c852e989
fix *.cdn-telegram.org 2023-11-05 19:33:35 +08:00
9f908aa88e
add scaladoc, change Long to EpochMillis, scheduler tests
- fix wrong Telegram EpochSeconds to EpochMillis conv at OnCallMe
2023-11-05 19:25:00 +08:00
f0d4471646
add some scaladoc for scheduler 2023-11-04 19:38:40 +08:00
b57d87dece
add basic Scheduler and interval tasks
- MedicationTimer refactor using new scheduler
- add `/info tasks` for monitoring morny global tasks
2023-11-03 20:23:32 +08:00
adb91a06d5
[[release 1.2.1]]
- fix featured-image error
- fix morny startup report missing `@` in username field
2023-10-20 21:31:14 +08:00