Juris-M / zotero-odf-scan-plugin

RTF/ODF-Scan for Zotero add-on
https://zotero-odf-scan.github.io/zotero-odf-scan/
Other
87 stars 15 forks source link

basics for build setup #18

Closed retorquere closed 5 years ago

retorquere commented 5 years ago

(plus some general cleanup of tabs)

retorquere commented 5 years ago

basics for a build setup. npm version patch can be used to manage versions.

adam3smith commented 5 years ago

yeah, this is great, thanks so much! Also like that this stops using the gh-pages branch.

retorquere commented 5 years ago

Cool. I don't really know what all the rest in jm-sh does but I think these two scripts bring us mostly there already. Technically possible to replace the python script with a node script, but async is an unnecesary burden for shell scripting. The scripts in package.json depend on github-release -- again technically possible to replace with python code, but this is quick and easy. Python code could do more stringent tests like bailing if a release already exists (github-release does not bail on this but will bail on re-upload of the asset)

retorquere commented 5 years ago

(the version in package.json is bogus, I was using it for testing, should be replaced with an actual version of course)

adam3smith commented 5 years ago

this can absolutely be lightweight -- we're not not planning on BBT-level release frequencies here. And I at least much prefer this in python to npm

retorquere commented 5 years ago

There are only two reasons why npm is involved right now:

  1. npm version patch takes care of version bumping and checks beforehand all files are checked in.
  2. The version number needs to live somewhere. If it were all python I'd probably have settled on making install.rdf authoritative, but see 1.
adam3smith commented 5 years ago

thanks for doing this -- I don't have a suitable testing set-up on my work machine, so test&merge will happen tonight or over the weekend.

retorquere commented 5 years ago

In that case let me push a few more commits to make it a fully working setup.

retorquere commented 5 years ago

Should work now

retorquere commented 5 years ago

There was more than just the promise, the observer message that the scanner was waiting for is no longer being fired, and it's no longer necessary to listen for it even if it were in Z5. The current state installs the translator successfully.

adam3smith commented 5 years ago

I checked out your branch, build using the script with the --beta flag (works great), the .xpi looks good as far as I can tell, installs and installs the translator, but then I get:

XML Parsing Error: undefined entity Location: chrome://rtf-odf-scan-for-zotero/content/rtfScan.xul Line Number 8, Column 1:<wizard xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"

I poked around a bit, but the error doesn't make any sense to me, especially since you didn't touch that script. Any idea?

retorquere commented 5 years ago

The DTDs were missing because python's glob.glob isn't recursive by default even if you specify **. Fixed now.

adam3smith commented 5 years ago

Great, thanks!

retorquere commented 5 years ago

jm-sh and build.sh can probably be removed now, but I didn't want to delete stuff without knowing if there's information contained in those scripts worth retaining.