Linux 软件免费装

WP Nasa/ADS Query Importer

开发者 mbissinger
giodimilia
更新时间 2023年6月27日 18:16
PHP版本: 7.0 及以上
WordPress版本: 5.4
版权: GPLv2 or later
版权网址: 版权信息

标签

ads article astronomy NASA

下载

1.0.0 1.0.1 1.0.3

详情介绍:

The SAO/NASA Astrophysics Data System (ADS) (NASA ADS) is a digital library portal for researchers in astronomy and physics. Complex literature searches can be performed such that compiling a list of relevant papers for a specific topic can be done easily. This plugin provides an interface to the NASA ADS API in order to include lists of records in your posts using shortcodes. With this plugin you are able to Shortcodes The shortcode wp_nasaads_query_importer can be used to query the NASA ADS and output the returned list of records. It can be inserted into any post with or without providing enclosed content: [wp_nasaads_query_importer attributes] or [wp_nasaads_query_importer attributes] format [/wp_nasaads_query_importer] Here, attributes are the shortcode's attributes and it is mandatory to either provide Please note that for all of the following query attributes the NASA ADS search syntax is applied, i.e., the shortcode's attribute values are submitted unaltered to the API (with the exception of author and title as described below). This enables more complex searches, for instance when combined with logical operators like AND, OR, or NOT (read the search syntax for details). Showing the records within an ADS user library is supported by the For more complex ADS searches, which are not supported by using the attributes of the shortcode, you may specify the Format How the list of records is formatted and inserted into your post can be defined in the plugin option "Content template" for all shortcodes. In case a shortcode is inserted into a post with enclosed content, i.e., [wp_nasaads_query_importer] ... [/wp_nasaads_query_importer] then the content within the shortcode tags is used as the template and, thus, overrides the plugin's global option. The template is applied to each record in the list and may contain HTML entities to style the output. The data of the record is inserted by the following placeholders: %author, %affil, %title, %year, %month, %bibstem, %pub, %page, %volume, and %adsurl. See the NASA ADS search syntax for the definition of the record's fields with the exception of %year and %month which are derived from date, and %adsurl which is derived from bibcode. Ultimate full control over the output and field records can be gained by new WordPress filters added by the plugin (see the WordPress filter section below). WordPress filter This plugins adds a few filters to WordPress, which can be used by third party plugins to further control the output and fetched record fields. apply_filters( 'wp_nasaads_query_importer-record_mapping', array $mapping ) Defines which record fields are fetched from NASA ADS and on which placeholders they are mapped. The keys of the associative array $mapping are the placeholder names (without the leading %) and their values the API fields names. The default definition can be found in the source code. (Source code) apply_filters( 'wp_nasaads_query_importer-API_value', mixed $value, string $field ) Filters the $value of a fetched API $field before it is inserted into the record's data. (Source code) apply_filters( 'nasa_das_query-format_[placeholder]', mixed $current_value, mixed $original_value, array $atts ) The final value returned by this filter will be the replacement for the placeholder (without the leading %). The $original_value is that returned by the NASA ADS API while $current_value is the value already modified by filter functions of higher priority. The shortcode attributes are passed as the associative array $atts. See the source code of the author filter for an example. (Source code)

安装:

  1. Get a copy of the plugin by one of the following options:
  2. from the plugin manager in your WordPress admin dashboard search for "WP Nasa/ADS Query Importer" and hit the "Install now" button.
  3. download the ZIP-file from http://wordpress.org/extend/plugins/wp-nasaads-query-importer/ and extract its content into your Wordpress plugin folder located at /wp-content/plugins/.
  4. clone the GIT repository at https://github.com/adsabs/wp-nasaads-query-importer/ into your WordPress plugin folder located at /wp-content/plugins/ and checkout the master branch.
  5. Activate the plugin using the plugin manager of your WordPress admin dashboard.
  6. Follow the Settings link in the plugin manager or navigate to Settings -> WP Nasa/ADS Query Importer in your admin dashboard. Then insert your NASA ADS API access token into the Token field. If you do not have a personalized token yet read the Requirements section above. You are then ready to insert the plugin's shortcodes into any of your posts.

常见问题:

I do not want to create an account at NASA ADS. How can I still use the plugin?

Unfortunately, there is no way to query the NASA ADS API without providing a token. Since a token is personalized to an account at NASA ADS and they recommend to "keep your API key secret to protect it from abuse".

Is my token kept secret by the WP Nasa/ADS Query Importer plugin?

Don't worry. This plugin does not distribute your token any further! It will be used only for each query defined by the shortcodes in your blog! In doubts checkout the source code. Note, however, that your token is saved unencrypted as a plugin option in the database attached to your WordPress website. If your database or WordPress blog gets hacked then your token might get stolen. The token cannot be saved encrypted since the encryption method could be looked up in the source code easily. Thus, make sure to have the latest versions of WordPress and of database software installed in order to close any security issues! In case of a security problem you can simply generate a new token in your NASA ADS account settings. In this case your old token can no longer be used.

Can I still use the ads_query_url shortcode parameter from old versions of the plugin?

No, unfortunately this code is not backward compatible with version 0.3 or older since it has migrated to the more modern NASA ADS API.

Can you implement a feature I'd like to have?

That depends. Create an issue at GitHub with your requested feature and the developers will investigate whether the feature is of general interest (and there is a developer with same spare time to implement it).

I think I have discovered a bug!

In case you have discovered a bug please create an issue at GitHub.

Can I contribute to the plugin?

Sure, thanks! Simply fork the GIT repository from GitHub and create a pull request of your feature branch once your code works.

更新日志:

1.0.3 1.0.2 1.0.1 1.0 0.3 0.2 0.1