把 .bib 文件转换成新的 .acm 文件

Convert .bib file into a new .acm file

提问人:Anas Aaquil 提问时间:12/10/2022 更新时间:12/10/2022 访问量:24

问:

我正在尝试将可以包含 x 篇文章的 .bib 转换为具有上述 x 篇 ACM 表示法的 ACM 文件。我已经写了一些代码,但希望得到其余部分的帮助。

.bib 的格式是这样的 -->

@ARTICLE{
8249726, 
author={N. Khlif and A. Masmoudi and F. Kammoun and N. Masmoudi}, 
journal={IET Image Processing}, 
title={Secure chaotic dual encryption scheme for H.264/AVC video conferencing protection}, 
number={1}, 
year={2018}, 
volume={12}, 
pages={42-52}, 
keywords={adaptive codes;chaotic communication;cryptography;data compression;data protection;variable length codes;video coding;H.264/AVC video conferencing protection;advanced video coding protection;chaos-based crypto-compression scheme;compression ratio;context adaptive variable length coding;decision module;format compliance;inter-prediction encryption;intra-prediction encryption;piecewise linear chaotic maps;pseudorandom bit generators;secure chaotic dual encryption scheme;selective encryption approach;video compression standards}, 
doi={10.1049/iet-ipr.2017.0022}, 
ISSN={1751-9659}, 
month={Dec},
}

@ARTICLE{
8093611, 
author={W. Wu and H. Mao and Y. Wang and J. Wang and W. Wang and C. Tian}, 
journal={IEEE Access}, 
title={CoolConferencing: Enabling Robust Peer-to-Peer Multi-Party Video Conferencing}, 
year={2017}, 
pages={25474-25486},
number={2},
volume={5}, 
keywords={Internet;peer-to-peer computing;teleconferencing;video communication;CoolConferencing design;MPVC approach;MPVC platform;any-view support;multirate support;optimal video transmission performance;overlay network;realistic network environments;resilient data-driven principle;robust MPVC system;robust peer-to-peer multiparty video conferencing;robust system;state-of-the-art video;Bandwidth;Delays;Internet;Peer-to-peer computing;Receivers;Robustness;Streaming media;Computer networks;peer to peer computing;streaming media}, 
doi={10.1109/ACCESS.2017.2768798}, 
ISSN={1751-9659}, 
month={Dec},
}

请注意,.bib 文件可以包含任意数量的文章,在本例中为 2 篇,因此 .ACM 文件应有 2 个 ACM 报价。此外,文章信息没有特定的行顺序。 我不能使用任何自动转换的库。

这是我目前拥有的代码。这段代码将读取 1 个 latex 文件的每一行并打印 { } 之间的所有信息,现在我需要保存每个信息,然后创建一个以 ACM 格式返回信息的方法。

public static void main(String[] args) {
    List<String> lines = new ArrayList<>();
    try {
        File myFile = new File("Latex1.bib");
        Scanner reader = new Scanner(myFile);
        while (reader.hasNextLine()) {
            Pattern pattern = Pattern.compile("=\\{([^}]*)");
            Matcher matcher = pattern.matcher(reader.nextLine());
            if (matcher.find()) {
                System.out.println(matcher.group(1));
            }
        }
    } catch (FileNotFoundException e) {
        e.getMessage();
    }
}

你能完成它吗?

字符串 解析 java.util.scanner

评论


答: 暂无答案