update bots

This commit is contained in:
2026-05-18 14:15:59 +07:00
parent b0ce866a2f
commit b9054d178e
5775 changed files with 832577 additions and 38 deletions

View File

@@ -0,0 +1,22 @@
from faker.providers import BaseProvider
class Provider(BaseProvider):
"""
Provider for Digital Object Identifier (DOI)
Source of info: https://en.wikipedia.org/wiki/Digital_object_identifier (English)
"""
def doi(self) -> str:
"""
Generate a valid Digital Object Identifier (DOI).
Format: 10.{4-9 digits}/{alphanumeric string}
Eg: 10.1000/xyz123
:sample:
"""
prefix = "10"
registrant = str(self.generator.random.randint(1000, 99999999))
suffix = self.generator.bothify("?#?#?##").lower()
return f"{prefix}.{registrant}/{suffix}"