Skip to content

Instantly share code, notes, and snippets.

@joachimesque
joachimesque / script.py
Last active August 23, 2023 15:40
A simple command line utility that returns a JSON-formatted definitions list of the handle and url of a Fediverse address/handle/url
"""Returns a JSON-formatted definitions list of the handle and url of a Fediverse address."""
import json
import re
import click
import requests
API_ASK = ".well-known/webfinger?resource=acct:"
API_REL_PROFILE = "http://webfinger.net/rel/profile-page"
@joachimesque
joachimesque / 100.json
Last active November 22, 2024 16:47
`100.json` est l’exemple de sortie JSON que Wordpress propose pour chaque post, `import-authors.py` et `import.py` sont deux versions de la moulinette, pas vraiment faites pour être relues, mais bref.
{
"id": 100,
"date": "2012-12-07T00:00:55",
"date_gmt": "2012-12-06T23:00:55",
"guid":
{
"rendered": "http://www.24joursdeweb.fr/?p=100"
},
"modified": "2012-12-06T21:52:21",
"modified_gmt": "2012-12-06T20:52:21",