Conversation
Update Readme, fix exec bit on python script, refine gitignore
Not needed as fetch is included in nodejs. Updated the package.json and tests. Ensure the fetch runs in an isolated vm, where we import the shims. SHould only be relevant for the tests
Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
Bumps [translators/zotero](https://github.com/zotero/translators) from `c7551c1` to `b91223a`. - [Commits](zotero/translators@c7551c1...b91223a) --- updated-dependencies: - dependency-name: translators/zotero dependency-version: b91223a2972b62bc2f22b0e7c6b16207ce803c2e dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Replace jabref icon and descriptions
Co-authored-by: Tobias Diez <code@tobiasdiez.com> Co-authored-by: systemoperator <3658393+systemoperator@users.noreply.github.com> Co-authored-by: John Moore <39682+jakkarth@users.noreply.github.com> Co-authored-by: Christoph <siedlerkiller@gmail.com>
This helps when running the tests locally, to avoid pulling from the various websites, and speeding up the process. The tests run in parallel in vm environments.
CI Feedback 🧐(Feedback updated until commit 5093e2d)A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
|
Supersed by JabRef/JabRef-Browser-Extension-fresh#20 |
User description
This ports the rewrite of @LyzardKing to this repo.
PR Type
Enhancement
Description
Complete architectural rewrite from Zotero connector infrastructure to lightweight translator execution engine
New core modules:
translatorRunner.jsexecutes Zotero-style translators with legacy VM support,zoteroShims.jsprovides compatibility layer,ris.jsconverts RIS to BibTeX formatSimplified background service worker (276→76 lines) with offscreen document delegation for Chrome environments
New popup UI (288 lines) with automatic translator detection via regex matching, BibTeX textarea, and HTTP POST integration to JabRef
Manifest V2→V3 migration (142→37 lines) with service worker, offscreen permissions, and simplified architecture
Removed 1600+ lines of complex Zotero connector infrastructure and external dependencies
Added Python automation script for importing and patching Zotero translators as git submodule
Comprehensive documentation updates, test runner for translator validation, and build automation via Makefile
Simplified dependencies: removed gulp, babel, browserify; kept only jsdom, eslint, web-ext
New GitHub Actions workflows for linting and testing with submodule support
Diagram Walkthrough
File Walkthrough
11 files
translatorRunner.js
Core translator execution engine with legacy supportsources/translatorRunner.js
on HTML content
fallback for legacy translators
detect()ordetectWeb()and execution viatranslate()ordoWeb()meta tags
zoteroShims.js
Shared Zotero compatibility shims and helperssources/zoteroShims.js
createZU()helper with xpath, text, requestDocument, andauthor cleaning utilities
createZoteroShim()for minimal Zotero environment withloadTranslator()supportbibtexToItem()to parse BibTeX strings into Zotero-like itemobjects
contexts
background.js
Simplified background service worker with offscreen delegationbackground.js
for
runTranslatorrequests(Chrome), otherwise runs translator in background
runTranslatorOnHtml()with paralleltranslator attempts
offscreenResultmessagepopup.js
Popup UI with translator matching and JabRef HTTP integrationpopup.js
execution
regex patterns
runTranslatormessagesto background
offscreenResultmessages and populates BibTeX textarealogging
ris.js
RIS to BibTeX format convertersources/ris.js
parseRisToBib()function to convert RIS format toBibTeX
journal, year, etc.)
offscreen.js
Offscreen document translator runner for Chromeoffscreen.js
runTranslatormessages and fetches page HTMLoffscreenResultmessage to background/popupsettings.js
Settings page for JabRef HTTP port configurationsettings.js
chrome.storage.localwith default 23119popup.css
Popup UI stylesheetpopup.css
and log box appearance
styling
popup.html
Popup UI HTML templatepopup.html
logs section
popup.jsandpopup.cssfor functionality and stylingsettings.html
Settings page HTML templatesettings.html
save/cancel buttons
settings.jsfor event handlingoffscreen.html
Offscreen document HTML templateoffscreen.html
offscreen.jsas ES module4 files
example_bib_page.html
Example page for testing BibTeX detectionexample_bib_page.html
README.md
Comprehensive documentation update for new architectureREADME.md
POST to JabRef
setup
script execution
troubleshooting guide
CONTRIBUTING.md
Contributing guidelinesCONTRIBUTING.md
commit, PR)
sample.bib
Sample BibTeX entry for testingsample.bib
issue, pages, and DOI
1 files
test.js
Node.js test runner for translator validationtest.js
cases
testCasesvariable from sourcerunTranslatorOnHtml()on each test case and logs results to fileand console
translators/zotero directory
8 files
import_and_patch_translators.py
Translator import and patching automation scriptscripts/import_and_patch_translators.py
submodule
translators/manifest.jsonby extracting translator metadatafrom headers
AGENTS.md)
manifest.json
Manifest V3 migration with simplified architecturemanifest.json
external scripts
and offscreen permissions
offscreenpermission for Chrome translator executiondependabot.yml
Dependabot configuration with submodule support.github/dependabot.yml
gitsubmodulepackage ecosystem for automatic translatorsubmodule updates
lint.yml
Updated lint workflow for new tooling.github/workflows/lint.yml
test.yaml
New test workflow for CI/CD pipeline.github/workflows/test.yaml
import_and_patch_translators.pyscript before testseslint.config.mjs
ESLint configuration for code qualityeslint.config.mjs
Makefile
Build automation with MakefileMakefile
packages
.gitmodules
Git submodule configuration for translators.gitmodules
translators/zotero2 files
package.json
Simplified package.json with minimal dependenciespackage.json
devDependencies
zotero
Zotero translators submoduletranslators/zotero
101 files