前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >如何定制化展示arxiv的论文

如何定制化展示arxiv的论文

作者头像
西西嘛呦
发布2022-12-25 10:51:47
3930
发布2022-12-25 10:51:47
举报
文章被收录于专栏:数据分析与挖掘

进入到网址代码仓库:https://github.com/MLNLP-World/MyArxiv

新建完成后进入到自己创建的仓库。 修改config.toml:

代码语言:javascript
复制
site_title = "MyArxiv"
limit_days = 7
cache_url = "https://taishan1994.github.io/MyArxiv/cache.json" # taishan1994为自己的名称 
[[sources]]
limit = 150  # 显示的文章数
category = "cs.CL"  # 这里是arxiv上的类别,还可以添加其它类,我这里主要针对自然语言处理
title = "Computation and Language"

[scripts]
highlight_title = "scripts/highlight_title.rhai"
highlight_author = "scripts/highlight_author.rhai"
highlight_conference = "scripts/highlight_conference.rhai"

修改scripts/config.rhai,这里面主要是一些高亮显示。

代码语言:javascript
复制
let titles_type = ["Dataset", "Survey", "Review", "Overview"];
let titles_model = ["BERT", "GPT", "Transformer","chinese","entity","relation"];  # 这里我加了实体、关系、中文
let titles_method = ["Pre-train", "Pretrain", "Prompt", "Self-Supervised"];
let titles =  titles_model + titles_method + titles_type;
let authors_array = ["Yann LeCun", "Geoffrey Hinton", "Yoshua Bengio"];

let conferences = [
    // AI
    "AAAI", "AAMAS", "ACM MM", "AISTATS", "ALT", "CEC", "ECAI", "FUZZ IEEE", "GECCO", "ICANN", "ICAPS", "ICCBR", "ICONIP", "ICRA", "ICTAI", "IJCAI", "IJCNN", "IROS", "KR", "KSEM", "SIGGRAPH", "STOC", "UAI", "PPSN", "PRICAI", "TAAI",
    // CV
    "3DV", "ACCV", "ACM MM", "BMVC", "CVPR", "ECCV", "ICCV", "ICDAR", "ICIP", "ICME", "ICPR", "IEEE VIS", "MICCAI", "SIGGRAPH", "WACV",
    // DM
    "AKBC", "APWeb", "CIKM", "DASFAA", "ECML-PKDD", "ICDE", "ICDM", "ICDT", "KDD", "LREC", "MDM", "PAKDD", "PODS", "RecSys", "SDM", "SIGMOD", "VLDB", "WSDM", "WWW", "EDBT", "CIDR",
    // IR
    "ECIR", "ESWC", "ICMR", "ICTIR", "ISWC", "SIGIR",
    // ML
    "ACML", "AISTATS", "ECML", "ICLR", "ICML", "ML4H", "NeurIPS", "NIPS", "UAI",
    // NLP
    "AACL", "ACL", "CCL", "COLING", "COLT", "CoNLL", "EACL", "EMNLP", "ICASSP", "ICDAR", "ICONIP", "INTERSPEECH", "LREC", "NAACL", "NLPCC", "RepL4NLP", "SIGDIAL", "SemEval", "WANLP", "WASSA", "WOAH",
    // Arch
    "ASPLOS", "ATC", "DATE", "EuroSys", "FAST", "HPCA", "ISCA", "MICRO", "PPoPP", "SC", "SoCC",
    // System
    "FSE/ESEC", "ICSE", "ISSTA", "OSDI", "SOSP",
    // Security
    "ACSA", "AsiaCCS", "CCS", "DSN", "ESORICS", "EuroS&P", "ICICS", "NDSS", "RAID", "SP", "USENIX Security"
];

let start = conferences.shift();
let conferences_rg = conferences.reduce(|sum, v| sum + "|" + v, start);
let conferences_rg = "(" + conferences_rg + ")([\\s'-]*\\d+)?";

let start = titles.shift();
let title_rg = titles.reduce(|sum, v| sum + "|" + v, start);

let start = authors_array.shift();
let authors_rg = authors_array.reduce(|sum, v| sum + "|" + v, start);

export title_rg;
export authors_rg;
export conferences_rg;

修改includes/index.hbs:

代码语言:javascript
复制
<!DOCTYPE html>
<html lang="en">

