Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zotero2yaml #72

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Zotero2yaml #72

wants to merge 3 commits into from

Conversation

tomlincr
Copy link
Contributor

Partial fix for #60

Currently needs 2 manual steps
These can be done from anyone's machine (but will need to grant access to the Zotero library

  1. Run Zotero on a local machine with access to https://www.zotero.org/groups/4859963/uclhal-publications and from there use the BetterBiBTex export to CSL YAML tool2.

@docsteveharris I've had a go at automating part 1. of your workflow.

Notes:

  • Would ideally use pandoc docker image:
    • docker:https://pandoc/core:2.19.2 is Alpine based and lacks bash required for using the git-auto-commit-action
    • docker:https://pandoc/core:2.19.2-ubuntu lacks wget/curl for retrieving .bib
    • Can't install missing components in either (may be my lack of familiarity with docker)
  • Current fix is therefore to install pandoc from .deb package when workflow is run, clunky but does work
  • Therefore (and given the frequent changes currently happening) I've left this workflow to be manually triggered

Suggested improvements:

  • Custom dockerfile OR use the official Alpine container and sort out github actions to commit generated .yaml to repo

Questions:

@tomlincr tomlincr added enhancement New feature or request experimental🧪 Experimental - caution before merging labels Nov 21, 2022
@tomlincr tomlincr self-assigned this Nov 21, 2022
@github-actions
Copy link

github-actions bot commented Nov 21, 2022

PR Preview Action v1.2.0
🚀 Deployed preview to https://uclhal.github.io/pr-preview/pr-72/
on branch gh-pages at 2022-11-22 11:16 UTC

@tomlincr
Copy link
Contributor Author

@docsteveharris it seems zotero2quarto.py is run locally?

I'm getting an error trying to run this with either your uclhal_publications_zotero_better_csl.yaml or my pubs.yaml

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 724: character maps to <undefined>

When you get the chance if you could have a go running it with my pubs.yaml?

If that works we could try adding zotero2quarto.py to the end of my github-actions workflow zotero2yaml.yml and that should fix #60

@docsteveharris
Copy link
Contributor

Hi Chris. I've had a look.
I found the following issues

  • It seemed to think there were duplicate entries in the file until I removed the header and footer --- and nocite: "[@*]" lines (1 and 2) and --- at the end.
  • I don't think it likes having the abstract at the first field in the YAML dictionary
  • It didn't like the date being formatted as a string (e.g. 2022-10 and wanted the 'dictionary format')
  issued:
    - year: 2010
      month: 12

And after that it still didn't work. 😬
Sorry.
I didn't do much in the way of checking my YAML specification but you're right, I built this locally, and used the BetterBiBTex export to generate the file. I think doing this from the web interface makes more sense.

@tomlincr
Copy link
Contributor Author

Thanks Steve, will have a think 🤔

@docsteveharris docsteveharris marked this pull request as draft March 30, 2023 06:51
@docsteveharris docsteveharris removed their request for review March 30, 2023 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request experimental🧪 Experimental - caution before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants