diff --git a/.github/workflows/update-feed.yml b/.github/workflows/update-feed.yml new file mode 100644 index 0000000..a911bec --- /dev/null +++ b/.github/workflows/update-feed.yml @@ -0,0 +1,49 @@ +name: Update + +on: + workflow_dispatch: + push: + branches: + - main + schedule: + # Adjust refresh schedule here. By default, it runs once per day. + # Syntax reference: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#schedule + # Recommended tool: https://crontab.guru/ + - cron: "12 5 * * *" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Download ArxivFeed + env: + GITHUB_PAT: ${{ github.token }} + REPO: "NotCraft/ArxivFeed" + VERSION: "latest" + MATCH: "arxivfeed-.+-x86_64-unknown-linux-musl.tar.gz$" + RENAME: "arxivfeed.tgz" + shell: bash + run: | + curl -sL --fail \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: Bearer ${GITHUB_PAT}" \ + "https://api.github.com/repos/${REPO}/releases/${VERSION}" \ + | jq -r ".assets | .[] | select(.name | test(\"${MATCH}\")) | .url" \ + | tee asset.url + curl -sL --fail \ + -H "Accept: application/octet-stream" \ + -H "Authorization: Bearer ${GITHUB_PAT}" \ + -o "${RENAME}" \ + "$(cat asset.url)" + tar -zxvf arxivfeed.tgz --strip-components 1 $(tar tf arxivfeed.tgz | grep /arxivfeed) + chmod +x arxivfeed + - name: Build rss + run: ./arxivfeed + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./target + force_orphan: true diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d354a28 --- /dev/null +++ b/.gitignore @@ -0,0 +1,113 @@ +# Idea +.idea + +# Macos +.DS_Store + +# NotFeed Files +/target/ + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and *not* Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3dac35d --- /dev/null +++ b/README.md @@ -0,0 +1,353 @@ +

+

MyArxiv

+

+ + +

+ + version + + + Status-building + + + PRs-Welcome + + + stars + + + FORK + + + Issues + +
+

+
+

+ 项目动机/ + 项目简介/ + 项目预览/ + 使用说明/ + 快速上手指南/ + 定制化指南/ + 参考资源/ + 致谢/ + 组织者/ + 贡献者 +

+
+ + + + + +--- + +## 项目动机 + +`Arxiv`作为当前最受欢迎的学术论文预印的网站之一,每天有大量的最新学术论文在此网站发布。许多一线研究者,在这样信息爆炸的时代,为了第一时间有效地关注到与自己研究“相关”的学术论文,每天都需要耗费较多时间进行检索和审阅过滤掉“无关”的学术论文,这无疑为大家的科研带来了较大的负担。为了帮助大家高效地、自由地阅览Arxiv最新学术论文,本项目为大家提供了`Arxiv`个性化定制化模版,实现对特定领域的相关内容、作者与学术会议的有效跟进,将`Arxiv`定制化为`MyArxiv`。 + + +本项目所用徽章来自互联网,如侵犯了您的图片版权请联系我们删除,谢谢。 + +## 项目简介 + +`MyArxiv`项目基于[`Arxiv官方API`](https://arxiv.org/help/api)与[`Github Actions`](https://docs.github.com/en/actions)相关服务,为大家了提供了`Arxiv`的定制化服务,使用者可以通过配置相关文件,从`Arxiv`每日发布的最新研究成果中,实现个性化地、轻松地阅览属于自己的`Arxiv`网站,其功能如下: + +**基本功能**: + +- 跟踪指定领域的最新成果 +- 缓存指定时段的文章信息 + +**特色功能**: + +- 快速聚焦到文章标题中的指定**关键字** +- 方便注意到文章作者中的指定**学者** +- 及时了解到相关知名**会议、期刊**的学术文章 + +## 项目预览 + +使用者可以访问[https://mlnlp-world.github.io/MyArxiv/](https://mlnlp-world.github.io/MyArxiv/)进行对当前项目进行预览,以便更好地熟悉和使用当前项目。 + +- `MyArxiv`总页面概览: + + + +​ 其中包含了指定领域的多天的文章最新更新情况 + +- 进一步查看领域中更新的文章列表: + +​ + +​ 每一个条目中有特定类型的前缀标识(e.g. `☆` 或 `★`标识是否有高亮的作者)、包含高亮的文章标题(e.g. `Dialogue`)以及相应的会议信息(e.g. `EMNLP 2022`)。 + +- 更加细化地对感兴趣的文章内容进行查看: + + + +​ 其中有包含高亮详细作者列表(e.g. `Qun Liu`)、摘要以及对应的`comment`(e.g. `EMNLP 2022, Long paper, Main conference`)。 + +## 使用说明 + +- 单击`标题`展开并仔细查看其摘要。 +- 单击`摘要`跳转到对应的`Arxiv`文章。 +- 指定关键字、指定学者和会议/期刊信息的高亮显示。 +- 通过文章条目前缀标识区分论文是新提交的还是更新的`♻`。 +- 通过文章条目前缀标识区分论文是否由高亮的作者撰写的`☆` 或`★`。 +- 使用`Tab`键展开/折叠所有文章。 +- 实现了对于Latex公式的渲染。 +- 支持深色/浅色模式。 + +## 快速上手指南 + +使用MyArxiv实现个人定制的Arxiv,使用默认设置快速上手,步骤如下: + +
+ Get Start + +
+ +

