Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},

"postCreateCommand": "pip3 install --user -r requirements.txt -r docs/requirements.txt && pip install --editable .",
"postCreateCommand": "pip3 install -r docs/requirements.txt && pip install --editable .",

"customizations": {
"vscode": {
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches: [ "main" ]
paths-ignore:
- '**/*.md'
- '**/*.rst'
- '**/*.txt'

jobs:
Expand All @@ -30,7 +31,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip pylint black mypy sphinx-lint
pip install -r requirements.txt
pip install .

- name: Run Pylint
run: |
Expand Down
35 changes: 30 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,50 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import re
import sys
from datetime import datetime, timezone

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys

docs_dir = os.path.dirname(os.path.dirname(__file__))
sys.path.insert(0, os.path.abspath('../..'))


# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

# Find the version and release information.
# We have a single source of truth for our version number: the __init__.py file.
# This next bit of code reads from it.
file_with_version = os.path.join(docs_dir, "..", "src", "instawebhooks", "__init__.py")
with open(file_with_version) as f:
for line in f:
m = re.match(r'__version__ = "(.*)"', line)
if m:
__version__ = m.group(1)
# The short X.Y version.
version = ".".join(__version__.split(".")[:2])
# The full version, including alpha/beta/rc tags.
release = __version__
break
else: # AKA no-break
version = release = "dev"

print("version:", version)
print("release:", release)

project = 'InstaWebhooks'
copyright = '2024-2025, Ryan Luu'
copyright = f'2024-{datetime.now(tz=timezone.utc).year}, Ryan Luu'
author = 'Ryan Luu'
release = '1.0'
version = '1.0.0'
version = ".".join(__version__.split(".")[:2])
release = __version__

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ build-backend = "setuptools.build_meta"

[project]
name = "instawebhooks"
version = "0.1.3"
description = "Discord webhooks for new Instagram posts from any profile"
readme = "README.md"
readme = "README.rst"
requires-python = ">=3.8"
keywords = ["webhooks", "feed", "embed", "Instagram", "Discord", "CLI"]
authors = [
Expand Down Expand Up @@ -34,6 +33,7 @@ dependencies = [
"requests",
"instaloader",
]
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/RyanLua/InstaWebhooks"
Expand All @@ -46,6 +46,9 @@ Sponsor = "https://github.com/sponsors/RyanLua"
[project.scripts]
instawebhooks = "instawebhooks.__main__:main"

[tool.setuptools.dynamic]
version = {attr = "instawebhooks.__version__"}

[tool.isort]
profile = "black"

Expand Down
Binary file removed requirements.txt
Binary file not shown.
3 changes: 3 additions & 0 deletions src/instawebhooks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import sys

__version__ = "0.1.3"


if __name__ == "__main__":
from instawebhooks.__main__ import main

Expand Down
Loading