Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
Attrap
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de conteneur
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Conditions générales et politique de confidentialité
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
La Quadrature du Net
Attrap
Validations
389a40bc
Valider
389a40bc
rédigé
il y a 11 mois
par
Bastien Le Querrec
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
RAAspotter: ajoute un suffixe aux pouets
parent
568e4c0c
Aucune branche associée trouvée
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
4
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
RAAspotter.py
+8
-4
8 ajouts, 4 suppressions
RAAspotter.py
ppparis.py
+1
-1
1 ajout, 1 suppression
ppparis.py
pref13.py
+1
-1
1 ajout, 1 suppression
pref13.py
pref35.py
+1
-1
1 ajout, 1 suppression
pref35.py
avec
11 ajouts
et
7 suppressions
RAAspotter.py
+
8
−
4
Voir le fichier @
389a40bc
...
...
@@ -66,6 +66,7 @@ class RAAspotter:
self
.
smtp_configured
=
False
self
.
mastodon
=
None
self
.
mastodon_prefix
=
''
self
.
mastodon_suffix
=
''
self
.
update_user_agent
(
user_agent
)
...
...
@@ -73,20 +74,23 @@ class RAAspotter:
f
.
write
(
''
)
f
.
close
()
def
configure_mastodon
(
self
,
access_token
,
instance
,
mastodon_prefix
):
def
configure_mastodon
(
self
,
access_token
,
instance
,
mastodon_prefix
,
mastodon_suffix
):
if
(
not
access_token
==
""
)
and
(
not
instance
==
""
):
self
.
mastodon
=
Mastodon
(
access_token
=
access_token
,
api_base_url
=
instance
)
self
.
mastodon_prefix
=
mastodon_prefix
self
.
mastodon_suffix
=
mastodon_suffix
def
mastodon_toot
(
self
,
content
):
if
self
.
mastodon
:
toot
=
content
if
not
self
.
mastodon_prefix
==
''
:
self
.
mastodon
.
toot
(
f
"
{
self
.
mastodon_prefix
}
\n\n
{
content
}
"
)
else
:
self
.
mastodon
.
toot
(
f
"
{
content
}
"
)
toot
=
f
"
{
self
.
mastodon_prefix
}
\n\n
{
toot
}
"
if
not
self
.
mastodon_suffix
==
''
:
toot
=
f
"
{
toot
}
\n\n
{
self
.
mastodon_suffix
}
"
self
.
mastodon
.
toot
(
toot
)
def
enable_tor
(
self
,
max_requests
=
0
):
proxies
=
{
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
ppparis.py
+
1
−
1
Voir le fichier @
389a40bc
...
...
@@ -101,5 +101,5 @@ raa_spotter.not_before = __NOT_BEFORE
raa_spotter
.
configure_mailer
(
__SMTP_HOSTNAME
,
__SMTP_USERNAME
,
__SMTP_PASSWORD
,
__SMTP_PORT
,
__SMTP_STARTTLS
,
__SMTP_SSL
,
__EMAIL_FROM
,
__EMAIL_TO
,
'
[RAAspotter] [Préfecture de police de Paris] Nouveaux éléments trouvés
'
)
raa_spotter
.
configure_mastodon
(
__MASTODON_ACCESS_TOKEN
,
__MASTODON_INSTANCE
,
'
[Préfecture de police de Paris]
'
)
raa_spotter
.
configure_mastodon
(
__MASTODON_ACCESS_TOKEN
,
__MASTODON_INSTANCE
,
'
[Préfecture de police de Paris]
'
,
'
#ppparis
'
)
raa_spotter
.
get_raa
(
__KEYWORDS
)
Ce diff est replié.
Cliquez pour l'agrandir.
pref13.py
+
1
−
1
Voir le fichier @
389a40bc
...
...
@@ -101,5 +101,5 @@ raa_spotter.not_before = __NOT_BEFORE
raa_spotter
.
configure_mailer
(
__SMTP_HOSTNAME
,
__SMTP_USERNAME
,
__SMTP_PASSWORD
,
__SMTP_PORT
,
__SMTP_STARTTLS
,
__SMTP_SSL
,
__EMAIL_FROM
,
__EMAIL_TO
,
'
[RAAspotter] [Préfecture des Bouches-du-Rhône] Nouveaux éléments trouvés
'
)
raa_spotter
.
configure_mastodon
(
__MASTODON_ACCESS_TOKEN
,
__MASTODON_INSTANCE
,
'
[Préfecture des Bouches-du-Rhône]
'
)
raa_spotter
.
configure_mastodon
(
__MASTODON_ACCESS_TOKEN
,
__MASTODON_INSTANCE
,
'
[Préfecture des Bouches-du-Rhône]
'
,
'
#pref13
'
)
raa_spotter
.
get_raa
(
__KEYWORDS
)
Ce diff est replié.
Cliquez pour l'agrandir.
pref35.py
+
1
−
1
Voir le fichier @
389a40bc
...
...
@@ -101,5 +101,5 @@ raa_spotter.not_before = __NOT_BEFORE
raa_spotter
.
configure_mailer
(
__SMTP_HOSTNAME
,
__SMTP_USERNAME
,
__SMTP_PASSWORD
,
__SMTP_PORT
,
__SMTP_STARTTLS
,
__SMTP_SSL
,
__EMAIL_FROM
,
__EMAIL_TO
,
'
[RAAspotter] [Préfecture d
\'
Ille-et-Vilaine] Nouveaux éléments trouvés
'
)
raa_spotter
.
configure_mastodon
(
__MASTODON_ACCESS_TOKEN
,
__MASTODON_INSTANCE
,
'
[Préfecture d
\'
Ille-et-Vilaine]
'
)
raa_spotter
.
configure_mastodon
(
__MASTODON_ACCESS_TOKEN
,
__MASTODON_INSTANCE
,
'
[Préfecture d
\'
Ille-et-Vilaine]
'
,
'
#pref35
'
)
raa_spotter
.
get_raa
(
__KEYWORDS
)
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter