#1
|
||||
|
||||
Tutorials for writing new plugins
Hi
I wanted to try my hand at contributing plugins, but since I'm just getting started and any recommendations for tutorials on how to write would be priceless. My first attempt failed rather miserably, as I couldn't even ensure that my class was used, much less dumping debug information, configuring the Eclipse project (not just the JAR file) for debugging/inspection at breakpoints or even the location of where a Eclipse-compiled instances log data shows up. Current skeleton for reference: Code:
package jd.plugins.decrypter; import java.util.ArrayList; import org.appwork.utils.logging2.LogSource; import org.jdownloader.logging.LogController; import jd.PluginWrapper; import jd.controlling.ProgressController; import jd.plugins.CryptedLink; import jd.plugins.DecrypterPlugin; import jd.plugins.DownloadLink; import jd.plugins.PluginForDecrypt; @DecrypterPlugin(revision = "$Revision: 35010 $", interfaceVersion = 3, names = { "domain.here" }, urls = { "**External links are only visible to Support Staff** }) public class classNameHere extends PluginForDecrypt { protected final LogSource logger = LogController.CL(); public classNameHere(PluginWrapper wrapper) { super(wrapper); } @Override public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception { ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>(); final String parameter = param.toString().replace("http:", "https:"); final String page = br.getPage(parameter); logger.info("--------------------------------------------------------------"); logger.info("parameter --------------------------------------------------------------"); logger.info(parameter); logger.info("--------------------------------------------------------------"); logger.info("page --------------------------------------------------------------"); logger.info(page); logger.info("--------------------------------------------------------------"); logger.info("--------------------------------------------------------------"); return decryptedLinks; } } Last edited by raztoki; 19.08.2018 at 02:10. |
Thread Tools | |
Display Modes | |
|
|