<head>
    <title>{{site_title}}</title>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="robots" content="noindex, nofollow"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
    <link href="index.css" rel="stylesheet"/>
    <link href="https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css"
          integrity="sha384-R4558gYOUz8mP9YWpZJjofhk+zx0AS11p36HnD2ZKj/6JR5z27gSSULCNHIRReVs" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css"
          integrity="sha384-R4558gYOUz8mP9YWpZJjofhk+zx0AS11p36HnD2ZKj/6JR5z27gSSULCNHIRReVs" crossorigin="anonymous">
    <script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js"
            integrity="sha384-z1fJDqw8ZApjGO3/unPWUPsIymfsJmyrDVWC8Tv/a1HeOtGmkwNd/7xUS0Xcnvsx"
            crossorigin="anonymous"></script>
    <script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/auto-render.min.js"
            integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR"
            crossorigin="anonymous"></script>
    <script>
        document.addEventListener("DOMContentLoaded", function () {
            renderMathInElement(document.body, {
                // customised options
                // • auto-render specific keys, e.g.:
                delimiters: [
                    {left: '$$', right: '$$', display: true},
                    {left: '$', right: '$', display: false},
                    {left: '\\(', right: '\\)', display: false},
                    {left: '\\[', right: '\\]', display: true},
                    {left: "\\begin{equation}", right: "\\end{equation}", display: true},
                    {left: "\\begin{align}", right: "\\end{align}", display: true},
                    {left: "\\begin{alignat}", right: "\\end{alignat}", display: true},
                    {left: "\\begin{gather}", right: "\\end{gather}", display: true},
                    {left: "\\begin{CD}", right: "\\end{CD}", display: true},
                ],
                // • rendering keys, e.g.:
                throwOnError: false
            });
        });
    </script>
</head>

<body>
<section class="header-container">
    <div style="display:flex; justify-content:space-between; align-items:flex-end;">
        <div>
            {{!-- <a href="https://github.com/MLNLP-World/MyArxiv" style="text-decoration: none;">
                <div class="header-title">
                    <span class="header-title-preffix">MLNLP</span>//MyArxiv
                </div>
            </a> --}}
            <div class="header-title">
                xiximayou-arxiv //我主要修改了这里,自定义名称
            </div>
        </div>

        <div class=icons>
            <label class="theme-switch" for="checkbox">
                <input type="checkbox" id="checkbox"/>
                <i id="theme-icon" class="ri-moon-line" style="font-size: 32px" rel="noopener noreferrer"></i>
            </label>
        </div>
    </div>
</section>

{{#each days}}
    <section class="day-container">
        <div class="date">
            <time datetime="{{datetime}}">{{time_format datetime "%F"}}</time>
        </div>
        {{#each subjects}}
            <article>
                <details>
                    <Summary>
                        {{ subject }}
                    </Summary>
                    <div class="details-content">
                        {{#each papers}}
                            <article>
                                <details class="article-expander">
                                    <summary class="article-expander-title">
                                        {{#if (ne updated published)}}♻{{/if}} {{highlight_title title authors}} {{highlight_conference comment}}
                                    </summary>
                                    <div class="article-authors">
                                        <a href="{{id}}">
                                            <i class="ri-links-line"></i>
                                        </a>
                                        <a href="{{pdf_url}}">
                                            <i class="ri-file-paper-2-line"></i>
                                        </a>
                                        {{highlight_author authors}}
                                    </div>
                                    <div class="article-summary-box-inner">
                                        <span>{{summary}}</span>
                                    </div>
                                    {{#if comment}}
                                        <div class="article-summary-box-inner">
                                            <span class="chip">comment</span>: <span>{{comment}}</span>
                                        </div>
                                    {{/if}}
                                </details>
                            </article>
                        {{/each}}
                    </div>
                </details>
            </article>
        {{/each}}
    </section>
{{/each}}

</body>

<footer>
    <div>
        <time id="build-timestamp" datetime="{{build_time}}">
            {{!-- <a href="https://github.com/MLNLP-World/MyArxiv/actions">
                <img id="build-timestamp-badge"
                     src="https://img.shields.io/github/workflow/status/mlnlp-world/myarxiv/Update?label={{time_format
                    build_time "%F %T %Z"}}&style=for-the-badge"
                alt="{{time_format build_time "%F %T %Z"}}">
            </a> --}}
            {{time_format build_time "%F %T %Z"}}
        </time>
    </div>
</footer>
<script src="index.js"></script>
</html>

可以选择修改workflows/update-feed.yml里面的定时,什么时候更新。

代码语言:javascript
复制
- cron: "12 5 * * *"

最后选择settings/pages,修改:

至此,就可以定制自己的arxiv了,访问https://taishan1994.github.io/xiximayou-arxiv/

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022-12-23,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
NLP 服务
NLP 服务(Natural Language Process,NLP)深度整合了腾讯内部的 NLP 技术,提供多项智能文本处理和文本生成能力,包括词法分析、相似词召回、词相似度、句子相似度、文本润色、句子纠错、文本补全、句子生成等。满足各行业的文本智能需求。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档