I need to make a plugin

Since I am a newbie, I need a lot of help, especially because I installed the Hello-World plugin as a model for making my own, but it never gave me a message in any circumstance (adding, editing, deleting an item), as expected and explained in GitHub.
I do need something to aid me in my research, but since what should be a basis for a more complex plugin does not work, I feel lost.
I use a desktop Zotero 5.0.88 on Windows 7 64-bit, with adm credentials and all.
  • What do you have a problem with? Just getting a plugin set up? Using the Zotero internal API? Using external libraries?
  • Hi emilianoeheyns, thanks for answering.
    The first issue is to make that Hello_World thing responsive. It was supposed to return a message, right? If I could see it working, I would be able to figure out what I need to do, but somehow it's dead. Is it going to have any sort of update, bugfix?
  • "responsive" in what sense?

    I don't use the Hello World scaffold, I have my own scaffold generator but that will likely bring in more complexity (typescript, npm modules) than you need. I know a bit about general plugin development but not about the Hello World scaffold in particular.
  • Hi, "responsive" in the sense it says in the annotations inside the code, for example:
    Zotero.HelloWorldZotero = {
    DB: null,

    init: function () {
    // Connect to (and create, if necessary) helloworld.sqlite in the Zotero directory
    this.DB = new Zotero.DBConnection('helloworld');

    if (!this.DB.tableExists('changes')) {
    this.DB.query("CREATE TABLE changes (num INT)");
    this.DB.query("INSERT INTO changes VALUES (0)");
    }
    (etc)
    This example is quite old, Mr. Dan Stillman made it in 2016.
    =======
    What I need is merely a plugin that creates/opens a database and shows a window where I can insert/modify data besides the ones existent in Zotero. Then, it has to offer a way for me to make a query using both databases (Zotero's and mine).
    I'm sorry if I don't make myself very clear; English is not my primary language).
  • Don't worry about the English, your English is fine, but you're going to have to create a UI by hand for your plugin; there's no sample code for that. You're going to have to get familiar with the DOM.

    There's a way that I think is easier (XUL) but it's a deprecated technology and you're going to have to rewrite to a DOM user interface when Zotero eventually migrates to Electron.
  • Thank you! I'll try to have some fun learning this... :)
  • nicolesigaud, have you had any success? if so, would you be willing to share what you've learned? I am a newbie as well with the same ambition. Today. I ran into the same problem with the hello world plugin you did, which led me to this discussion...even a skeletal sample plugin (what hello world was supposed to be) would be enormously helpful
  • @jsgoodman What are you looking to do? A good option is to look at other existing Zotero plugins as models.
  • I have looked at a few other existing plugins but even those are too complex for my impoverished technical background. I really am a beginner and have never coded anything resembling a GUI before. Could you suggest a plugin that appears to be the most straightforward?

    Regarding my goal, I would like to automate a couple things when I add a reference to my collection: populate some fields according to a personal convetion, rename the attachment also according to a personal convention, create a symbolic link of the /zotero/storage file in another directory on my computer...among others. I have already written a program to do all these things but I currently have to run it in the "Run Javascript" box every time. When I switched to a linux operating system my "OS.File.unixSymLink()" command stopped working of course and I couldn't patch it. So I have decided to try to do this the right way, which I assume is with a plugin.
  • So you don’t really need a GUI to much of a degree for that. Take a look at DOI Manager. It has an option screen and right click menu item, but mostly runs a script each time an item is added.
  • Perfect. I'll take a look at it. Thank you.
Sign In or Register to comment.