View Issue Details

Category
SSPBT:本体(SSP)
SeverityfeatureReproducibilityN/A 
Status closed 
Fixed in Version2.5 (リリース) 
Summary0000195: Interact with ghost using web link
Description

Some ghost have online documents, and maybe we can design a link format (ukagaka-link://, or something) to trigger new events("OnUkagakaLinkOpen",etc) when the user opens the browser
We can do a lot of things through this function, from opening a Shiori function, switching ghost or shell to using it with DICLOAD to load dictionaries on the network. All we need to do is click a link

Activities

guest

2021-06-30 13:03

reporter   ~0000449

Hey, it's very difficult to switch ghost if you open a link only to trigger an event, especially this function. Most of the links are only for one ghost
I think we should be more rigorous. This support may need to design a new set of things
In particular, security needs to be guaranteed

guest

2021-07-31 14:20

reporter   ~0000481

In my opinion, security is a problem that ghost authors need to consider. The information that Web links themselves need to contain is only three aspects: ghost that can accept the event, event name, and event parameter (optional)
And possible special operations to facilitate future expansion, such as opening plug-ins or headlines, switching balloon/shell, etc

ponapalt

2021-08-03 14:26

administrator   ~0000488

Last edited: 2021-08-03 14:27

Planned spec

  • URL : "x-ukagaka-link:(some text)"
  • Event : "OnUkagakaLinkOpen" Ref0 = above URL.

Limitation

  • This function may work when "Associate Related File Extension to SSP" option is enabled, because registry must be modified to enable Windows URL handler.
  • SecurityLevel header of OnUkagakaLinkOpen event must be "external" for security considerations. This prevents AYA/YAYA normal event handling. (Please check yaya_shiori3.dic request function : it will return "204 No Content" when SecurityLevel = External)

guest

2021-08-03 16:49

reporter   ~0000489

Ghost authors can use asymmetric encryption to ensure that the URL content is set by themselves
Of course, this is what ghost authors need to consider

I'm just struggling that the link name is' x-ukagaka-link 'but the event name is "OnUkagakaLinkOpen"
However, if the event name is changed to "OnXUkagakaLinkOpen", it is also ugly
Oh, God, help me
I feel like I'm dying

ponapalt

2021-08-03 17:14

administrator   ~0000490

I think OnXUkagakaLinkOpen is acceptable.
It's just specification and users never see. We will endure ugly ID, like "craftmanurl".

guest

2021-08-03 23:44

reporter   ~0000492

Although we know that just forwards all information to ghost for processing is very convenient to implement, I think it is better to specify this for future expansion:
x-ukagaka-link://type=event/ghost=ghost_name/info=event_info
The OnXUkagakaLinkOpen event handles the case where ghost name is the current ghost name
OnXUkagakaLinkOpen.Others event handles the case where ghost name is not the current ghost name

By the way, I think OnxUkagakaLinkOpen might be "better looking"

guest

2021-08-04 03:54

reporter   ~0000493

(Not the original poster)
OnxUkagakaLinkOpen violates the consistency of every event starting with On and then a capital letter. It's a bit confusing, my brain wants to parse it as 'Onx' (Pronounced a bit like 'honks') rather than 'On x'. OnXUkagakaLink is a bit clumsy, but it's clear and consistent.
But really, a bit of ugliness doesn't matter too much, I don't think. Whatever name is given, as long as the purpose is clear, we'll survive.

guest

2021-08-04 11:12

reporter   ~0000494


Of all things, I only think the following design is important for expansion
x-ukagaka-link://type=event/ghost=ghost_name/info=event_info
As for the name of the event?
I don't think it's important
Just like the getaistateex event, if you feel uncomfortable, just write this in your DIC:
On_getaistateex{On_GetAIStateEX}

guest

2021-08-13 19:02

reporter   ~0000531

Hemmm, that's all
Any name, I think

ponapalt

2021-08-14 17:39

administrator   ~0000537

Last edited: 2021-08-14 17:39

I(ve included test implementation in 2.5.11 :

Event: OnURLOpen
Reference0: x-ukagaka-link:(some text)

Above event is sent to all active (booted) ghosts when opening x-ukagaka-link URL.

guest

2021-08-14 22:41

reporter   ~0000538

I'm steve

Well, I think the event name ‘OnUrlOpen’ is too common. It may have been used
For example: https://github.com/Taromati2/ghost/blob/master/master/dic/aya/master/url.dic#L2

'OnXUkagakaLinkOpen' may be a better choice. The bro in front just proposed to change it to 'OnxUkagakaLinkOpen'.
Even if don't accept that, I don't think he will be angry
Also, as the bro said, it's better to force the ghost name in the URL, so that ghost authors can distinguish their URL use to

and add type info for future expansion like 'type:ghost_event' is also great
In this way, we can develop more uses of web URL in the future, rather than necessarily using it as an event to activate ghost

ponapalt

2021-08-15 07:03

administrator   ~0000540

Last edited: 2021-08-15 11:18

I've changed event name to "OnXUkagakaLinkOpen". Please try 2.5.12.

  • Event spec :

    • ID: OnXUkagakaLinkOpen
    • Reference0 : info_text (already decoded)
  • URL spec :

    • similar to the mailto scheme
    • x-ukagaka-link:("name" or "sakura.name" in descript.txt : URL encoded, must be UTF-8)?type=event&info=(info_text : URL encoded, must be UTF-8)
  • Sample :

    • x-ukagaka-link:Emily?type=event&info=sweet-potato-feeding

guest

2021-08-15 16:14

reporter   ~0000543

Is there any hidden trouble in putting the URL type into after the ghost name?
For example, how should we design specifications when support plugin URL related functions in the future? In this case, ghost's name is not the main info

guest

2021-08-15 16:20

reporter   ~0000544

Ah, I was stupid
As long as the content of type is different, the main information is not necessarily the ghost name, but the plugin name or something else
Please ignore me

ponapalt

2021-08-15 17:08

administrator   ~0000545

I reconsidered it and decided to do as follows:

  • x-ukagaka-link:type=event&ghost=Emily&info=sweet-potato-feeding

because it's simpler and we don't have to stick to the same format as "mailto" scheme.

ponapalt

2021-08-15 20:29

administrator   ~0000553

Last edited: 2021-08-15 21:15

Please try 2.5.14.

  • Event spec :

    • ID: OnXUkagakaLinkOpen
    • Reference0 : info_text (already decoded)
  • URL spec :

    • similar to the mailto scheme
    • x-ukagaka-link:type=event&ghost=("name" or "sakura.name" in descript.txt : URL encoded, must be UTF-8)&info=(info_text : URL encoded, must be UTF-8)
    • sample : x-ukagaka-link:type=event&ghost=Emily&info=sweet-potato-feeding

guest

2021-08-16 00:52

reporter   ~0000555

Personally, I think there is nothing to adjust this function
Maybe we can close this problem until someone thinks there are still areas that need to be modified?

guest

2021-08-18 12:51

reporter   ~0000565

I have a problem: GitHub's markdown doesn't seem to support linking to any url format other than HTTP or HTTPS
What shall I do?

guest

2021-08-18 13:42

reporter   ~0000566

about #c565
you can use a jump.html to convert any link to http/https
like " https://steve02081504.github.io/jump.html?url=x-ukagaka-link%3Atype%3Devent%26ghost%3DTaromati2%26info%3DMirrorChange%3Ahttps%3A%2F%2Fraw.githubusercontent.com%2FTaromati2%2Fstable-mirror%2Fmaster%2FTaromati2%2F "

ponapalt

2021-08-20 04:38

administrator   ~0000577

2.5.16

Issue History

Date Modified Username Field Change
2021-06-28 15:11 guest New Issue
2021-06-30 13:03 guest Note Added: 0000449
2021-07-31 14:20 guest Note Added: 0000481
2021-08-03 14:26 ponapalt Assigned To => ponapalt
2021-08-03 14:26 ponapalt Status new => confirmed
2021-08-03 14:26 ponapalt Note Added: 0000488
2021-08-03 14:26 ponapalt Note Edited: 0000488
2021-08-03 14:27 ponapalt Note Edited: 0000488
2021-08-03 16:49 guest Note Added: 0000489
2021-08-03 17:14 ponapalt Note Added: 0000490
2021-08-03 23:44 guest Note Added: 0000492
2021-08-04 03:54 guest Note Added: 0000493
2021-08-04 11:12 guest Note Added: 0000494
2021-08-13 12:07 ponapalt Status confirmed => feedback
2021-08-13 19:02 guest Note Added: 0000531
2021-08-13 19:02 guest Status feedback => assigned
2021-08-14 17:37 ponapalt Status assigned => feedback
2021-08-14 17:39 ponapalt Note Added: 0000537
2021-08-14 17:39 ponapalt Note Edited: 0000537
2021-08-14 22:41 guest Note Added: 0000538
2021-08-14 22:41 guest Status feedback => assigned
2021-08-15 07:00 ponapalt Status assigned => feedback
2021-08-15 07:03 ponapalt Note Added: 0000540
2021-08-15 07:05 ponapalt Note Edited: 0000540
2021-08-15 07:06 ponapalt Note Edited: 0000540
2021-08-15 07:06 ponapalt Note Edited: 0000540
2021-08-15 07:06 ponapalt Note Edited: 0000540
2021-08-15 07:07 ponapalt Note Edited: 0000540
2021-08-15 07:15 ponapalt Note Edited: 0000540
2021-08-15 07:16 ponapalt Note Edited: 0000540
2021-08-15 11:18 ponapalt Note Edited: 0000540
2021-08-15 16:14 guest Note Added: 0000543
2021-08-15 16:14 guest Status feedback => assigned
2021-08-15 16:20 guest Note Added: 0000544
2021-08-15 17:03 ponapalt Status assigned => feedback
2021-08-15 17:08 ponapalt Note Added: 0000545
2021-08-15 20:29 ponapalt Note Added: 0000553
2021-08-15 21:15 ponapalt Note Edited: 0000553
2021-08-16 00:52 guest Note Added: 0000555
2021-08-16 00:52 guest Status feedback => assigned
2021-08-16 07:34 ponapalt Status assigned => confirmed
2021-08-18 12:51 guest Note Added: 0000565
2021-08-18 13:42 guest Note Added: 0000566
2021-08-19 15:03 ponapalt Fixed in Version => 2.5 (リリース)
2021-08-20 04:38 ponapalt Status confirmed => closed
2021-08-20 04:38 ponapalt Resolution open => fixed
2021-08-20 04:38 ponapalt Note Added: 0000577