renanbr / bibtex-parser Goto Github PK
View Code? Open in Web Editor NEWBibTex Parser provides an API to read .bib files programmatically.
License: MIT License
BibTex Parser provides an API to read .bib files programmatically.
License: MIT License
Consider the next test.php
use RenanBr\BibTexParser\Listener;
use RenanBr\BibTexParser\Parser;
require 'vendor/autoload.php';
$bibtex = <<<BIBTEX
@TechReport{Plotkin_1995,
author = {Serge Plotkin},
title = {Research in Graph Algorithms and Combinatorial Optimization},
year = 1995,
month = mar,
type = {resreport},
doi = {10.21236/ada292630},
url = {https://doi.org/10.21236%2Fada292630},
publisher = {Defense Technical Information Center}
}
BIBTEX;
$parser = new Parser(); // Create a Parser
$listener = new Listener(); // Create and configure a Listener
$parser->addListener($listener); // Attach the Listener to the Parser
$parser->parseString($bibtex); // or parseFile('/path/to/file.bib')
$entries = $listener->export(); // Get processed data from the Listener
print_r($entries);
Output from > php test.php | nl
1 Array
2 (
3 [0] => Array
4 (
5 [type] => resreport
6 [citation-key] => Plotkin_1995
7 [author] => Serge Plotkin
8 [title] => Research in Graph Algorithms and Combinatorial Optimization
9 [year] => 1995
10 [month] => mar
11 [doi] => 10.21236/ada292630
12 [url] => https://doi.org/10.21236%2Fada292630
13 [publisher] => Defense Technical Information Center
14 [_original] => @techreport{Plotkin_1995,
15 author = {Serge Plotkin},
16 title = {Research in Graph Algorithms and Combinatorial Optimization},
17 year = 1995,
18 month = mar,
19 type = {resreport},
20 doi = {10.21236/ada292630},
21 url = {https://doi.org/10.21236%2Fada292630},
22 publisher = {Defense Technical Information Center}
23 }
24 )
25 )
But line 5 in the output should be
5 [type] => TechReport
or better
5 [_type] => TechReport
...
11 [type] => resreport
Clearly, this is because of the collision between key type
(php array) and bib-field type
, a legal field in bibtex § 2.2 and biblatex § 4.9.2.13.
Maybe the patches...
# Parser.php
19 const TYPE = '_type';
and
# Listener.php
66 $this->entries[] = [Parser::TYPE => $text];
...
84 if ('string' === $entry[Parser::TYPE] && array_key_exists($text, $entry)) {
...work, but I'm not sure if this is enough.
@article{
title = " trimmed ",
}
use RenanBr\BibTexParser\Processor\TrimProcessor;
$listener->addProcessor(new TrimProcessor());
Expected result var_dump()
result for $entries[0]['title']
:
string(7) "trimmed"
Main changes:
ParserTest
and ListenerTest
classes are too longtests/resources/valid/
Listeners could be able to know when a file/string parsing has been started/finished.
It allows listeners to...
discussion started at: ubergeek42@3b4b07d
@Article{O’Connor2017653
title = "Privacy by Design: Informed Consent and Internet of Things for Smart Health ",
journal = "Procedia Computer Science ",
volume = "113",
number = "",
pages = "653 - 658",
year = "2017",
note = "The 8th International Conference on Emerging Ubiquitous Systems and Pervasive Networks (EUSPN 2017) / The 7th International Conference on Current and Future Trends of Information and Communication Technologies in Healthcare (ICTH-2017) / Affiliated Workshops ",
issn = "1877-0509",
doi = "https://doi.org/10.1016/j.procs.2017.08.329",
url = "https://www.sciencedirect.com/science/article/pii/S1877050917317398",
author = "Yvonne O’Connor and Wendy Rowan and Laura Lynch and Ciara Heavin",
keywords = "Informed Consent",
keywords = "IOT",
keywords = "Smart Health",
keywords = "Privacy by Design ",
abstract = "Abstract Check: I accept the terms and conditions and privacy policy statements associated with this technological artefact! The informed consent process is becoming more of a challenge with the emergence of Internet of Things (IoT) as data may be collected without the digital health citizen being aware. It is argued in this paper that the first phase for universal usability of IoT within the smart health domain is to ensure that digital health citizens (i.e. user of technology) are fully aware of what they are consenting to when they register an account with such technological artefacts. This point is further reinforced by the proposed ‘Privacy by Design’ requirements associated with the forthcoming General Data Protection Regulation (GDPR). This paper proposes some practical approaches which should be considered when designing and developing IoT for data collection and data sharing within the health domain. "
}
One other suggestion I might make it so lowercase the key names. Some of my entries were Year, and others were year, so I had to write some code to lowercase all the key names across the board. Relatively minor but I did read that key names are supposed to be case insensitive anyway.
from ubergeek42@3b4b07d
Possible solution: $listener->changeTagNameCase(\CASE_LOWER)
BibTex recognizes four parts of an author's name: First Von Last Jr.
For instance, the entry "Ludwig von Beethoven" has First: "Ludwig", von-part: "von" and Last: "Beethoven" and no Junior-part. The entry "Ford, Jr., Henry" has First: "Henry", no von-part, Last: "Ford" and Junior-part: "Jr.".
Is it possible to implement this parsing of names on bibtex-parser
? The only PHP library I found that implements this is a very old and unmantained one, called Structures_BibTex.
References:
https://nwalsh.com/tex/texhelp/bibtx-23.html
https://github.com/pear/Structures_BibTex/blob/master/Structures/BibTex.php
Hi,
I have lots of german bibtexs which contain special characters in their reference, for example:
@article{schünemann2013evaluation,
title={Evaluation and control of the orientation of small molecules for strongly absorbing organic thin films},
author={Schünemann, Christoph and Wynands, David and Eichhorn, Klaus-Jochen and Stamm, Manfred and Leo, Karl and Riede, Moritz},
journal={The Journal of Physical Chemistry C},
volume={117},
number={22},
pages={11600--11609},
year={2013},
publisher={ACS Publications},
doi={10.1021/jp400604j}
}
I am working on a PR to fix it, if you don't mind.
General:
ParseException
with Exception
Exception
, and put all needed exceptions inside itExceptionInterface
Listener
able to manage "entry processors" instead of "tag processors" (aed4c2e)
Coming entry processors:
DateProcessor
#28
_date
tag with a DateTime
instanceDoiToUrlProcessor
#37
url
tag if this one is missing using DOI
TrimProcessor
#36
Internals:
Thoughts:
Hi renabr!
I am using your bibtex-parser. I've got bibtex file through sciencedirect, but it was invalid bib.
so I've reviewed the bibtex file. That file contains multi-quote. I guess it is the issue.
therefore, I am trying to implement quoteProcessor, so I need your help.
I would like to use more than one Processor for setTagValueProcessor()
. Should I
(1) write a wrapper function that calls all of the Processors? (easiest to do, but I think this generates less clear code)
(2) rewrite setTagValueProcessor()
to accept an array of callable
s?
(3) rewrite setTagValueProcessor()
to accept a callable, but allow it to "stack" these callables so I can write
$listener->setTagValueProcessor(new AuthorProcessor());
$listener->setTagValueProcessor(new HTMLEntitiesProcessor());
When enabled, the AuthorProcessor
modifies only the author
tag.
It could be interesting to apply the same processor in others tags, for example editor
.
There is nothing in the API that justifies do not support this PHP version.
Some examples could be added to the README.md
Currently nightly PHP version in the CI targets to v8, in addition v7.4 is knocking the door.
Hi,
I'm working on a .bib file that contain some "@comment{}" and when the parser arrive to one of them, it cause an error, because they don't have to be valid entry and some aren't...
Actually, the rule is that everything from the @comment and to the end of line is ignored. The remainder lines of the commented entry is ignored by the first comment mechanism we described; in particular a @comment does not need to be a valid entry, i.e. it can for example skip comas between two fields
http://maverick.inria.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html#comment
In my case "@comment" are always on one line and no line is very long.
So I just fixed it with a "fgets" instead of "fread" and a small exeption in the parseFile function :
public function parseFile($file)
{
$handle = fopen($file, 'r');
try {
$this->reset();
while (!feof($handle)) {
$buffer = fgets($handle);//fread($handle, 128);
if (strpos($buffer, '@Comment{') === false) {
$this->parse($buffer);
}
}
$this->throwExceptionIfReadingEntry("\0");
} finally {
fclose($handle);
}
}
"@comment" in my .bib file :
@Comment{jabref-meta: databaseType:bibtex;}
@Comment{jabref-entrytype: Poster: req[author;title;year;organization] opt[abstract]}
I found that they are automaticaly added by JabRef (http://www.jabref.org/) at the end of the .bib file.
JabRef/jabref#2944
Have a nice day!
https://www.sciencedirect.com/science/article/pii/S1877050917317398
@Article{XU20171077,
title = "Cost Extension Control Model in Digital Context: From Continuous Cost Reduction to Value Co-creation",
journal = "Procedia Computer Science",
volume = "122",
pages = "1077 - 1083",
year = "2017",
note = "5th International Conference on Information Technology and Quantitative Management, ITQM 2017",
issn = "1877-0509",
doi = "https://doi.org/10.1016/j.procs.2017.11.476",
url = "http://www.sciencedirect.com/science/article/pii/S187705091732731X",
author = "Ling Xu and Chengxiao Zhang and Jing Guo and Xingsen Li",
keywords = "Digital, Cost control, Extension method, Big data, Value co-creation",
abstract = "Digital technology has brought about great changes in organizational structure, the way of value creation and profit-making methods, which brings new challenges to cost control based on "chain". In this paper, cost control in digital context is promoted to the pattern design level, combining the cost control process and the value creation process into one. with the new characteristics of cost control, this paper puts forward that extension method can be the method and tool of cost control, and provides the optimization of strategic choice and model innovation following. Finally, the prospect of intelligent cost control based on Extenics is prospected."
}
Is it possible to ignore the " within the text?
discussion started at ubergeek42@94acc6d
Discussion started at raphael-st@f2a9aa9
Reference: http://www.bibtex.org/SpecialSymbols/
The following bibtex isn't well parsed, citation key isn't detected.
@article{imhere}
The expected result is:
Array
(
[0] => Array
(
[type] => article
[citation-key] => imhere
)
)
$parser = new RenanBr\BibTexParser\Parser();
$listener = new RenanBr\BibTexParser\Listener();
$parser->addListener($listener);
$parser->parseString('@article{imhere}');
$entries = $listener->export();
print_r($entries);
Array
(
[0] => Array
(
[type] => article
)
)
$parser = new RenanBr\BibTexParser\Parser();
$listener = new RenanBr\BibTexParser\Listener();
$listener->addProcessor(new RenanBr\BibTexParser\Processor\CitationKeyProcessor());
$parser->addListener($listener);
$parser->parseString('@article{imhere}');
$entries = $listener->export();
print_r($entries);
Array
(
[0] => Array
(
[type] => article
[citation-key] =>
)
)
Consider the next example:
<?php
use RenanBr\BibTexParser\Listener;
use RenanBr\BibTexParser\Parser;
require 'vendor/autoload.php';
$bibtex = <<<BIBTEX
@String{Andrasfai = {Andr{\'{a}}sfai, B{\'{e}}la}}
@String{Bollobas = {Bollob{\'{a}}s, B{\'{e}}la}}
@String{Chvatal = {Chv{\'{a}}tal, Va{\v{s}}ek}}
@String{Erdos = {Erd{\H{o}}s, Paul}}
@String{Gyarfas = {Gy{\'{a}}rf{\'{a}}s, Andr{\'{a}}s}}
@String{Lovasz = {Lov{\'{a}}sz, L{\'{a}}szl{\'{o}}}}
@String{Balbuena = {Balbuena, Camino}}
@String{Cera = {Cera, Mart{\'{\i}}n}}
@String{Dianez = {Di{\'{a}}nez, Ana}}
@String{Garcia-Vazquez = {Garc{\'{\i}}a-V{\'{a}}zquez, Pedro}}
@Article{BCDGV07TopologicalFree,
author = Balbuena #{ and } # Cera #{ and } # Dianez #{ and } # Garcia-Vazquez,
title = {New exact values of the maximum size of graphs free of topological complete subgraphs},
journal = {Discrete Mathematics},
year = {2007},
volume = {307},
number = {9-10},
pages = {1038--1046},
issn = {0012-365X},
doi = {10.1016/j.disc.2006.07.031},
keywords = {Extremal graphs},
publisher = {Elsevier {BV}},
}
BIBTEX;
$parser = new Parser(); // Create a Parser
$listener = new Listener(); // Create and configure a Listener
$parser->addListener($listener); // Attach the Listener to the Parser
$parser->parseString($bibtex); // or parseFile('/path/to/file.bib')
$entries = $listener->export(); // Get processed data from the Listener
print_r($entries);
?>
Which gives the following:
PHP Fatal error: Uncaught RenanBr\BibTexParser\Exception\ParserException: Unexpected character '-' at line 13 column 75 in ~/PHP/vendor/renanbr/bibtex-parser/src/Exception/ParserException.php:28
Stack trace:
#0 ~/PHP/vendor/renanbr/bibtex-parser/src/Parser.php(349): RenanBr\BibTexParser\Exception\ParserException::unexpectedCharacter(''-'', 13, 75)
#1 ~/PHP/vendor/renanbr/bibtex-parser/src/Parser.php(368): RenanBr\BibTexParser\Parser->readPreTagContent('-')
#2 ~/PHP/vendor/renanbr/bibtex-parser/src/Parser.php(185): RenanBr\BibTexParser\Parser->readRawTagContent('-')
#3 ~/PHP/vendor/renanbr/bibtex-parser/src/Parser.php(124): RenanBr\BibTexParser\Parser->read('-')
#4 ~/PHP/vendor/renanbr/bibtex-parser/src/Parser.php(112): RenanBr\BibTexParser\Parser->parse('@String{Andrasf...')
#5 ~/PHP/parserbib.php(37): RenanBr\BibTexParser\Parser->parseString('@String{Andrasf...')
#6 {main}
thrown in ~/PHP/vendor/renanbr/bibtex-parser/src/Exception/ParserException.php on line 28
This seems to be caused by the character -
in the string constant Garcia-Vazquez
, created at line 10 of the bib-file:
@String{Garcia-Vazquez = {Garc{\'{\i}}a-V{\'{a}}zquez, Pedro}}
...and subsequently used in the author
field at line 13.
According to this answer, only the characters " # ' ( ) , = { } %
should be banned in bib-keys, if possible.
According this bibtex-summary the placeholder (variable/string name) must start with a letter and can contain any character in [A-Z,a-z,_,0-9]. In any case, the character _
gives the same issue.
Some research units export files with double braces in it. It looks like this is an acceptable format, however unfortunate it might be. Here is an example:
@article{ ISI:000440287200008,
Author = {Dubos, Nicolas and Le Viol, Isabelle and Robert, Alexandre and
Teplitsky, Celine and Ghislain, Manon and Dehorter, Olivier and
Julliard, Romain and Henry, Pierre Yves},
Title = {{Disentangling the effects of spring anomalies in climate and net primary
production on body size of temperate songbirds}},
Journal = {{ECOGRAPHY}},
Year = {{2018}},
Volume = {{41}},
Number = {{8}},
Pages = {{1319-1330}},
Month = {{AUG}},
Abstract = {{Body size is implicated in individual fitness and population dynamics.
Mounting interest is being given to the effects of environmental change [...]
growth than food assimilation.}},
DOI = {{10.1111/ecog.03413}},
ISSN = {{0906-7590}},
EISSN = {{1600-0587}},
Keywords = {{body size; climate; birds}},
Keywords-Plus = {{TIT PARUS-MAJOR; ENVIRONMENTAL-CHANGE; GREAT TIT; NESTLING GROWTH;
PASSERINE BIRD; BERGMANNS RULE; SURVIVAL; MODEL; MASS; ECOSYSTEMS}},
Research-Areas = {{Biodiversity \& Conservation; Environmental Sciences \& Ecology}},
Times-Cited = {{0}},
Unique-ID = {{ISI:000440287200008}},
}
As a result, title, year and other affected fields will contain (single) braces after parsing. Is there a way bibtex-parser can deal with this, or is this syntax simply not accepted?
(BTW we are still on version 0.5, please let me know if this has since been solved in later versions.)
$parser = new \RenanBr\BibTexParser\Parser();
$parser->parseFile('inexistent file');
https://www.sciencedirect.com/science/article/pii/S0022460X15007506
The following is Bibtex file content.
@Article{ABBOUD2016305,
title = "Deterministic-random separation in nonstationary regime",
journal = "Journal of Sound and Vibration",
volume = "362",
pages = "305 - 326",
year = "2016",
issn = "0022-460X",
doi = "https://doi.org/10.1016/j.jsv.2015.09.029",
url = "http://www.sciencedirect.com/science/article/pii/S0022460X15007506",
author = "D. Abboud and J. Antoni and S. Sieg-Zieba and M. Eltabach",
abstract = "In rotating machinery vibration analysis, the synchronous average is perhaps the most widely used technique for extracting periodic components. Periodic components are typically related to gear vibrations, misalignments, unbalances, blade rotations, reciprocating forces, etc. Their separation from other random components is essential in vibration-based diagnosis in order to discriminate useful information from masking noise. However, synchronous averaging theoretically requires the machine to operate under stationary regime (i.e. the related vibration signals are cyclostationary) and is otherwise jeopardized by the presence of amplitude and phase modulations. A first object of this paper is to investigate the nature of the nonstationarity induced by the response of a linear time-invariant system subjected to speed varying excitation. For this purpose, the concept of a cyclo-non-stationary signal is introduced, which extends the class of cyclostationary signals to speed-varying regimes. Next, a “generalized synchronous average’’ is designed to extract the deterministic part of a cyclo-non-stationary vibration signal—i.e. the analog of the periodic part of a cyclostationary signal. Two estimators of the GSA have been proposed. The first one returns the synchronous average of the signal at predefined discrete operating speeds. A brief statistical study of it is performed, aiming to provide the user with confidence intervals that reflect the "quality" of the estimator according to the SNR and the estimated speed. The second estimator returns a smoothed version of the former by enforcing continuity over the speed axis. It helps to reconstruct the deterministic component by tracking a specific trajectory dictated by the speed profile (assumed to be known a priori).The proposed method is validated first on synthetic signals and then on actual industrial signals. The usefulness of the approach is demonstrated on envelope-based diagnosis of bearings in variable-speed operation."
}
I am trying to parse this file using your lib, but it don't work.
I've got this error:
Exception:exception 'RenanBr\BibTexParser\Exception\ParserException' with message 'Unexpected character 'q' at line 11 column 1476' in ....
How I can solve this issue?
(I think it is a quote process like "quality".)
LatexToUnicodeProcessor
should throw ProcessorException
in place of PandocException
.
This library could provide these shortcuts:
function parse_bibtex_file(string $filename, array $processors = []): array;
function parse_bibtex_string(string $bibtex, array $processors = []): array;
Usage:
use function RenanBr\BibTexParser\parse_bibtex_file;
$entries = parse_bibtex_file('/path/to/file.bib');
Once export()
is called, future found entries are not processed.
$parser = new \RenanBr\BibTexParser\Parser();
$listener = new \RenanBr\BibTexParser\Listener();
$listener->addProcessor(function (array $entry) {
$entry['title'] .= ' processed';
return $entry;
});
$parser->addListener($listener);
$parser->parseString('@misc{title="A"}');
$listener->export(); // <--- first call
$parser->parseString('@misc{title="B"}');
$entries = $listener->export(); // <--- second call
var_dump(array_column($entries, 'title'));
Expected result:
array(2) {
[0] =>
string(11) "A processed"
[1] =>
string(1) "B processed"
}
Actual result:
array(2) {
[0] =>
string(11) "A processed"
[1] =>
string(1) "B"
}
When enabled, the LatexToUnicodeProcessor
modifies all tags.
It could be interesting be able to restrict or skip which tags the processor will run.
Some exported BibTex files contain tags with whitespaces (such as "Early Access Date"), and the parser failed.
Maybe there is something wrong in function readTagName()
at Parser.php?
Revisiting the bibtex documentation due the issue #6 I've found these statements regarding comments in files:
§4, item 7, p. 13
For Scribe compatibility, the database files allow an @comment command; it's not really needed because BibTEX allows in the database files any comment that's not within an entry. If you want to comment out an entry, simply remove the '@' character preceding the entry type.
§4, item 14, p. 14
LATEX's comment character '%' is not a comment character in the database files.
Note: This may introduce BC breaks, some tests should not fail because some examples of invalid files will not be invalid anymore. The possible breaks are in a good direction, once files already valid should be interpreted as always.
@article{
title = {foo},
description = {lorem ipsum dolor}
}
@article{
title = {bar}
}
use RenanBr\BibTexParser\Processor\FillMissingProcessor;
$listener->addProcessor(new FillMissingProcessor([
'description' => 'this entry has no description',
]));
Expected result:
Array
(
[0] => Array
(
[title] => foo
[description] => lorem ipsum dolor
)
[1] => Array
(
[title] => bar
[description] => this entry has no description
)
)
It could be interesting to have a standardized way to read entries' date.
We could read month
and year
tags for providing DateTime object within _date
key of processed entries.
$ phpmd src/ text cleancode
src/Parser.php:109 The method parse uses an else expression. Else is never necessary and you can simplify the code to work without else.
src/Parser.php:198 The method readType uses an else expression. Else is never necessary and you can simplify the code to work without else.
src/Parser.php:226 The method readKey uses an else expression. Else is never necessary and you can simplify the code to work without else.
src/Parser.php:293 The method readRawValue uses an else expression. Else is never necessary and you can simplify the code to work without else.
src/Parser.php:321 The method readDelimitedValue uses an else expression. Else is never necessary and you can simplify the code to work without else.
src/Parser.php:327 The method readDelimitedValue uses an else expression. Else is never necessary and you can simplify the code to work without else.
$ phpmd src/ text codesize
src/Parser.php:14 The class Parser has an overall complexity of 87 which is very high. The configured complexity threshold is 50.
src/Parser.php:140 The method read() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
src/Parser.php:250 The method readValue() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
src/Parser.php:305 The method readDelimitedValue() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
$ phpmd src/ text controversial,design,naming,unusedcode; echo $?
0
Parser could detect citation keys and trigger them to the listeners as Parser::CITATION_KEY
.
Parser doesn't trigger listener with the original entry value when the input ends with }
$parser = new Parser();
$listener = new Listener();
$parser->addListener($listener);
$parser->parseString('@misc{title="findme"}');
$entries = $listener->export();
print_r($entries);
Expected result:
Array
(
[0] => Array
(
[type] => misc
[title] => findme
[_original] => @misc{title="findme"}
)
)
Actual output:
Array
(
[0] => Array
(
[type] => misc
[title] => findme
)
)
Note: It works fine when adding a space at the end of the input.
$parser->parseString('@misc{title="findme"} ');
Entry
instead of array
Entry
class:
getCitationKey(): string
getType(): string
getOriginal(): string
getTag(string $name): Stringable
(PHP 8.0)
ArrayIterator
for lists (e.g. keywords, author)ProcessorInterface
Entry
(PHP 7.0)DBPL citation key includes /
@Article{DBLP:journals/npl/CaamanoSBD16,
ACM citation key includes .
@inproceedings{Kyriakakis:2016:EMI:3003733.3003777,
Both are not parsed.
The sulotion i tried is changing reg expr in line
Line 246 in 49b46e0
to
if (preg_match('/^[a-zA-Z0-9_\+:\-\.\/]$/', $char)) {
so it will accept / and . in citation key.
Parser ignores non-valid characters when reading tag's content.
use RenanBr\BibTexParser\Listener;
use RenanBr\BibTexParser\Parser;
$parser = new Parser();
$listener = new Listener();
$parser->addListener($listener);
$parser->parseString('@misc{foo=)"bar"}');
$entries = $listener->export();
print_r($entries);
Expected result:
An exception saying )
character was not expected
Actual result:
Array
(
[0] => Array
(
[type] => misc
[foo] => bar
[_original] => @misc{foo=)"bar"}
)
)
An possible solution is to delete an entry if processor returns null
Example of use case:
$listener->addProcessor(function (array $entry) {
if (!myFuncToCheckIfDoiIsValid($entry['doi'])) {
return null;
}
return $entry;
});
I'm trying to parse a bibtex using your library, but I'm getting the following error :
Unexpected character '\0' at line 19 column 2
Any way to support the null character ?
Thanks 😄
@article{
doi = {xyz}
}
use RenanBr\BibTexParser\Processor\UrlFromDoiProcessor;
$listener->addProcessor(new UrlFromDoiProcessor());
Expected result:
Array
(
[0] => Array
(
[doi] => xyz
[url] => https://doi.org/xyz
)
)
When quotation-marks are used, string concatenation using # is possible, but not when braces are used.
From: http://www.bibtex.org/Format/
Currently, concatenation works even when braces are used.
Users should be informed about that in the docs ... or maybe this library could work strictly, it means to throw a ParseException
in the Parser
(or in the Listener
).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.