Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://doi.org/10.5281/zenodo.15281299
25 April 2025, 10:06:35 UTC
  • Code
  • Branches (0)
  • Releases (1)
  • Visits
    • Branches
    • Releases
      • 1
      • 1
    • c999079
    • /
    • conradhuebler-ALIMA-9149c20
    • /
    • setup_project.fish
    Raw File Download

    To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
    Select below a type of object currently browsed in order to display its associated SWHID and permalink.

    • content
    • directory
    • snapshot
    • release
    origin badgecontent badge
    swh:1:cnt:6c0f4e15a79e7f0de67edfd7a7188ec8fe65e58d
    origin badgedirectory badge
    swh:1:dir:9c72c77c294e128e1d4610d12e313488bc084d66
    origin badgesnapshot badge
    swh:1:snp:4ca73675f00499f7788b560b527d2d3608e24808
    origin badgerelease badge
    swh:1:rel:536b651fe52569a0b29d9afb23a4c016482765cb

    This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
    Select below a type of object currently browsed in order to generate citations for them.

    • content
    • directory
    • snapshot
    • release
    (requires biblatex-software package)
    Generating citation ...
    (requires biblatex-software package)
    Generating citation ...
    (requires biblatex-software package)
    Generating citation ...
    (requires biblatex-software package)
    Generating citation ...
    setup_project.fish
    #!/usr/bin/env fish
    
    # Projektname
    set PROJECT_NAME "gnd_search"
    
    # Hauptverzeichnis erstellen
    mkdir -p $PROJECT_NAME
    
    # Basis-Dateien erstellen
    cd $PROJECT_NAME
    
    # requirements.txt
    echo "PyQt6>=6.0.0
    requests>=2.28.0
    python-dotenv>=0.19.0" > requirements.txt
    
    # README.md
    echo "# GND Search Tool
    
    Ein Tool zur Suche und Analyse von GND-Schlagworten mit KI-Unterstützung.
    
    ## Installation
    
    \`\`\`bash
    pip install -r requirements.txt
    \`\`\`
    
    ## Verwendung
    
    \`\`\`bash
    python main.py
    \`\`\`" > README.md
    
    # main.py
    echo 'import sys
    from PyQt6.QtWidgets import QApplication
    from src.ui.main_window import MainWindow
    
    def main():
        app = QApplication(sys.argv)
        window = MainWindow()
        window.show()
        sys.exit(app.exec())
    
    if __name__ == "__main__":
        main()' > main.py
    
    # Verzeichnisstruktur erstellen
    mkdir -p src/{ui,core,utils} tests
    
    # __init__.py Dateien erstellen
    touch src/__init__.py
    touch src/ui/__init__.py
    touch src/core/__init__.py
    touch src/utils/__init__.py
    touch tests/__init__.py
    
    # UI Module
    echo 'from PyQt6.QtWidgets import QMainWindow
    from .search_tab import SearchTab
    from .abstract_tab import AbstractTab
    
    class MainWindow(QMainWindow):
        def __init__(self):
            super().__init__()
            self.init_ui()
            
        def init_ui(self):
            self.setWindowTitle("GND Search Tool")
            # TODO: Implementierung' > src/ui/main_window.py
    
    echo 'from PyQt6.QtWidgets import QWidget
    
    class SearchTab(QWidget):
        def __init__(self, parent=None):
            super().__init__(parent)
            # TODO: Implementierung' > src/ui/search_tab.py
    
    echo 'from PyQt6.QtWidgets import QWidget
    
    class AbstractTab(QWidget):
        def __init__(self, parent=None):
            super().__init__(parent)
            # TODO: Implementierung' > src/ui/abstract_tab.py
    
    echo 'from PyQt6.QtWidgets import QWidget
    
    # Gemeinsame Widget-Komponenten
    # TODO: Implementierung' > src/ui/widgets.py
    
    # Core Module
    echo 'import sqlite3
    import json
    from datetime import datetime, timedelta
    
    class CacheManager:
        def __init__(self, db_path="search_cache.db"):
            self.conn = sqlite3.connect(db_path)
            self.create_tables()
            
        def create_tables(self):
            # TODO: Implementierung' > src/core/cache_manager.py
    
    echo 'import requests
    from collections import Counter
    
    class SearchEngine:
        def __init__(self, cache_manager):
            self.cache = cache_manager
            
        def search(self, terms):
            # TODO: Implementierung' > src/core/search_engine.py
    
    echo 'import requests
    import os
    
    class AIProcessor:
        def __init__(self):
            self.api_key = self._load_api_key()
            
        def process_abstract(self, abstract, keywords):
            # TODO: Implementierung
            
        def _load_api_key(self):
            # TODO: Implementierung' > src/core/ai_processor.py
    
    # Utils Module
    echo 'import os
    from dotenv import load_dotenv
    
    load_dotenv()
    
    class Config:
        API_KEY = os.getenv("GEMINI_API_KEY")
        CACHE_DB = "search_cache.db"
        # Weitere Konfigurationsoptionen' > src/utils/config.py
    
    echo 'class TextProcessor:
        @staticmethod
        def clean_text(text):
            # TODO: Implementierung
            pass
            
        @staticmethod
        def extract_keywords(text):
            # TODO: Implementierung
            pass' > src/utils/text_processor.py
    
    # Tests
    echo 'import unittest
    
    class TestSearch(unittest.TestCase):
        def setUp(self):
            # TODO: Test Setup
            pass
            
        def test_search(self):
            # TODO: Implementierung
            pass' > tests/test_search.py
    
    echo 'import unittest
    
    class TestCache(unittest.TestCase):
        def setUp(self):
            # TODO: Test Setup
            pass
            
        def test_cache(self):
            # TODO: Implementierung
            pass' > tests/test_cache.py
    
    # Git-Ignore
    echo "*.pyc
    __pycache__/
    .env
    *.db
    .pytest_cache/
    .coverage
    htmlcov/
    dist/
    build/
    *.egg-info/" > .gitignore
    
    # Erstelle eine leere .env Datei für Konfiguration
    echo "GEMINI_API_KEY=" > .env
    
    # Mache main.py ausführbar
    chmod +x main.py
    
    echo "Projektstruktur wurde erstellt in: $PROJECT_NAME"
    
    

    back to top

    Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
    The source code of Software Heritage itself is available on our development forge.
    The source code files archived by Software Heritage are available under their own copyright and licenses.
    Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API