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

[Feature Request] Add option to query remote server for publication list #211

Open
Juma7C9 opened this issue Dec 11, 2022 · 4 comments
Open
Labels
enhancement New feature or request idea An idea for a future enhancement

Comments

@Juma7C9
Copy link

Juma7C9 commented Dec 11, 2022

Hi,

As there are some services (either public or internal to some institutions) that allow to download a set of entries for an arbitrary bibliographical query (e.g. in BibTex format), it would be great if it would be possible to to specify a query (e.g. inside a shortcode), and then show the entries contained in the returned file (possibly caching or adding them to the database for future use), instead of showing the content of a static database.

Unfortunately I'm not familiar with the internals of WP plugins, so I have no idea how difficult could it be, but I would appreciate any pointers so I could help with adding this functionality myself.

Thank you!

@fabricebg
Copy link
Contributor

Hi,

The latest version of this plugin (9.0.0), available in this repository, features an Auto-publish page, which periodically polls a given URL (pointing to a dynamic bibtex, for instance), and populates the database with the publications found at this URL. It may not be exactly what you are looking for, but it is a starting point. I suggest you download and install the latest version 9.0.0 and experiment.

Best.

@winkm89
Copy link
Owner

winkm89 commented Dec 12, 2022

Hi,

The core of the plugin is that you have a database and not a single publication file or a couple of files, which make it easier to use SQL based filters or searches. This is also faster as rendering a hole text file for every view. From my point of view it makes not really sense to add a direct parsing option which is also a lot of work for at the end a not so different from the existing import feature. If somebody wants to make it, your welcome. :) But It's not on my priority list.

As Fabrice noted maybe the new auto-publishing feature is something for you.

Note: I've added a separate release for v9 beta:
https://github.com/winkm89/teachPress/releases/tag/9.0.0-beta

@winkm89 winkm89 added enhancement New feature or request idea An idea for a future enhancement labels Dec 12, 2022
@Juma7C9
Copy link
Author

Juma7C9 commented Dec 12, 2022

This is great, and very close to what I'm looking for!

I updated the plugin deactivating it, replacing the relative files in the WP directory, and then reactivating it again (to avoid deleting and manually reinstalling it via the interface, as doing so the plugin data would be lost).

The only issue that now I have is that while using a somewhat unrelated plugin WordPress throws an error, complaining that the course module cannot be found:

[12-Dec-2022 21:48:53 UTC] PHP Fatal error:  Uncaught Error: Class 'TP_Courses' not found in /var/www/clients/client8/web499/web/wp-content/plugins/teachpress/core/general.php:378
Stack trace:
#0 /var/www/clients/client8/web499/web/wp-includes/class-wp-hook.php(287): tp_write_data_for_tinymce()
#1 /var/www/clients/client8/web499/web/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()
#2 /var/www/clients/client8/web499/web/wp-includes/plugin.php(478): WP_Hook->do_action()
#3 /var/www/clients/client8/web499/web/wp-admin/admin-header.php(149): do_action()
#4 /var/www/clients/client8/web499/web/wp-admin/edit-form-advanced.php(419): require_once('/var/www/client...')
#5 /var/www/clients/client8/web499/web/wp-admin/post.php(206): require('/var/www/client...')
#6 {main}
  thrown in /var/www/clients/client8/web499/web/wp-content/plugins/teachpress/core/general.php on line 378

I may open another issue, if that isn't something easy to solve.

Thank you!

winkm89 added a commit that referenced this issue Dec 12, 2022
@Juma7C9
Copy link
Author

Juma7C9 commented Dec 13, 2022

Thank you, the latest commit seems to have fixed that.

As this feature does basically what I need, I'll need to test it for a bit, and if everything works correctly I think this issue may be closed.

The only issue I see by now is that the auto-imported publications do not appear among the list of imports; I do not know if this is an intended behaviour, but it may be useful to have them appear there, so to be able to apply the same actions (e.g. bulk delete in case of a misconfigured url) that can be applied to manually imported ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request idea An idea for a future enhancement
Projects
None yet
Development

No branches or pull requests

3 participants