diff --git a/setup.py b/setup.py index c77a4bc..5c15a7a 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,26 @@ +#!/usr/bin/env python from setuptools import setup +import re + +PACKAGE_NAME = 'socials_util' + +with open('README.md', 'r') as f: + readme = f.read() + +with open(PACKAGE_NAME+'/_version.py', 'r') as f: + match = re.match(r'^__version__\s*=\s*"([\d\.]+)"$', f.read()) + version = match.group(1) + del match setup( - name='socials_util', - version='0.1.0', - description='Small utility used by one-page-internet for social site detection.', + name=PACKAGE_NAME, + version=version, + long_description=readme, + long_description_content_type='text/markdown', author='Jmaa', author_email='jonjmaa@gmail.com', url='https://gitfub.space/Jmaa/socials-util', - packages=['socials_util'], + packages=[PACKAGE_NAME], install_requires=['enforce-typing', 'aenum'], keywords=[], classifiers=[], diff --git a/socials_util/__init__.py b/socials_util/__init__.py index 50d7eb1..473cd8e 100644 --- a/socials_util/__init__.py +++ b/socials_util/__init__.py @@ -10,6 +10,8 @@ import datetime import re import urllib.parse +from socials_util._version import __version__ + class SocialSiteId(aenum.Enum): ''' The great social website enum. @@ -55,7 +57,6 @@ class SocialSiteId(aenum.Enum): BLUESKY_PROFILE = 12361 BLUESKY_DID = 12409 ITCH_IO_DEVELOPER = 8176 - FIREFOX_PROFILE_BOOKMARKS = 33 COHOST_PROFILE = 117203288 SOUNDCLOUD_ARTIST = 3040 IGDB_GAME_ID = 5794 @@ -64,6 +65,10 @@ class SocialSiteId(aenum.Enum): PLURK = 32111 + # Browser bookmarks + FIREFOX_PROFILE_BOOKMARKS = 33 + FALKON_PROFILE_BOOKMARKS = 34 + def wikidata_property(self, client): return client.get(WIKIDATA_PROPERTIES[self]) diff --git a/socials_util/_version.py b/socials_util/_version.py new file mode 100644 index 0000000..df9144c --- /dev/null +++ b/socials_util/_version.py @@ -0,0 +1 @@ +__version__ = '0.1.1'