With apologies to the ABBC in which the discussion was previously taking place…
Book Clubs
This category is ONLY for book club threads!<br> For other questions or topics regarding reading, use the Reading subcategory
With apologies to the ABBC in which the discussion was previously taking place…
That’s what push notifs are for, on mobile they even get delivered through regular notifications any time.
Yep, I know. Still needs to be set up though, that’s why I mentioned it. I never used it, but I think you either need your own server or use a service, so some research included. (After the little research I did, Webpushr seemed best in the free tier).
- If you log in, you can request editor access.
- I personally accept that editor request
- At this point, you have access to the existing book clubs, and can create one if it doesn’t yet exist
- When selecting a club, you have the option to send out notifications to all subscribed members, be that a new book starting up, voting period, nomination period, whatever.
- Without logging in even, you can see all the book clubs that were created, and can subscribe to them
Sounds good!
I was thinking of using the WK API (and authorize usernames) instead of a login/registration system to:
Yep, I know. Still needs to be set up though, that’s why I mentioned it. I never used it, but I think you either need your own server or use a service, so some research included. (After the little research I did, Webpushr seemed best in the free tier).
If you are willing to have a bit of a more complex setup (or a library), then you can use firebase cloud messaging. It’s completely free and works on all major platforms
I was thinking of using the WK API (and authorize usernames) instead of a login/registration system to
I also dislike logins, because I would rather have others worry about this, but using the wk api is not enough in my opinion. It’s a bit clunky, you need to store the api key on the client side, etc etc. Instead I want to either authenticate properly or use a regular “sign in with google” or similar thing
One route for people who are able to use UserScripts would be a UserScript something like this:
// ==UserScript==
// @name Testing
// @namespace none
// @version 0.1
// @description pending
// @author pending
// @match https://community.wanikani.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Test showing a message:
if ('ABBC Title' in localStorage) {
//HandleTitleChange('This is a test of the nomination.')
}
// If the stored title is more than a day old, update it.
let currentDate = new Date()
let lastUpdatedDate = 'ABBC Title Updated' in localStorage ? new Date(localStorage.getItem('ABBC Title Updated')) : new Date('1/1/2001')
const daysSinceTitleLastChecked = (currentDate - lastUpdatedDate) / 1000 / 60 / 60 / 24
if (daysSinceTitleLastChecked < 1) {
return
}
let url = 'https://community.wanikani.com/t/x/34698/1.json'
fetch(url)
.then(res => res.json())
.then(out => HandleTitleChange(out.title))
.then(out => localStorage.setItem('ABBC Title', out.title))
.then(out => localStorage.setItem('ABBC Title Updated', new Date()))
.catch(err => { throw err })
})();
function HandleTitleChange(newTitle) {
const oldTitle = localStorage.getItem('ABBC Title')
if (oldTitle === newTitle) {
return
}
if (newTitle.toLowerCase().includes('nomination')) {
console.log('Seeking nominations!')
}
else if (newTitle.toLowerCase().includes('voting')) {
console.log('Now voting!')
}
}
This is just a proof of concept. The idea is that once per day, it checks the title of the ABBC thread, and if there is a change, it pushes a message to the Javascript console.
An extended version could:
Advantages
Disadvantages
I have a few reservations about this approach.
The biggest is that it only works, if you go to the community forums, and I don’t think this could easily be solved.
It also requires one person, the maintainer of the script to manually input the URL of all of the threads, that need attention like this, which isn’t very flexible, if someone for example wanted to start a separate book club suddenly about horror manga, or a specific mangaka, or horror manga from a specific mangaka.
Lastly, if there’s ever a typo in the title, that basically breaks the system. Not likely, but can easily happen.
The biggest is that it only works, if you go to the community forums
True.
This only solves the situation of “I want to know when there is a call for nominations or voting, but I don’t want to put the thread on Notification” without consideration of people who otherwise get notifications without visiting the forum.
(That’s why I say this isn’t a complete solution, only a limited one.)
It also requires one person, the maintainer of the script to manually input the URL of all of the threads, that need attention like this
An alternate approach is to have a UI that can add/remove any thread ID to the notification (perhaps with a limit on how many threads can be added). But then it gets fragile if those threads don’t change their title, or don’t use specific words in the title for nomination and vote events.
Lastly, if there’s ever a typo in the title, that basically breaks the system.
If someone running a book club has a typo in the thread title, they deserve to have their pay docked for two weeks.
This only solves the situation of “I want to know when there is a call for nominations or voting, but I don’t want to put the thread on Notification”
Just to clarify, so I’m understanding what you’re trying to accomplish (apologies if this was previously discussed): you’re just looking to be notified of Nominations / Calls for Voting in the main 4 book club threads?
In that case, I think the thread IDs likely won’t change (unless there’s a hard limit to the number of replies allowed forcing a new thread or something, or someone adds a new main category, as happened with Visual Novels).
Alternative would be checking for any new updates on threads in the book club category:
This category is ONLY for book club threads!<br> For other questions or topics regarding reading, use the Reading subcategory
and see if ANY mention nominations or voting, but that might get you false positives.
you’re just looking to be notified of Nominations / Calls for Voting in the main 4 book club threads?
There may be more potential features being talked about in the overall discussion, but for my script, yes, this is specifically what I targeted.
Alternative would be checking for any new updates on threads in the book club category
I like the idea, but there is one issue that comes up.
It looks like the JSON file returns the top 30 threads, three pinned, so it’d be 27 of interest.
As I write this, the list includes both ABBC and ABC, but not BBC. This means the script, were it using the list of recent posts, would miss the BBC thread if it had nominations open or voting, but hadn’t received any recent postings. (Threads tend to be a bit more lively during those times, though.)
There may be more potential features being talked about in the overall discussion, but for my script, yes, this is specifically what I targeted.
Gotcha. I feel like if it’s just the main ones you can probably safely just reference the thread ids, since I doubt those would change.
Only risk would be if no one updated the title, or, as @Gorbit99 said, if they typoed it. You could probably check for a close match on words “nominate,” “nomination,” “vote,” “voting” or similar, though, and catch that.
Gotcha. I feel like if it’s just the main ones you can probably safely just reference the thread ids, since I doubt those would change.
Not sure exactly what you’re talking about, he is referencing the thread ids, though in the form of the thread URL.
You could probably check for a close match on words “nominate,” “nomination,” “vote,” “voting” or similar, though, and catch that.
Just use the system WK uses for checking how close an answer was we all know that never goes wrong
The real issue with my code comes up when BBC reads the manga adaptation of “My nomination went to vote and I was banished to another world so I’m starting over as a chef overlord.”[1]
[1] Not an actual series.
[1] Not an actual series.
yet
I actually did look around for a whole 5 seconds for a series that would mess the system up. Ranking of the kings is sadly “ranking” of the kings.
Not sure exactly what you’re talking about, he is referencing the thread ids, though in the form of the thread URL.
Yup, I just meant that probably hard-coding those 4 ids as-is would likely be fine, since they shouldn’t change!
The real issue with my code comes up when BBC reads the manga adaptation of “My nomination went to vote and I was banished to another world so I’m starting over as a chef overlord.”[1]
Hopefully the next really popular series doesn’t contain one of the key words, though that would be amusing in its own way.
… goes to change code
if ( keywordMatchesFunction() && (title != “New super popular Nominating series”) )