Closed GuiltyDolphin closed 7 years ago
Nice! I think trigger_words.txt is a convention we just made up during perldoc development, so a CL option would be cool for other ones... Or we could just adopt trigger_words.txt as a thing.
@jbarrett I thought it would be a pretty good convention to start (and the file doesn't need to be comitted for it to work), as @jdorweiler said:
@jbarrett How about put the trigger words in a separate file trigger_words.txt? I'll have to add them manually to our internal list of triggers but at least they will be documented in a place where everyone can see them.
It would help document how you expect the FatHead to trigger.
But sure, I can add an option for triggers.
You're right, I just made trigger_words.txt
up :smile:
I'm going to start asking everyone to include one though.
I was actually going to add support for trigger words via the Metadata. We already have a place to define them on the IA Pages so I figured we might as well use that?
@jdorweiler @jbarrett @GuiltyDolphin what are your thoughts?
Maybe @zachthompson remembers but I tried adding trigger words to the triggers field on the IA page and it broke some stuff. I don't know if that was ever fixed.
I tried adding trigger words to the triggers field on the IA page and it broke some stuff.
@jdorweiler you mean simply have the IA page trigger words filled out created problems? I have them filled out for https://duck.co/ia/view/mdn_css, and it seems fine? That's what I was going to use to get it working via metadata.
@moollaza Hmm, metadata would be a good option - @jdorweiler it shouldn't be an issue if we ensure triggers are reviewed before deploy? At the least we could use it in 'testing'.
Edit: @moollaza it looks like the triggers aren't provided through the public metadata? I can't seem to access it through DDG::Meta::Data
.
@jdorweiler @moollaza @jbarrett What do you think would be the best way to do this?
@GuiltyDolphin Thanks! This LGTM :+1:
This allows better emulation of the triggering on production by providing a means of specifying trigger words.
Currently just accepts a
trigger_words.txt
file in the same directory asoutput.txt
(not required) for trigger words; we could potentially have a CL option as well.cc @moollaza @jbarrett