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://hal.archives-ouvertes.fr/halshs-04471220
22 February 2024, 16:04:02 UTC
  • Code
  • Branches (0)
  • Releases (1)
  • Visits
    • Branches
    • Releases
      • HEAD
    • a484edc
    • /
    • pink-my-pad-main
    • /
    • makingpmp.md
    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:a94568d3407de38e6f205fff78934fbc627350c9
    origin badgedirectory badge
    swh:1:dir:50295b718c5a4276ff88ec3f458540475c2c28c5
    origin badgesnapshot badge
    swh:1:snp:1cec82382c21679aff8bfdc56a1af78f0ce81b78
    origin badgerelease badge
    swh:1:rel:126858d6c4406c406a2b27070e903c7270fa816a

    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 ...
    makingpmp.md
    # making pmp
    
    Quelques réflexions en faisant..
    
    - [x] refresh
    - [x] refresh index
    - [ ] template
        - [x] gestion d'une css externe
        - [ ] choix css via yaml
    - [x] schema d'adresse
        - [x] hedgedoc/hackmd
        - [x] framapad
        - [ ] etherpad
    - [ ] mots-clés catégorisés
    
    ## Mots-clés catégorisés
    
    - Regex sur le markdown pour lister les mots-clés (liste markdown)
    - création d'un module html (pandoc liste-md → liste-html)
    - substitute une variable dans le template par le module html 
    
    ## refresh
    
    je dois trouver un trigger entre la page et une commande python.
    Par défaut, l'application charge ce qui a déjà été transformé (fetch_one_url), mais on peut tester et comparer la date ?
    
    J'ai trouvé le trigger (simple button qui relance la page), mais on doit pouvoir faire mieux : 
    1. charger le html quand on demande une url
    2. forcer le refresh quand on ajoute un paramètre ( par exemple `?refresh`)
    
    ou différencier get et post ! voir https://flask.palletsprojects.com/en/2.2.x/quickstart/#http-methods
    
    En différenciant le get et le post, on peut n'avoir un refresh que si le bouton refresh est appuyé (POST). Sinon, lorsqu'on fait un simple GET, l'application sert le html existant par défaut, et fait une requête seulement si nécessaire.
    
    ## Schéma d'adresses
    
    proposition de construire les adresses en suivant le schéma : `/service/idpad`.
    
    exemple: 
    - `/hedgedoc/XOXOXOXOX/`
    - `/etherpad/XOXOXOXOX/`
    - `/hackmd/XOXOXOX/`
    
    comment traiter les anciens ? je propose d'homogénéiser les schémas d'adresse, et d'utiliser canonical pour récupérer les annotations.
    
    
    
    ## Choix de template:
    
    principe : une donnée yaml définit le template qui sera utilisé: 
    
    ```
    template: [notes, cards, site, ]
    ```
    
    ## Déploiement
    
    
    Config flask
    Ressources apache : 
    - most useful : https://www.rosehosting.com/blog/how-to-install-flask-on-ubuntu-22-04-with-apache-and-wsgi/
    - similar : https://tecadmin.net/deploying-flask-application-on-ubuntu-apache-wsgi/
    - alternative method: https://stackoverflow.com/questions/71294518/deploying-flask-application-with-apache2-proxy-server
    - official Virtual Host documentation : https://httpd.apache.org/docs/2.4/vhosts/examples.html

    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