How to convert a reference table in GB7714-2015 format into a bib file
background
Using references in latex is an automated work, but establishing and maintaining bib files is actually a long-term accumulation activity.
bibtex data of some references exist, for example, they can be downloaded from various academic websites. But some websites do not provide this. For example, cnki does not provide bib file information.
One solution is to grab it with zotero and save it to a bib file.
In addition, there is also a way to convert the bibliographic texts into bib files.
Because cnki will provide the description text in GB7714-2015 format of the current literature, if we copy this text, we can convert it into a bib file through a tool. Now let's talk about how to do this.
Since the reference description text in GB7714-2015 format provided by cnki is a long string, and the bib file is actually a text file, this conversion is essentially a text processing tool. I provided this tool when the biblatex-gb7714-2015 macro package was released, but few people actually used it and there was no feedback, so they almost forgot. Until the previous paragraph, younger martial brother also had such a demand, so I'll share it again.
Acquisition of bibliographic texts
The description text of cnki can be obtained from the quotation marks on the right side of the document:
Get:
We can copy the text in GB7714-2015 format to the file.
When the documents are in batch, you can also select multiple documents and use export analysis:
The export result is
Save it to a text file b.tex.
Acquisition of conversion tools
The conversion tool name is: gb7714texttobib.pl
If you have texlive installed, you can use it directly or copy it to a folder. If not in the system, you can download it from the link above.
Note that this tool was written in perl. To be honest, I also learned perl when I was learning biber. Now I have forgotten it for so long. But this tool is tested.
If it cannot be used directly, it may be that the perl version in the system is relatively old and can be used next time strawberry perl Install it.
Method of conversion
The tool is executed on the command line. The command format is:
perl gb7714texttobib.pl in=textfilename out=bibfilename
We already have the reference text in gb format in the b.TXT file. If the output file name after conversion is c.BIB, use the following command for conversion:
perl gb7714texttobib.pl in=b.TEX out=c.BIB
For b.TXT file
[1]Wang Qingbin,Wang Wenliang,Zhao Rui.Based on Improvement XGBoost Ship accident risk and type prediction based on Algorithm[J/OL].Journal of safety and environment:1-9[2021-09-04].https://doi.org/10.13637/j.issn.1009-6094.2021.1040. [2]Nie Renqing,Tang Tang,Zhang Xiaoyi,Zhang Jin.Screening of common markers of two types of renal cell carcinoma and its mechanism(english)[J/OL].Advances in biochemistry and Biophysics:1-21[2021-09-04].http://kns.cnki.net/kcms/detail/11.2161.Q.20210902.1856.002.html. [3]Fan Sihan.Based on Improvement BP Music genre classification based on Neural Network[J].software engineering,2021,24(09):17-20. [4]Li MENGNAN,Wang Mingyan.A survey of affective analysis methods and applications based on machine learning[J].software engineering,2021,24(09):21-23+8. [5]Liu Na,Xiong Anyuan,Zhang Qiang,Liu Yujia,Zhan Yunjian,Liu Yiming.Construction of basic data set for artificial intelligence application training in severe convective weather[J].Journal of Applied Meteorology,2021,32(05):530-541. [6]Getman Rachel Rose,Green Denise Nicole,Bala Kavita,Mall Utkarsh,Rawat Nehal,Appasamy Sonia,Hariharan Bharath. Machine Learning (ML) for Tracking Fashion Trends: Documenting the Frequency of the Baseball Cap on Social Media and the Runway[J]. Clothing and Textiles Research Journal,2021,39(4):3-5.
The conversion result is:
c.BIB file:
% Encoding: UTF-8 @article{ref-1-1-Wang Qingbin, author = {Wang Qingbin and Wang Wenliang and Zhao Rui}, title = {Based on Improvement XGBoost Ship accident risk and type prediction based on Algorithm}, urldate = {2021-09-04}, url = {https: //doi. org/10. 13637/j. issn. 1009-6094. 2021. 1040}, } @article{ref-2-2-Nie Renqing, author = {Nie Renqing and Tang Tang and Zhang Xiaoyi and Zhang Jin}, title = {Screening of common markers of two types of renal cell carcinoma and its mechanism(english)}, urldate = {2021-09-04}, url = {http: //kns. cnki. net/kcms/detail/11. 2161. Q. 20210902. 1856. 002. html}, } @article{ref-3-3-Fan Sihan, author = {Fan Sihan}, title = {Based on Improvement BP Music genre classification based on Neural Network}, journal = {software engineering}, date = {2021}, volume = {24}, number = {09}, pages = {17-20}, } @article{ref-4-4-Li MENGNAN, author = {Li MENGNAN and Wang Mingyan}, title = {A survey of affective analysis methods and applications based on machine learning}, journal = {software engineering}, date = {2021}, volume = {24}, number = {09}, pages = {21-23+8}, } @article{ref-5-5-Liu Na, author = {Liu Na and Xiong Anyuan and Zhang Qiang and Liu Yujia and Zhan Yunjian and Liu Yiming}, title = {Construction of basic data set for artificial intelligence application training in severe convective weather}, journal = {Journal of Applied Meteorology}, date = {2021}, volume = {32}, number = {05}, pages = {530-541}, } @article{ref-6-6-GRR, author = {{Getman Rachel Rose } and { Green Denise Nicole } and { Bala Kavita } and { Mall Utkarsh } and { Rawat Nehal } and { Appasamy Sonia } and { Hariharan Bharath}}, title = {Machine Learning (ML) for Tracking Fashion Trends: Documenting the Frequency of the Baseball Cap on Social Media and the Runway}, journal = {Clothing and Textiles Research Journal}, date = {2021}, volume = {39}, number = {4}, pages = {3-5}, }
Summary
Here is a conversion tool from reference description text in GB7714-2015 format to bib file, which enriches the means of generating bib file. From the perspective of cnki, because it provides output in different formats, such as NoteExpress format, in fact, we can also download relevant software to convert NoteExpress format into bib file, which is also a good path.