From 098fa51f07d673af2f17d8657dd8c80462c338f9 Mon Sep 17 00:00:00 2001 From: Marcin Dobosz Date: Wed, 21 Jun 2023 19:12:51 +0200 Subject: [PATCH] Update of README.md --- .github/workflows/deploy.yml | 5 +++++ README.md | 10 ++-------- setup.py | 17 +++++++++++++++-- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 732efb7..1b5c9f4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,6 +14,9 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set output + id: vars + run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT - name: Set up Python uses: actions/setup-python@v3 with: @@ -23,6 +26,8 @@ jobs: python -m pip install --upgrade pip pip install build - name: Build package + env: + RELEASE_VERSION: ${{ steps.vars.outputs.tag }} run: python -m build - name: Publish package uses: pypa/gh-action-pypi-publish@v1.8.6 diff --git a/README.md b/README.md index 43b9a52..59be7ea 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,10 @@ # AI Link Embedder # ## Introduction ## This abomination of a code was created to solve my fiancé issue with migrating Adobe Illustrator files to different machine. It comes with absolutely no guarantee, but it seems to work. Good luck. - ## Requirements ## Running this script requires: - Windows OS (macOS is not supported for now) - Adobe Illustrator installed -## Setup ## -To install necessary dependency you need to run: -```shell -pip install -r requirement.txt -``` ## Run ## Usage: ``` @@ -31,6 +25,6 @@ options: -s SUFFIX, --suffix SUFFIX ``` Example: -```shell -python3 main.py -o -d C:\Users\Username\Documents\ai_embedded -r C:\Users\Username\Documents\ +``` +python -m ai_embedder ``` \ No newline at end of file diff --git a/setup.py b/setup.py index 43a0ac2..4b611f0 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,27 @@ #!/usr/bin/env python +import os from setuptools import find_packages, setup +with open("README.md", "r") as readme_file: + README = readme_file.read() + + +def _get_version(): + version = os.getenv("RELEASE_VERSION", default="1.0") + if version.startswith("v"): + version = version[1:] + return version + + setup(name='ai_embedder', - version='1.0', + version=_get_version(), description='This script takes .ai files and save them with linked files embedded.', author='mdobosz', author_email='doboszsite@gmail.com', packages=find_packages(), - long_description="This script takes .ai files and save them with linked files embedded.", + long_description_content_type="text/markdown", + long_description=README, install_requires=[ "altgraph==0.17.3", " pefile==2023.2.7",