1. 建立仓库

+ +当前MyArxiv仓库为模版仓库,当我们建立属于自己的MyArxiv时,需要从当前模版新建仓库到自己的Github账号下。 + + + +假设仓库地址为`github.com/username/reponame`,便于后续说明。 + + + +

2. 修改cachr url

+ +修改`config.toml`中文件中的`cache_url`设置(MyArxiv数据缓存地址,该地址设置与你托管当前项目的网站地址相关),将其对应的Github账户,从`MLNLP-World`修改为自己当前的账户,如下图所示: + + + +

3. Github pages设置

+ +进入当前Repo对应的Settings后,进入Pages页面,设置`Branch`为`gh-pages`分支。 + + + +使用至此,你已经基于`MyArxiv`的默认配置实现了快速上手,直接访问Github Pages对应的网页`username.github.io/MyArxiv`,可以查看属于自己的`MyArxiv`: + + + +## 定制化指南 + +MyArxiv是高度可定制化的,使用者可以根据自己的实际需求进行更改,实现个性化定制,如下内容对于可定制化的部分进行说明。 + +
+ Build Steps + +
+ +

1. 托管网站设置

+ +`config.toml`配置文件中,个人网站相关设置部分如下图所示: + + + +此部分与个人MyArxiv托管的网站设置相关,默认设置如下: + +```toml +site_title = "MyArxiv" +limit_days = 7 +cache_url = "https://mlnlp-world.github.io/MyArxiv/cache.json" +``` + +- `site_title`:MyArxiv网站名称,默认为`"MyArxiv"`。 + +- `limit_days`:MyArxiv网站所缓存的过去几天的最新论文,默认为缓存过去`7`天的最新论文。 + +- `cache_url`:MyArxiv数据缓存地址,该地址设置与你托管当前项目的网站地址相关。 + - 若使用默认的Github Pages,那么会在`username.github.io`域名上托管该项目,项目具体地址为`username.github.io/reponame`,就要将`cache_url`设置为`username.github.io/reponame/cache.json`。 + - 若使用其他域名`yourarxivdomain`托管该项目,则要将`cache_url`使用对应的网址进行替换,设置为`yourarxivwebsite/cache.json`。 + +

2. Arxiv领域偏好设置

