Help:Automation: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Fix minor grammar mistake)
 
(17 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Subpage|[[Help:Contents]]}}{{help_page}}
{{LanguageBar}}
{{todo|This page is not a stub but could use some more detail.}}
{{Subpage|[[Help:Contents]]}}
 
{{help page}}
 
{{Todo|This page is not a stub but could use some more detail.}}
Unlike many other wikis, such as Wikipedia, the VDC, as a site focused on programming in relation to certain games and engines, can benefit greatly from automatic gathering and formatting of much of the data that these engines use. Automation can also greatly help with tasks such as applying and updating templates across pages.
 
This article delves into the realm of automation, exploring the usage of scripts and bots in streamlining processes and enhancing efficiency across the VDC.
This article delves into the realm of automation, exploring the usage of scripts and bots in streamlining processes and enhancing efficiency across the VDC.
[[File:PyQT6-Entity-List-Script-Skit.png|400px|thumb|A script for generation entity lists from fgd file]]
[[File:PyQT6-Entity-List-Script-Skit.png|400px|thumb|A script for generation entity lists from fgd file]]


==Scripts==
== Scripts ==
Scripts are fundamental to automation, enabling the automation of repetitive tasks and the execution of complex operations. This section will detail the types of scripts used in automation, their applications, and the programming languages most commonly employed for scripting.  
Scripts are fundamental to automation, enabling the automation of repetitive tasks and the execution of complex operations. This section will detail the types of scripts used in automation, their applications, and the programming languages most commonly employed for scripting.  
{{note|While AI can be used for some automation, it still often makes errors and needs specific prompts. Regular scripts are still recommended for most tasks.}}
{{note|While AI can be used for some automation, it still often makes errors and needs specific prompts. Regular scripts are still recommended for most tasks.}}
<br>
<br>The following scripts provide utility for task automation:
The following scripts provide utility for task automation:
 
===Entity Lists===
=== Entity Lists ===
Creating lists of entities is not difficult task; in fact, it is rather straightforward.
Creating lists of entities is not difficult task; in fact, it is rather straightforward.


Line 17: Line 23:


==== Issues ====
==== Issues ====
{{bug|Sometimes the script adds entities to the wrong section (with a different prefix)}}
{{bug|hidetested=1|Sometimes the script adds entities to the wrong section (with a different prefix)}}
{{bug|Sometimes unnecessary spaces may be added}}
{{bug|hidetested=1|Sometimes unnecessary spaces may be added}}


====For {{src|4}} [[FGD]]'s====
==== For {{src|4}} [[FGD]]'s ====
'''The Script'''{{ref|1}}
'''The Script'''{{ref|1}}
*Uses grep -i '^\(@solidclass\|@pointclass\|@NPCClass\)' "$1" to filter lines from the input file that start with @solidclass, @pointclass, or @NPCClass.  
*Uses grep -i '^\(@solidclass\|@pointclass\|@NPCClass\)' "$1" to filter lines from the input file that start with @solidclass, @pointclass, or @NPCClass.  
Line 41: Line 47:
* [[List of Wilson Chronicles entities]]
* [[List of Wilson Chronicles entities]]


==== For {{gldsrc|4}} [[FGD]]s====
==== For {{gldsrc|4}} [[FGD]]'s====
'''The Script'''{{ref|2}}
'''The Script'''{{ref|2}}
* The logic is the same as the {{src|4}} script
* The logic is the same as the {{src|4}} script
Line 57: Line 63:


== Bots ==
== Bots ==
Bots are automated software agents designed to perform repetitive or time-consuming tasks, often in response to certain triggers or conditions.<br>
Bots are automated software agents designed to perform repetitive or time-consuming tasks, sometimes in response to certain triggers or conditions. On this site they are usually dedicated to certain onetime tasks, such as removing instances of a deprecated template.<br>
This is a table of bots that currently exist on this site.  
This is a table of bots that currently exist on this site.  


