neuropoly / neuro.polymtl.ca

NeuroPoly's Website
https://neuro.polymtl.ca
3 stars 5 forks source link

Automatically update publication list #61

Closed alexfoias closed 4 months ago

alexfoias commented 2 years ago
jcohenadad commented 2 years ago

@alexfoias i think we already have a related issue on another repository— can you please cross reference

alexfoias commented 2 years ago

Yes, I remembered the same thing. A similar issue is https://github.com/spinalcordtoolbox/spinalcordtoolbox/issues/3169

kousu commented 2 years ago

I've been tracking this in https://github.com/jcohenadad/bibeasy/issues/16.

I think solving this with bibeasy will be, well, easy.

jcohenadad commented 1 year ago

@kousu there is already a list of publications for me and Nikola. Benjamin and Eva can create their own ones (or maybe they already have) so the idea (I think) would be to run a script that runs bibeasy on our four google sheets, remove duplicates, and update the publication page. I suppose we can have it run during compilation on RTD?

kousu commented 1 year ago

I would very much like to have it run during site compilation. bibeasy needs to be taught either how to output markdown directly, or output .bib (that was my idea in https://github.com/jcohenadad/bibeasy/issues/16) which we then feed into a .bib -> markdown plugin, or a sphinx .bib plugin. My guess is that .bib will be more future-proof.

jcohenadad commented 1 year ago

Right, I forgot about the .bib solution, which does seem like an elegant solution indeed. I'm just afraid we will run into limitations by not being able to customize the format of the output citations. For example, we might want to use bold characters for journal names, add hyperlink to the article, underline student's name, add custom fields like 'best poster award' or things like that. Also, I'm anticipating that complying to .bib will require some headaches because some fields are not properly describing the structure of a bib citation (eg: column 'volume:page'), whereas to port it into a md page, we don't need to parse this. What do you think?

kousu commented 1 year ago

I think.... we should implement something and just use it and get it working, because it's not something we ever intend to build anything on. So probably straight to markdown.

namgo commented 1 year ago

I've been working on automating the bibeasy->neuro.polymtl.ca system, initially locally with podman. Now that it's working locally I'll be moving things into github actions.

Only modification that I'll need to make in the website's repo is to add the generated filenames to the tocfile list.

I will create a public repo now and move only the latest snapshot of bibeasy to it (avoiding leaky keys).

Julien made an excellent point that the bibeasy import gh-action should be running at a set interval (weekly) rather than on every commit. I don't know how to do this offhand, but it seems very doable so I'll look into it.

namgo commented 1 year ago

https://github.com/namgo/neuro.polymtl.ca I think the gh-action to generate pages with bibeasy is at a decent spot now. Only thing left is to switch it to a weekly job I believe.

namgo commented 1 year ago

Update on the weekly job: unless we cache older gen-{}.md pages in the main repo, we might be best off regenerating the markdown on push:

I've also set up a weekly job, in case there are updates to publications and nobody commits to the website during that week.

jcohenadad commented 1 year ago

This is awesome, @namgo . Where can we see your development? Do you have a working branch or something?

namgo commented 1 year ago

Absolutely, so under https://github.com/namgo/neuro.polymtl.ca I have a added a weekly.yml and modified the publish.yml. https://github.com/namgo/neuro.polymtl.ca/tree/master/.github/workflows

Prior to merging it back, I'll need to re-add the cname definition in both files.

I guess I informally requested a review but didn't specify what I'd like reviewed, whoops! The changes shouldn't break anything now, but I just want to confirm that while the website is important, needing to temporarily revert it if my changes do in fact cause a problem, is not itself a huge cause for concern?

namgo commented 1 year ago

http://test-neuro.nzm.ca is available as an alias to my fork's github.io if anyone wants to check it out in the next few days.

2023-06-01-123424_1460x1041_scrot

I just want to point out the duplicate/redundant titles under data, these are generated and I don't know what to name them. Should we get rid of any of the existing files?

jcohenadad commented 1 year ago

This is great @namgo !

Just to clarify: was "Journal articles" automatically generated?

Also, you can get rid of "Articles", "Conference Articles" and "Combined" as these are already included in "Journal articles".

namgo commented 1 year ago

Journal articles, Book Chapters, Theses, Public News, Data were there already.

Articles, Conference Articles, Combined, are generated.

I haven't integrated the javascript yet.

jcohenadad commented 1 year ago

i see-- so the "combined" would be the one to use, right?

I haven't integrated the javascript yet.

what javascript needs to be integrated? this?

<div id="filter-box">
</div>
namgo commented 1 year ago

/_static/js/custom.js would put its contents into that div, I believe. That's the javascript I was referring to, yeah.

Oh! I guess gen-combined.md is the only generated file that's needed here. I will: 1) place the filter system into gen-combined.md 2) rename gen-combined.md to articles.md 3) remove gen-articles.md gen-conf-articles.md 4) remove journal_articles.md

https://namgo.github.io/neuro.polymtl.ca/ is the current link (cname setting got overwritten).

namgo commented 1 year ago

I completely misread the original journal_articles.md and the fact that we were including the generated dataset already within that. I've modified journal_articles to include the gen-combined.md - no sense removing it, my mistake.

https://namgo.github.io/neuro.polymtl.ca/publications/journal_articles.html

It basically works now, I'll just remove the modification I made to bibeasy which document title names to generated files.

2023-06-06-132409_994x825_scrot

jcohenadad commented 4 months ago

Fixed in #90