ðŸŠķ /who/ Starter Pack ðŸŠķ

Collection of QOL improving tools and edits.
ytarchive and twitterspace recorder
Python Scripts
OP Template

Go back to the Main Page

/who/ Starter Pack

  • This page contains QOL improvements that are heavily recommended to better your and the /who/ experience.
  • ytarchive and twitterspace recorder page contains an explanation and example usage for setting up ytarchive (the original means of automatic archiving youtube streams) and twitterspace recorder to save any of those rare spaces.
  • Python Scripts page currently covers two major focuses: soundposts and stream archival. The stream archiver is an alternative to ytarchive and is designed to be more robust and versatile. The soundpost section contains scripts for creation, automated cleaning of filenames, and recombining soundfiles back into a singular file.

YTBetter

This is a userscript that returns the ability to rewind in livestreams, install Tampermonkey addon to use:

Variant 1

Shared many times, known to work.

⎗
✓
// ==UserScript==
// @name        YTBetter
// @namespace   YTBetter
// @match       https://*.youtube.com/*
// @run-at      document-start
// @grant       none
// @version     2.0
// @author      トãƒŊâ€Ķ
// @description Patches YouTube to bypass some limitations
// ==/UserScript==

"use strict";

// Interop with "Simple YouTube Age Restriction Bypass"
const {
  get: getter,
  set: setter,
} = Object.getOwnPropertyDescriptor(Object.prototype, "playerResponse") ?? {
  set(value) {
    this[Symbol.for("YTBetter")] = value;
  },
  get() {
    return this[Symbol.for("YTBetter")];
  },
};

const isObject = (value) => value != null && typeof value === "object";

Object.defineProperty(Object.prototype, "playerResponse", {
  set(value) {
    if (isObject(value)) {
      const { videoDetails } = value;
      if (isObject(videoDetails)) {
        videoDetails.isLiveDvrEnabled = true;
      }
    }
    setter.call(this, value);
  },
  get() {
    return getter.call(this);
  },
  configurable: true,
});

Variant 2 (NEW)

https://greasyfork.org/en/scripts/485020-ytbetter-enable-rewind-dvr

Variant 3 (DEAD)

Appears to be more advanced with hooking into frames on pages like Holodex.
https://greasyfork.org/en/scripts/459535-ytbetter

Improved Twitter Image Sharing

(Updated: 2023-06-04)
The intent is to standardize the saving of twitter image filenames so that when shared, they can easily have their source located. This is done by using a userscript with custom settings and the addition of a saucelink for 4chan-x to make it a one-click solution.

Userscript and Custom Settings

https://greasyfork.org/en/scripts/423001-twitter-media-downloader
Change the default filename to: @{user-id}-{status-id}

It doesn't update on its own, so check it from time to time.

Nitter Variant (Courtesy of Anon)

For those who like using nitter instances for art, here's a tampermonkey script to save image with @username_statusnumber.Jpg format

Clicking on a image on nitter instances will propose to download it as : @username-statusnumber.jpg
now with multiple pics in one tweet support
I should also mention the script only works when on a searching page atm

https://files.catbox.moe/npv63s.js

Bsky Variant

https://greasyfork.org/en/scripts/513021-bluesky-image-download-button
Default filename follows our default so it doesn't need changing.
Reminder: @<%username>-bsky-<%post_id>-<%img_num>

Variant 1

Under the Sauce tab, add the following line below # Known filename formats: (Refresh required)
javascript:void(open("https://twitter.com/"+%$1+(%$2?"/status/"+%$2:"")));regexp:/@(\w+)-?(\d{19})?(-\d)?.*\.\w+$/

Variant 2

If you're not a fan of wrapping it in JavaScript or want the ability to just right-click copy link, use this variant.

⎗
✓
https://x.com/%$1;regexp:/(?!.*\b\d{19}\b)@(\w+).*\.\w+$/
https://x.com/%$1/status/%$2;regexp:/@(\w+)-(\d{19})(-\d)?.*\.\w+$/

You can add ;text:twitter to the end of each line if you want it to say "twitter" instead of "x"

EDIT
If you want to not false-positive on bsky files, replace the first line from above with:

⎗
✓
https://x.com/%$1;regexp:/(?!.*\b(\d{19}|bsky)\b)@(\w+).*\.\w+$/

Bsky (Updated)

⎗
✓
https://bsky.app/profile/%$1.bsky.social/post/%$2;regexp:/@([a-zA-Z0-9-]+)-bsky-(\S{13})(-\d)?.*\.\w+$/
https://bsky.app/profile/%$1.%$2/post/%$3;regexp:/@([a-zA-Z0-9-]+)\.(\S+)-bsky-(\S{13})(-\d)?.*\.\w+$/

For anons using old filename system

To quickly convert all the old _ system to -, I put together some quick code:

Windows (CMD/Batch Script)

Can be saved as a .bat script. It works recursively so put it in the top-most directory and it will fix all the files including ones in folders within the folder it is ran. (Hacky way to do this...)

⎗
✓
powershell -Command "& {Get-ChildItem -Recurse | Where-Object{$_.Name -match '@\w+_\d{19}'} | Foreach-Object {$OldName = $_.FullName; $NewName = $_.Name -Replace '_(\d{19})', '-$1'; $Destination = Join-Path -Path $_.Directory.FullName -ChildPath $NewName; Move-Item -Path $OldName -Destination $Destination -Force; Write-Output $('{0} -> {1}' -f $OldName,$NewName)}}"

Linux

Can be saved as a .sh script. Not recursive, if someone wants to make it better and output changes, hmu.

⎗
✓
rename 's/_(\d{19})/-$1/' *

Untested recursive variant:

⎗
✓
find . -type f -exec rename 's/_(\d{19})/-$1/' '{}' \;

4chan-x Edit: Better Page Info (Purge Position)


4chan-X.user.js: https://files.catbox.moe/yvgup8.js

EDIT: NEW METHOD, USE 4chan-xt INSTEAD AND ENABLE IT!

Either install either of the above scripts or manually edit the lines by following the below changes.

⎗
✓
@@ -21040,7 +21040,7 @@ ThreadStats = (function() {
         $.addClass(ThreadStats.pageCountEl, 'warning');
         return;
       }
-      ThreadStats.timeout = setTimeout(ThreadStats.fetchPage, 2 * $.MINUTE);
+      ThreadStats.timeout = setTimeout(ThreadStats.fetchPage, 2 * $.MINUTE / (23 * (ThreadStats.pageCountEl.classList.contains('warning')) + 1));
       return $.whenModified(g.SITE.urls.threadsListJSON(ThreadStats.thread), 'ThreadStats', ThreadStats.onThreadsLoad);
     },
     onThreadsLoad: function() {
@@ -21077,6 +21077,9 @@ ThreadStats = (function() {
               if (thread.no === ThreadStats.thread.ID) {
                 ThreadStats.pageCountEl.textContent = pageNum + 1;
                 ThreadStats.pageCountEl.classList.toggle('warning', i >= nThreads - this.response[0].threads.length);
+                if (ThreadStats.pageCountEl.classList.contains('warning')) {
+                  ThreadStats.pageCountEl.textContent += " (" + (nThreads - i - 1) + ")";
+                }
                 ThreadStats.lastPageUpdate = new Date(thread.last_modified * $.SECOND);
                 ThreadStats.retry();
                 return;

In non-coder terms:

Edit Line 21043 to be:

⎗
✓
ThreadStats.timeout = setTimeout(ThreadStats.fetchPage, 2 * $.MINUTE / (23 * (ThreadStats.pageCountEl.classList.contains('warning')) + 1));

Add after Line 21079:

⎗
✓
1
2
3
if (ThreadStats.pageCountEl.classList.contains('warning')) {
  ThreadStats.pageCountEl.textContent += " (" + (nThreads - i - 1) + ")";
}

Useful Non-Browser Scripts

Soundpost Cleaner

Fixes those pesky underscores and removes http(s) from those filenames, they're unneeded!

Powershell

Save as something like Cleaner.ps1 in the folder you keep all your soundposts and run it.

⎗
✓
# Get the current directory
$currentDir = Get-Location
# Get all files in the current directory
$files = Get-ChildItem -Path $currentDir -File
# Loop through each file
foreach ($file in $files) {
  # Get the current file name
  $currentName = $file.Name
  # Replace "https_3A_2F_2F" with an empty string
  $newName = $currentName -replace "https?_3A_2F_2F", "" -replace "_2F", "%2F"
  # Check if the new name is different from the old name
  if ($newName -ne $currentName) {
    try {
      # Rename the file
      Rename-Item -Path $file.FullName -NewName $newName
      Write-Host "Renaming '$currentName' to '$newName'"
    }
    catch {
      # Output an error message if renaming fails
      Write-Error "Failed to rename '$currentName': $($_.Exception.Message)"
      Write-Host -NoNewLine 'Press any key to continue...';
      $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
    }
  }
}

Bash

Untested

Save as something like Cleaner.sh, might require a chmod +x Cleaner.sh to work.

⎗
✓
1
2
3
4
5
6
7
8
9
#!/bin/bash

for file in *; do
  new_name=$(echo "$file" | sed 's/https?_3A_2F_2F//g; s/_2F/%2F/g')
  if [[ "$new_name" != "$file" ]]; then
    echo "Renaming '$file' to '$new_name'"
    mv -n "$file" "$new_name" # Use -n to avoid overwriting existing files
  fi
done
Edit
Pub: 22 May 2023 06:04 UTC
Edit: 11 Dec 2024 20:50 UTC
Views: 4685