Line 66: Line 72:
| {{u|VDCBot}} || {{valve|4.1}} || {{N/A}} || A range of automated cleanup assignments. || <p style="color:yellow;display:inline">Active</p> (intermittently)
| {{u|VDCBot}} || {{valve|4.1}} || {{N/A}} || A range of automated cleanup assignments. || <p style="color:yellow;display:inline">Active</p> (intermittently)
|-
|-
| {{u|PIPEbot}} || {{u|Mailmanmicky}} || {{pywikibot|4.1}} || {{N/A}} || <p style="color:red;display:inline">Inactive</p>, likely to never become active
| {{u|CrematorBot}} || {{u|PabloS}} || {{N/A}} || Deleting pages <!-- I think --> || <p style="color:yellow;display:inline">Active</p> (intermittently?)
|-
|-
| {{u|WisdomBot}} || {{u|Wisdurm}} || {{DotNetWikiBot|4.1}} || Updating pages using {{t|lang}} to use {{t|multipage}}, as well as other possible tasks when it becomes functional again. || <p style="color:red;display:inline">Inactive</p> due to permission problems
| {{u|DiscussionRepairBot}} || ? || {{N/A}} || Remove instances of [[Template:Message]]. || <p style="color:red;display:inline">Inactive</p>, the bot has served its purpose.
|-
|-
| {{u|Thunder4ik}}|| {{u|Noug4at}} || {{w|Wikipedia:AutoWikiBrowser|AutoWikiBrowser|icon=hide}}<br>{{pywikibot|4.1}}|| Updating deprecated templates, optimizing pages, categorization & adding templates. See more at it's [[User:Thunder4ik#Function|user page]]. <!-- References should be used for references, keep hyperlinks as is since it makes more sense and is easier for the reader --> || <p style="color:yellow;display:inline">Active</p> (intermittently)
| {{u|Nesciuse}} || {{u|Nescius}} || {{N/A}} || Updating language templates <!-- I think --> || <p style="color:green;display:inline">Active</p>
|-
|-
|{{u|PeeBot}} || {{u|Pee}} || {{DotNetWikiBot|4.1}} || Fixing redirects, updating templates, helping with template creation and possibly more. || <p style="color:red;display:inline">Inactive</p>, seemingly due to lack of motivation by owner to operate it
| {{u|PIPEbot}} || {{u|Mailmanmicky}} || {{pywikibot|4.1}} || {{N/A}} || <p style="color:red;display:inline">Inactive</p>, account has been deleted
|-
| {{u|WisdomBot}} || {{u|Wisdurm}} || {{DotNetWikiBot|4.1}} || Updating templates among other things. || <p style="color:red;display:inline">Inactive</p>
|-
| [[User:Thunder4ik|AveaBot]]|| {{u|Noug4at}} || {{w|Wikipedia:AutoWikiBrowser|AutoWikiBrowser|icon=hide}}<br>{{pywikibot|4.1}}|| Updating deprecated templates, optimizing pages, categorization & adding templates. See more at it's [[User:Thunder4ik#Function|user page]]. <!-- References should be used for references, keep hyperlinks as is since it makes more sense and is easier for the reader --> || <p style="color:red;display:inline">Inactive</p>
|-
|{{u|PeeBot}} || {{u|Pee}} || {{DotNetWikiBot|4.1}} || Fixing redirects, updating templates, helping with template creation and possibly more. || <p style="color:yellow;display:inline">Active</p> (intermittently)
|-
|{{u|MenialTasksBot}} || {{u|CHILLMODEA}} || {{N/A}} || Any task deemed not-important, but still too tedious for a human. || <p style="color:green;display:inline">Active</p>
|}
|}
===First community bot===
{{u|WisdomBot}} marks the inaugural creation of an automated bot within the VDC, realized by {{u|Wisdurm}}. Despite the existence of {{u|PIPEbot}} prior to this, there is no evidence to suggest that it operated autonomously or performed any specific functions{{ref|3}}. As of current time, the bot has made a number of edits, including significantly replacing the outdated {{t|entity}} and its derivatives with {{t|this is a}} on pages featuring it,{{ref|4}} as well as having begun the process of moving pages using {{t|lang}} to use {{t|multipage}}. However the bot is current not functional. While the reason for it not working is not definitely known, it is most likely due to the bot being blocked either by Cloudflare, or the VDC servers themselves.


== See also ==
== See also ==
* [[Help:Page Creation]]
* [[Help:Page Creation]] (Basics)
* {{w|Wikipedia:Bots|Bots}} (Wikipedia)
* {{w|Wikipedia:Bots|Bots}} (Wikipedia)
* {{w|ChatGPT}} (Wikipedia)
* {{w|ChatGPT}} (Wikipedia)
Line 97: Line 108:
}}
}}


[[category:wiki]]
[[Category:wiki]]
[[category:help]]
[[Category:help]]

Latest revision as of 22:01, 12 July 2025

