diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
deleted file mode 100644
index cffc198..0000000
--- a/.github/CODEOWNERS
+++ /dev/null
@@ -1 +0,0 @@
-* @MartaSien
\ No newline at end of file
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 3401052..0000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-# To get started with Dependabot version updates, you'll need to specify which
-# package ecosystems to update and where the package manifests are located.
-# Please see the documentation for all configuration options:
-# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
-
-version: 2
-updates:
- - package-ecosystem: "pip"
- directory: "/"
- schedule:
- interval: "weekly"
diff --git a/.github/linters/.mega-linter.yml b/.github/linters/.mega-linter.yml
deleted file mode 100644
index c45a956..0000000
--- a/.github/linters/.mega-linter.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-# Configuration file for MegaLinter
-# See all available variables at https://megalinter.io/configuration/ and in linters documentation
-# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
-ENABLE_LINTERS:
- - PYTHON_BLACK
- - PYTHON_RUFF
- - CSS_STYLELINT
- - HTML_HTMLHINT
- - MARKDOWN_MARKDOWNLINT
- - YAML_PRETTIER
-MARKDOWN_FILTER_REGEX_EXCLUDE: '(LICENSE\.md|docs/NEWS\.md)'
-MARKDOWN_MARKDOWN_LINK_CHECK_DISABLE_ERRORS: true
-PRE_COMMANDS:
- - command: R --slave -e 'install.packages(c("lintr"))'
- cwd: "root"
-PRINT_ALL_FILES: false
diff --git a/.github/workflows/megalinter.yml b/.github/workflows/megalinter.yml
deleted file mode 100644
index 4dbceef..0000000
--- a/.github/workflows/megalinter.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-# MegaLinter GitHub Action configuration file
-# More info at https://megalinter.io
-name: MegaLinter
-
-on:
- push:
- branches: [master]
- pull_request:
- branches: [master]
-
-env:
- MEGALINTER_CONFIG: .github/linters/.mega-linter.yml
-
-concurrency:
- group: ${{ github.ref }}-${{ github.workflow }}
- cancel-in-progress: true
-
-jobs:
- megalinter:
- name: MegaLinter
- runs-on: ubuntu-latest
- steps:
- # Git Checkout
- - name: Checkout Code
- uses: actions/checkout@v4
- with:
- token: ${{ secrets.PAT }}
-
- - name: MegaLinter
- id: ml
- # You can override MegaLinter flavor used to have faster performances
- # More info at https://megalinter.io/flavors/
- uses: oxsecurity/megalinter/flavors/python@v8.0.0
- env:
- VALIDATE_ALL_CODEBASE: true
- GITHUB_TOKEN: ${{ secrets.PAT }}
- # DISABLE: COPYPASTE,SPELL # Uncomment to disable copy-paste and spell checks
diff --git a/.github/workflows/update-website.yml b/.github/workflows/update-website.yml
deleted file mode 100644
index 8d11de4..0000000
--- a/.github/workflows/update-website.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-# Simple workflow for deploying static content to GitHub Pages
-name: Update website
-
-on:
- # Runs on pushes targeting the default branch
- pull_request:
- branches: ["master"]
-
- # Allows you to run this workflow manually from the Actions tab
- workflow_dispatch:
-
-# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
-# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
-concurrency:
- group: "update"
- cancel-in-progress: false
-
-jobs:
- # Run Python script to fetch REST API info
- update:
- runs-on: ubuntu-latest
- permissions:
- # Give the default GITHUB_TOKEN write permission to commit and push the
- # added or changed files to the repository.
- contents: write
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- # Push to protected branch
- token: ${{ secrets.PAT }}
- # Fetch all commits instead of a single, top one
- fetch-depth: 0
- - name: Set up Python
- uses: actions/setup-python@v5
- with:
- python-version: "3.10"
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install -r requirements.txt
- - name: Generate files
- run: python main.py
- - name: Prepare deployment branch
- run: |
- git stash
- git checkout gh-pages
- git reset --hard origin/master
- git stash pop
- - name: Commit and push
- uses: stefanzweifel/git-auto-commit-action@v7.1.0
- with:
- commit_message: Update website
- push_options: --force
- branch: gh-pages
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index f5855d3..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-env
-__pycache__
-.env
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index fe4b2e2..0000000
--- a/README.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# HS3 Baza zasobów Dashboard
-
-Skrypt, który generuje podsumowanie [Bazy Wiedzy zasobów Hackerspace Trójmiasto](https://kb.hs3.pl/docs) w formie statycznej strony internetowej.
-
-## Uruchomienie połączenia z drukarką etykiet
-
-Potrzebne, by działał przycisk w kolumnie `print`. Po kliknięciu, nastąpi próba połączenia się z drukarką Brother PT-E550W, pod adresem IP zdefiniowanym w `PRINTER_IT`, w celu wydruku naklejki z kodem QR.
-
-```bash
-uv venv --python 3.11
-source .venv.bin/activate
-uv sync
-fastapi dev --port 31337 labeler/adapter/fastapi_srv.py
-export PRINTER_IT=192.168.0.147
-```
-
-W razie problemów, spróbuj alternatywnych komend:
-```bash
-source .venv/Scripts/activate
-uv run -- fastapi dev --port 31337 labeler/adapter/fastapi_srv.py
-```
-
-## Sposób działania
-
-1. Baza Wiedzy znajduje się na Discourse Hackerspace Trójmiasto i jest dostępna publicznie. Projekt wykorzystuje Discourse REST API do pobrania listy zasobów.
-1. Lista zasobów zapisana jest w pliku csv `zasoby.csv`.
-1. Skrypt tworzy statyczną stronę internetową na podstawie pliku `.csv`.
-1. Strona jest hostowana przy pomocy GitHub Pages.
-
-## Możliwości generatora bazy zasobów csv
-
-- pobieranie listy wszystkich zasobów z wybranej kategorii
-- pobieranie ID, tagów i treści posta każdego zasobu
-- wyłuskanie z treści posta informacji:
- - nazwa przedmiotu
- - miejsce zamieszkania
- - ilość
- - opiekunowie
-- oto jak powinien wyglądać ostateczny wpis:
-
-```
-ID, nazwa, miejsce, ilość, opiekunowie, tagi
-```
-
-## Automatyczna aktualizacja
-
-Żeby działały automatyczne aktualizacje przy użyciu GitHub Actions należy w sekretach dodać sekret o nazwie `PAT` którego wartością jest Personal Access Token z uprawnieniami do modyfikowania repozytorium.
-
-## Możliwości dashboard'u
-
-- filtrowanie bazy zasobów po tagach
-- sortowanie alfabetyczne bazy zasobów po dowolnej kolumnie
-- linki do zasobu na Discourse w ID zasobu
-- łatwa zmiana ilości kolumn dashboardu
-
-## Co chcę dodać w przyszłości
-
-- wizualizacja statystyk z bazy zasobów
-- generowanie drugiego pliku csv służącego do wygenerowania naklejek z kodem QR
-
-## Dokumentacja
-
-- [Discourse REST API](https://docs.discourse.org/)
-- [hbrylkowski/labeling_bot](https://github.com/hbrylkowski/labeling_bot)
diff --git a/fegen/discourse.py b/fegen/discourse.py
index cf42b56..216c11f 100644
--- a/fegen/discourse.py
+++ b/fegen/discourse.py
@@ -9,13 +9,6 @@ from dotenv import load_dotenv
DISCOURSE_URL = "https://kb.hs3.pl" # Database is hosted here
CATEGORY_ID = 9 # Database category ID
-PLACES = [
- "cow-work",
- "garage",
- "lab",
- "audiolab",
- "server-room"
-]
class DiscourseDatabase():
def __init__(self):
@@ -76,7 +69,8 @@ class DiscourseDatabase():
def get_place(self, topic):
"""Get place of a topic"""
- for place in PLACES:
+ places = ["cow-work", "garage", "lab"]
+ for place in places:
if place in topic["tags"]:
return f'{place}'
return "unknown"
diff --git a/fegen/docs/index.html b/fegen/docs/index.html
index 59ee207..dd1f24f 100644
--- a/fegen/docs/index.html
+++ b/fegen/docs/index.html
@@ -83,742 +83,6 @@
-