前言介紹
- 這款 WordPress 外掛「WP Nasa/ADS Query Importer」是 2011-09-27 上架。
- 目前有 20 個安裝啟用數。
- 上一次更新是 2023-06-27,距離現在已有 677 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.7 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
giodimilia | mbissinger |
外掛標籤
ads | NASA | article | astronomy |
內容簡介
美國太空總署(NASA)和 Smithonian Astrophysical Observatory(SAO)的天體物理數據系統(ADS) 是一個為天文學和物理學研究人員提供數字圖書館門戶的網站。使用該網站可以輕鬆進行複雜的文獻搜索,並編制出特定主題的相關論文列表。該外掛程序提供了一個界面,以便使用簡短代碼在文章中包含列表記錄,並使用NASA ADS API進行查詢。
使用此外掛,您可以:
- 在不學習NASA ADS API的情況下輕鬆包含簡單的ADS查詢。
- 通過提供完整的GET方法URL(請參閱以下的簡碼部分),包含複雜的ADS查詢。
- 在需要時,在簡碼級別自定義返回的記錄列表的格式和顯示的信息。
注意:此代碼與0.3版本及更低版本不兼容。
簡碼
簡碼wp_nasaads_query_importer可用於查詢NASA ADS並輸出返回的記錄列表。它可以插入到任何帶或不帶封閉的內容的帖子中:
[ wp_nasaads_query_importer attributes]
或
[ wp_nasaads_query_importer attributes]格式[/ wp_nasaads_query_importer]
這裡,屬性是簡碼的屬性,必須提供:
- 以下所述的至少一個查詢屬性之一
- 库属性(可與查询属性组合使用),
- 查詢属性。
在包含的內容的情況下,格式用於格式化記錄列表。請參閱以下“格式”部分。
請注意,對於以下所有查詢屬性,都適用NASA ADS搜索語法,即,簡碼的屬性值未經修改地提交到API(除作者和標題之外)。這使得更複雜的搜索成為可能,例如與邏輯運算符AND、OR或NOT相結合時(詳情請閱讀搜索語法)。
作者:搜索特定作者。如果僅給出單個作者,則作者的名稱即該屬性的值將用雙引號括起來提交(例如,Hawking,S.將作為"Hawking,S."提交)。從技術上講,如果字符串不包含AND、OR、雙引號或括號,則將其作為單個作者的值。如果您需要在作者字段中包含雙引號,請在屬性值周圍使用單引號(參見下面的示例)。
aff:搜索包含給定字符串的作者所屬機構。
bibstem:搜索以期刊縮寫形式給出的特定期刊中發表的文章。
year:搜索以 YYYY 格式給出的特定年份發表的文章。可以通過 YYYY-YYYY 或 YYYY TO YYYY 搜索特定時間範圍內的文章。
title:搜索包含給定字符串的文章標題。如上所述,標題將在單個作者屬性中使用雙引號括起來提交。
property:過濾特定屬性(例如refereed)的記錄。請閱讀搜索語法中屬性部分以了解所有可用屬性的列表。
支持顯示位於 ADS用戶庫中的記錄,這由
library属性:用戶庫的ID。
對於更複雜的ADS搜索,可以在簡碼層級上提供完整的GET方法URL。
原文外掛簡介
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
– easily include simple ADS queries without having to learn the NASA ADS API.
– include complex ADS queries by providing the full GET method URL (see the Shortcodes section below).
– customize the format and the displayed information of the returned list of records at the shortcode level if needed.
Note: this code is not backward compatible with version 0.3 and older.
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
– at least one of the query attributes described below,
– the library attribute (and combined optionally with query attributes),
– or the query attribute.
In case of enclosed content the format is used to format the list of the records. See the Format section below.
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).
author: search for certain author(s). In case a single author is given the name of the author, i.e., the attribute’s value will be submitted with surrounding double quotes (e.g., Hawking, S. will be submitted as "Hawking, S."). Technically, a value is considered to be a single author if the string contains no AND, OR, double quotes or parentheses. If you need to include double quotes in the author field, please use single quotes around the attribute’s value (see the examples below).
aff: search for author’s affiliations which contain the given string.
bibstem: search for articles published in specific journal(s) given by the acronym(s) of the journal(s).
year: search for articles published in a certain year given in the format YYYY. Articles within a certain period can be searched by YYYY-YYYY or YYYY TO YYYY.
title: search for articles whose title contains the given string. The title will be submitted with surrounding double quotes under the same conditions as described for the author attribute.
property: filter the records on specific properties like refereed. Read the Properties section of the search syntax for a list of all available properties.
Showing the records within an ADS user library is supported by the
library attribute: the ID of the user-library.
For more complex ADS searches, which are not supported by using the attributes of the shortcode, you may specify the
– query attribute: the GET method’s URL to the API without the base path, i.e., https://api.adsabs.harvard.edu/v1/ is added automatically to the URL.
Finally,the following optional attributes can be used to control the output:
– sort: sort the list of records. The value has to be in the format field+direction where field is the record field name to sort on and direction is either desc or asc. The default is date desc,bibcode desc.
– max_rec: the maximum number of records to show. The default is set to 25.
– max_authors: the maximum number of authors to print, which is set to 3 by default. The remaining number of authors are appended to the printed author list.
– notify_empty_list: overrides the global plugin option “Notify empty list”. Possible values are true or false. The default is true.
– show_num_rec: overrides the global plugin option “Show number of records”. Allowed values are never, always, or depends (read the description in the plugin’s settings page for details). The default is set to depends.
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)
Requirements
The plugin needs your personalized NASA ADS API token in order to fetch records from the database and, thus, to work correctly! You need to register an account at NASA ADS or login and generate your token in the account settings.
Examples
Show a list of refereed papers with Stephen Hawking among the list of authors:
[wp_nasaads_query_importer author=”Hawking, S.” property=”refereed”]
Same as before but where Hawking was first author:
[wp_nasaads_query_importer author=”^Hawking, S.” property=”refereed”]
List all articles by Ejnar Hertzsprung published in the Astronomische Nachrichten:
[wp_nasaads_query_importer author=”Hertzsprung, E.” bibstem=”AN”]
List all articles by Ejnar Hertzsprung and Henry Norris Russell. Note that the author string is surrounded by single quotes while the author names are surrounded by double quotes in order to preserve their last and first names. Also the search by both authors is logically combined by AND due to the space between their names:
[wp_nasaads_query_importer author='”Hertzsprung, E.” “Russell, H.N.”‘]
Load a user ADS library and filter the list of papers on a year range and exclude a certain journal:
[wp_nasaads_query_importer library=”GdEguHJfSGCrYKKqJM-5XA” year=”1911-1914″ bibstem=”(-SciAm)” max_rec=40]
Same as before but only show the title by customizing the record template:
-
[wp_nasaads_query_importer library="GdEguHJfSGCrYKKqJM-5XA" year="1911-1914" bibstem="(-SciAm)" max_rec=40]
- %title
[/wp_nasaads_query_importer]
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP Nasa/ADS Query Importer」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Moon Phases 》此外掛新增了一個側邊欄小工具,會顯示當前的月相。此外掛還可以顯示月亮位於哪個星座、月份以及類似距離、黃道緯度和黃道經度等細節。, 除了英語,此外掛還...。
WP Moon Phase Widget 》WP Moon Phase Widget 外掛允許您在側邊欄或文章中添加一個很棒的月相小工具。, 主要功能, , 自動地理位置偵測, 顯示月相名稱和圖像, 顯示月出和月落時間, 顯...。
The Stars at Night 》這個外掛會顯示對天文愛好者有興趣的數據,該數據是根據用戶提供的位置和日期信息計算得出。, 這個外掛是透過 WordPress 短碼調用的,該短碼中指定了參數,以...。
Astronomy Picture Of the Day 》「Astronomy Picture Of the Day」外掛程式會從 NASA 開放 API 檢索資料,專門檢索來自「Astronomy Picture Of the Day」(APOD)的資料。透過於文字模式編輯...。
Helioviewer.org – Latest Image 》這是一個簡單的小工具,用於顯示太陽最近的圖像,可從Helioviewer.org取得。此小工具可進行自定義,以顯示來自幾個不同數據源的圖像,包括SDO和SOHO。。
Hello Star 》受 Hello Dolly 啟發,這個外掛可提醒您當前月份可見的星座/星星。, 它顯示關於國際天文學聯合會 (IAU) 公認的 88 個星座的資訊。, 如果一個星座有 28 個最明...。
Curiosity POTD 》這個 WordPress 外掛添加了一個小部件來顯示 NASA 火星好奇號每日照片。, 如果你對天文新聞感興趣,並想在你的網站上放一張太空照片,這是一個很好的解決方案...。
NASA Picture of the Day 》這個簡單的外掛程式會取得 NASA 的每日天文圖片並建立一個新的文章。您可以選擇要以哪個使用者名稱發佈文章,以及是否在建立時立即發佈。, 使用這個外掛程式...。
Launches from SpaceX 》在你的側邊欄中展示給訪客即將舉行及最近的 SpaceX 發射。, 使用 r-spacex API:https://github.com/r-spacex/SpaceX-API。
Mosne Media Library AstroBin 》**WordPress 外掛介紹:AstroBin API 整合**, , - **功能**, 1. 與 AstroBin API 整合,可以直接在 Gutenberg 編輯器中瀏覽並插入天文圖像。, 2. 圖像包...。
Galaxy Zoo 》這個外掛提供了兩個 WordPress 小工具,讓使用者可以顯示他們在 Galaxy Zoo 帳戶中的數據。, 第一個小工具 ‘Galaxy Zoo’,會顯示一般統計資料,...。