I made a script to drop my sourcepawn scripting (.sp) files onto and have it put a list of CVars, player cmds, and admin cmds into the clipboard in a nice clean format. Simply drag/drop the file onto cvar_cmds_toclipboard.vbs and the output will be in your clipboard.
An alternate script (cvar_cmds_htmltoclipboard.vbs) makes the same list, but has the output put into spoilers for a web page. The spoiler I use have the following CSS:
CSS
PHP Code:
<style type="text/css">
.spoilerbutton {display:block;margin:5px 0;overflow:hidden;}
.spoiler {overflow:hidden;width:auto;}
.spoiler > div {-webkit-transition: all 0.2s ease;-moz-transition: margin 0.2s ease;-o-transition: all 0.2s ease;transition: margin 0.2s ease;}
.spoilerbutton[value="Show"] + .spoiler > div {margin-top:-100%;}
.spoilerbutton[value="Hide"] + .spoiler {padding:5px;}
</style>
And utilize the following javascript:
Javascript
PHP Code:
function showSpoiler(obj)
{
var inner = obj.parentNode.getElementsByTagName("div")[0];
if (inner.style.display == "none")
{
inner.style.display = "";
}
else
{
inner.style.display = "none";
}
}
Here is an example output from a test file I made put through both scripts:
Examples
Example Output from cvar_cmds_toclipboard.vbs
PHP Code:
//CVars:
some_string_cvar - Typical string CVar description without escaped quotes in it.
some_string_cvar - Typical string CVar description with "escaped quotes" in it.
some_string_cvar - Typical string CVar description without escaped quotes in it and no flags/bounds.
some_string_cvar - Typical string CVar description with "escaped quotes" in it and no flags/bounds
some_string_cvar_nodescr - [No Description Provided]
some_val_cvar - Typical CVar description without escaped quotes in it.
some_val_cvar - Typical CVar description with "escaped quotes" in it.
some_val_cvar - Typical CVar description without escaped quotes in it and no flags/bounds.
some_val_cvar - Typical CVar description with "escaped quotes" in it and no flags/bounds.
some_val_cvar_nodescr - [No Description Provided]
some_val_cvar - Typical CVar description without escaped quotes in it and value as constant.
some_val_cvar - Typical CVar description with "escaped quotes" in it and value as constant.
some_val_cvar - Typical CVar description without escaped quotes in it, no flags/bounds, and value as constant.
some_val_cvar - Typical CVar description with "escaped quotes" in it, no flags/bounds, and value as constant.
some_val_cvar_nodescr descr_valconst - [No Description Provided]
some_val_cvar_with_descr_rest_descrconst - [No Description Provided]
some_val_cvar_with_descr_descrconst - [No Description Provided]
some_val_cvar_with_no descr_descrconst - [No Description Provided]
some_val_cvar_with_valconst_descrconst_rest - [No Description Provided]
some_val_cvar_with_valconst_descrconst - [No Description Provided]
some_val_cvar_with_valconst - [No Description Provided]
//Player Cmds:
sm_some_plyr_cmd - Typical CVar description without escaped quotes in it.
sm_some_plyr_cmd - Typical CVar description with "escaped quotes" in it.
//Admin Cmds:
sm_some_adm_cmd - Typical CVar description without escaped quotes in it.
sm_some_adm_cmd - Typical CVar description with "escaped quotes" in it.
Example Output from cvar_cmds_htmltoclipboard.vbs
PHP Code:
<div class="spoiler">
<input type="button" onclick="showSpoiler(this);" value="CVars" />
<div class="inner" style="display:none;">
<ul>
<li>some_string_cvar - Typical string CVar description without escaped quotes in it.</li>
<li>some_string_cvar - Typical string CVar description with "escaped quotes" in it.</li>
<li>some_string_cvar - Typical string CVar description without escaped quotes in it and no flags/bounds.</li>
<li>some_string_cvar - Typical string CVar description with "escaped quotes" in it and no flags/bounds</li>
<li>some_string_cvar_nodescr - [No Description Provided]</li>
<li>some_val_cvar - Typical CVar description without escaped quotes in it.</li>
<li>some_val_cvar - Typical CVar description with "escaped quotes" in it.</li>
<li>some_val_cvar - Typical CVar description without escaped quotes in it and no flags/bounds.</li>
<li>some_val_cvar - Typical CVar description with "escaped quotes" in it and no flags/bounds.</li>
<li>some_val_cvar_nodescr - [No Description Provided]</li>
<li>some_val_cvar - Typical CVar description without escaped quotes in it and value as constant.</li>
<li>some_val_cvar - Typical CVar description with "escaped quotes" in it and value as constant.</li>
<li>some_val_cvar - Typical CVar description without escaped quotes in it, no flags/bounds, and value as constant.</li>
<li>some_val_cvar - Typical CVar description with "escaped quotes" in it, no flags/bounds, and value as constant.</li>
<li>some_val_cvar_nodescr descr_valconst - [No Description Provided]</li>
<li>some_val_cvar_with_descr_rest_descrconst - [No Description Provided]</li>
<li>some_val_cvar_with_descr_descrconst - [No Description Provided]</li>
<li>some_val_cvar_with_no descr_descrconst - [No Description Provided]</li>
<li>some_val_cvar_with_valconst_descrconst_rest - [No Description Provided]</li>
<li>some_val_cvar_with_valconst_descrconst - [No Description Provided]</li>
<li>some_val_cvar_with_valconst - [No Description Provided]</li>
</ul>
</div>
</div>
<div class="spoiler">
<input type="button" onclick="showSpoiler(this);" value="Player Cmds" />
<div class="inner" style="display:none;">
<ul>
<li>sm_some_plyr_cmd - Typical CVar description without escaped quotes in it.</li>
<li>sm_some_plyr_cmd - Typical CVar description with "escaped quotes" in it.</li>
</ul>
</div>
</div>
<div class="spoiler">
<input type="button" onclick="showSpoiler(this);" value="Admin Cmds" />
<div class="inner" style="display:none;">
<ul>
<li>sm_some_adm_cmd - Typical CVar description without escaped quotes in it.</li>
<li>sm_some_adm_cmd - Typical CVar description with "escaped quotes" in it.</li>
</ul>
</div>
</div>
The HTML will roughly translate to the following:
Example HTML Formatting
CVars
some_string_cvar - Typical string CVar description without escaped quotes in it.
some_string_cvar - Typical string CVar description with "escaped quotes" in it.
some_string_cvar - Typical string CVar description without escaped quotes in it and no flags/bounds.
some_string_cvar - Typical string CVar description with "escaped quotes" in it and no flags/bounds
[*]sm_some_plyr_cmd - Typical CVar description without escaped quotes in it.
[*]sm_some_plyr_cmd - Typical CVar description with "escaped quotes" in it.[/LIST]
Admin Cmds
sm_some_adm_cmd - Typical CVar description without escaped quotes in it.
sm_some_adm_cmd - Typical CVar description with "escaped quotes" in it.
The scripts check if something is commented out, but since it was developed for my coding style, it might need adaptations for some others. The scripts do support AutoExecConfig include as well. They were made for my convenience, but I thought I'd post em here for others to make use of if they want.
EDIT: Added Github script (cvar_cmds_githubtoclipboard.vbs) as well, providing github spoilers and formatting. For an example of the output, view the readme for my clan tags plugin: https://github.com/ThatOneHomelessGu...ster/README.md