[WordPress] 外掛分享: JCMS Librivox

前言介紹

  • 這款 WordPress 外掛「JCMS Librivox」是 2017-11-13 上架。 目前已經下架不再更新,不建議安裝使用。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2018-01-13,距離現在已有 2668 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.7 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
  • 尚未有人給過這款外掛評分。
  • 論壇上目前有 1 個提問,問題解答率 0%

外掛協作開發者

smeghammer |

外掛標籤

librivox | audio books | WP Librivox | free audio books | public domain book recordings |

內容簡介

這是一個基於簡碼的外掛程式,可訪問公共領域中未受版權保護以及版權自由的書籍的免費朗讀。錄音由LibriVox.org提供,通過LibriVox REST API進行訪問。此外,該外掛程式還提供了一個豐富的網絡應用程序,允許直接搜索、瀏覽和播放LibriVox目錄中的任何錄音。該應用程式使用了 LibriVox API 的大型子集,以實現其功能。

這個豐富的網絡應用程序使用了客戶端JavaScript訪問的代理REST API。 如果其他外掛程式希望使用它,此代理API也可用。此外,該外掛使用服務器端代碼訪問遠程Librivox API,並將其呈現給客戶端作為本地REST端點。這是通過擴展相對較新的WP REST API (http://v2.wp-api.org/)完成的。

插入單個書籍的內嵌簡碼 [librivox_book bookid="nnn"] 很簡單,只需將有效的Librivox書籍 ID 傳遞給外掛程式代理代碼,然後將其傳遞給遠程Librivox端點即可。外掛程式代碼然後構造 HTML 輸出,並將其合併在發送回瀏覽器的完整 HTML 輸出中。注意,您可以使用如以下內容的方式,從Librivox API 直接獲取書籍 ID: https://librivox.org/api/feed/audiobooks?fields[]=id&fields[]=title&limit=1000。這個簡碼不會生成或需要任何客戶端JavaScript。

豐富的應用程式觸發簡碼[librivox_app]不需要任何參數,可以在內容模板的任意位置使用。此外,由 [librivox_app] 生成的豐富應用程式利用了該外掛程式創建和公開的多個自定義WP API端點,這些端點作為代理傳遞作者搜索字符串和書籍 ID 到Librivox API。這些插件端點返回JSON作為插件JavaScript用作 AJAX數據源的數據。

API端點包括:
列出作者(限制為50): /wp-json/wp-librivox/v1/authors
按作者列出書籍(例如‘doyle’): /wp-json/wp-librivox/v1/books/doyle
通過書籍 ID 獲取書籍詳細信息(例如 4135): /wp-json/wp-librivox/v1/books/id/4135
通過書籍 ID 獲取曲目列表(對於 MP3 文件): /wp-json/wp-librivox/v1/rss/4135。

使用方法:

為單本書籍添加簡碼: 在適當的位置添加簡碼 [librivox_book bookid="nnn"]。參數 ‘nnn’ 是LibriVox書籍ID。例如,將 ‘nnn’ 換成 ‘804’將呈現經典的Conan Doyle福爾摩斯系列‘Sherlock Holmes回憶錄’
添加互動應用程式的簡碼: 在適當的位置添加簡碼 [librivox_app]。這將啟動完整的互動應用程序,允許按作者搜索書籍並播放音頻書籍。

原文外掛簡介

A shortcode-based plugin that accesses free public domain readings of out-of-copyright and copyright-free books. Recordings are provided by LibriVox.org and are accessed via the LibriVox REST API
The plugin provides a shortcode interface that allows presentation of a specified book, by its LibriVox API ID, with downloadable or HTML5 playable content, in your content area. Returned content is therefore either MP3 files, or a ZIPped archive of all MP3 files related to the selected book.
The plugin also provides a rich web application that allows direct searching, browsing and playing of any recording in the LibriVox catalogue. This application uses a large subset of the full LibriVox API to realise its functionality.
The rich web application uses a proxy REST API, accessed by client-side JavaScript. This proxy API is also available should other plugins wish to use it.
The plugin uses server-side code to access the remote Librivox API, and presents these to the client-side as local REST emdpoints. This is done using extensions to the relatively new WP REST API (http://v2.wp-api.org/).
The single-book embed shortcode [librivox_book bookid="nnn"] simply passes a valid Librivox book ID to the plugin proxy code, which in turn passes this on to the remote librivox endpoint. The plugin code then constructs HTML output from the response and incorporates this this in the full HTML output send back to the browser. Note you can use something like https://librivox.org/api/feed/audiobooks?fields[]=id&fields[]=title&limit=1000 to get a list of book IDs directly from the Librivox API [there is not yet a nice way of obtaining a book ID via this plugin – perhaps a todo for the future…]. This shortcode does not generate or require any client-side JavaScript.
The rich application trigger shortcode [librivox_app] does not require any parameters and can be used wherever you need on your content template. [Note that you will be able to access a book ID from here as well if you examine the generated HTML for a book list. The Book ID is the attribute ‘bookid’ on each of the book output containing div elements.]
The rich application generated by [librivox_app] utilises several custom WP API endpoints created and exposed by the plugin which act as proxies passing the author search string and book IDs to the Librivox API. These plugin endpoints return JSON for the plugin JavaScript to use as AJAX data sources.
API endpoints are:
List authors (limited to 50): /wp-json/wp-librivox/v1/authors
List books by author (e.g. ‘doyle’): /wp-json/wp-librivox/v1/books/doyle
Get book details by book ID (e.g. 4135): /wp-json/wp-librivox/v1/books/id/4135
Get track list by book ID (for MP3 files): /wp-json/wp-librivox/v1/rss/4135
Usage

Adding shortcode for single book: Add shortcode [librivox_book bookid="nnn"] In a suitable location. The parameter ‘nnn’ is the LibriVox book ID. For example, replacing ‘nnn’ with ‘804’ will render the classic Conan Doyle Sherlock Holmes collection ‘Memoirs of Sherlock Holmes’
Adding shortcode for interactive app: Add shortcode [librivox_app] In a suitable location. This will trigger the full interactive application, allowing searching for books by author and playing an audio book.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「JCMS Librivox」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


最新版本

延伸相關外掛(你可能也想知道)

暫無相關外掛推薦。

文章
Filter
Apply Filters
Mastodon