[UserScript] Book Club Manager

Book Club Manager

:warning: This is a third-party script/app and is not created by the WaniKani team. By using this, you understand that it can stop working at any time or be discontinued indefinitely.

What is this?

A tool for streamlining the management of running a book club.

Screenshots

Note: These screenshots are from version 0.4.6.

Volumes > Volume section

image

Volumes > Chapters section

image

Volumes > Weeks section

Templates section

Vocabulary section

image

Why was this written?

My book club posting duties used to be as follows:

  1. Create a vocabulary spreadsheet by:
    • Find an older vocabulary spreadsheet.
    • Save a new copy.
    • Spend time removing the content from each of the weekly tabs.
    • Spend time fixing any errors in the formatting of the sheets.
    • Copy or remove tabs until there is the correct amount.
  2. Create a volume thread by:
    • Find an older book club’s main thread post.
    • Quote-reply to get the post’s content to copy and paste into a new thread.
    • Spend time editing all the parts to match the new book club.
    • Make various mistakes, especially in the schedule table.
    • Find and fix mistakes after posting.
  3. Create each week’s thread by:
    • Find an older book club’s weekly post.
    • Quote-reply to get the post’s content to copy and paste into a new thread.
    • Spend time editing all the parts to match this book club.
    • Make various mistakes.
    • Find and fix mistakes after posting.

Today, my book club duties are:

  1. Fill out series/volume information in the Book Club Manager.
  2. Create a vocabulary spreadsheet by:
    • Click a button.
    • Create a new Google Docs spreadsheet.
    • Run a macro.
  3. Create a volume thread by:
    • Click a button.
    • Click the Create Topic button.
  4. Create each week’s posting by:
    • Click a button.
    • Click the create/reply button.

When I’m running multiple clubs, what used to be half an hour of tedious work each Friday is now a few minutes of clicking.

How do I install this?

Install a UserScript extension such as Tampermonkey.

Install the UserScript itself from GreasyFork: Book Club Manager

Usage Instructions

To open or close the Book Club Manager, click on the book icon located on the navigation bar:

image

Creating a new book club entry
  1. In the Series section, enter the title of the book/series in the Title field.
  2. Select “Save to Browser”.

Note: If you have another series selected already, you cannot add a new series. Please reload the page to clear the current selection, then you can create a new entry.

Populating Series fields

Title: The title of the book being read. The title should be generic to the series for a multi-volume book club.

Emoji: Appears after the Title in post titles.

Note: At the time of this writing, templates are not supported for titles.

Club: If the book is being read as part of one of the main clubs, select it here. This determines the thread ID used when linking to the parent club in a template.

Home Thread: The thread ID of the club’s home thread. This is used in templates for weekly threads to link back to the home thread.

Short date format: A shorter date format that may be used in templates where space is limited, such as in a schedule table. Recommended value: MMM D.

Long date format: A longer date format that may be used in templates. Recommended value: MMMM D.

Chapter # prefix: Text to prepend to chapter numbers via a template.

Chapter # suffix: Text to append to chapter numbers via a template.

Populating Volumes fields

Add a volume: Creates a new volume entry.

Populating Volumes > Volume fields

Volume

Volume number: The number of a volume in a series.

Note that while you can change the Volume Number, it currently breaks parts of the interface. If you change a volume number, select Save to Browser and then reload the page to ensure smooth operation.

Note: Support for non-numeric values has not been tested and may not be supported.

Populating Volumes > Chapters fields

Add a chapter: Adds a new chapter row.

Number: The chapter’s number.

Title: The chapter’s title.

Select the minus (:heavy_minus_sign:) image to remove a chapter.

Populating Volumes > Weeks fields

Add a week: Adds a new week row.

Note: If there is a prior row with a Start Date, the new row auto-populates the Start Date to one week later.

Week: The week number in the reading schedule.

Thread: The thread ID that this week’s thread was posted as.

Note: Templates may use this to add a link to the prior week’s thread.

Start Date: The date that this week’s reading begins.

Chapters: A comma-separated list of chapters to read this week.

Start Page: The first page number for this week’s reading.

End Page: The last page number for this week’s reading.

Note: Templates may use the Start Page and End Page to display the number of pages in a week’s reading.

Select the minus (:heavy_minus_sign:) image to remove a week.

Populating Templates fields

Add a template: Creates a new template. You will be prompted to name the template. Templates currently cannot be renamed.

