summaryrefslogtreecommitdiff
path: root/bucky2/bin
diff options
context:
space:
mode:
authorJules Laplace <carbon@melanarchy.org>2013-12-23 18:47:46 -0600
committerJules Laplace <carbon@melanarchy.org>2013-12-23 18:47:46 -0600
commitc3150cb2fe6ff53c4d12fb967b27c73e15f64f28 (patch)
tree615774dfa486205a0611186f90b6ff778b280da4 /bucky2/bin
parent9ec9729691f019be3214d1d20abec935ae58d58c (diff)
move comment and file scripts
Diffstat (limited to 'bucky2/bin')
-rwxr-xr-xbucky2/bin/move-comment18
-rwxr-xr-xbucky2/bin/move-file18
2 files changed, 36 insertions, 0 deletions
diff --git a/bucky2/bin/move-comment b/bucky2/bin/move-comment
new file mode 100755
index 0000000..29c59ef
--- /dev/null
+++ b/bucky2/bin/move-comment
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+use strict;
+use lib "../lib";
+use Bucky;
+
+if (scalar(@ARGV) < 2) {
+ print "usage: move-comment id thread\n";
+ exit(1);
+}
+
+my $bucky = new Bucky;
+$bucky->db->update_by_id('comment', {
+ "id" => $ARGV[0],
+ "record" => {
+ "thread" => $ARGV[1]
+ }
+});
+
diff --git a/bucky2/bin/move-file b/bucky2/bin/move-file
new file mode 100755
index 0000000..7c9e603
--- /dev/null
+++ b/bucky2/bin/move-file
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+use strict;
+use lib "../lib";
+use Bucky;
+
+if (scalar(@ARGV) < 2) {
+ print "usage: move-file id thread\n";
+ exit(1);
+}
+
+my $bucky = new Bucky;
+$bucky->db->update_by_id('file', {
+ "id" => $ARGV[0],
+ "record" => {
+ "thread" => $ARGV[1]
+ }
+});
+