common.lib.config_definition
Default 4CAT Configuration Options
Possible options and their default values. Options are actually set in 4CAT"s
Database. Additional options can be defined in Data sources or Processors as
config
objects.
The order of th dictionary below determines the order of the settings in the interface.
1""" 2Default 4CAT Configuration Options 3 4Possible options and their default values. Options are actually set in 4CAT"s 5Database. Additional options can be defined in Data sources or Processors as 6`config` objects. 7 8The order of th dictionary below determines the order of the settings in the interface. 9 10""" 11from common.lib.user_input import UserInput 12 13config_definition = { 14 "datasources.intro": { 15 "type": UserInput.OPTION_INFO, 16 "help": "Data sources enabled below will be offered to people on the 'Create Dataset' page. Additionally, " 17 "people can upload datasets for these by for example exporting them with " 18 "[Zeeschuimer](https://github.com/digitalmethodsinitiative/zeeschuimer) to this 4CAT instance.\n\n" 19 "Some data sources offer further settings which may be configured on other tabs." 20 }, 21 "datasources.intro2": { 22 "type": UserInput.OPTION_INFO, 23 "help": "*Warning:* changes take effect immediately. Datasets that would have expired under the new settings " 24 "will be deleted. You can use the 'Dataset bulk management' module in the control panel to manage the " 25 "expiration status of existing datasets." 26 }, 27 "datasources.enabled": { 28 "type": UserInput.OPTION_DATASOURCES, 29 "default": ["ninegag", "bsky", "douban", "douyin", "imgur", "upload", "instagram", "import_4cat", "linkedin", "media-import", 30 "telegram", "tiktok", "twitter", "tiktok-comments", "truthsocial", "gab"], 31 "help": "Data Sources", 32 "tooltip": "A list of enabled data sources that people can choose from when creating a dataset page." 33 }, 34 "datasources.expiration": { 35 "type": UserInput.OPTION_TEXT_JSON, 36 "default": {"fourchan": {"enabled": False, "allow_optout": False, "timeout": 0}, "eightchan": {"enabled": False, "allow_optout": False, "timeout": 0}, "eightkun": {"enabled": False, "allow_optout": False, "timeout": 0}, "ninegag": {"enabled": True, "allow_optout": False, "timeout": 0}, "bitchute": {"enabled": True, "allow_optout": False, "timeout": 0}, "bsky": {"enabled": True, "allow_optout": False, "timeout": 0}, "dmi-tcat": {"enabled": False, "allow_optout": False, "timeout": 0}, "dmi-tcatv2": {"enabled": False, "allow_optout": False, "timeout": 0}, "douban": {"enabled": True, "allow_optout": False, "timeout": 0}, "douyin": {"enabled": True, "allow_optout": False, "timeout": 0}, "import_4cat": {"enabled": True, "allow_optout": False, "timeout": 0},"gab": {"enabled": True, "allow_optout": False, "timeout": 0}, "imgur": {"enabled": True, "allow_optout": False, "timeout": 0}, "upload": {"enabled": True, "allow_optout": False, "timeout": 0}, "instagram": {"enabled": True, "allow_optout": False, "timeout": 0}, "linkedin": {"enabled": True, "allow_optout": False, "timeout": 0}, "media-import": {"enabled": True, "allow_optout": False, "timeout": 0}, "parler": {"enabled": True, "allow_optout": False, "timeout": 0}, "reddit": {"enabled": False, "allow_optout": False, "timeout": 0}, "telegram": {"enabled": True, "allow_optout": False, "timeout": 0}, "tiktok": {"enabled": True, "allow_optout": False, "timeout": 0}, "tiktok-urls": {"enabled": True, "allow_optout": False, "timeout": 0}, "truthsocial": {"enabled": True, "allow_optout": False, "timeout": 0}, "tumblr": {"enabled": False, "allow_optout": False, "timeout": 0}, "twitter": {"enabled": True, "allow_optout": False, "timeout": 0}, "twitterv2": {"enabled": False, "allow_optout": False, "timeout": 0}, "usenet": {"enabled": False, "allow_optout": False, "timeout": 0}, "vk": {"enabled": False, "allow_optout": False, "timeout": 0}}, 37 "help": "Data source-specific expiration", 38 "tooltip": "Allows setting expiration settings per datasource. Configured by proxy via the 'data sources' " 39 "setting.", 40 "indirect": True 41 }, 42 # Configure how the tool is to be named in its web interface. The backend will 43 # always refer to "4CAT" - the name of the software, and a "powered by 4CAT" 44 # notice may also show up in the web interface regardless of the value entered here. 45 "4cat.name": { 46 "type": UserInput.OPTION_TEXT, 47 "default": "4CAT", 48 "help": "Short tool name", 49 "tooltip": "Configure short name for the tool in its web interface. The backend will always refer to '4CAT' - " 50 "the name of the software, and a 'powered by 4CAT' notice may also show up in the web interface " 51 "regardless of the value entered here." 52 }, 53 "4cat.name_long": { 54 "type": UserInput.OPTION_TEXT, 55 "default": "4CAT: Capture and Analysis Toolkit", 56 "help": "Full tool name", 57 "tooltip": "Used in e.g. the interface header. The backend will always refer to '4CAT' - the name of the " 58 "software, and a 'powered by 4CAT' notice may also show up in the web interface regardless of the " 59 "value entered here." 60 }, 61 "4cat.about_this_server": { 62 "type": UserInput.OPTION_TEXT_LARGE, 63 "default": "", 64 "help": "Server information", 65 "tooltip": "Custom server information that is displayed on the 'About' page. Can for instance be used to show " 66 "information about who maintains the tool or what its intended purpose is. Accepts Markdown markup.", 67 }, 68 "4cat.crash_message": { 69 "type": UserInput.OPTION_TEXT_LARGE, 70 "default": "This processor has crashed; the crash has been logged. 4CAT will try again when it is restarted. " 71 "Contact your server administrator if this error persists. You can also report issues via 4CAT's " 72 "[GitHub repository](https://github.com/digitalmethodsinitiative/4cat/issues).", 73 "help": "Crash message", 74 "tooltip": "This message is shown to users in the interface when a processor crashes while processing their " 75 "dataset. It can contain Markdown markup." 76 }, 77 # privileges 78 "privileges.can_create_dataset": { 79 "type": UserInput.OPTION_TOGGLE, 80 "default": True, 81 "help": "Can create dataset", 82 "tooltip": "Controls whether users can view and use the 'Create dataset' page. Does NOT control whether " 83 "users can run processors (which also create datasets); this is a separate setting." 84 }, 85 "privileges.can_run_processors": { 86 "type": UserInput.OPTION_TOGGLE, 87 "default": True, 88 "help": "Can run processors", 89 "tooltip": "Controls whether processors can be run. There may be processor-specific settings or dependencies " 90 "that override this." 91 }, 92 "privileges.can_view_all_datasets": { 93 "type": UserInput.OPTION_TOGGLE, 94 "default": False, 95 "help": "Can view global dataset index", 96 "tooltip": "Controls whether users can see the global datasets overview, i.e. not just for their own user but " 97 "for all other users as well." 98 }, 99 "privileges.can_view_private_datasets": { 100 "type": UserInput.OPTION_TOGGLE, 101 "default": False, 102 "help": "Can view private datasets", 103 "tooltip": "Controls whether users can see the datasets made private by their owners." 104 }, 105 "privileges.can_create_api_token": { 106 "type": UserInput.OPTION_TOGGLE, 107 "default": True, 108 "help": "Can create API token", 109 "tooltip": "Controls whether users can create a token for authentication with 4CAT's Web API." 110 }, 111 "privileges.can_use_explorer": { 112 "type": UserInput.OPTION_TOGGLE, 113 "default": True, 114 "help": "Can use Explorer", 115 "tooltip": "Controls whether users can use the Explorer feature to analyse and annotate datasets." 116 }, 117 "privileges.can_export_datasets": { 118 "type": UserInput.OPTION_TOGGLE, 119 "default": True, 120 "help": "Can export datasets", 121 "tooltip": "Allows users to export datasets they own to other 4CAT instances." 122 }, 123 "privileges.admin.can_manage_users": { 124 "type": UserInput.OPTION_TOGGLE, 125 "default": False, 126 "help": "Can manage users", 127 "tooltip": "Controls whether users can add, edit and delete other users via the Control Panel" 128 }, 129 "privileges.admin.can_manage_notifications": { 130 "type": UserInput.OPTION_TOGGLE, 131 "default": False, 132 "help": "Can manage notifications", 133 "tooltip": "Controls whether users can add, edit and delete notifications via the Control Panel" 134 }, 135 "privileges.admin.can_manage_settings": { 136 "type": UserInput.OPTION_TOGGLE, 137 "default": False, 138 "help": "Can manage settings", 139 "tooltip": "Controls whether users can manipulate 4CAT settings via the Control Panel" 140 }, 141 "privileges.admin.can_manipulate_all_datasets": { 142 "type": UserInput.OPTION_TOGGLE, 143 "default": False, 144 "help": "Can manipulate all datasets", 145 "tooltip": "Controls whether users can manipulate all datasets as if they were an owner, e.g. sharing it with " 146 "others, running processors, et cetera." 147 }, 148 "privileges.admin.can_restart": { 149 "type": UserInput.OPTION_TOGGLE, 150 "default": False, 151 "help": "Can restart/upgrade", 152 "tooltip": "Controls whether users can restart, upgrade, and manage extensions 4CAT via the Control Panel" 153 }, 154 "privileges.can_upgrade_to_dev": { 155 # this is NOT an admin privilege, because all admins automatically 156 # get all admin privileges! users still need the above privilege 157 # to actually use this, anyway 158 "type": UserInput.OPTION_TOGGLE, 159 "default": False, 160 "help": "Can upgrade to development branch", 161 "tooltip": "Controls whether users can upgrade 4CAT to a development branch of the code via the Control Panel. " 162 "This is an easy way to break 4CAT so it is recommended to not enable this unless you're really " 163 "sure of what you're doing." 164 }, 165 "privileges.admin.can_manage_tags": { 166 "type": UserInput.OPTION_TOGGLE, 167 "default": False, 168 "help": "Can manage user tags", 169 "tooltip": "Controls whether users can manipulate user tags via the Control Panel" 170 }, 171 "privileges.admin.can_view_status": { 172 "type": UserInput.OPTION_TOGGLE, 173 "default": False, 174 "help": "Can view worker status", 175 "tooltip": "Controls whether users can view worker status via the Control Panel" 176 }, 177 # The following option should be set to ensure that every analysis step can 178 # be traced to a specific version of 4CAT. This allows for reproducible 179 # research. The output of "git show" in PATH_ROOT will be used to determine 180 # the version of a processor file, if possible. 181 "4cat.github_url": { 182 "type": UserInput.OPTION_TEXT, 183 "default": "https://github.com/digitalmethodsinitiative/4cat", 184 "help": "Repository URL", 185 "tooltip": "URL to the github repository for this 4CAT instance", 186 "global": True 187 }, 188 "4cat.phone_home_url": { 189 "type": UserInput.OPTION_TEXT, 190 "default": "https://ping.4cat.nl", 191 "help": "Phone home URL", 192 "tooltip": "This URL is called once - when 4CAT is installed. If the installing user consents, information " 193 "is sent to this URL to help the 4CAT developers (the Digital Methods Initiative) keep track of how " 194 "much it is used. There should be no need to change this URL after installation.", 195 "global": True 196 }, 197 "4cat.phone_home_asked": { 198 "type": UserInput.OPTION_TOGGLE, 199 "default": True, 200 "help": "Shown phone home request?", 201 "tooltip": "Whether you've seen the 'phone home request'. Set to `False` to see the request again. There " 202 "should be no need to change this manually.", 203 "global": True 204 }, 205 "4cat.layout_hue": { 206 "type": UserInput.OPTION_HUE, 207 "default": 356, 208 "help": "Interface accent colour", 209 "saturation": 87, 210 "value": 81, 211 "min": 0, 212 "max": 360, 213 "coerce_type": int, 214 "global": True 215 }, 216 "4cat.layout_hue_secondary": { 217 "type": UserInput.OPTION_HUE, 218 "default": 86, 219 "help": "Interface secondary colour", 220 "saturation": 87, 221 "value": 90, 222 "min": 0, 223 "max": 360, 224 "coerce_type": int, 225 "global": True 226 }, 227 "4cat.allow_access_request": { 228 "type": UserInput.OPTION_TOGGLE, 229 "default": True, 230 "help": "Allow access requests", 231 "tooltip": "When enabled, users can request a 4CAT account via the login page if they do not have one, " 232 "provided e-mail settings are configured." 233 }, 234 "4cat.allow_access_request_limiter": { 235 "type": UserInput.OPTION_TEXT, 236 "default": "100/day", 237 "help": "Access request limit", 238 "tooltip": "Limit the number of access requests per day. This is a rate limit for the number of requests " 239 "that can be made per IP address. The format is a number followed by a time unit, e.g. '100/day', " 240 "'10/hour', '5/minute'. You can also combine these, e.g. '100/day;10/hour'.", 241 "global": True 242 }, 243 "4cat.sphinx_host": { 244 "type": UserInput.OPTION_TEXT, 245 "default": "localhost", 246 "help": "Sphinx host", 247 "tooltip": "Sphinx is used for full-text search for collected datasources (e.g., 4chan, 8kun, 8chan) and requires additional setup (see 4CAT wiki on GitHub).", 248 "global": True 249 }, 250 # proxy stuff 251 "proxies.urls": { 252 "type": UserInput.OPTION_TEXT_JSON, 253 "default": ["__localhost__"], 254 "help": "Proxy URLs", 255 "tooltip": "A JSON Array of full proxy URLs. Include any proxy login details in the URL itself (e.g. " 256 "http://username:password@proxy:port). There is one special value, '__localhost__'; this means a " 257 "direct request, without using a proxy." 258 }, 259 "proxies.cooloff": { 260 "type": UserInput.OPTION_TEXT, 261 "coerce_type": float, 262 "help": "Cool-off time", 263 "tooltip": "After a request has finished, do not use the proxy again for this many seconds.", 264 "default": 0.1, 265 "min": 0.0 266 }, 267 "proxies.concurrent-overall": { 268 "type": UserInput.OPTION_TEXT, 269 "coerce_type": int, 270 "default": 1, 271 "min": 1, 272 "help": "Max concurrent requests (overall)", 273 "tooltip": "Per proxy, this many requests can run concurrently overall." 274 }, 275 "proxies.concurrent-host": { 276 "type": UserInput.OPTION_TEXT, 277 "coerce_type": int, 278 "default": 1, 279 "min": 1, 280 "help": "Max concurrent requests (per host)", 281 "tooltip": "Per proxy, this many requests can run concurrently per host. Should be lower than or equal to the " 282 "overall limit." 283 }, 284 # logging 285 "logging.slack.level": { 286 "type": UserInput.OPTION_CHOICE, 287 "default": "WARNING", 288 "options": {"DEBUG": "Debug", "INFO": "Info", "WARNING": "Warning", "ERROR": "Error", "CRITICAL": "Critical"}, 289 "help": "Slack alert level", 290 "tooltip": "Level of alerts (or higher) to be sent to Slack. Only alerts above this level are sent to the Slack webhook", 291 "global": True 292 }, 293 "logging.slack.webhook": { 294 "type": UserInput.OPTION_TEXT, 295 "default": "", 296 "help": "Slack webhook URL", 297 "tooltip": "Slack callback URL to use for alerts", 298 "global": True 299 }, 300 "mail.admin_email": { 301 "type": UserInput.OPTION_TEXT, 302 "default": "", 303 "help": "Admin e-mail", 304 "tooltip": "E-mail of admin, to send account requests etc to", 305 "global": True 306 }, 307 "mail.server": { 308 "type": UserInput.OPTION_TEXT, 309 "default": "", 310 "help": "SMTP server", 311 "tooltip": "SMTP server to connect to for sending e-mail alerts.", 312 "global": True 313 }, 314 "mail.port": { 315 "type": UserInput.OPTION_TEXT, 316 "default": 0, 317 "coerce_type": int, 318 "help": "SMTP port", 319 "tooltip": 'SMTP port to connect to for sending e-mail alerts. "0" defaults to "465" for SMTP_SSL or OS default for SMTP.', 320 "global": True 321 }, 322 "mail.ssl": { 323 "type": UserInput.OPTION_CHOICE, 324 "default": "ssl", 325 "options": {"ssl": "SSL", "tls": "TLS", "none": "None"}, 326 "help": "SMTP over SSL, TLS, or None", 327 "tooltip": "Security scheme to use to connect to e-mail server", 328 "global": True 329 }, 330 "mail.username": { 331 "type": UserInput.OPTION_TEXT, 332 "default": "", 333 "help": "SMTP Username", 334 "tooltip": "Only if your SMTP server requires login", 335 "global": True 336 }, 337 "mail.password": { 338 "type": UserInput.OPTION_TEXT, 339 "default": "", 340 "help": "SMTP Password", 341 "tooltip": "Only if your SMTP server requires login", 342 "global": True 343 }, 344 "mail.noreply": { 345 "type": UserInput.OPTION_TEXT, 346 "default": "noreply@localhost", 347 "help": "NoReply e-mail", 348 "global": True 349 }, 350 # Explorer settings 351 "explorer.basic-explanation": { 352 "type": UserInput.OPTION_INFO, 353 "help": "4CAT's Explorer feature lets you navigate and annotate datasets as if they " 354 "appared on their original platform. This is intended to facilitate qualitative " 355 "exploration and manual coding." 356 }, 357 "explorer.max_posts": { 358 "type": UserInput.OPTION_TEXT, 359 "default": 100000, 360 "help": "Amount of posts", 361 "coerce_type": int, 362 "tooltip": "Maximum number of posts to be considered by the Explorer (prevents timeouts and " 363 "memory errors)" 364 }, 365 "explorer.posts_per_page": { 366 "type": UserInput.OPTION_TEXT, 367 "default": 50, 368 "help": "Posts per page", 369 "coerce_type": int, 370 "tooltip": "Number of posts to display per page" 371 }, 372 "explorer.config_explanation": { 373 "type": UserInput.OPTION_INFO, 374 "help": "Data sources use <em>Explorer templates</em> that determine how they look and what information is " 375 "displayed. Explorer templates consist of [custom HTML templates](https://github.com/" 376 "digitalmethodsinitiative/4cat/tree/master/webtool/templates/explorer/datasource-templates) and " 377 "[custom CSS files](https://github.com/digitalmethodsinitiative/4cat/tree/master/webtool/static/css/" 378 "explorer). If no template is available for a data source, a <em>generic</em> template is used " 379 "made of [this HTML file](https://github.com/digitalmethodsinitiative/4cat/blob/master/webtool/" 380 "templates/explorer/datasource-templates/generic.html) and [this CSS file](https://github.com/" 381 "digitalmethodsinitiative/4cat/tree/master/webtool/static/css/explorer/generic.css).\n\n" 382 "You can request a new data source Explorer template by [creating a GitHub issue](https://github.com/" 383 "digitalmethodsinitiative/4cat/issues) or adding them yourself and opening a pull request." 384 }, 385 # Web tool settings 386 # These are used by the FlaskConfig class in config.py 387 # Flask may require a restart to update them 388 "flask.flask_app": { 389 "type": UserInput.OPTION_TEXT, 390 "default": "webtool/fourcat", 391 "help": "Flask App Name", 392 "tooltip": "", 393 "global": True 394 }, 395 "flask.server_name": { 396 "type": UserInput.OPTION_TEXT, 397 "default": "4cat.local:5000", 398 "help": "Host name", 399 "tooltip": "e.g., my4CAT.com, localhost, 127.0.0.1. Default is localhost; when running 4CAT in Docker this " 400 "setting is ignored as any domain/port binding should be handled outside of the Docker container" 401 "; the Docker container itself will serve on any domain name on the port configured in the .env " 402 "file.", 403 "global": True 404 }, 405 "flask.autologin.hostnames": { 406 "type": UserInput.OPTION_TEXT_JSON, 407 "default": [], 408 "help": "White-listed hostnames", 409 "tooltip": "A list of host names or IP addresses to automatically log in. Docker should include localhost and " 410 "Server Name. Front-end needs to be restarted for changed to apply.", 411 "global": True 412 }, 413 "flask.autologin.api": { 414 "type": UserInput.OPTION_TEXT_JSON, 415 "default": [], 416 "help": "White-list for API", 417 "tooltip": "A list of host names or IP addresses to allow access to API endpoints with no rate limiting. " 418 "Docker should include localhost and Server Name. Front-end needs to be restarted for changed to " 419 "apply.", 420 "global": True 421 }, 422 "flask.https": { 423 "type": UserInput.OPTION_TOGGLE, 424 "default": False, 425 "help": "Use HTTPS", 426 "tooltip": "If your server is using 'https', set to True and 4CAT will use HTTPS links.", 427 "global": True 428 }, 429 "flask.proxy_override": { 430 "type": UserInput.OPTION_MULTI_SELECT, 431 "default": [], 432 "options": { 433 "x_for": "X-Forwarded-For", 434 "x_proto": "X-Forwarded-Proto", 435 "x_host": "X-Forwarded-Host", 436 "x_port": "X-Forwarded-Port", 437 "x_prefix": "X-Forwarded-Prefix" 438 }, 439 "help": "Use proxy headers for URL", 440 "tooltip": "These proxy headers will be taken into account when building URLs. For example, if " 441 "X-Forwarded-Proto is enabled, the URL scheme (http/https) of the built URL will be based on the " 442 "scheme defined by this header. Use when running 4CAT behind a reverse proxy. Requires a front-end " 443 "restart to take effect." 444 }, 445 "flask.autologin.name": { 446 "type": UserInput.OPTION_TEXT, 447 "default": "Automatic login", 448 "help": "Auto-login name", 449 "tooltip": "Username for whitelisted hosts (automatically logged in users see this name for themselves)", 450 }, 451 "flask.secret_key": { 452 "type": UserInput.OPTION_TEXT, 453 "default": "please change me... please...", 454 "help": "Secret key", 455 "tooltip": "Secret key for Flask, used for session cookies", 456 "global": True 457 }, 458 "flask.max_form_parts": { 459 "type": UserInput.OPTION_TEXT, 460 "default": 1000, 461 "help": "Max form parts per request", 462 "coerce_type": int, 463 "global": True, 464 "tooltip": "Affects approximate number of files that can be uploaded at once" 465 }, 466 "flask.tag_order": { 467 "type": UserInput.OPTION_TEXT_JSON, 468 "default": ["admin"], 469 "help": "Tag priority", 470 "tooltip": "User tag priority order. This can be manipulated from the 'User tags' panel instead of directly.", 471 "global": True, 472 "indirect": True 473 }, 474 "flask.proxy_secret": { 475 "type": UserInput.OPTION_TEXT, 476 "default": "", 477 "help": "Proxy secret", 478 "tooltip": "Secret value to authenticate proxy headers. If the value of the X-4CAT-Config-Via-Proxy header " 479 "matches this value, the X-4CAT-Config-Tag header can be used to enable a given configuration tag. " 480 "Leave empty to disable this functionality." 481 }, 482 # YouTube variables to use for processors 483 "api.youtube.name": { 484 "type": UserInput.OPTION_TEXT, 485 "default": "youtube", 486 "help": "YouTube API Service", 487 "tooltip": "YouTube API 'service name', e.g. youtube, googleapis, etc.", 488 "global": True 489 }, 490 "api.youtube.version": { 491 "type": UserInput.OPTION_TEXT, 492 "default": "v3", 493 "help": "YouTube API Version", 494 "tooltip": "e.g., ''v3'", 495 "global": True 496 }, 497 "api.youtube.key": { 498 "type": UserInput.OPTION_TEXT, 499 "default": "", 500 "help": "YouTube API Key", 501 "tooltip": "The developer key from your API console" 502 }, 503 # service manager 504 # this is a service that 4CAT can connect to to run e.g. ML models 505 # it is used by a number of processors 506 "dmi-service-manager.aa_DSM-intro-1": { 507 "type": UserInput.OPTION_INFO, 508 "help": "The [DMI Service Manager](https://github.com/digitalmethodsinitiative/dmi_service_manager) is a " 509 "support tool used to run some advanced processors. These processors generally require high CPU " 510 "usage, a lot of RAM, or a dedicated GPU and thus do not fit within 4CAT's arcitecture. It is also " 511 "possible for multiple 4CAT instances to use the same service manager. Please see [this link]" 512 "(https://github.com/digitalmethodsinitiative/dmi_service_manager?tab=readme-ov-file#installation) " 513 "for instructions on setting up your own instance of the DMI Service Manager.", 514 }, 515 "dmi-service-manager.ab_server_address": { 516 "type": UserInput.OPTION_TEXT, 517 "default": "", 518 "help": "DMI Service Manager server/URL", 519 "tooltip": "The URL of the DMI Service Manager server, e.g. http://localhost:5000", 520 "global": True 521 }, 522 "dmi-service-manager.ac_local_or_remote": { 523 "type": UserInput.OPTION_CHOICE, 524 "default": 0, 525 "help": "DMI Services Local or Remote", 526 "tooltip": "Services have local access to 4CAT files or must be transferred from remote via DMI Service Manager", 527 "options": { 528 "local": "Local", 529 "remote": "Remote", 530 }, 531 "global": True 532 }, 533 # UI settings 534 # this configures what the site looks like 535 "ui.homepage": { 536 "type": UserInput.OPTION_CHOICE, 537 "options": { 538 "about": "'About' page", 539 "create-dataset": "'Create dataset' page", 540 "datasets": "Dataset overview" 541 }, 542 "help": "4CAT home page", 543 "default": "about" 544 }, 545 "ui.inline_preview": { 546 "type": UserInput.OPTION_TOGGLE, 547 "help": "Show inline preview", 548 "default": False, 549 "tooltip": "Show main dataset preview directly on dataset pages, instead of behind a 'preview' button" 550 }, 551 "ui.offer_anonymisation": { 552 "type": UserInput.OPTION_TOGGLE, 553 "help": "Offer anonymisation options", 554 "default": True, 555 "tooltip": "Offer users the option to anonymise their datasets at the time of creation. It is strongly " 556 "recommended to leave this enabled." 557 }, 558 "ui.advertise_install": { 559 "type": UserInput.OPTION_TOGGLE, 560 "help": "Advertise local 4CAT", 561 "default": True, 562 "tooltip": "In the login form, remind users of the possibility to install their own 4CAT server." 563 }, 564 "ui.show_datasource": { 565 "type": UserInput.OPTION_TOGGLE, 566 "help": "Show data source", 567 "default": True, 568 "tooltip": "Show data source for each dataset. Can be useful to disable if only one data source is enabled." 569 }, 570 "ui.nav_pages": { 571 "type": UserInput.OPTION_MULTI_SELECT, 572 "help": "Pages in navigation", 573 "options": { 574 "data-policy": "Data Policy", 575 "citing": "How to cite", 576 }, 577 "default": [], 578 "tooltip": "These pages will be included in the navigation bar at the top of the interface." 579 }, 580 "ui.prefer_mapped_preview": { 581 "type": UserInput.OPTION_TOGGLE, 582 "help": "Prefer mapped preview", 583 "default": True, 584 "tooltip": "If a dataset is a JSON file but it can be mapped to a CSV file, show the CSV in the preview instead" 585 "of the underlying JSON." 586 }, 587 "ui.offer_hashing": { 588 "type": UserInput.OPTION_TOGGLE, 589 "default": True, 590 "help": "Offer pseudonymisation", 591 "tooltip": "Add a checkbox to the 'create dataset' forum to allow users to toggle pseudonymisation." 592 }, 593 "ui.offer_private": { 594 "type": UserInput.OPTION_TOGGLE, 595 "default": True, 596 "help": "Offer create as private", 597 "tooltip": "Add a checkbox to the 'create dataset' forum to allow users to make a dataset private." 598 }, 599 "ui.option_email": { 600 "type": UserInput.OPTION_CHOICE, 601 "options": { 602 "none": "No Emails", 603 "processor_only": "Processors only", 604 "datasources_only": "Create Dataset only", 605 "both": "Both datasets and processors" 606 }, 607 "default": "none", 608 "help": "Show email when complete option", 609 "tooltip": "If a mail server is set up, enabling this allow users to request emails when datasets and processors are completed." 610 }, 611} 612 613# These are used in the web interface for more readable names 614# Can't think of a better place to put them... 615categories = { 616 "4cat": "4CAT Tool settings", 617 "api": "API credentials", 618 "flask": "Flask settings", 619 "explorer": "Explorer", 620 "datasources": "Data sources", 621 "expire": "Dataset expiration settings", 622 "mail": "Mail settings & credentials", 623 "logging": "Logging", 624 "path": "File paths", 625 "privileges": "User privileges", 626 "dmi-service-manager": "DMI Service Manager", 627 "ui": "User interface", 628 "proxies": "Proxied HTTP requests", 629 "image-visuals": "Image visualization", 630}
config_definition =
{'datasources.intro': {'type': 'info', 'help': "Data sources enabled below will be offered to people on the 'Create Dataset' page. Additionally, people can upload datasets for these by for example exporting them with [Zeeschuimer](https://github.com/digitalmethodsinitiative/zeeschuimer) to this 4CAT instance.\n\nSome data sources offer further settings which may be configured on other tabs."}, 'datasources.intro2': {'type': 'info', 'help': "*Warning:* changes take effect immediately. Datasets that would have expired under the new settings will be deleted. You can use the 'Dataset bulk management' module in the control panel to manage the expiration status of existing datasets."}, 'datasources.enabled': {'type': 'datasources', 'default': ['ninegag', 'bsky', 'douban', 'douyin', 'imgur', 'upload', 'instagram', 'import_4cat', 'linkedin', 'media-import', 'telegram', 'tiktok', 'twitter', 'tiktok-comments', 'truthsocial', 'gab'], 'help': 'Data Sources', 'tooltip': 'A list of enabled data sources that people can choose from when creating a dataset page.'}, 'datasources.expiration': {'type': 'json', 'default': {'fourchan': {'enabled': False, 'allow_optout': False, 'timeout': 0}, 'eightchan': {'enabled': False, 'allow_optout': False, 'timeout': 0}, 'eightkun': {'enabled': False, 'allow_optout': False, 'timeout': 0}, 'ninegag': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'bitchute': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'bsky': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'dmi-tcat': {'enabled': False, 'allow_optout': False, 'timeout': 0}, 'dmi-tcatv2': {'enabled': False, 'allow_optout': False, 'timeout': 0}, 'douban': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'douyin': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'import_4cat': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'gab': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'imgur': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'upload': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'instagram': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'linkedin': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'media-import': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'parler': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'reddit': {'enabled': False, 'allow_optout': False, 'timeout': 0}, 'telegram': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'tiktok': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'tiktok-urls': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'truthsocial': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'tumblr': {'enabled': False, 'allow_optout': False, 'timeout': 0}, 'twitter': {'enabled': True, 'allow_optout': False, 'timeout': 0}, 'twitterv2': {'enabled': False, 'allow_optout': False, 'timeout': 0}, 'usenet': {'enabled': False, 'allow_optout': False, 'timeout': 0}, 'vk': {'enabled': False, 'allow_optout': False, 'timeout': 0}}, 'help': 'Data source-specific expiration', 'tooltip': "Allows setting expiration settings per datasource. Configured by proxy via the 'data sources' setting.", 'indirect': True}, '4cat.name': {'type': 'string', 'default': '4CAT', 'help': 'Short tool name', 'tooltip': "Configure short name for the tool in its web interface. The backend will always refer to '4CAT' - the name of the software, and a 'powered by 4CAT' notice may also show up in the web interface regardless of the value entered here."}, '4cat.name_long': {'type': 'string', 'default': '4CAT: Capture and Analysis Toolkit', 'help': 'Full tool name', 'tooltip': "Used in e.g. the interface header. The backend will always refer to '4CAT' - the name of the software, and a 'powered by 4CAT' notice may also show up in the web interface regardless of the value entered here."}, '4cat.about_this_server': {'type': 'textarea', 'default': '', 'help': 'Server information', 'tooltip': "Custom server information that is displayed on the 'About' page. Can for instance be used to show information about who maintains the tool or what its intended purpose is. Accepts Markdown markup."}, '4cat.crash_message': {'type': 'textarea', 'default': "This processor has crashed; the crash has been logged. 4CAT will try again when it is restarted. Contact your server administrator if this error persists. You can also report issues via 4CAT's [GitHub repository](https://github.com/digitalmethodsinitiative/4cat/issues).", 'help': 'Crash message', 'tooltip': 'This message is shown to users in the interface when a processor crashes while processing their dataset. It can contain Markdown markup.'}, 'privileges.can_create_dataset': {'type': 'toggle', 'default': True, 'help': 'Can create dataset', 'tooltip': "Controls whether users can view and use the 'Create dataset' page. Does NOT control whether users can run processors (which also create datasets); this is a separate setting."}, 'privileges.can_run_processors': {'type': 'toggle', 'default': True, 'help': 'Can run processors', 'tooltip': 'Controls whether processors can be run. There may be processor-specific settings or dependencies that override this.'}, 'privileges.can_view_all_datasets': {'type': 'toggle', 'default': False, 'help': 'Can view global dataset index', 'tooltip': 'Controls whether users can see the global datasets overview, i.e. not just for their own user but for all other users as well.'}, 'privileges.can_view_private_datasets': {'type': 'toggle', 'default': False, 'help': 'Can view private datasets', 'tooltip': 'Controls whether users can see the datasets made private by their owners.'}, 'privileges.can_create_api_token': {'type': 'toggle', 'default': True, 'help': 'Can create API token', 'tooltip': "Controls whether users can create a token for authentication with 4CAT's Web API."}, 'privileges.can_use_explorer': {'type': 'toggle', 'default': True, 'help': 'Can use Explorer', 'tooltip': 'Controls whether users can use the Explorer feature to analyse and annotate datasets.'}, 'privileges.can_export_datasets': {'type': 'toggle', 'default': True, 'help': 'Can export datasets', 'tooltip': 'Allows users to export datasets they own to other 4CAT instances.'}, 'privileges.admin.can_manage_users': {'type': 'toggle', 'default': False, 'help': 'Can manage users', 'tooltip': 'Controls whether users can add, edit and delete other users via the Control Panel'}, 'privileges.admin.can_manage_notifications': {'type': 'toggle', 'default': False, 'help': 'Can manage notifications', 'tooltip': 'Controls whether users can add, edit and delete notifications via the Control Panel'}, 'privileges.admin.can_manage_settings': {'type': 'toggle', 'default': False, 'help': 'Can manage settings', 'tooltip': 'Controls whether users can manipulate 4CAT settings via the Control Panel'}, 'privileges.admin.can_manipulate_all_datasets': {'type': 'toggle', 'default': False, 'help': 'Can manipulate all datasets', 'tooltip': 'Controls whether users can manipulate all datasets as if they were an owner, e.g. sharing it with others, running processors, et cetera.'}, 'privileges.admin.can_restart': {'type': 'toggle', 'default': False, 'help': 'Can restart/upgrade', 'tooltip': 'Controls whether users can restart, upgrade, and manage extensions 4CAT via the Control Panel'}, 'privileges.can_upgrade_to_dev': {'type': 'toggle', 'default': False, 'help': 'Can upgrade to development branch', 'tooltip': "Controls whether users can upgrade 4CAT to a development branch of the code via the Control Panel. This is an easy way to break 4CAT so it is recommended to not enable this unless you're really sure of what you're doing."}, 'privileges.admin.can_manage_tags': {'type': 'toggle', 'default': False, 'help': 'Can manage user tags', 'tooltip': 'Controls whether users can manipulate user tags via the Control Panel'}, 'privileges.admin.can_view_status': {'type': 'toggle', 'default': False, 'help': 'Can view worker status', 'tooltip': 'Controls whether users can view worker status via the Control Panel'}, '4cat.github_url': {'type': 'string', 'default': 'https://github.com/digitalmethodsinitiative/4cat', 'help': 'Repository URL', 'tooltip': 'URL to the github repository for this 4CAT instance', 'global': True}, '4cat.phone_home_url': {'type': 'string', 'default': 'https://ping.4cat.nl', 'help': 'Phone home URL', 'tooltip': 'This URL is called once - when 4CAT is installed. If the installing user consents, information is sent to this URL to help the 4CAT developers (the Digital Methods Initiative) keep track of how much it is used. There should be no need to change this URL after installation.', 'global': True}, '4cat.phone_home_asked': {'type': 'toggle', 'default': True, 'help': 'Shown phone home request?', 'tooltip': "Whether you've seen the 'phone home request'. Set to `False` to see the request again. There should be no need to change this manually.", 'global': True}, '4cat.layout_hue': {'type': 'hue', 'default': 356, 'help': 'Interface accent colour', 'saturation': 87, 'value': 81, 'min': 0, 'max': 360, 'coerce_type': <class 'int'>, 'global': True}, '4cat.layout_hue_secondary': {'type': 'hue', 'default': 86, 'help': 'Interface secondary colour', 'saturation': 87, 'value': 90, 'min': 0, 'max': 360, 'coerce_type': <class 'int'>, 'global': True}, '4cat.allow_access_request': {'type': 'toggle', 'default': True, 'help': 'Allow access requests', 'tooltip': 'When enabled, users can request a 4CAT account via the login page if they do not have one, provided e-mail settings are configured.'}, '4cat.allow_access_request_limiter': {'type': 'string', 'default': '100/day', 'help': 'Access request limit', 'tooltip': "Limit the number of access requests per day. This is a rate limit for the number of requests that can be made per IP address. The format is a number followed by a time unit, e.g. '100/day', '10/hour', '5/minute'. You can also combine these, e.g. '100/day;10/hour'.", 'global': True}, '4cat.sphinx_host': {'type': 'string', 'default': 'localhost', 'help': 'Sphinx host', 'tooltip': 'Sphinx is used for full-text search for collected datasources (e.g., 4chan, 8kun, 8chan) and requires additional setup (see 4CAT wiki on GitHub).', 'global': True}, 'proxies.urls': {'type': 'json', 'default': ['__localhost__'], 'help': 'Proxy URLs', 'tooltip': "A JSON Array of full proxy URLs. Include any proxy login details in the URL itself (e.g. http://username:password@proxy:port). There is one special value, '__localhost__'; this means a direct request, without using a proxy."}, 'proxies.cooloff': {'type': 'string', 'coerce_type': <class 'float'>, 'help': 'Cool-off time', 'tooltip': 'After a request has finished, do not use the proxy again for this many seconds.', 'default': 0.1, 'min': 0.0}, 'proxies.concurrent-overall': {'type': 'string', 'coerce_type': <class 'int'>, 'default': 1, 'min': 1, 'help': 'Max concurrent requests (overall)', 'tooltip': 'Per proxy, this many requests can run concurrently overall.'}, 'proxies.concurrent-host': {'type': 'string', 'coerce_type': <class 'int'>, 'default': 1, 'min': 1, 'help': 'Max concurrent requests (per host)', 'tooltip': 'Per proxy, this many requests can run concurrently per host. Should be lower than or equal to the overall limit.'}, 'logging.slack.level': {'type': 'choice', 'default': 'WARNING', 'options': {'DEBUG': 'Debug', 'INFO': 'Info', 'WARNING': 'Warning', 'ERROR': 'Error', 'CRITICAL': 'Critical'}, 'help': 'Slack alert level', 'tooltip': 'Level of alerts (or higher) to be sent to Slack. Only alerts above this level are sent to the Slack webhook', 'global': True}, 'logging.slack.webhook': {'type': 'string', 'default': '', 'help': 'Slack webhook URL', 'tooltip': 'Slack callback URL to use for alerts', 'global': True}, 'mail.admin_email': {'type': 'string', 'default': '', 'help': 'Admin e-mail', 'tooltip': 'E-mail of admin, to send account requests etc to', 'global': True}, 'mail.server': {'type': 'string', 'default': '', 'help': 'SMTP server', 'tooltip': 'SMTP server to connect to for sending e-mail alerts.', 'global': True}, 'mail.port': {'type': 'string', 'default': 0, 'coerce_type': <class 'int'>, 'help': 'SMTP port', 'tooltip': 'SMTP port to connect to for sending e-mail alerts. "0" defaults to "465" for SMTP_SSL or OS default for SMTP.', 'global': True}, 'mail.ssl': {'type': 'choice', 'default': 'ssl', 'options': {'ssl': 'SSL', 'tls': 'TLS', 'none': 'None'}, 'help': 'SMTP over SSL, TLS, or None', 'tooltip': 'Security scheme to use to connect to e-mail server', 'global': True}, 'mail.username': {'type': 'string', 'default': '', 'help': 'SMTP Username', 'tooltip': 'Only if your SMTP server requires login', 'global': True}, 'mail.password': {'type': 'string', 'default': '', 'help': 'SMTP Password', 'tooltip': 'Only if your SMTP server requires login', 'global': True}, 'mail.noreply': {'type': 'string', 'default': 'noreply@localhost', 'help': 'NoReply e-mail', 'global': True}, 'explorer.basic-explanation': {'type': 'info', 'help': "4CAT's Explorer feature lets you navigate and annotate datasets as if they appared on their original platform. This is intended to facilitate qualitative exploration and manual coding."}, 'explorer.max_posts': {'type': 'string', 'default': 100000, 'help': 'Amount of posts', 'coerce_type': <class 'int'>, 'tooltip': 'Maximum number of posts to be considered by the Explorer (prevents timeouts and memory errors)'}, 'explorer.posts_per_page': {'type': 'string', 'default': 50, 'help': 'Posts per page', 'coerce_type': <class 'int'>, 'tooltip': 'Number of posts to display per page'}, 'explorer.config_explanation': {'type': 'info', 'help': 'Data sources use <em>Explorer templates</em> that determine how they look and what information is displayed. Explorer templates consist of [custom HTML templates](https://github.com/digitalmethodsinitiative/4cat/tree/master/webtool/templates/explorer/datasource-templates) and [custom CSS files](https://github.com/digitalmethodsinitiative/4cat/tree/master/webtool/static/css/explorer). If no template is available for a data source, a <em>generic</em> template is used made of [this HTML file](https://github.com/digitalmethodsinitiative/4cat/blob/master/webtool/templates/explorer/datasource-templates/generic.html) and [this CSS file](https://github.com/digitalmethodsinitiative/4cat/tree/master/webtool/static/css/explorer/generic.css).\n\nYou can request a new data source Explorer template by [creating a GitHub issue](https://github.com/digitalmethodsinitiative/4cat/issues) or adding them yourself and opening a pull request.'}, 'flask.flask_app': {'type': 'string', 'default': 'webtool/fourcat', 'help': 'Flask App Name', 'tooltip': '', 'global': True}, 'flask.server_name': {'type': 'string', 'default': '4cat.local:5000', 'help': 'Host name', 'tooltip': 'e.g., my4CAT.com, localhost, 127.0.0.1. Default is localhost; when running 4CAT in Docker this setting is ignored as any domain/port binding should be handled outside of the Docker container; the Docker container itself will serve on any domain name on the port configured in the .env file.', 'global': True}, 'flask.autologin.hostnames': {'type': 'json', 'default': [], 'help': 'White-listed hostnames', 'tooltip': 'A list of host names or IP addresses to automatically log in. Docker should include localhost and Server Name. Front-end needs to be restarted for changed to apply.', 'global': True}, 'flask.autologin.api': {'type': 'json', 'default': [], 'help': 'White-list for API', 'tooltip': 'A list of host names or IP addresses to allow access to API endpoints with no rate limiting. Docker should include localhost and Server Name. Front-end needs to be restarted for changed to apply.', 'global': True}, 'flask.https': {'type': 'toggle', 'default': False, 'help': 'Use HTTPS', 'tooltip': "If your server is using 'https', set to True and 4CAT will use HTTPS links.", 'global': True}, 'flask.proxy_override': {'type': 'multi_select', 'default': [], 'options': {'x_for': 'X-Forwarded-For', 'x_proto': 'X-Forwarded-Proto', 'x_host': 'X-Forwarded-Host', 'x_port': 'X-Forwarded-Port', 'x_prefix': 'X-Forwarded-Prefix'}, 'help': 'Use proxy headers for URL', 'tooltip': 'These proxy headers will be taken into account when building URLs. For example, if X-Forwarded-Proto is enabled, the URL scheme (http/https) of the built URL will be based on the scheme defined by this header. Use when running 4CAT behind a reverse proxy. Requires a front-end restart to take effect.'}, 'flask.autologin.name': {'type': 'string', 'default': 'Automatic login', 'help': 'Auto-login name', 'tooltip': 'Username for whitelisted hosts (automatically logged in users see this name for themselves)'}, 'flask.secret_key': {'type': 'string', 'default': 'please change me... please...', 'help': 'Secret key', 'tooltip': 'Secret key for Flask, used for session cookies', 'global': True}, 'flask.max_form_parts': {'type': 'string', 'default': 1000, 'help': 'Max form parts per request', 'coerce_type': <class 'int'>, 'global': True, 'tooltip': 'Affects approximate number of files that can be uploaded at once'}, 'flask.tag_order': {'type': 'json', 'default': ['admin'], 'help': 'Tag priority', 'tooltip': "User tag priority order. This can be manipulated from the 'User tags' panel instead of directly.", 'global': True, 'indirect': True}, 'flask.proxy_secret': {'type': 'string', 'default': '', 'help': 'Proxy secret', 'tooltip': 'Secret value to authenticate proxy headers. If the value of the X-4CAT-Config-Via-Proxy header matches this value, the X-4CAT-Config-Tag header can be used to enable a given configuration tag. Leave empty to disable this functionality.'}, 'api.youtube.name': {'type': 'string', 'default': 'youtube', 'help': 'YouTube API Service', 'tooltip': "YouTube API 'service name', e.g. youtube, googleapis, etc.", 'global': True}, 'api.youtube.version': {'type': 'string', 'default': 'v3', 'help': 'YouTube API Version', 'tooltip': "e.g., ''v3'", 'global': True}, 'api.youtube.key': {'type': 'string', 'default': '', 'help': 'YouTube API Key', 'tooltip': 'The developer key from your API console'}, 'dmi-service-manager.aa_DSM-intro-1': {'type': 'info', 'help': "The [DMI Service Manager](https://github.com/digitalmethodsinitiative/dmi_service_manager) is a support tool used to run some advanced processors. These processors generally require high CPU usage, a lot of RAM, or a dedicated GPU and thus do not fit within 4CAT's arcitecture. It is also possible for multiple 4CAT instances to use the same service manager. Please see [this link](https://github.com/digitalmethodsinitiative/dmi_service_manager?tab=readme-ov-file#installation) for instructions on setting up your own instance of the DMI Service Manager."}, 'dmi-service-manager.ab_server_address': {'type': 'string', 'default': '', 'help': 'DMI Service Manager server/URL', 'tooltip': 'The URL of the DMI Service Manager server, e.g. http://localhost:5000', 'global': True}, 'dmi-service-manager.ac_local_or_remote': {'type': 'choice', 'default': 0, 'help': 'DMI Services Local or Remote', 'tooltip': 'Services have local access to 4CAT files or must be transferred from remote via DMI Service Manager', 'options': {'local': 'Local', 'remote': 'Remote'}, 'global': True}, 'ui.homepage': {'type': 'choice', 'options': {'about': "'About' page", 'create-dataset': "'Create dataset' page", 'datasets': 'Dataset overview'}, 'help': '4CAT home page', 'default': 'about'}, 'ui.inline_preview': {'type': 'toggle', 'help': 'Show inline preview', 'default': False, 'tooltip': "Show main dataset preview directly on dataset pages, instead of behind a 'preview' button"}, 'ui.offer_anonymisation': {'type': 'toggle', 'help': 'Offer anonymisation options', 'default': True, 'tooltip': 'Offer users the option to anonymise their datasets at the time of creation. It is strongly recommended to leave this enabled.'}, 'ui.advertise_install': {'type': 'toggle', 'help': 'Advertise local 4CAT', 'default': True, 'tooltip': 'In the login form, remind users of the possibility to install their own 4CAT server.'}, 'ui.show_datasource': {'type': 'toggle', 'help': 'Show data source', 'default': True, 'tooltip': 'Show data source for each dataset. Can be useful to disable if only one data source is enabled.'}, 'ui.nav_pages': {'type': 'multi_select', 'help': 'Pages in navigation', 'options': {'data-policy': 'Data Policy', 'citing': 'How to cite'}, 'default': [], 'tooltip': 'These pages will be included in the navigation bar at the top of the interface.'}, 'ui.prefer_mapped_preview': {'type': 'toggle', 'help': 'Prefer mapped preview', 'default': True, 'tooltip': 'If a dataset is a JSON file but it can be mapped to a CSV file, show the CSV in the preview insteadof the underlying JSON.'}, 'ui.offer_hashing': {'type': 'toggle', 'default': True, 'help': 'Offer pseudonymisation', 'tooltip': "Add a checkbox to the 'create dataset' forum to allow users to toggle pseudonymisation."}, 'ui.offer_private': {'type': 'toggle', 'default': True, 'help': 'Offer create as private', 'tooltip': "Add a checkbox to the 'create dataset' forum to allow users to make a dataset private."}, 'ui.option_email': {'type': 'choice', 'options': {'none': 'No Emails', 'processor_only': 'Processors only', 'datasources_only': 'Create Dataset only', 'both': 'Both datasets and processors'}, 'default': 'none', 'help': 'Show email when complete option', 'tooltip': 'If a mail server is set up, enabling this allow users to request emails when datasets and processors are completed.'}}
categories =
{'4cat': '4CAT Tool settings', 'api': 'API credentials', 'flask': 'Flask settings', 'explorer': 'Explorer', 'datasources': 'Data sources', 'expire': 'Dataset expiration settings', 'mail': 'Mail settings & credentials', 'logging': 'Logging', 'path': 'File paths', 'privileges': 'User privileges', 'dmi-service-manager': 'DMI Service Manager', 'ui': 'User interface', 'proxies': 'Proxied HTTP requests', 'image-visuals': 'Image visualization'}