Recommended template names:

  • Volume Thread
  • Week Thread

Suggested templates:

Offshoot Volume Thread
# Volume {Volume Number} Discussion Thread

**Start Date:** {Volume Start Timestamp}

{Book Image}

[{Book Title} Reading Club Home Thread]({Series Home Link})

## Vocabulary Lists

{Vocabulary List}

## Reading Schedule

|Week|Start Date|Pages|No. of Pages|Chapter|
|---|---|---|---:|---|
{Week}|Week {Week Number}|{Week Start Date}|{Start Page}–{End Page}|{Page Count} pages|{Week Chapters}|{/Week}

## Discussion Rules

* If you have any questions, don't hesitate to ask.
* Please mention the chapter and page number.
* Please use spoiler tags for  ***major***  events.
* If you read ahead, please hold questions until during or after the appropriate week.
Offshoot Week Reply
# {Chapters}
**Start Date:** {Week Start Timestamp}

PLACE CHAPTER IMAGE HERE

## Participation

Mark your participation status by voting in this poll. (You can change your answer later if you'd like.)

[poll type=regular results=always public=true chartType=bar]
* I'm reading along.
* I have finished this part.
* I will catch up later.
[/poll]

<small>*If you've read it before but will join in the discussion (or have read ahead), please select "I'm reading along"!*</small>

Remove selected template: Removes the selected template.

Note: At the time of this writing, adding or removing a template does not update the template selection dropdowns for individual volumes. Please use the “Save to Browser” button and then reload the page to see the volume template dropdowns reflect the change.

Populating Vocabulary fields

Show title row: Adds a title row to tabs. This row contains the chapter number and title.

Note: This is for vocabulary sheets with chapter tabs. When weekly tabs are implemented, this functionality may not apply as some book clubs may read multiple titled chapters in one week. For a club reading at this pace, chapter tabs are recommended.

Alternate row colors: Adds row striping, alternating vocabulary sheet rows between colored and white.

Color unsure and unknown: Allows readers to add a vocabulary word they don’t know the meaning of or add the text “unsure” when they are not confident in the meaning they’ve entered. These cause the rows to have a red or yellow background, respectively.

Color page numbers: Adds a background color to the page color, changing the color for each incrementing page number. Can be used as a visual clue to which vocabulary words as on the same page.

Main Buttons

Save to Browser: Saves the entry to the browser’s local storage.

Save to File: Downloads the entry to a JSON file.

Delete from Browser: Deletes the entry from the browser’s local storage.

Load from File: Loads an entry from a JSON file.

Create Volume Thread: Creates a new thread and populates the text area with the volume thread.

Create Week Post: Creates a new thread or reply and populates the text area with the weekly thread or post.

Note: If you are viewing a thread, these buttons will create a reply to the thread you are on rather than creating a new thread.

Note: These replace the text in the new thread or reply draft. If you have already typed text into a reply and have not submitted it, selecting one of these buttons may overwrite the content of your draft.*

Creating a Vocabulary Spreadsheet

Note: Spreadsheets currently can only be created with one tab per chapter. One tab per week is not supported at this time.

Before creating a vocabulary spreadsheet, you’ll want to populate the series Title, create a Volume, and populate a Chapter row for each chapter, and add at least one Week to the volume with a Start Date. Select any options you prefer from the “Vocabulary” section.

Note: The Start Date is how the script knows which volume to create a vocabulary sheet for. In the future, I may move this button into the Vocabulary section.

  1. Create a new Google Sheets spreadsheet. (You can use this link to do so.)

  2. Select the “Extensions” menu, then the “Apps Script” submenu.

    • The Apps Script opens in a new tab.
    • You should see an empty function:
      image
  3. Select the “Copy Sheets Macro” button from the Book Club Manager and paste it into the function:

    • image
  4. Select the Save button. This is required to enable the Run button.

    • image
  5. Select Run.

    • image
  6. Select “Review Permissions”.

    • image
  7. Select your Google account.

    • image
  8. Select “Advanced”.

    • image

    • image

  9. Select “Go to Untitled project (unsafe)”.

    • image
    • Disclaimer: Normally, you should not run random code you find on the Internet without checking over it first. If you don’t understand code, or if you do trust the person who wrote the code (me), you can be more lax in accepting to run such code.
  10. Click allow.

  • image
  1. Switch over to the Sheets tab and watch the magic happen.
Posting a Volume Thread or Week Post

Select “Create Volume Thread” or “Create Week Post” to create a new topic or reply.

The volume and week used are determined by the Start Date set for the first Week of each Volume entry.

If you are on a forum thread list page, the buttons will create a new topic.

If you are viewing a thread, the buttons will create a reply.

Misc Q&A

Do I need this if I don’t plan on running a book club?

No.

Does this work for book clubs on Natively as well?

Maybe. I haven’t tested it yet.

Does this work on mobile devices?

Probably not. It was designed and tested on a desktop computer but not tested on a mobile device.

Are users of this script essentially guinea pig testers while it’s still below version 1.0?

Yes.

Priority To-Do List:

  • When adding/removing a template, auto-update all template dropdown lists.
  • Improve the buttons so the active section and subsection buttons are in a different color/shade.
  • For any field that takes a thread ID, add a link to open that thread.
  • Support easily updating a volume/weekly thread to include a link to a new week’s thread.
  • Support generating a vocabulary sheet with tabs per week rather than per chapter.

Misc

Update History

  • Version 0.5.0: Public release as a User Script.
  • Version 0.5.1: Quick fix for volume selection dropdown not working.
21 Likes

excellent work! will have to try it out soon :grin:

5 Likes

@MrGeneric hey lookie!!!

2 Likes

My apologies in advance if anything is broken. My testing shows that things work reasonably well, but there’s a reason it’s version 0.5 rather than 1.0. Don’t hesitate to let me know if you try and encounter an issue.

I finally got this developed into a User Script just in time for MrGeneric to retire =(

4 Likes

It really does look impressive, though! That is super great! I’m sure a lot of people will find it super handy! And who knows, maybe I can use it for the last few volumes of Takagi-san!

5 Likes

I was testing this out to make the next volume thread for blue box, and ran into one small qol thing and one rather serious issue:

  • QOL - It would be nice if adding a new chapter incremented from the value in the row above, rather than just counting up from 1
  • When saving to browser (I think, at least? I didn’t try to replicate it too hard), the icon to access the manager disappears and I couldn’t find a way to get it back without completely reinstalling the script. It still saved my data, so I didn’t lose anything, but it was puzzling :laughing:

Very impressed with this tool though!

Edit:

Saving to browser does not appear to be what caused it, but I have no idea what I did to anger it then :laughing: Seeeeeeeems to be working fine now, will let you know if it randomly vanishes again

1 Like

This is how it should be working.

For example, here I have “Chapter 9”, then I select “Add a chapter” three times:

image

Perhaps it fails when adding chapters to a new volume when there’s no prior volume saved? I’ll check into that.

If this happens again, the most useful thing would be to see what’s in the “Errors” section of the Javascript console:

(These errors are from a different userscript, but give an idea of what a userscript error looks like.)

1 Like

Somewhat off-topic, but since these errors seem to be from an outdated version of my IME2Furigana script: this should be fixed in version 1.11 of IME2Furigana (with a caveat).

1 Like

Good catch! When the script stopped working a while back, I made some changes to get it working again by removing features I didn’t use, and I hadn’t bothered checking whether the console errors were due to the forum change or my chopping out parts of the script.

If I use Ctrl+B and Ctrl+I on here all the time, maybe I shouldn’t update? (My modification of the script is working fine for me for minimal furigana-adding purposes.)

Might be better to not update in this case.

Does this help?

That would make sense, I’ll have to try to see if saving/refreshing makes it start populating like that after adding the first chapter number

1 Like

I should also ask, which browser and extension are you using? That’ll make it easier for me to try and reproduce. (I’ve only tested this on Chromium + Tampermonkey.)

I’m on firefox + tampermonkey, I disabled all other active scripts and themes to make sure it wasn’t a compatibility issue, but this error stayed

1 Like

As best I can figure based on observation, on Chromium, Tampermonkey is always running the function to add the icon after the page loads, but on Firefox it’s sometimes running it before the page loads (so there’s nothing to add the icon to yet).

I’ve updated the script to version 0.5.2 which adds code telling it to add the icon after the page loads.

1 Like

For the moment, this appears to have fixed it! I’ll play around with it and see if it does anything weird

Adding a new chapter to a volume that I already had saved also incremented the chapters correctly when trying to add a new one, so I think it’s just before it gets saved like you thought

2 Likes