+ +`config.toml`配置文件中,Arxiv领域偏好设置部分如下图所示: + + + +此部分与个人定制的Arxiv领域配置相关,设置的样例如下: + +```toml +[[sources]] +limit = 150 +category = "cs.CL" +title = "Computation and Language" +``` + +- `limit`:每天更新当前Arxiv领域中的论文数目,默认为`150`,(*一般来说,大部分单领域Arxiv论文的每日更新数目不会超过150*。) +- `category`:所感兴趣的Arxiv文章领域标识,需根据[Arxiv](https://arxiv.org/)官网查找对应领域的标识。 +- `title`:领域标识对应的领域名称,需根据[Arxiv](https://arxiv.org/)官网查找对应领域的名称。 + +上述设置为一个Arxiv领域对应的设置单元样例,默认设置涵盖NLP研究者主要关注的Arxiv中`cs.CL`、`cs.CV`、`cs.IR`、`cs.LG`以及`cs.MM`领域,使用者可以根据自己的研究偏好参照上述说明进行更改。 + +

3. 高亮脚本设置

+ +`config.toml`配置文件中,高亮脚本设置部分如下图所示: + + + +此部分与个人定制的高亮信息相关,使用者在此部分可以根据自己的研究偏好,进一步添加定制化高亮信息。 + +```toml +[scripts] +highlight_title = "scripts/highlight_title.rhai" +highlight_author = "scripts/highlight_author.rhai" +highlight_conference = "scripts/highlight_conference.rhai" +``` + +目前所支持的高亮信息,包括文章标题、作者和会议名称三个方面。然而此部分所给出的信息只有脚本文件的位置,使用者需要转移到脚本文件夹`./scripts`下修改对应的高亮配置文件`./scripts/config.rhai`,其中文件中相关设置部分如下: + + + +在`./scripts/config.rhai`中,定制化改动如下: + +- `let titles = titles_model + titles_method + titles_type;`:标题的高亮可以自定义其内容,默认由***模型***、***方法***以及***类型***三部分组成: + - `let titles_type = ["Dataset", "Survey"];`:添加需要高亮的文章类型; + - `let titles_model = ["BERT", "GPT", "Transformer"];`添加需要高亮的文章模型信息; + - `let titles_method = ["Pre-train", "Pretrain", "Prompt", "Self-Supervised"];`添加需要高亮的文章方法信息; +- `let authors_array = ["Yann LeCun", "Geoffrey Hinton", "Yoshua Bengio"];`添加需要高亮的作者信息; +- `let conferences = [];` 高亮的会议列表,默认包含了当前AI领域的大部分主流会议信息; + +

4. workflow设置

+ +workflow设置位于文件`./.github/workflows/update-feed.yml`中: + + + +可以参考如下部分需要对此文件进行修改。 + +- `name: workflowname`:对Workflow进行命名,默认为`Update`。 + +- `- cron: "12 5 * * *"`:对Workflow运行的时间进行设置,即对MyArxiv每天更新的时间进行设置,*可以参考[crontab](https://crontab.guru/),对时间进行调整*。 + +

5. MyArxiv网页设置

+ +完成MyArxiv个性定制化后,下面进行网页显示的修改,主要修改目标文件为`./includes/index.hbs`,使用者可以根据自己的风格喜好对网页格式进行各类更改,如下提供两个更改样例: + +- 网页标题的修改: + + 在`index.hbs`中,网页标题相关配置如下所示: + + + + - 其中位于`line 56`的蓝线高亮部分为当前配置的网页标题,使用者可以自行进行更改: + + ```js +
+ NAME YOU LIKE +
+ ``` + + - 其中位于`index.hbs `中`line 50 `的分区中已经注释掉的部分中,红线高亮部分表示将自己的`MyArxiv`仓库地址进行链接并对标题进行重新命名的相关设置,可以使用此设置,替代默认的网页标题,修改格式如下: + + ```js +
+ + ``` + +- 徽章的修改: + + 在`index.hbs`中,网页标题相关配置如下所示: + + + + - 其中位于`line 125`的蓝线高亮部分为当前配置的网页时间戳,使用者可以根据自己需要进行自行更改: + + ```js + {{time_format build_time "%F %T %Z"}} + ``` + + - 其中位于`index.hbs `中`line 119 `的分区中已经注释掉的部分中,红线高亮部分表示使用shield.io实时更新当前workflow的build时间戳,对`index.hbs`中`line 118`链接的workflow地址进行修改;可以使用此设置,设置徽章替代默认的网页时间戳,修改格式如下: + + ```js + {{time_format build_time + ``` + + 其中涉及`workflowname`需要与`./.github/workflows/update-feed.yml`中的`name`的保持一致。 + +配置修改完成,将上述更改提交至个人的Github仓库。 + +

6. Github Pages设置

+ +在完成上述定制后,需要对个人的MyArxiv库Github Pages进行设置,将项目进行托管: + +- 访问`Github Pages`设置`https://github.com/username/reponame/settings/pages` + + + +- 若使用`username.github.io`来托管MyArxiv,则: + - 将其中的`Branch`设置为`gh-pages`分支; + - 成功Build后,定制化结束; + - 访问`username.github.io./reponame`,即可实现MyArxiv的定制化访问 + +- 若使用其他域名来托管MyArxiv,则: + - 将其中的`Branch`设置为`gh-pages`分支; + - 将自己的域名填入`Custom Domain`; + - 在`./statics`文件夹下新建`CNAME`文件,将域名写入其中: + + ```shell + >> cd ./statics + >> touch CNAME + >> echo "your domain" > CNAME + ``` + - 成功Build后,定制化结束; + - 访问`username.github.io/reponame`,即可实现MyArxiv的定制化访问 + +到这里,就实现了`MyArxiv`的定制化。**Enjoy *YourArxiv* !** + +## 参考资源 +该项目部分参考如下项目: +- [ArxivFeed Template](https://github.com/NotCraft/ArxivDaily) +- Powered By [ArxivFeed](https://github.com/NotCraft/ArxivFeed) + +## 致谢 +感谢如下项目对本项目提供的帮助: +- [Osmosfeed](https://github.com/osmoscraft/osmosfeed) +- [AlongWY Version](https://github.com/AlongWY/ArxivDaily) +- [LooperXX Osmosfeed Version](https://github.com/LooperXX/ArxivDaily-Old) + +## 组织者 +感谢以下同学对本项目的组织 + + + + + + + + +## 贡献者 +感谢以下同学对本项目的支持与贡献 + + + + + + diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..41e2203 --- /dev/null +++ b/config.toml @@ -0,0 +1,33 @@ +site_title = "MyArxiv" +limit_days = 7 +cache_url = "https://mlnlp-world.github.io/MyArxiv/cache.json" + +[[sources]] +limit = 150 +category = "cs.CL" +title = "Computation and Language" + +[[sources]] +limit = 150 +category = "cs.CV" +title = "Computer Vision and Pattern Recognition" + +[[sources]] +limit = 150 +category = "cs.IR" +title = "Information Retrieval" + +[[sources]] +limit = 150 +category = "cs.LG" +title = "Machine Learning" + +[[sources]] +limit = 150 +category = "cs.MM" +title = "Multimedia" + +[scripts] +highlight_title = "scripts/highlight_title.rhai" +highlight_author = "scripts/highlight_author.rhai" +highlight_conference = "scripts/highlight_conference.rhai" diff --git a/imgs/icon/ai.png b/imgs/icon/ai.png new file mode 100644 index 0000000..871010e Binary files /dev/null and b/imgs/icon/ai.png differ diff --git a/imgs/icon/catalogue.png b/imgs/icon/catalogue.png new file mode 100644 index 0000000..5683be4 Binary files /dev/null and b/imgs/icon/catalogue.png differ diff --git a/imgs/icon/cog.png b/imgs/icon/cog.png new file mode 100644 index 0000000..3d9d73c Binary files /dev/null and b/imgs/icon/cog.png differ diff --git a/imgs/icon/folders.png b/imgs/icon/folders.png new file mode 100644 index 0000000..9820089 Binary files /dev/null and b/imgs/icon/folders.png differ diff --git a/imgs/icon/heart.png b/imgs/icon/heart.png new file mode 100644 index 0000000..9e0301e Binary files /dev/null and b/imgs/icon/heart.png differ diff --git a/imgs/icon/intro.png b/imgs/icon/intro.png new file mode 100644 index 0000000..6afb3e5 Binary files /dev/null and b/imgs/icon/intro.png differ diff --git a/imgs/icon/link.png b/imgs/icon/link.png new file mode 100644 index 0000000..8014ae2 Binary files /dev/null and b/imgs/icon/link.png differ diff --git a/imgs/icon/motivation.png b/imgs/icon/motivation.png new file mode 100644 index 0000000..c99adf7 Binary files /dev/null and b/imgs/icon/motivation.png differ diff --git a/imgs/icon/notes.png b/imgs/icon/notes.png new file mode 100644 index 0000000..9536a4d Binary files /dev/null and b/imgs/icon/notes.png differ diff --git a/imgs/icon/organizer.png b/imgs/icon/organizer.png new file mode 100644 index 0000000..dc19915 Binary files /dev/null and b/imgs/icon/organizer.png differ diff --git a/imgs/icon/resource.png b/imgs/icon/resource.png new file mode 100644 index 0000000..61b827c Binary files /dev/null and b/imgs/icon/resource.png differ diff --git a/imgs/icon/thanks.png b/imgs/icon/thanks.png new file mode 100644 index 0000000..01579fb Binary files /dev/null and b/imgs/icon/thanks.png differ diff --git a/imgs/profile/libo_qin.jpg b/imgs/profile/libo_qin.jpg new file mode 100644 index 0000000..af7fb21 Binary files /dev/null and b/imgs/profile/libo_qin.jpg differ diff --git a/imgs/profile/xiao_xu.jpg b/imgs/profile/xiao_xu.jpg new file mode 100644 index 0000000..1bd2beb Binary files /dev/null and b/imgs/profile/xiao_xu.jpg differ diff --git a/imgs/profile/yu_gu.png b/imgs/profile/yu_gu.png new file mode 100644 index 0000000..de2a130 Binary files /dev/null and b/imgs/profile/yu_gu.png differ diff --git a/imgs/profile/yudi_zhang.jpg b/imgs/profile/yudi_zhang.jpg new file mode 100644 index 0000000..ef2987b Binary files /dev/null and b/imgs/profile/yudi_zhang.jpg differ diff --git a/imgs/profile/yunlong_feng.png b/imgs/profile/yunlong_feng.png new file mode 100644 index 0000000..3b83b2a Binary files /dev/null and b/imgs/profile/yunlong_feng.png differ diff --git a/imgs/readme/preview1.png b/imgs/readme/preview1.png new file mode 100644 index 0000000..8304466 Binary files /dev/null and b/imgs/readme/preview1.png differ diff --git a/imgs/readme/preview2.png b/imgs/readme/preview2.png new file mode 100644 index 0000000..0a1fd6e Binary files /dev/null and b/imgs/readme/preview2.png differ diff --git a/imgs/readme/preview3.png b/imgs/readme/preview3.png new file mode 100644 index 0000000..84d419e Binary files /dev/null and b/imgs/readme/preview3.png differ diff --git a/imgs/tutorial/1.1.1.png b/imgs/tutorial/1.1.1.png new file mode 100644 index 0000000..5fa338b Binary files /dev/null and b/imgs/tutorial/1.1.1.png differ diff --git a/imgs/tutorial/1.1.2.png b/imgs/tutorial/1.1.2.png new file mode 100644 index 0000000..ddd3103 Binary files /dev/null and b/imgs/tutorial/1.1.2.png differ diff --git a/imgs/tutorial/1.2.1.png b/imgs/tutorial/1.2.1.png new file mode 100644 index 0000000..f137e04 Binary files /dev/null and b/imgs/tutorial/1.2.1.png differ diff --git a/imgs/tutorial/1.3.1.png b/imgs/tutorial/1.3.1.png new file mode 100644 index 0000000..40069dc Binary files /dev/null and b/imgs/tutorial/1.3.1.png differ diff --git a/imgs/tutorial/1.3.2.png b/imgs/tutorial/1.3.2.png new file mode 100644 index 0000000..34f7aa2 Binary files /dev/null and b/imgs/tutorial/1.3.2.png differ diff --git a/imgs/tutorial/2.1.1.png b/imgs/tutorial/2.1.1.png new file mode 100644 index 0000000..3e2dd50 Binary files /dev/null and b/imgs/tutorial/2.1.1.png differ diff --git a/imgs/tutorial/2.2.1.png b/imgs/tutorial/2.2.1.png new file mode 100644 index 0000000..5b051e7 Binary files /dev/null and b/imgs/tutorial/2.2.1.png differ diff --git a/imgs/tutorial/2.3.1.png b/imgs/tutorial/2.3.1.png new file mode 100644 index 0000000..ea8d1e1 Binary files /dev/null and b/imgs/tutorial/2.3.1.png differ diff --git a/imgs/tutorial/2.4.1.png b/imgs/tutorial/2.4.1.png new file mode 100644 index 0000000..de485ad Binary files /dev/null and b/imgs/tutorial/2.4.1.png differ diff --git a/imgs/tutorial/2.5.1.png b/imgs/tutorial/2.5.1.png new file mode 100644 index 0000000..1d62a0b Binary files /dev/null and b/imgs/tutorial/2.5.1.png differ diff --git a/imgs/tutorial/2.6.1.png b/imgs/tutorial/2.6.1.png new file mode 100644 index 0000000..3b6a859 Binary files /dev/null and b/imgs/tutorial/2.6.1.png differ diff --git a/imgs/tutorial/2.7.1.png b/imgs/tutorial/2.7.1.png new file mode 100644 index 0000000..b72e728 Binary files /dev/null and b/imgs/tutorial/2.7.1.png differ diff --git a/imgs/tutorial/2.8.1.png b/imgs/tutorial/2.8.1.png new file mode 100644 index 0000000..9e91a80 Binary files /dev/null and b/imgs/tutorial/2.8.1.png differ diff --git a/includes/index.hbs b/includes/index.hbs new file mode 100644 index 0000000..e894c33 --- /dev/null +++ b/includes/index.hbs @@ -0,0 +1,130 @@ + + + + + {{site_title}} + + + + + + + + + + + + + + + +
+
+
+ {{!-- +
+ MLNLP//MyArxiv +
+
--}} +
+ MyArxiv +
+
+ +
+ +
+
+
+ +{{#each days}} +
+
+ +
+ {{#each subjects}} +
+
+ + {{ subject }} {{len papers}} + +
+ {{#each papers}} +
+
+ + {{#if (ne updated published)}}♻{{/if}} {{highlight_title title authors}} {{highlight_conference comment}} + + +
+ {{summary}} +
+ {{#if comment}} +
+ comment: {{comment}} +
+ {{/if}} +
+
+ {{/each}} +
+
+
+ {{/each}} +
+{{/each}} + + + +
+
+ +
+
+ + diff --git a/scripts/config.rhai b/scripts/config.rhai new file mode 100644 index 0000000..5e08c02 --- /dev/null +++ b/scripts/config.rhai @@ -0,0 +1,40 @@ +let titles_type = ["Dataset", "Survey", "Review", "Overview"]; +let titles_model = ["BERT", "GPT", "Transformer"]; +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; \ No newline at end of file diff --git a/scripts/highlight_author.rhai b/scripts/highlight_author.rhai new file mode 100644 index 0000000..b48e9c1 --- /dev/null +++ b/scripts/highlight_author.rhai @@ -0,0 +1,8 @@ +import "scripts/config" as cfg; +let authors = params[0]; + +let authors_rg = RegexCaseInsensitive(`(?P(${cfg::authors_rg}))`); +let authors = authors.map(|v|authors_rg.replace_all(v,"$key")); + +let start = authors.shift(); +authors.reduce(|sum, v| sum + ", " + v, start) \ No newline at end of file diff --git a/scripts/highlight_conference.rhai b/scripts/highlight_conference.rhai new file mode 100644 index 0000000..39f78cc --- /dev/null +++ b/scripts/highlight_conference.rhai @@ -0,0 +1,20 @@ +import "scripts/config" as cfg; +let comment = params[0]; + +let conferences_rg = Regex(`(?P(${cfg::conferences_rg}))`); + +if comment != () { + let conference = conferences_rg.find(comment); + let conference = conference.text; + + let conference = if conference != "" { + "" + conference + "" + } else { + "" + }; + + conference +} else { + "" +} + diff --git a/scripts/highlight_title.rhai b/scripts/highlight_title.rhai new file mode 100644 index 0000000..55297c6 --- /dev/null +++ b/scripts/highlight_title.rhai @@ -0,0 +1,19 @@ +import "scripts/config" as cfg; + +let title = params[0]; +let authors = params[1]; + +title.trim(); + +let title_rg = RegexCaseInsensitive(`(?P(${cfg::title_rg}))`); +let authors_rg = RegexCaseInsensitive(`(?P(${cfg::authors_rg}))`); +let title = title_rg.replace_all(title,"$key"); + +let authors = authors.map(|v|authors_rg.is_match(v)); +let title = if true in authors { + " " + title +} else { + "☆ " + title +}; + +title \ No newline at end of file diff --git a/statics/favicon.ico b/statics/favicon.ico new file mode 100644 index 0000000..7f5166c Binary files /dev/null and b/statics/favicon.ico differ diff --git a/statics/index.css b/statics/index.css new file mode 100644 index 0000000..9ded9d9 --- /dev/null +++ b/statics/index.css @@ -0,0 +1,355 @@ +:root { + /* Palette: Nord (https://www.nordtheme.com)*/ + --nord00: #2e3440; + --nord01: #3b4252; + --nord02: #434c5e; + --nord03: #4c566a; + --nord04: #d8dee9; + --nord05: #e5e9f0; + --nord06: #eceff4; + --nord07: #8fbcbb; + --nord08: #88c0d0; + --nord09: #81a1c1; + --nord0A: #5e81ac; + --nord0B: #bf616a; + --nord0C: #d08770; + --nord0D: #ebcb8b; + --nord0E: #a3be8c; + --nord0F: #b48ead; + + + /* Typograph */ + --font-family-default: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", + sans-serif; + --font-size-scaler: 62.5%; + --font-size-m: 1.6rem; + --font-size-s: 1.4rem; + + /* Components */ + --body-color: var(--nord06); + --body-bg: var(--nord00); + + --header-title: var(--nord06); + --header-container: var(--nord00); + --header-title-preffix: var(--nord0F); + + --chip-font: var(--nord08); + --chip-color: var(--nord0B); + + --icons: var(--nord06); + --icons-hover: var(--nord0F); + + --day-container: var(--nord01); + --date: var(--nord09); + + --summary: var(--nord0E); + --summary-hover: var(--nord0F); + + --details-open: var(--nord02); + --details-content: var(--nord05); + --details-a: var(--nord07); + --details-a-hover: var(--nord0F); + + --highlight-title: var(--nord0B); + --highlight-author: var(--nord0B); + + --article-summary-hover-color: var(--nord0D); + --article-summary-color: var(--nord04); + + --article-title-color: var(--nord05); + --article-title-hover-color: var(--nord0E); + + --accordion-content-rail-color: var(--nord01); + --accordion-content-hover-rail-color: var(--nord0D); + --accordion-title-marker-color: var(--nord01); + --accordion-title-hover-marker-color: var(--nord0E); + + --footer-color: var(--nord04); + --footer-link-hover-color: var(--nord0D); +} + +[data-theme="light"] { + /* Theme design */ + + --color-primary: var(--nord07); + --color-primary-second: var(--nord00); + --color-info: var(--nord0A); + --color-success: var(--nord0E); + --color-warning: var(--nord0C); + --color-danger: var(--nord0B); + + --color-text: var(--nord00); + --color-hover: var(--nord0D); + --color-shadow: var(--nord03); + + --color-primary-h: var(--nord09); + --color-primary-s: var(--nord08); + --color-primary-l: var(--nord07); + + --color-contrast-higher-h: var(--nord01); + --color-contrast-higher-l: var(--nord02); + --color-contrast-higher-s: var(--nord03); + + --color-content: white; + + --background: var(--nord06); + --background-content: var(--nord05); + --background-color: var(--nord04); + + /* Components */ + + --chip-font: var(--nord06); + --chip-color: var(--nord09); + + --body-color: var(--background-color); + --body-bg: var(--background); + + --header-title: var(--color-shadow); + --header-container: var(--background); + --header-title-preffix: var(--color-primary-h); + + --icons: var(--color-shadow); + --icons-hover: var(--color-hover); + + --day-container: var(--background-content); + --date: var(--color-primary-l); + + --summary: var(--color-info); + --summary-hover: var(--color-success); + + --details-open: var(--color-content); + --details-content: var(--color-text); + --details-a: var(--color-primary-h); + --details-a-hover: var(--color-hover); + + --highlight-title: var(--color-danger); + --highlight-author: var(--color-warning); + + --article-summary-color: var(--color-text); + --article-summary-hover-color: var(--color-primary-s); + + --article-title-color: var(--color-primary); + --article-title-hover-color: var(--color-success); + + --accordion-content-rail-color: var(--color-warning); + --accordion-content-hover-rail-color: var(--color-warning); + --accordion-title-marker-color: var(--color-success); + --accordion-title-hover-marker-color: var(--color-success); + + --footer-color: var(--color-text); + --footer-link-hover-color: var(--color-hover); +} + +html { + font-size: var(--font-size-scaler); +} + +body { + background-color: var(--body-bg); + font-family: var(--font-family-default); + color: var(--body-color); + margin: 0; + padding-top: 16px; + display: grid; +} + +.header-container { + width: 90%; + max-width: 1200px; + background: var(--header-container); + margin: 0 auto; +} + +.header-title { + font-size: 32px; + font-weight: bold; + color: var(--header-title); + margin: 0; + padding-bottom: 14px; +} + +.header-title-preffix { + color: var(--header-title-preffix); +} + +.icons { + color: var(--icons); + padding-bottom: 16px; +} + +.icons a { + color: var(--icons); + text-decoration: none; +} + +.icons a:hover { + color: var(--icons-hover); +} + +.day-container { + padding: 16px 16px 16px 16px; + background: var(--day-container); + width: 90%; + max-width: 1200px; + margin: 0 auto; + margin-bottom: 8px; + border-radius: 10px; +} + +.date { + font-size: 24px; + font-weight: 700; + margin: 0; + color: var(--date); +} + +p { + margin: 0; +} + +summary { + font-weight: 600; + color: var(--summary); +} + +summary:hover { + text-decoration: underline; + cursor: pointer; + color: var(--summary-hover); +} + +details { + --border-color: transparent; + + padding: 2px 4px; + font-size: 20px; + border: 1px solid var(--border-color); + border-radius: 4px; +} + +details[open] { + background-color: var(--details-open); + margin-bottom: 8px; +} + +.details-content { + padding: 12px 3px; + gap: 16px; + color: var(--details-content); +} + +details a { + color: var(--details-a); +} + +details a:hover { + color: var(--details-a-hover); +} + +footer { + margin: 0 auto; + color: var(--footer-color); + font-size: var(--font-size-s); + display: flex; + padding: 0 16px; + justify-content: space-between; +} + +.description { + margin: 0 auto; + color: var(--footer-color); + font-size: var(--font-size-s); + display: flex; + padding: 0 16px; + text-align: center; +} + +.highlight-author { + color: var(--highlight-author); + font-weight: bold; +} + +.highlight-title { + color: var(--highlight-title); + font-weight: bold; +} + +.channel-description { + text-align: center; + font-size: var(--font-size-scaler); +} + +.article-summary-link { + color: var(--article-summary-color); + font-size: var(--font-size-s); + text-decoration: none; +} + +.article-summary-link:hover { + color: var(--article-summary-hover-color); + --accordion-content-rail-color: var(--accordion-content-hover-rail-color); +} + +.article-summary-box-outer { + display: block; + padding: 4px 8px 8px 4px; +} + +.article-summary-box-inner { + padding-left: 8px; + border-left: 1px solid var(--accordion-content-rail-color); + font-size: var(--font-size-m); +} + +.article-expander { + padding: 10px 4px; + border-radius: 4px; +} + +.article-authors { + font-size: var(--font-size-m); + padding: 0.25em 1em; +} + +.article-authors a { + text-decoration: none; +} + +.article-expander-title { + font-size: var(--font-size-m); + font-weight: 600; +} + +.article-expander-title:hover { + cursor: pointer; +} + +.article-expander-title::marker { + color: var(--accordion-title-marker-color); +} + +.article-expander-title:hover::marker { + color: var(--accordion-title-hover-marker-color); +} + +/* for switcher */ +.theme-switch { + display: inline-block; + position: relative; +} + +.theme-switch input { + display: none; +} + +/* chip */ +.chip { + font-size: 90%; + align-items: center; + color: var(--chip-font); + background: var(--chip-color); + border-radius: 5rem; + display: inline-flex; + padding: .2rem .4rem; + vertical-align: middle; +} \ No newline at end of file diff --git a/statics/index.js b/statics/index.js new file mode 100644 index 0000000..69f5da7 --- /dev/null +++ b/statics/index.js @@ -0,0 +1,39 @@ +/* Exapand/Collapse with TAB key */ +var expanded = false; +document.onkeydown = function (e) { + if (e.keyCode === 9) { + expanded = !expanded; + document.querySelectorAll("details").forEach(detail => detail.open = expanded); + return false; + } +}; + +/* Switch Theme */ +const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]'); + +function switchTheme(e) { + if (e.target.checked) { + document.documentElement.setAttribute('data-theme', 'light'); + document.getElementById("theme-icon").className = "ri-sun-line"; + localStorage.setItem('theme', 'light'); //add this + } else { + document.documentElement.setAttribute('data-theme', 'dark'); + document.getElementById("theme-icon").className = "ri-moon-line"; + localStorage.setItem('theme', 'dark'); //add this + } +} + +toggleSwitch.addEventListener('change', switchTheme, false); +const currentTheme = localStorage.getItem('theme') ? localStorage.getItem('theme') : null; +if (currentTheme) { + document.documentElement.setAttribute('data-theme', currentTheme); + if (currentTheme === 'light') { + toggleSwitch.checked = true; + } +} + +const timestamp = document.getElementById("build-timestamp"); +const timestamp_local = new Date(timestamp.getAttribute("datetime")).toLocaleString(); + +const badge = document.getElementById("build-timestamp-badge"); +// badge.src = `https://img.shields.io/github/workflow/status/mlnlp-world/myarxiv/Update?=${timestamp_local}&style=for-the-badge`