geotribu_cli.constants module¶
Package constants.
- class geotribu_cli.constants.ExtendedEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases :
Enum
Custom Enum with extended methods.
- classmethod has_key(name)¶
Check if a certain key is present in enum.
- classmethod has_value(value)¶
Check if a certain value is present in enum.
- class geotribu_cli.constants.GeotribuDefaults(git_base_url_organisation='https://github.com/geotribu/', site_base_url='https://geotribu.fr/', site_git_default_branch='master', site_git_project='website', site_search_index='search/search_index.json', cdn_base_url='https://cdn.geotribu.fr/', cdn_base_path='img', cdn_search_index='search-index.json', comments_base_url='https://comments.geotribu.fr/', rss_path_created='feed_rss_created.xml', rss_path_updated='feed_rss_updated.xml', images_body_extensions=('.png', '.jpg', '.jpeg', '.webp'), images_body_dimensions_max=(400, 800), images_header_extensions=('.png', '.jpg', '.jpeg'), images_header_dimensions_ratio=320000, images_icon_extensions=('.png', '.jpg', '.jpeg', '.webp'), images_icon_dimensions_ratio=320000, geotribu_working_folder=PosixPath('/home/runner/.geotribu'), mastodon_base_url='https://mapstodon.space/', template_article='/articles/templates/template_article.md', template_rdp='/rdp/templates/template_rdp.md', template_rdp_news='/rdp/templates/template_rdp_news.md')¶
Bases :
object
Defaults settings for Geotribu.
- __init__(git_base_url_organisation='https://github.com/geotribu/', site_base_url='https://geotribu.fr/', site_git_default_branch='master', site_git_project='website', site_search_index='search/search_index.json', cdn_base_url='https://cdn.geotribu.fr/', cdn_base_path='img', cdn_search_index='search-index.json', comments_base_url='https://comments.geotribu.fr/', rss_path_created='feed_rss_created.xml', rss_path_updated='feed_rss_updated.xml', images_body_extensions=('.png', '.jpg', '.jpeg', '.webp'), images_body_dimensions_max=(400, 800), images_header_extensions=('.png', '.jpg', '.jpeg'), images_header_dimensions_ratio=320000, images_icon_extensions=('.png', '.jpg', '.jpeg', '.webp'), images_icon_dimensions_ratio=320000, geotribu_working_folder=PosixPath('/home/runner/.geotribu'), mastodon_base_url='https://mapstodon.space/', template_article='/articles/templates/template_article.md', template_rdp='/rdp/templates/template_rdp.md', template_rdp_news='/rdp/templates/template_rdp_news.md')¶
- property cdn_search_index_full_url: str¶
Returns CDN search index full URL.
- Renvoie:
URL as string
- Type renvoyé:
- property json_created_full_url: str¶
Returns website JSON Feed full URL for latest created contents.
- Renvoie:
URL as string
- Type renvoyé:
- json_path_created = 'feed_json_created.json'¶
- json_path_updated = 'feed_json_updated.json'¶
- property rss_created_full_url: str¶
Returns website RSS full URL for latest created contents.
- Renvoie:
URL as string
- Type renvoyé:
- site_git_source_base_url(mode='blob', url_path='')¶
Returns website git source URL in three flavors: blob, edit or raw.
- property site_search_index_full_url: str¶
Returns website search index full URL.
- Renvoie:
URL as string
- Type renvoyé:
- property site_search_tags_full_url: str¶
Returns website search tags full URL.
- Renvoie:
URL as string
- Type renvoyé:
- site_search_tags_remote_path = 'tags.json'¶
- class geotribu_cli.constants.YamlHeaderAvailableLicense(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases :
ExtendedEnum
Licences disponibles pour les contenus publiés sur Geotribu.
- BEERWARE = 'beerware'¶
- CC4_BY_BC_SA = 'cc4_by-nc-sa'¶
- CC4_BY_SA = 'cc4_by-sa'¶
- DEFAULT = 'default'¶
- class geotribu_cli.constants.YamlHeaderMandatoryKeys(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases :
ExtendedEnum
Clés obligatoires dans l’en-tête d’un contenu Geotribu.
- AUTHORS = 'authors'¶
- CATEGORIES = 'categories'¶
- DATE = 'date'¶
- DESCRIPTION = 'description'¶
- LICENSE = 'license'¶
- TAGS = 'tags'¶
- TITLE = 'title'¶