Skip to content

Commit

Permalink
Bump to v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TDKorn committed May 9, 2023
1 parent 83cc540 commit d8e0542
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 29 deletions.
6 changes: 3 additions & 3 deletions InstaTweet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Helpers
from . import utils, db
from .db import DBConnection
# API Interaction/Wrapper Classes
from .instapost import InstaPost
from .instapage import InstaPage, InstaUser, Hashtag
from .instaclient import InstaClient, USER_AGENT
from .tweetclient import TweetClient
# User Interface Classes
from .profile import Profile
from .instatweet import InstaTweet

__version__ = "v2.2.0"

10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
:description: A Python package to automatically repost content from Instagram to Twitter

.. |.InstaTweet| replace:: ``InstaTweet``
.. _.InstaTweet: https://github.com/tdkorn/insta-tweet/blob/master/InstaTweet/instatweet.py#L5-L147
.. _.InstaTweet: https://github.com/tdkorn/insta-tweet/blob/v2.2.0/InstaTweet/instatweet.py#L5-L147
.. |.add_pages| replace:: ``add_pages()``
.. _.add_pages: https://github.com/tdkorn/insta-tweet/blob/master/InstaTweet/profile.py#L132-L165
.. _.add_pages: https://github.com/tdkorn/insta-tweet/blob/v2.2.0/InstaTweet/profile.py#L132-L165
.. |.Profile| replace:: ``Profile``
.. _.Profile: https://github.com/tdkorn/insta-tweet/blob/master/InstaTweet/profile.py#L11-L382
.. _.Profile: https://github.com/tdkorn/insta-tweet/blob/v2.2.0/InstaTweet/profile.py#L11-L382
.. |.start| replace:: ``start()``
.. _.start: https://github.com/tdkorn/insta-tweet/blob/master/InstaTweet/instatweet.py#L71-L121
.. _.start: https://github.com/tdkorn/insta-tweet/blob/v2.2.0/InstaTweet/instatweet.py#L71-L121
.. |.InstaClient| replace:: ``InstaClient``
.. _.InstaClient: https://github.com/tdkorn/insta-tweet/blob/master/InstaTweet/instaclient.py#L16-L159
.. _.InstaClient: https://github.com/tdkorn/insta-tweet/blob/v2.2.0/InstaTweet/instaclient.py#L16-L159
.. |mandatory-settings| replace:: mandatory settings
.. _mandatory-settings: https://instatweet.readthedocs.io/en/latest/_readme/getting-started.html#mandatory-settings

Expand Down
10 changes: 5 additions & 5 deletions README_PyPi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
:description: A Python package to automatically repost content from Instagram to Twitter

.. |.InstaTweet| replace:: InstaTweet
.. _.InstaTweet: https://github.com/tdkorn/insta-tweet/blob/master/InstaTweet/instatweet.py#L5-L147
.. _.InstaTweet: https://github.com/tdkorn/insta-tweet/blob/v2.2.0/InstaTweet/instatweet.py#L5-L147
.. |.add_pages| replace:: add_pages()
.. _.add_pages: https://github.com/tdkorn/insta-tweet/blob/master/InstaTweet/profile.py#L132-L165
.. _.add_pages: https://github.com/tdkorn/insta-tweet/blob/v2.2.0/InstaTweet/profile.py#L132-L165
.. |.Profile| replace:: Profile
.. _.Profile: https://github.com/tdkorn/insta-tweet/blob/master/InstaTweet/profile.py#L11-L382
.. _.Profile: https://github.com/tdkorn/insta-tweet/blob/v2.2.0/InstaTweet/profile.py#L11-L382
.. |.start| replace:: start()
.. _.start: https://github.com/tdkorn/insta-tweet/blob/master/InstaTweet/instatweet.py#L71-L121
.. _.start: https://github.com/tdkorn/insta-tweet/blob/v2.2.0/InstaTweet/instatweet.py#L71-L121
.. |.InstaClient| replace:: InstaClient
.. _.InstaClient: https://github.com/tdkorn/insta-tweet/blob/master/InstaTweet/instaclient.py#L16-L159
.. _.InstaClient: https://github.com/tdkorn/insta-tweet/blob/v2.2.0/InstaTweet/instaclient.py#L16-L159
.. |mandatory-settings| replace:: mandatory settings
.. _mandatory-settings: https://instatweet.readthedocs.io/en/latest/_readme/getting-started.html#mandatory-settings

Expand Down
25 changes: 9 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import os
import re
from pathlib import Path
from setuptools import setup


LONG_DESCRIPTION_SRC = 'README_PyPi.rst'


Expand All @@ -11,27 +10,21 @@ def read(file):
return f.read()


def get_pypi_desc(rst_file=LONG_DESCRIPTION_SRC):
rst = read(rst_file)
# Replace the "From the Docs..." rst admonition with a screenshot of it
docs_admonition_regex = r'.. admonition:: From the Docs\.\.\.[\w\W]+https.+\n{3}'
docs_admonition_img = ".. image:: {}".format(
"https://user-images.githubusercontent.com/96394652/187158617-f45761ab-3aa9-472f-a6fb-a99cd0ce900c.png\n\n\n"
)
return re.sub(
pattern=docs_admonition_regex,
repl=docs_admonition_img,
string=rst
)
# Parse version
init = Path(__file__).parent.joinpath("InstaTweet", "__init__.py")
for line in init.read_text().split("\n"):
if line.startswith("__version__ ="):
break
version = line.split(" = ")[-1].strip('"')


setup(
name='insta-tweet',
packages=['InstaTweet'],
version='2.1.3',
version=version,
license='MIT',
description='Automatically Repost Content From Instagram to Twitter',
long_description=get_pypi_desc(LONG_DESCRIPTION_SRC),
long_description=read(LONG_DESCRIPTION_SRC),
long_description_content_type="text/x-rst; charset=UTF-8",
author='Adam Korn',
author_email='[email protected]',
Expand Down

0 comments on commit d8e0542

Please sign in to comment.