DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:pubmed2020

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:pubmed2020 [2020-06-05 18:30] – [Description] eric.maeker@gmail.complugin:pubmed2020 [2023-01-12 06:52] (current) – [Authors and licence] 2a01:e34:efb1:3b80:9cb7:a35:3efe:6fdc
Line 6: Line 6:
 email      : eric.maeker@gmail.com email      : eric.maeker@gmail.com
 type       : syntax, render type       : syntax, render
-lastupdate : 2020-05-26+lastupdate : 2023-01-13
 compatible : Greebo, Frusterick Manners, Elenor Of Tsort, Detritus compatible : Greebo, Frusterick Manners, Elenor Of Tsort, Detritus
 similar    : pubmed similar    : pubmed
Line 29: Line 29:
   * Code was rewritten in 2020 due to PubMed new API (see [[https://api.ncbi.nlm.nih.gov/lit/ctxp|updateCtx]])   * Code was rewritten in 2020 due to PubMed new API (see [[https://api.ncbi.nlm.nih.gov/lit/ctxp|updateCtx]])
   * License : Public Domain   * License : Public Domain
-  * Version 2020-05-27+  * Current version 2023-01-13
  
 ===== Examples/Usage ===== ===== Examples/Usage =====
Line 43: Line 43:
 ===== Syntax ===== ===== Syntax =====
  
-**Including article citation into your pages**+==== Basic syntax ====
  
-The syntax is quite easy: ''%%{{pmid>01234567}}%%'' or ''%%{{pmid>command:01234567}}%%''+  * The plugin basic syntax architecture is the following: 
 +    * ''%%{{pmid>___}}%%'' for the PubMed database 
 +    * ''%%{{pmcid>___}}%%'' for the PMC database (please note carrefully the ''%%c%%'' in pm**c**id)
  
-**Using the default options:**\\ +  Following the database declaration, after the ''%%>%%'', you can add 
-''%%{{pmid>24073682}}%%'' where 24073682 is the PMID of the article as notified by pubmed.\\ +    specific commands. Eg with the **long** command: ''%%{{pmid>long:012345678}}%%'' (see below) 
-''%%{{pmid>user:24073682}}%%'' where 24073682 is the PMID of the article as notified by pubmed and the default user parameter will be used to create the article citation.+    * or simply the ID of the publicationsEg ''%%{{pmcid>0123456}}%%''
  
-**Using specific formula:**+==== Including article citation into your pages ====
  
-''%%{{pmid>long:24073682}}%%'' where 24073682 is the PMID of the article as notified by pubmed and //long// is the selected article citation formula.+  * **The syntax is quite easy:** 
 +    * ''%%{{pmid>01234567}}%%'' / ''%%{{pmcid>01234567}}%%''  
 +    * or ''%%{{pmid>command:01234567}}%%''''%%{{pmcid>command:01234567}}%%''
  
-**You can require multiple citations at once (creating a nice HTML list):**+  * **Using the default options:** 
 +    * ''%%{{pmid>24073682}}%%'' where 24073682 is the PMID of the article as notified by pubmed.\\ 
 +    * ''%%{{pmcid>7241351}}%%'' where 7241351 is the PCMID of the article as notified by pubmed PMC.\\ 
 +    * ''%%{{pmid>user:24073682}}%%'' where 24073682 is the PMID of the article as notified by pubmed and the default user parameter (see configuration) will be used to create the article citation.
  
-For example this list uses the citations used as examples in the Vancouver referencing paper ''%%{{pmid>vancouver:19171717,12142303,12028325,12084862,12166575,15857727}}%%''+  * **Using specific format:** 
 +    * ''%%{{pmid>long:24073682}}%%'' where 24073682 is the PMID of the article as notified by pubmed and //long// is the selected article citation format. 
 +    * Many predefined citation format are available. You can define yours in the configuration panel and call it using the ''%%user%%'' command.
  
-**Including links to pubmed search page*+  * **You can require multiple citations at once (creating a nice HTML list):** 
- +    * For example this list uses the citations used as examples in the Vancouver referencing paper ''%%{{pmid>vancouver:19171717,12142303,12028325,12084862,12166575,15857727}}%%'' 
-You can also use this plugin to create pubmed search URL. +    * If you want to automatically sort ID, just start the list with the word //sort// : ''%%{{pmid>vancouver:sort,19171717,12142303,12028325,12084862,12166575,15857727}}%%''
-<code>{{pmid>search:"Inappropriate Prescribing"[Mesh]}}</code> +
-<code>{{pmid>search:"Drug-Related Side Effects and Adverse Reactions"[Mesh] AND (Review[ptyp] AND "loattrfree full text"[sb])}}</code>+
  
 +  * **Including links to pubmed search page**
 +    * You can also use this plugin to create pubmed search URL.
 +    * You can use //basic// search of terms or
 +    * Complete search with options: //size, format, filter, sort//. You just have to specify options separated with a ''|'' char.
 +    * <code>
 +// Basic search of terms
 +{{pmid>search:"Inappropriate Prescribing"[Mesh]}}
 +{{pmid>search:"Drug-Related Side Effects and Adverse Reactions"[Mesh] AND (Review[ptyp] AND "loattrfree full text"[sb])}}
 +// Search of terms with options
 +{{pmid>search:"Inappropriate Prescribing"[Mesh]|size=200|sort=pubdate}}
 +// Search passing a specific title for the link (just use a # for the first param)
 +{{pmid>search:#My Link Title|"Inappropriate Prescribing"[Mesh]|size=200|sort=pubdate}}
 +</code>
  
 ===== Options ===== ===== Options =====
  
-==== Citation formula ====+==== Citation format ====
  
   * The article citation can be automatically included using pre-formatted outputs:   * The article citation can be automatically included using pre-formatted outputs:
-    * **vancouver** : Full Vancouver citation see Vancouver.+    * **vancouver** : Full Vancouver citation see [[https://en.wikipedia.org/wiki/Vancouver_system|Vancouver]] for more information.
     * **short** : ISO citation in a short way.     * **short** : ISO citation in a short way.
     * **long** : full ISO citation including all authors, article title, journal title, volume, year, month, pages.     * **long** : full ISO citation including all authors, article title, journal title, volume, year, month, pages.
Line 81: Line 101:
     * **long_abstract_pdf** : append the full abstract to the long citation. The abstract can toggled and is hidden by default. If you own the PDF file a link will show.     * **long_abstract_pdf** : append the full abstract to the long citation. The abstract can toggled and is hidden by default. If you own the PDF file a link will show.
     * **long_tt_abstract_pdf** : same as long_tt_abstract_pdf but with translated title (if exists)     * **long_tt_abstract_pdf** : same as long_tt_abstract_pdf but with translated title (if exists)
-    * or **user** defined : you can define you own citation formula (see below).+    * **authors** : only authors 
 +    * **title** : only title 
 +    * **year** 
 +    * **date** month and year 
 +    * **journal** : only journal title 
 +    * **journaliso** : only journal iso title 
 +    * **doi_link** : only DOI link 
 +    * **listgroup** : Bootstrap ready list-group output (useful with bootstrap3 template) 
 +    * or **user** defined : you can define you own citation format (see below).
   * Provides by default a link to the PubMed page and to the free full text in PMC if exists.   * Provides by default a link to the PubMed page and to the free full text in PMC if exists.
  
 ==== User defined citation ==== ==== User defined citation ====
  
-You can define in the configuration a simple string to define your own citation formula. The following tokens are available.+You can define in the configuration a simple string to define your own citation format. The following tokens are available.
  
 ^  Token  ^  Content  ^ ^  Token  ^  Content  ^
 |  %pmid%  |  PMID with a link to pubmed citation  | |  %pmid%  |  PMID with a link to pubmed citation  |
 +|  %pmcid%  |  PMCID with a link to pubmed PMC citation  |
 |  %type%  |  Type of the citation ("article", "book" | |  %type%  |  Type of the citation ("article", "book" |
 |  %authors%  |  All authors (complete lastname)  | |  %authors%  |  All authors (complete lastname)  |
Line 120: Line 149:
 |  %localpdf%  |  Add link to local PDF file (see specific doc)  | |  %localpdf%  |  Add link to local PDF file (see specific doc)  |
  
-^  Hard coded formula   Content +^  Hard coded format   Content 
-|  **short**  |  %first_author%. %iso%. %pmid%. %journal_url% %pmc_url% +|  **short**  |  %first_author%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% 
-|  **long**  |  %authors%. %title%. %iso%. %pmid%. %journal_url% %pmc_url% +|  **long**  |  %authors%. %title%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% 
-|  **long_pdf**  |  %authors%. %title%. %iso%. %pmid%. %journal_url% %pmc_url% %localpdf% +|  **long_pdf**  |  %authors%. %title%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %localpdf% %tweet%  | 
-|  **long_abstract**  |  %authors%. %title%. %iso%. %pmid%. %journal_url% %pmc_url% %abstract% %abstractFr% +|  **long_abstract**  |  %authors%. %title%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %abstract% %abstractFr% %tweet%  | 
-|  **long_abstract_pdf**  |  %authors%. %title%. %iso%. %pmid%. %journal_url% %pmc_url% %abstract% %abstractFr% %localpdf% +|  **long_abstract_pdf**  |  %authors%. %title%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %abstract% %abstractFr% %localpdf% %tweet%  | 
-|  **long_tt**  |  %authors%. %title_tt%. %iso%. %pmid%. %journal_url% %pmc_url% +|  **long_tt**  |  %authors%. %title_tt%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %tweet%  | 
-|  **long_tt_pdf**  |  %authors%. %title_tt%. %iso%. %pmid%. %journal_url% %pmc_url% %localpdf% +|  **long_tt_pdf**  |  %authors%. %title_tt%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %localpdf% %tweet%  | 
-|  **long_tt_abstract**  |  %authors%. %title_tt%. %iso%. %pmid%. %journal_url% %pmc_url% %abstract% %abstractFr% +|  **long_tt_abstract**  |  %authors%. %title_tt%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %abstract% %abstractFr% %tweet%  | 
-|  **long_tt_abstract_pdf**  |  %authors%. %title_tt%. %iso%. %pmid%. %journal_url% %pmc_url% %abstract% %abstractFr% %localpdf%  |+|  **long_tt_abstract_pdf**  |  %authors%. %title_tt%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %abstract% %abstractFr% %localpdf% %tweet%  | 
 + 
 +==== Defining citation format for one document ==== 
 + 
 +  * Use the following command ''%%{{pmid>doc_format:long_abstract_pdf}}%%''
  
 ==== Styling==== ==== Styling====
  
-You can change the style of your citation. Please take a look at the style.css file for further information.+  * You can change the style of your citation. Please take a look at the ''%%style.css%%'' file for further information.
  
 ===== Using local PDF ===== ===== Using local PDF =====
-You get a direct link to your media PDF files of publications. You have to save the PDF files in the media directory: ''%%media/pubmed/pmid_pdf%%'' or ''%%media/pubmed/doi_pdf%%''. Just use the PMID or DOI as file name. It is recommanded to use the PMID mode.+ 
 +  * You get a direct link to your media PDF files of publications. You have to save the PDF files in the media directory: ''%%media/pubmed/pmid_pdf%%'' or ''%%media/pubmed/doi_pdf%%''. Just use the PMID or DOI as file name. It is recommanded to use the PMID mode.
  
 ===== Specific commands ===== ===== Specific commands =====
  
   * Some more commands are available:   * Some more commands are available:
-    * **test** only for devs +    * ''%%addtt%%'' add a translated to the raw medline data 
-    * **raw_medline** show the retrieved MedLine code. {{pmid>summaryxml:24073682}} +      ''%%{{pmid>addtt:123456789|translated title to add is this current string}}%%'' 
-    * **clear_raw_medline** : clear all cached Medline files +    ''%%addhash%%'' add a hashtags to the raw medline data (used for the Tweet URLs) 
-    * **remove_dir** : remove the cache directory (by default /data/media/pubmed) +      ''%%{{pmid>addhash:123456789|MyHash1,MyHash2,MyHash3}}%%'' 
-    * **recreate_cross_refs** : recreate the crossref (DOI <-> PMID) +    ''%%test%%'' only for devs 
-    * **full_pdf_list** : show all available PDF (see specific doc) +    * ''%%raw_medline%%'' show the retrieved MedLine code. {{pmid>summaryxml:24073682}} 
-  * To use these commands, use this syntax: ''%%{{pmid>cmd}}%%''+    * ''%%clear_raw_medline%%'' : clear all cached Medline files 
 +    * ''%%remove_dir%%'' : remove the cache directory (by default /data/media/pubmed) 
 +    * ''%%recreate_cross_refs%%'' : recreate the crossref (DOI <-> PMID) 
 +    * ''%%full_pdf_list%%'' : show all available PDF (see specific doc) 
 +  * To use these commands, use this syntax:  
 +    * ''%%{{pmid>cmd:0123456789}}%%'' 
 +    * ''%%{{pmcid>cmd:01234567}}%%''
  
 ===== Configuration and Settings ===== ===== Configuration and Settings =====
  
   * This plugin comes with some configuration parameters:   * This plugin comes with some configuration parameters:
-    * Default citation formula+    * Default citation format
-    * Default user defined formula+    * Default user defined format
-    * Default authors limitation in Vancouver citation+    * Default authors limitation in Vancouver format
     * Default string replacement of authors over the Vancouver author limitation     * Default string replacement of authors over the Vancouver author limitation
 +    * Twitter user name to use in the Tweet URLs (via @UserName)
 +    * You use URL shorteners for the creation of the Twitter weblinks
  
 ===== Development ===== ===== Development =====
plugin/pubmed2020.1591374604.txt.gz · Last modified: 2020-06-05 18:30 by eric.maeker@gmail.com

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki