Libraryless. Click here for Pure Java version (13701L/91K).
abstract sclass DynGazelleBot > DynPrintLogAndEnabled { switchable S gazelleServer = gazelle_server(); switchable S _user; switchable S _botToken; switchable double grabDelay = 0.5; new Gazelle_GrabPostsLoop grabLoop; start { addAll(grabLoop.fields, "type", "creating", "postRefs", "postRefTags", "creatorID", "creatorName", "creatorIsMaster", "title", "bumped", "botInfo"); dm_startThread("Post Grab Loop", r runGrabLoop); } void runGrabLoop { dm_copyFieldsToObject(grabLoop, "_user", "_botToken", "enabled"); grabLoop.delay = grabDelay; grabLoop.server = gazelleServer; grabLoop.verbose = true; grabLoop.onChange(r change); grabLoop.handlePost = post -> enter { handlePost(post); }; grabLoop.run(); } swappable void handlePost(GazellePost post) { } void rescan { grabLoop.reset(); } void enhanceFrame(Container f) { super.enhanceFrame(f); internalFramePopupMenuItem(f, "Rescan all posts", rEnter rescan); } }
Began life as a copy of #1029986
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1029993 |
Snippet name: | DynGazelleBot |
Eternal ID of this version: | #1029993/16 |
Text MD5: | d839edba40c6b2f152c859230d1a3e38 |
Transpilation MD5: | d47e6d99c40da26d05a823b5a1b8729b |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-02-04 10:54:46 |
Source code size: | 1035 bytes / 33 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 332 / 660 |
Version history: | 15 change(s) |
Referenced in: | [show references] |