diff --git a/activate.sh b/activate.sh new file mode 100755 index 0000000..207af7a --- /dev/null +++ b/activate.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# [TLP:AMBER] LIMITED DISTRIBUTION: WORK IN PROGRESS +# Author: Moussouni, Yaël (MSc student; yael.moussouni@etu.unistra.fr) +# Institution: Université de Strasbourg, CNRS, Observatoire astronomique +# de Strasbourg, UMR 7550, F-67000 Strasbourg, France +# Date: 2025-09-15 +# +# Licence: +# ArXtic +# Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr) +# +# activate.sh +# Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr) +# +# 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 3 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, see www.gnu.org/licenses/. + +set -a +source cfg/general_config.cfg +set +a +source $VENV_DIR"bin/activate" diff --git a/arxtic.sh b/arxtic.sh new file mode 100755 index 0000000..918c8a1 --- /dev/null +++ b/arxtic.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# [TLP:AMBER] LIMITED DISTRIBUTION: WORK IN PROGRESS +# Author: Moussouni, Yaël (MSc student; yael.moussouni@etu.unistra.fr) +# Institution: Université de Strasbourg, CNRS, Observatoire astronomique +# de Strasbourg, UMR 7550, F-67000 Strasbourg, France +# Date: 2025-09-15 +# +# Licence: +# ArXtic +# Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr) +# +# arXtic +# Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr) +# +# 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 3 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, see www.gnu.org/licenses/. + +source activate.sh + +$VENV_DIR/bin/python3 src/arxtic.py diff --git a/cfg/filters/authors.txt b/cfg/filters/authors.txt new file mode 100644 index 0000000..eb2fb74 --- /dev/null +++ b/cfg/filters/authors.txt @@ -0,0 +1,6 @@ +Moussouni +Voggel +Lançon +Lancon +Hilker + diff --git a/cfg/filters/keywords.txt b/cfg/filters/keywords.txt new file mode 100644 index 0000000..7fb4802 --- /dev/null +++ b/cfg/filters/keywords.txt @@ -0,0 +1,7 @@ +Globular clusters +Galaxy: globular clusters +Galaxy: globular clusters +Galaxies: clusters: intracluster medium +GC +GCs + diff --git a/cfg/general_config.cfg b/cfg/general_config.cfg new file mode 100644 index 0000000..89452b8 --- /dev/null +++ b/cfg/general_config.cfg @@ -0,0 +1,34 @@ +# [TLP:AMBER] LIMITED DISTRIBUTION: WORK IN PROGRESS +# General configuration file +# +# Configuration file for different codes used in this project. +# +# @ Author: Moussouni, Yaël (MSc student; yael.moussouni@etu.unistra.fr) +# @ Institution: Université de Strasbourg, CNRS, Observatoire astronomique +# de Strasbourg, UMR 7550, F-67000 Strasbourg, France +# @ Date: 2025-09-15 +# +# Licence: +# ArXtic +# Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr) +# +# general_config.cfg +# Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr) +# +# 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 3 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, see www.gnu.org/licenses/. + +## Directories +VENV_DIR="./venv/" +QUERY_URL="https://export.arxiv.org/api/query?" +RSS_URL="https://rss.arxiv.org/atom/astro-ph" diff --git a/src/arxtic.py b/src/arxtic.py new file mode 100644 index 0000000..0e3547d --- /dev/null +++ b/src/arxtic.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python +#[TLP:AMBER] LIMITED DISTRIBUTION: WORK IN PROGRESS +""" +ArXtic: + +ArXtic queries arXiv and filters the output. + +@ Author: Moussouni, Yaël (MSc student; yael.moussouni@etu.unistra.fr) +@ Institution: Université de Strasbourg, CNRS, Observatoire astronomique + de Strasbourg, UMR 7550, F-67000 Strasbourg, France +@ Date: 2025-09-15 + +Licence: +ArXtic +Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr) + +arxtic.py +Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr) + +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 3 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, see www.gnu.org/licenses/. +""" +import os +import feedparser as fp + +QUERY_URL = os.environ.get("QUERY_URL") +RSS_URL = os.environ.get("RSS_URL") + +COLOUR_DEFAULT="\033[0m" +COLOUR_INPUT="\033[36m" +COLOUR_OUTPUT="\033[32m" +COLOUR_INFO="\033[34m" +COLOUR_WARNING="\033[93m" +COLOUR_ERROR="\033[91m" + +d = fp.parse(RSS_URL) + +fields = list(d) +entries = d["entries"] + +for i in range(len(entries)): + print(entries[i]["published"] + ": " + entries[i]["id"]) +