Update archives with data from MayhemYDG fork

This commit is contained in:
ccd0 2014-04-03 14:52:25 -07:00
parent f6dece4b80
commit 1832f124c8
6 changed files with 164 additions and 413 deletions

View File

@ -1,3 +1,6 @@
**ccd0**:
- Update archives with data from MayhemYDG fork.
### v1.4.5
*2014-04-03*

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,9 +6,9 @@ Redirect =
file: {}
archives = {}
for {name, boards, files, data} in Redirect.archives
archives[name] = {boards, files, data}
{software} = data
for data in Redirect.archives
{name, boards, files, software} = data
archives[name] = data
for boardID in boards
o.thread[boardID] = data unless boardID of o.thread
o.post[boardID] = data unless boardID of o.post or software isnt 'foolfuuka'
@ -18,125 +18,11 @@ Redirect =
for type, id of record when (archive = archives[id])
boards = if type is 'file' then archive.files else archive.boards
continue unless boardID in boards
o[type][boardID] = archive.data
o[type][boardID] = archive
Redirect.data = o
archives: [
name: "Foolz"
boards: ["a", "biz", "co", "diy", "gd", "jp", "m", "sci", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"]
files: ["a", "biz", "diy", "gd", "jp", "m", "sci", "tg", "vg", "vp", "vr", "wsg"]
data:
domain: "archive.foolz.us"
http: false
https: true
software: "foolfuuka"
,
name: "NSFW Foolz"
boards: ["u"]
files: ["u"]
data:
domain: "nsfw.foolz.us"
http: false
https: true
software: "foolfuuka"
,
name: "The Dark Cave"
boards: ["c", "int", "out", "po"]
files: ["c", "po"]
data:
domain: "archive.thedarkcave.org"
http: true
https: true
software: "foolfuuka"
,
name: "4plebs"
boards: ["adv", "hr", "o", "pol", "s4s", "tg", "tv", "x"]
files: ["adv", "hr", "o", "pol", "s4s", "tg", "tv", "x"]
data:
domain: "archive.4plebs.org"
http: true
https: true
software: "foolfuuka"
,
name: "Nyafuu"
boards: ["c", "e", "w", "wg"]
files: ["c", "e", "w", "wg"]
data:
domain: "archive.nyafuu.org"
http: true
https: true
software: "foolfuuka"
,
name: "Love is Over"
boards: ["d", "i"]
files: ["d", "i"]
data:
domain: "loveisover.me"
http: true
https: true
software: "foolfuuka"
,
name: "Rebecca Black Tech"
boards: ["cgl", "g", "mu", "w"]
files: ["cgl", "g", "mu", "w"]
data:
domain: "archive.rebeccablacktech.com"
http: true
https: true
software: "fuuka"
,
name: "Heinessen"
boards: ["an", "fit", "k", "mlp", "r9k", "toy"]
files: ["an", "fit", "k", "r9k", "toy"]
data:
domain: "archive.heinessen.com"
http: true
software: "fuuka"
,
name: "warosu"
boards: ["3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr"]
files: ["3", "biz", "cgl", "ck", "diy", "fa", "ic", "jp", "lit", "sci", "tg", "vr"]
data:
domain: "fuuka.warosu.org"
https: true
software: "fuuka"
,
name: "fgts"
boards: ["r", "soc"]
files: ["r", "soc"]
data:
domain: "fgst.eu"
http: true
https: true
software: "foolfuuka"
,
name: "maware"
boards: ["t"]
files: ["t"]
data:
domain: "archive.mawa.re"
http: true
software: "foolfuuka"
,
name: "InstallGentoo"
boards: ["g", "t"]
files: ["g", "t"]
data:
domain: "chan.installgentoo.com"
http: true
software: "foolfuuka"
,
name: "Foolz Beta"
boards: ["a", "biz", "co", "d", "diy", "gd", "jp", "m", "mlp", "s4s", "sci", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"],
files: ["a", "biz", "d", "diy", "gd", "jp", "m", "s4s", "sci", "tg", "u", "vg", "vp", "vr", "wsg"]
data:
domain: "beta.foolz.us"
http: true
https: true
withCredentials: true
software: "foolfuuka"
]
archives: `<%= JSON.stringify(grunt.file.readJSON('src/Archive/archives.json')) %>`
to: (dest, data) ->
archive = (if dest is 'search' then Redirect.data.thread else Redirect.data[dest])[data.boardID]

128
src/Archive/archives.json Normal file
View File

@ -0,0 +1,128 @@
[{
"uid": 0,
"name": "Foolz",
"domain": "archive.foolz.us",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["a", "biz", "co", "diy", "gd", "jp", "m", "sci", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"],
"files": ["a", "biz", "gd", "diy", "jp", "m", "sci", "tg", "vg", "vp", "vr", "wsg"]
}, {
"uid": 1,
"name": "NSFW Foolz",
"domain": "nsfw.foolz.us",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["u"],
"files": ["u"]
}, {
"uid": 2,
"name": "The Dark Cave",
"domain": "archive.thedarkcave.org",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["c", "int", "out", "po"],
"files": ["c", "po"]
}, {
"uid": 3,
"name": "4plebs Archive",
"domain": "archive.4plebs.org",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["adv", "hr", "o", "pol", "s4s", "tg", "trv", "tv", "x"],
"files": ["adv", "hr", "o", "pol", "s4s", "tg", "trv", "tv", "x"]
}, {
"uid": 18,
"name": "4plebs Flash Archive",
"domain": "flash.4plebs.org",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["f"],
"files": ["f"]
}, {
"uid": 4,
"name": "Nyafuu",
"domain": "archive.nyafuu.org",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["c", "e", "w", "wg"],
"files": ["c", "e", "w", "wg"]
}, {
"uid": 5,
"name": "Love is Over",
"domain": "loveisover.me",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["d", "i"],
"files": ["d", "i"]
}, {
"uid": 8,
"name": "Rebecca Black Tech",
"domain": "archive.rebeccablacktech.com",
"http": true,
"https": true,
"software": "fuuka",
"boards": ["cgl", "g", "mu", "w"],
"files": ["cgl", "g", "mu", "w"]
}, {
"uid": 9,
"name": "Heinessen",
"domain": "archive.heinessen.com",
"http": true,
"https": false,
"software": "fuuka",
"boards": ["an", "fit", "k", "mlp", "r9k", "toy"],
"files": ["an", "fit", "k", "r9k", "toy"]
}, {
"uid": 10,
"name": "warosu",
"domain": "fuuka.warosu.org",
"http": false,
"https": true,
"software": "fuuka",
"boards": ["3", "biz", "cgl", "ck", "diy", "fa", "g", "ic", "jp", "lit", "sci", "tg", "vr"],
"files": ["3", "biz", "cgl", "ck", "diy", "fa", "ic", "jp", "lit", "sci", "tg", "vr"]
}, {
"uid": 15,
"name": "fgts",
"domain": "fgts.eu",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["cm", "hm", "r", "soc", "y"],
"files": ["cm", "hm", "r", "soc", "y"]
}, {
"uid": 16,
"name": "maware",
"domain": "archive.mawa.re",
"http": true,
"https": false,
"software": "foolfuuka",
"boards": ["t"],
"files": ["t"]
}, {
"uid": 17,
"name": "installgentoo.com",
"domain": "chan.installgentoo.com",
"http": true,
"https": false,
"software": "foolfuuka",
"boards": ["g", "t"],
"files": ["g", "t"]
}, {
"uid": 13,
"name": "Foolz Beta",
"domain": "beta.foolz.us",
"http": true,
"https": true,
"withCredentials": true,
"software": "foolfuuka",
"boards": ["a", "biz", "co", "d", "diy", "gd", "jp", "m", "s4s", "sci", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"],
"files": ["a", "biz", "d", "diy", "gd", "jp", "m", "s4s", "sci", "tg", "u", "vg", "vp", "vr", "wsg"]
}]

View File

@ -306,14 +306,14 @@ Settings =
$.on $.id('apply-css'), 'click', Settings.usercss
archBoards = {}
for {name, boards, files, data} in Redirect.archives
for {name, boards, files, software} in Redirect.archives
for boardID in boards
o = archBoards[boardID] or=
thread: []
post: []
file: []
o.thread.push name
o.post.push name if data.software is 'foolfuuka'
o.post.push name if software is 'foolfuuka'
o.file.push name if boardID in files
rows = []