Jump to content

Apropos DB Filter 0.2.0

   (0 reviews)

1 Screenshot

About This File

This is NOT a mod

 

You can not "install" it as a mod and call it a thing. You will need to follow the instructions first. And understand what it does and what it does not.

Starting from version 0.1.0 you can install the files of it as a mod, it will properly place the tool into the Apropos folder. You will stil need to follow the instructions for getting PHP environment in case you don't have one.

 

Disclaimer

 

If you decide to use this software, you use it as is and to your own risk.

 

If you use this tool, like it and modified the config to your liking and want to support the community - please share your config.json!

 

Description

 

This is a simple script written in php. What it does? It allows you to filter unwanted animation phrases from Apropos. The filter works in two ways:

 

  • Based on a banned word. This filter will try to find a properly terminated word that is in the banned list and remove any phrases that contain these words.
  • Based on a synonym. This is very similar to words, but it will enclose the filtered word into the synonym braces and thus it's much safer to use

 

How To Install

 

You will need to have php environment in your system, place the script to the Apropos DB folder and run it. Again:

 

  • Go to PHP site.
  • Download the interpreter. Here's the link for the latest windows ones (7.4.2 at the moment of writing of this post).
  • Extract the zip to somewhere
  • Make sure to add PHP to your system PATH variable. This is important! Or else calling a script via "php" command will fail. Here's how to do it in Windows 10.
  • Install this mod via any mod manager
  • Open command line, you can do this with hitting Windows+R keys and then typing cmd command
  • Go to the Apropos DB installation path (use cd command in the terminal for that)
  • Run the script with php updater.php or double-click the updater.bat file

 

If you did everything correctly, you will see the script going through the database and modifying the files.

 

How To Customize

 

First thing first - this is a file I wrote for myself when I wanted to remove some of the stuff from Apropos DB. "Default" filters are done to my liking. You may or may not agree with it - that's not the point. You can easily modify the filters. There are a lot of comments I added before publishing the script and I might be not the best engineer, but I hope the comments are self-explanatory.

 

For filters you want to touch these config values:

 

"blacklist" : {
		"words": [...]
}

- for banned words, and

"blacklist" : {
		"synonyms": [...]
}

- for banned synonyms. See above what is the difference (and it is also mentioned in the script comments).

 

Another dimension of customization is to use file blacklisting. You can add files that you do not want to process into the filesToSkip config array. Initially it was created to skip global DB files like Synonyms.txt but will do the trick just fine for any other file. Example: if you want to remove bestiality references from non-bestiality animations phrases only, you can achieve it by adding bestiality-related keywords to the banned entries/synonyms and then also adding bestiality file names to the blacklist (this should also work on directories, so if you add a directory name then the entire file set under this directory will not be processed)

 

More?

 

Not much more to add. Just play with the variables and adjust them to your liking.

 

Why?

 

I like Apropos idea, but I do not like certain things, like bestiality, orgies, public sex etc etc - the list can go on, it's not the point. The point is that there are 2.2k+ files in apropos db and manually fixing them after every update would be impossible. And I needed to fix it every time because Apropos is not very well set by default. A virgin PC yells "you're better than those giants"? ... a scene in complete seclusion in an inner cell causes "the guys start to cheer on"? ... Huh? ...

 

So I let the software to do the trick.

 

Also, why php? I happen to have an interpreter installed already. I could've done in in java so that users can just double-click the precious .jar, but it takes some effort (and in java I then would probably need to add support for config files if I want to modify filters / anything else in the software and it's just too much hassle for such a simple task)


What's New in Version 0.2.0

Released

v0.2.0

New feature

Replacement. It is now possible to not only filter, but also replace things in the entries. There are several important notes about this:

 

Precedence

By default, filtering is done before replacement! This means that if you want to replace something but that was filtered before replacing, you're out of luck. You can, however, change the precedence. You will need to change updater.php DI to do it. Here is how:
 

Spoiler

 

Change


$aggregator = new \Apropos\Aggregator($config, $logger, [$filter, $replacer]);

to


$aggregator = new \Apropos\Aggregator($config, $logger, [$replacer, $filter]);

(line 33 as of version 0.2.0)

 

 

Safety

Replacement will be done as a regex with the valid terminator being same as for filtering. This is to avoid situations with replacing synonyms at the very least. In fact, the best use of replacement is to "fix" some of the phrases where something that could have been a synonym is written in plain text. As such, default config includes such replacements

 

Config

The config for replacing is the same file, new section which is called "replacement" is a map key : value where the key is what you want to replace and value is what you want it to be replaced with.

 

Synonyms

By default, config includes some of the synonyms in an attempt to fix some of the phrases. It is not recommended to use anything but nouns for replacement. This is because otherwise you can replace something that's not meant to use synonyms. Also, not all nouns are good to go. I tested it a bit and selected some which seem to yield most consistent results to my liking.

 

You are not limited to synonyms! You can replace pretty much anything. Also, there's no limitation on words, entire phrases would do as fine.

 

Older changelog

  

Spoiler

v0.1.2

Fixes

  • Fixed an issue with not filtering keywords separated by other special delimiter / marks (such as exclamation / question marks etc)

v0.1.1

Fixes

  • Fixed an issue with not filtering keywords separated by quotes and colons.

 

Default Config

  • Improved the filtering for infidelity and group action categories.
  • Added versioning to the mod file (never thought it will make past version 0)

 

 


User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

×
×
  • Create New...