English (en)Translate (Translate)
Edit-copy.png
This is a help page
That means that this article contains information intended to advise or aid on the functions of the wiki, on how to use the wiki, or on general recommendations for users of the wiki.
Todo: This page is not a stub but could use some more detail.

Unlike many other wikis, such as Wikipedia, the VDC, as a site focused on programming in relation to certain games and engines, can benefit greatly from automatic gathering and formatting of much of the data that these engines use. Automation can also greatly help with tasks such as applying and updating templates across pages.

This article delves into the realm of automation, exploring the usage of scripts and bots in streamlining processes and enhancing efficiency across the VDC.

A script for generation entity lists from fgd file

Scripts

Scripts are fundamental to automation, enabling the automation of repetitive tasks and the execution of complex operations. This section will detail the types of scripts used in automation, their applications, and the programming languages most commonly employed for scripting.

Note.pngNote:While AI can be used for some automation, it still often makes errors and needs specific prompts. Regular scripts are still recommended for most tasks.


The following scripts provide utility for task automation:

Entity Lists

Creating lists of entities is not difficult task; in fact, it is rather straightforward.

Warning.pngWarning:This script is useless if the format for the FGD file in the game is modified, for example in games using Strata Source Strata Source. This script works with standard FGD files for all vanilla Source Source branches.
Note.pngNote:These scripts utilize a combination of Bash scripting and Unix/Linux command-line tools, such as grep, sed, and awk

Issues

Icon-Bug.pngBug:Sometimes the script adds entities to the wrong section (with a different prefix)
Icon-Bug.pngBug:Sometimes unnecessary spaces may be added

For Source Source FGD's

The Script[1]

  • Uses grep -i '^\(@solidclass\|@pointclass\|@NPCClass\)' "$1" to filter lines from the input file that start with @solidclass, @pointclass, or @NPCClass.
  • Creates sections based on the prefixes extracted from the processed lines. It uses an associative array declare -A seen to keep track of prefixes that have already been processed. This ensures that each prefix corresponds to a single section.
  • Uses *{{ent|$result}} to format the processed lines as wiki entries.
  • The section headers are formatted as ===%s_*=== where %s is replaced with the prefix. For example, if the prefix is foo, the section header will be ===foo_*===. Each processed line is then added under the appropriate section.
  • Handles unincluded lines by appending them to a separate "Unincluded" section at the end of the output file. This ensures that all lines are accounted for, even if they don't fit the criteria for the other sections.
Usage

Source-FGD-Ent-List-VDC-2.sh <input> <output>

Pages created using this script

For GoldSrc GoldSrc FGD's

The Script[2]

  • The logic is the same as the Source Source script
    • Uses grep -i '^\(@solidclass\|@pointclass\)' "$1" to filter lines from the input file that start with @solidclass, @pointclass, or @NPCClass.
    • Uses *{{ent|$result_(GoldSrc)|alt=$result}} to format the processed lines as wiki entries.
Usage

GoldSrc-FGD-Ent-List-VDC-2.sh <input> <output>

Pages created using this script

Bots

Bots are automated software agents designed to perform repetitive or time-consuming tasks, sometimes in response to certain triggers or conditions. On this site they are usually dedicated to certain onetime tasks, such as removing instances of a deprecated template.
This is a table of bots that currently exist on this site.

Bot Operator Framework Purpose Status
VDCBot Valve Valve N/A A range of automated cleanup assignments.

Active

(intermittently)
CrematorBot PabloS N/A Deleting pages

Active

(intermittently?)
DiscussionRepairBot ? N/A Remove instances of Template:Message.

Inactive

, the bot has served its purpose.
Nesciuse Nescius N/A Updating language templates

Active

PIPEbot Mailmanmicky Pywikibot Pywikibot N/A

Inactive

, account has been deleted
WisdomBot Wisdurm DotNetWikiBot DotNetWikiBot Updating templates among other things.

Inactive

AveaBot Noug4at Wikipedia icon AutoWikiBrowser
Pywikibot Pywikibot
Updating deprecated templates, optimizing pages, categorization & adding templates. See more at it's user page.

Inactive

PeeBot Pee DotNetWikiBot DotNetWikiBot Fixing redirects, updating templates, helping with template creation and possibly more.

Active

(intermittently)
MenialTasksBot CHILLMODEA N/A Any task deemed not-important, but still too tedious for a human.

Active

See also

External links

References

References