olagood / drastikbot_modules Goto Github PK
View Code? Open in Web Editor NEWModules for drastikbot
Modules for drastikbot
Usage: .yt/.ht [VIDEO_TITLE]
Potential Filename: youtube.py
The function get_url() was changed to only detect urls with an http or an https scheme. This means that the following line is no longer needed:
Line 98 in d9cd4c5
This is because it is no longer possible to unintentionally parse incomplete IP addresses, since the scheme will be required. As a result removal (or commenting) of the line above is suggested.
Features
The database could be: network wide or per channel.
The function remove_formatting() contains two regular expressions. I suggest replacing them with python's string manipulation functions and removing the re module import completely.
The change should be done only if string manipulation is faster than using the regular expressions.
Usage: .remind <nick|channel|me> <every|at|in> <time expr> <reminder text>
The module should be able to provide specific functionality for websites by checking their domain name and matching it to website specific functions using a hash table. There should be a generic function (perhaps the currently used one) that will be called for websites that do not exist in the hash table mentioned previously and will also be used by the website specific funcrions.
This mechanism is mainly a solution to supporting websites that do not work with the currently used user-agent such as Ebay and Amazon. The idea is to have a handling function for every website that does not work properly with the default function. While this solution is not necessarily a good one (imagine having specialized treatment for every website out there), it is a good solution for commonly used websites and could be used to provide additional information about a url (such as the current bid of an ebay auction, the length of a youtube video etc.), thus improving the user experience and overall usefulness of the module.
In the case that this design is actually implemented the current url blacklist mechanism, which is used to skip urls that are handled by other modules, should be removed and every url related functionality (see youtube.py) should only be performed by the url module.
The website that provides the short url functionality offered by the short_url() function is no longer available. It is suggested to remove the function and any other related code.
Replacing it with another short_url service is not encouraged since it could be a possible privacy risk for the users of the bot. This was the main reason that a custom url service was used in the first place.
.grid nick blacklist add
.grid nick blacklist rm
The command should:
The title tag should be easy to parse without the use of an external library. This should improve performance slightly (the difference might be so small that it probably isn't worth mentioning) and also get rid of bs4 as a dependency.
DO NOT WORK ON THIS ISSUE. ANY PULL REQUESTS WON'T probably BE ACCEPTED.
Module Filename: backup.py
Automatically enable/disable blacklisted modules when the bot that already provides the module's functionality quits, parts/joins.
It should provide an interface for configuration to authenticated (using grid.py) owners.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.