k2tools - General purpose library package [WIP] [SVN]

Release your plugins here!
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

k2tools - General purpose library package [WIP] [SVN]

Postby Omega_K2 » Tue Nov 20, 2012 3:56 pm

k2tools - General purpose library package

Quicklinks

Documentation | SVN Repository | Bug Report Forum | Suggestion Forum

Overview

This is a package of several different general purpose libaries. I deceided to make them public in one large release, as I'll be using many of these in my other scripts, and this makes it easier to keep them update and you'll always have everything you need without extra hassle.
You are welcome to use these in your own scripts too, however, all these libaries are subject to change, so the API may not stay the same thoughout the versions. Especially the misc.py may change rather often.

If you find bugs or have any ideas let me know, and I'll think about including them.

This is what is currently included with k2tools:

auth
Subpackage - more advanced alternative to Source.Python authentification

popup
Subpackage - popups

cmdlib.py
Advanced command library providing many additional featues (also see here)

config.py
Some utility functions to make loading/verifying configobj configs easier

colormsg.py
Support for using ES-style tags to add color to messages

data.py
Some general data variables and functions, such as server ip and current map

keyvalues.py
Parser for Valve's KeyValues format (No SP required!)

langlib.py
Remake of Eventscripts' langlib.py to keep compability of languages files

misc.py
Functions and classes that did not fit into another library

pubcvarlib.py
Small library to mainstream adding public variables (+ resetting of version values) (Port of my Eventscripts pubcvarlib)

smauth.py
Providing sourcemod authentification for the admin flatfiles (no SQL support) (Port of my Eventscripts smauth)

strings.py
Provides some gernal purpose methods for working with strings, such as fill functions. Also has some hug thing.

threadlib.py
Utility methods/classes for threading in SourcePython

threaddb.py
Threaded execution that works with gameservers for DPAPI 2.0 modules. Currently pymysql is supported (auto-reconnect) & tested


Documentation

You can view the documentation here:

https://www.german-slaughterhouse.de/wiki/K2Tools:K2Tools

I'll update this occassionally, but it won't be up-to-date all the time. Refer to the files for the most recent documentation.


Public SVN

All versions can be found at:
https://svn.german-slaughterhouse.de/svn/k2tools/

I'm using a self-singed certificate, so if you open this in your browser, it will bitch about it. You'll have to add an exception if you want to view it online.

See below to find out what package to use.


Latest development version

This version is always the most update, but is not necessarily tested for bug or even working at all. At times I may commit untested, nonworking changes or unfished stuff here

https://svn.german-slaughterhouse.de/svn/k2tools/trunk/

You can also find a revision of the trunk attached to this post:
soon to be added

Latest stable version (coming soon)

This version is usually a release-version, but may also be updated outside of releases. This is generally safe to use.

https://svn.german-slaughterhouse.de/svn...braches/stable


Releases

Releases will put be put here with their accoding version number. These packages are highly unlikely to change.

https://svn.german-slaughterhouse.de/svn/k2tools/tags/<release>


Known Issues

Please always check the header of the files and lines with TODO, generally known issues or missing features.

Despite that:
  • misc.py - TeamColor doesn't really work (as there is no \x07RRGGBB format)
Attachments
k2tools_trunk_r40.zip
(80.46 KiB) Downloaded 449 times
Libraries: k2tools
Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)
Plugins (game-specific): None atm

If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Tue Nov 20, 2012 3:57 pm

Reversed for future use.
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Tue Nov 20, 2012 3:57 pm

Downloads

Development Versions

The attachment k2tools_trunk_r35.zip is no longer available
Attachments
k2tools_trunk_r35.zip
(77.14 KiB) Downloaded 386 times
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Sun Jul 14, 2013 8:23 pm

No idea whether anyone is using this at this point, but I feel like I should note that I've updated a few things (rev 10 to 16):

  • Everything should work with the new SP build now, note that some stuff is still missing in SP (like INetInfo interface or w/e it's called.. network address validation won't work with smauth)
  • mysqlllib replaced by threaddb
  • All methods were changed from CamelCase to underscore_style to match the rewrite of SP and PEP8
  • I added a new libary colormsg.py that can be used to send color messages with tags in them (es style like... #greenThis is green#redThis is red)

You can read full changelog in the SVN if you view the logs (either online or otherwise).
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Tue Aug 06, 2013 10:28 pm

You really shouldn't be using the _libs folder for this. The proper place for 3rd party packages is in the _engines/site-packages/ directory. Only SP's built-in packages should be in the _libs directory.

Satoon
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Wed Aug 07, 2013 12:36 am

satoon101 wrote:You really shouldn't be using the _libs folder for this. The proper place for 3rd party packages is in the _engines/site-packages/ directory. Only SP's built-in packages should be in the _libs directory.

Satoon


I always felt the site-packages directory is better suited for gerneral-purpose python packages. I wouldn't want people under the impression this works outside of source-python. Simiarly, this doesn't require to be loaded in a traditional sense, so normal plugin-folder might work, but is imho a nogo too. How about a custom lib folder for sp-specific libaries? (like _customlibs oder _userlibs - or think about SM, they also kinda allow stock plugins/extensions in the same)

If you really want I can just move it in the next rev anyway, it's just a matter of search and replace anway
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Wed Aug 07, 2013 2:06 am

I will think about a custom lib folder. That sounds like an interesting idea worth considering. I will let you know.

Thanks,
Satoon
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Thu Sep 12, 2013 3:04 pm

Updated for latest SP, untested though =P

Use Rev <25 for the HG Source.Python and latest for the latest GIT Source.Python.

I'll attach a zip from the SVN later when I tested some things :P
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Sun Sep 29, 2013 3:24 am

I've added a popup library to k2tools, which supports rather complex creation of popups.

See the wiki page or script files for more info:

https://svn.german-slaughterhouse.de/svn/k2tools/trunk/addons/source-python/packages/custom/k2tools/popup/
https://www.german-slaughterhouse.de/wiki/K2Tools:Popup
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Sun Feb 09, 2014 9:19 pm

Updated for latest revision of Source Python (development), use Rev 40 or the zip I attached to the original post.
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython

Return to “Plugin Releases”

Who is online

Users browsing this forum: No registered users and 23 guests