New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Add: utilizing local meta keywords tags to suggest better and more relevant tags #47
Conversation
… more relevant tags. Examples include: nytimes.com and washingtonpost.com
Hi @ventz , Thanks for the pull request! |
@clvrobj No problem. If you can, please test it on your side - I started with the chrome extension at first, cloned it, and changed it there and got it to work, only to find your github repository :) I then modified it for here, following some of the names/conventions you have setup. My local version works (when I point chrome to the git working directory) -- but when I did the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clvrobj No problem.
If you can, please test it on your side - I started with the chrome extension at first, cloned it, and changed it there and got it to work, only to find your github repository :) I then modified it for here, following some of the names/conventions you have setup. My local version works (when I point chrome to the git working directory) -- but when I did the
gulp build
and took thedist
bundle, it had display issues upon logging into the pinboard account. I think this might be due to some out of date/deprecated packages however.
@ventz Sure, will try it! Thanks.
suggests = suggests.concat(keywordTags); | ||
suggests = suggests.sort().filter(function(item, pos, ary) {return !pos || item != ary[pos - 1];}); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind to replace the tabs in this block into 2 spaces? It'd be identical with the full project.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All set and pushed.
app/scripts/keywords_suggestions.js
Outdated
} | ||
sendResponse({data: tags}); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind to replace the tabs into 2 spaces? It'd be identical with the full project.
Thanks!
Hi @ventz I tried it and it works, but the tags seems a bit too many in the page. Pls check the below screenshot. |
Hi, The NYT is sadly one of the places where the keywords are a bit much. and honestly - in my opinion at least, they are probably not that helpful there. They basically don't use them properly. But in most other places I think they are pretty good (the ones that still use them - as google has stopped looking at meta tags, some websites have stopped bothering with meta data). Usually websites keep less than 10 of them, and they are directly related to the website itself. (ex: see cnn.com - although they filter their traffic so sometimes they are not available to the scripts pulling the metadata). Maybe as a solution the array length can be checked -- if it's over (picking an arbitrary number here) 10 for the ones coming from the meta keywords, we can then pull a keyword relevancy of some sort? (At that point, there's even the potential to do some keyword analysis from the html content itself :)) I would also lower case the tags by the way, otherwise there's some de-dups there and in general it probably makes sense to store them as lower case. |
It makes sense. |
@clvrobj That's great - thank you! |
Feature Add: utilizing local meta keywords tags to suggest better and more relevant tags.
PR includes:
1.) New content script:
keywords_suggestions.js
with agetKeywordsSuggestionTags
listener(utilized for pulling out "meta keywords" content from websites
2.) updated manifest.json to include new
content script
allowance forkeywords_suggestions.js
3.) Update to
background.js
to include optional parameter to pass local meta keywords, adding them to suggests, and de-dupping with popular and recommended tags.4.) Updated to
popups.js
to include newgetKeywordsSuggestionTags
tab message sender (to ourgetKeywordsSuggestionTags
listener from thekeywords_suggestions.js
), which either overloadsgetSuggests
(in thebackground.js
) with the local meta keywords, or if none are present, passes along the Pinboard suggestions.Examples/Test with: