Skip to content

Instantly share code, notes, and snippets.

@4chenz
Last active April 17, 2023 23:26
Show Gist options
  • Save 4chenz/de3a3490aff19fd72e4fdd9b7dafc8f4 to your computer and use it in GitHub Desktop.
Save 4chenz/de3a3490aff19fd72e4fdd9b7dafc8f4 to your computer and use it in GitHub Desktop.
A userscript that links file hashes on usenet.
// ==UserScript==
// @name useneet archive
// @namespace Violentmonkey Scripts
// @match *://desuarchive.org/gif/*
// @match *://desuarchive.org/wsg/*
// @match *://archived.moe/gif/*
// @match *://archived.moe/wsg/*
// @grant none
// @updateURL https://gist.github.com/4chenz/de3a3490aff19fd72e4fdd9b7dafc8f4/raw/useneet.user.js
// @version 1.0
// @author -
// @description 7/7/2022, 10:38:01 AM
// ==/UserScript==
function insertA(el, hex){
elle = document.createElement('a');
elle.textContent = '[usenet]';
elle.setAttribute('href', 'https://nzbindex.com/search/?q='+hex);
elle.setAttribute('class', 'btnr parent');
el.appendChild(elle);
}
function useneet(element){
hex = base64ToHex ( element.querySelector('a').href.split('/')[6])
insertA(element, hex)
//console.log(hex);
}
function base64ToHex(str) {
for (var i = 0, bin = atob(str.replace(/_/g, '/').replace(/-/g, '+')), hex = []; i < bin.length; ++i) {
let tmp = bin.charCodeAt(i).toString(16);
if (tmp.length === 1) tmp = "0" + tmp;
hex[hex.length] = tmp;
}
return hex.join("");
}
document.querySelectorAll('.post_file_controls').forEach(e => useneet(e))
@4chenz
Copy link
Author

4chenz commented Jul 7, 2022

I am currently uploading the unarchived files from /gif/ and /wsg/ to usenet.
If it makes it to the first party archive, it gets uploaded, for the most part.
The goal is to make the files accessible after they are pruned, in addition to archiving them. I would consider this much better than the current "nothing".
My setup currently uses very little space, since it simply dumps the files to usenet and deletes them from the local machine.
It also heavily relies on the existing archives, who do archive the text and thumbnails. (thank.)

Here is what I hope is a brief, sufficient tutorial on how to access the files.

The [usenet] link will automatically search the hash of the file on a public usenet indexer.

Preview:
image
Simple, right? Now click the download button to get the file's NZB.


To actually get the files, you will need

  1. A usenet client.
  2. A usenet provider.

For the client, I suggest https://sabnzbd.org/
It is dead simple to use, and the setup handholds while you enter your providers.

old/dead For the provider, the suggestion I have is "good enough", I would not endorse them, but it's free. https://xsusenet.com/ 25GB/mo for free. https://my.xsusenet.com/index.php?/cart/free-usenet/ (do not enter phone#)

image
image

10GB free trial:
https://usenet.farm/#trial
image

The server login info is located here.
image

A properly setup client should look like:

image

Last part is to simply click the NZB you downloaded. Just like torrents, only they want you to pay.
image

@Goosegit11
Copy link

XSUsenet has close free plan how do I do it now?

@tebowy
Copy link

tebowy commented Apr 17, 2023

XSUsenet has close free plan how do I do it now?

get a cheap block at news demon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment