A Pluckeye Forum

A place for Pluckeye users to chew the cud.

You are not logged in.

#1 2019-12-10 20:43:16

yondery
Member
Registered: 2018-10-08
Posts: 15

Batch changes to pluckeye settings

A while back, I imported the settings in "big-blacklist-ut1.txt" (under pluckeye.net/recipes).  This is an extremely long list with a lot of repetition.  Example:

    Block bad123.blogspot.com
    Block bad456.blogspot.com
    Block badsite.blogspot.com
*** Block blogspot.com ***
    Block nogood.blogspot.com
    Block nogood1.blogspot.com
    Block reallybad.blogspot.com

But this is redundant because everything in that list should be blocked by the one statement: Block blogspot.com.

I wanted to streamline my settings file because every once in a while, I get some weird blip and Jon pointed out that my blacklist was extremely long (over a million lines).

So I created a Windows batch file to update my pluckeye settings, something like this:

pluck rm "Block bad123.blogspot.com"
pluck rm "Block bad456.blogspot.com"
pluck rm "Block badsite.blogspot.com"
pluck rm "Block nogood.blogspot.com"
pluck rm "Block nogood1.blogspot.com"
pluck rm "Block reallybad.blogspot.com"

When I run this batch file, it executes each command one at a time.  (I can determine that the commands are issued about every 3 seconds because they are subject to my delay, so I end up with many "#at 2019-12-10 15:08:32 unset Block..." statements at the bottom of the exported settings file.)

I've definitely broken these updates into several files, but still, if a batch file is 8000 lines long, it's going to take a while.  Also, I assume that this involves multiple read/writes of the actual pluckeye settings file so it can't be very efficient.

Is there another way to apply a large number of update commands of the kind I'm describing, to take effect all at once?

Offline

#2 2019-12-10 22:13:04

jon
Administrator
Registered: 2017-01-10
Posts: 208

Re: Batch changes to pluckeye settings

yondery wrote:

... it can't be very efficient.

Is there another way to apply a large number of update commands of the kind I'm describing, to take effect all at once?

It depends on what version of Pluckeye you have.

In Pluckeye v0.98.x and below, you can use "unimport", but it is embarrassingly slow.  In bleeding edge versions (v0.99+), it is very fast.  But at the time of this post, v0.99+ is still heavy on the bleeding.

pluck unimport bigfile.txt

For a very big file and Pluckeye before v0.99, the fastest way is to export to a file, modify the file using any editor, clear your pluckeye settings, and reimport from the file.

pluck export > settings.txt
notepad settings.txt
pluck set "delay 0"
pluck clear
pluck import settings.txt

Offline

#3 2019-12-12 17:43:18

yondery
Member
Registered: 2018-10-08
Posts: 15

Re: Batch changes to pluckeye settings

I'm running Pluckeye version 0.97.10.

I tried the solution to export, edit as I wanted, "pluck clear", and then import the new file.  It looks like it worked.  One unexpected thing, though, after I ran the "pluck clear" command, I got the following error messages:

$ pluck clear
0172:173: fcbada93 SYS_ERROR 1300
0172:196: fcbada93 WARNING 0x301720b1

$ pluck import settings.txt

I don't notice any problems, so I'm not going to worry.  But do you know what these errors are about?

Thanks very much for you help!  I cut my blacklist file in half, just by "economizing" the entries.

Offline

#4 2019-12-12 19:39:33

jon
Administrator
Registered: 2017-01-10
Posts: 208

Re: Batch changes to pluckeye settings

That's just warning spew; it is safe to ignore.

Offline

Board footer

Powered by FluxBB