summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-12-10 21:41:45 +0100
committerJules Laplace <julescarbon@gmail.com>2017-12-10 21:41:45 +0100
commit872c5487c01bc88480edf648a122231cf15b5a82 (patch)
tree8829b89b03ff436fb8b3ec5f26d9ff125e22702f
parent928e8fd45290b9487abe61ad1ff1f7a6cc97678d (diff)
move bucky off melanarchyHEADmaster
-rw-r--r--.gitignore2
-rwxr-xr-xbin/keyword-export.pl9
-rw-r--r--bucky2/bin/flush-files44
-rwxr-xr-xcgi-bin/details2
-rw-r--r--fortune/mail-verbs3
-rw-r--r--fortune/titles1
-rw-r--r--lib/constants.pm2
-rw-r--r--lib/headers.pm19
8 files changed, 68 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index 8c360b6..f970181 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,5 @@ thumbs
*.tar
fasdf
incoming
+.DS_Store
+
diff --git a/bin/keyword-export.pl b/bin/keyword-export.pl
index 4f04579..b01d2fb 100755
--- a/bin/keyword-export.pl
+++ b/bin/keyword-export.pl
@@ -1,7 +1,14 @@
#!/usr/bin/perl
+BEGIN
+ {
+ our $BUCKY = "/cgi-bin/bucky";
+ our $BUCKY_DB = "bucky";
+ our $BUCKY_DB_CNF = "/var/www/vhosts/carbonpictures.com/.bucky.cnf";
+ }
+
use lib "/var/www/vhosts/carbonpictures.com/bucky/lib";
-use Bucky;
+use Bucky1;
$dbh = DBI->connect ($dsn);
diff --git a/bucky2/bin/flush-files b/bucky2/bin/flush-files
new file mode 100644
index 0000000..31648db
--- /dev/null
+++ b/bucky2/bin/flush-files
@@ -0,0 +1,44 @@
+#!/usr/bin/perl
+use strict;
+use lib "../lib";
+use Bucky;
+
+my $bucky = new Bucky;
+my $thread_list = $bucky->db->select("thread");
+my $thread_map = {};
+foreach my $t (@$thread_list) {
+ $thread_map->{ $t->{'id'} } = 1;
+}
+
+my $base = "/var/www/vhosts/carbonpictures.com/bucky/data/";
+opendir(DIR, $base) or die $!;
+my @dirs = readdir(DIR);
+closedir(DIR);
+
+# print scalar @dirs;
+
+foreach my $thread_id (@dirs) {
+ my $dir = $base . $thread_id;
+
+ next unless (-d $dir && $thread_id !~ /^\./);
+ next if (exists($thread_map->{$thread_id}));
+
+ opendir (THREAD, $dir);
+ my @local_files = readdir(THREAD);
+ closedir (THREAD);
+
+ my $size = `du -sh $dir`;
+ print $size;
+ print join("\n", sort(@local_files));
+ print "\n";
+ my $line = readline(STDIN);
+ if (substr($line, 0, 1) eq 'y') {
+ print "\n";
+ print ">>> delete " . $dir . "\n";
+ print "\n";
+ system('rm', '-rf', $dir);
+ }
+ print "\n\n";
+}
+
+
diff --git a/cgi-bin/details b/cgi-bin/details
index 203b77c..34bb9b3 100755
--- a/cgi-bin/details
+++ b/cgi-bin/details
@@ -202,7 +202,7 @@ var links = document.querySelectorAll("a")
var audio, music = [], current_index = -1, typing = false
var comment = document.querySelector("#comment")
Array.prototype.slice.apply(links).forEach(function(url){
- if (! url.href.match(/(mp3|wav|ogg)/i)) return
+ if (! url.href.match(/(opus|mp3|wav|ogg)/i)) return
var index = music.length
if (is_mobile) url.href = url.href.replace(/^https/,"http")
music.push(url)
diff --git a/fortune/mail-verbs b/fortune/mail-verbs
index f369708..bece622 100644
--- a/fortune/mail-verbs
+++ b/fortune/mail-verbs
@@ -20,7 +20,6 @@ gulped
shuddered
sang (albeit off-key)
babbled
-angrily masturbated
chowdered
railed
puffed
@@ -112,3 +111,5 @@ rang off
pulled a tiny bell from a pocket and struck it with an equally tiny hammer
thought you were someone else
went deaf (so whisper)
+conjugated sacred verbs
+
diff --git a/fortune/titles b/fortune/titles
index 57c6e5a..e55f880 100644
--- a/fortune/titles
+++ b/fortune/titles
@@ -308,7 +308,6 @@ a confident promulgator of buckitude
bucky's confidence scheme
bucky's new way to hang over
bucky's hereditary toe snaps
-bucky's waterproof vans
bucky's unorthodox fashion sense
bucky taps you on the shoulder
an old chum, here for you bucky
diff --git a/lib/constants.pm b/lib/constants.pm
index 36f12b9..ae42b31 100644
--- a/lib/constants.pm
+++ b/lib/constants.pm
@@ -74,7 +74,7 @@ our $ZIP_PATH = "/usr/bin/zip";
our $BUCKY_WELCOME_SUBJECT = "WELCOME TO BUCKY";
our $BUCKY_WELCOME_BODY = <<WORDUP;
-<b>bucky</b> is a bulletin board where you can post comments and upload files (music, video, pics, software, etc). you can share these links with your friends. to start your own post, you can use the "post" link at the top of the screen, or the quickstart form on the <a href="$BUCKY/index/">home page</a>. you can ftp files too if you have to send something large.
+<b>bucky</b> is a bulletin board where you can post comments and upload files (music, video, pics, software, etc). to start your own post, you can use the "post" link at the top of the screen, or on the <a href="$BUCKY/index/">home page</a>.
hope you find this board useful!!
diff --git a/lib/headers.pm b/lib/headers.pm
index dffc84c..6da5bb6 100644
--- a/lib/headers.pm
+++ b/lib/headers.pm
@@ -37,6 +37,7 @@ ERRORHEADER
print <<head;
<html>
<head>
+ <meta charset="UTF-8">
<title>$BUCKY_NAME [$buhtitle]</title>
<link rel="stylesheet" href="/css/bogart.css" type="text/css">
<link rel="shortcut icon" href="/favicon.ico">
@@ -56,7 +57,7 @@ head
{
print qq! </head>\n\n<body>\n!;
}
- if ($BUCKY_CONFIG->{SNOWBALL_MACHINE} eq "on" && $0 =~ /index/) # && (time % 13) < 7)
+ if ($BUCKY_CONFIG->{SNOWBALL_MACHINE} eq "on" && $0 =~ /index/ && (time % 13) < 7)
{
do_snowfall();
$title = "ACTIVATE SNOWBALL MACHINE !!!";
@@ -294,13 +295,13 @@ function initsnow() {
}
var snowsizerange=snowmaxsize-snowminsize
for (i=0;i<=snowmax;i++) {
- crds[i] = 0;
+ crds[i] = 0;
lftrght[i] = Math.random()*15;
x_mv[i] = 0.03 + Math.random()/10;
snow[i]=document.getElementById("s"+i)
snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]
snow[i].size=randommaker(snowsizerange)+snowminsize
- snow[i].style.fontSize=snow[i].size
+ snow[i].style.fontSize=snow[i].size + "px"
snow[i].style.color=snowcolor[randommaker(snowcolor.length)]
snow[i].sink=sinkspeed*snow[i].size/5
if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
@@ -308,8 +309,8 @@ function initsnow() {
if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
snow[i].posy=randommaker(6*marginbottom-marginbottom-6*snow[i].size)
- snow[i].style.left=snow[i].posx
- snow[i].style.top=snow[i].posy
+ snow[i].style.left=snow[i].posx + "px"
+ snow[i].style.top=snow[i].posy + "px"
}
movesnow()
}
@@ -318,8 +319,8 @@ function movesnow() {
for (i=0;i<=snowmax;i++) {
crds[i] += x_mv[i];
snow[i].posy+=snow[i].sink
- snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i]);
- snow[i].style.top=snow[i].posy
+ snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i]) + "px";
+ snow[i].style.top=snow[i].posy + "px"
if (snow[i].posy>=marginbottom-6*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
@@ -329,14 +330,14 @@ function movesnow() {
snow[i].posy=0
}
}
- var timer=setTimeout("movesnow()",50)
+ var timer=setTimeout(movesnow,50)
}
for (i=0;i<=snowmax;i++) {
document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
- window.onload=initsnow
+ window.addEventListener("DOMContentLoaded", initsnow)
}
</script>