Skip to content

Commit 740abbf

Browse files
committed
Update readme. Publish PyPI packages from tag builds (#80)
1 parent b3898d0 commit 740abbf

File tree

5 files changed

+46
-26
lines changed

5 files changed

+46
-26
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
name: test
1+
name: ci
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches:
6+
- master
7+
tags:
8+
- '**'
69
pull_request:
7-
branches: [ master ]
10+
branches:
11+
- master
812

913
jobs:
1014
lint:
@@ -37,7 +41,7 @@ jobs:
3741
- "pypy3.8"
3842
- "pypy3.9"
3943
- "pypy3.10"
40-
name: Python ${{ matrix.python-version }}
44+
name: test ${{ matrix.python-version }}
4145
steps:
4246
- uses: actions/checkout@v4
4347
- uses: actions/setup-python@v5
@@ -53,3 +57,22 @@ jobs:
5357
with:
5458
token: ${{ secrets.CODECOV_TOKEN }}
5559
fail_ci_if_error: true
60+
61+
publish:
62+
runs-on: ubuntu-latest
63+
name: publish
64+
if: github.ref_type == 'tag'
65+
needs:
66+
- lint
67+
- test
68+
steps:
69+
- uses: actions/checkout@v4
70+
- uses: actions/setup-python@v5
71+
with:
72+
python-version: "3.12"
73+
architecture: x64
74+
- run: |
75+
pip install poetry
76+
poetry publish --build
77+
env:
78+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

README.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,24 @@ ffmpy
1919
=====
2020
*ffmpy* is a simple `FFmpeg <http://ffmpeg.org/>`_ command line wrapper. It implements a Pythonic interface for FFmpeg command line compilation and uses Python's `subprocess <https://docs.python.org/2/library/subprocess.html>`_ to execute the compiled command line.
2121

22+
*ffmpy* requires Python 3.8 or greater.
23+
2224
Installation
2325
------------
24-
You guessed it::
26+
::
2527

2628
pip install ffmpy
2729

2830
Quick example
2931
-------------
3032
.. code:: python
3133
32-
>>> import ffmpy
33-
>>> ff = ffmpy.FFmpeg(
34-
... inputs={'input.mp4': None},
35-
... outputs={'output.avi': None}
36-
... )
37-
>>> ff.run()
34+
from ffmpy import FFmpeg
35+
ff = FFmpeg(
36+
inputs={'input.mp4': None},
37+
outputs={'output.avi': None}
38+
)
39+
ff.run()
3840
3941
This will take the ``input.mp4`` file in the current directory as the input, change the video container from MP4 to AVI without changing any other video parameters, and create a new output file ``output.avi`` in the current directory.
4042

docs/conf.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@
22
# -*- coding: utf-8 -*-
33

44
import datetime
5-
import os
6-
import sys
75
from typing import Dict
86

9-
sys.path.insert(0, os.path.abspath("..")) # noqa
10-
import ffmpy # noqa
11-
127
extensions = [
138
"sphinx.ext.autodoc",
149
"sphinx.ext.intersphinx",
@@ -22,8 +17,8 @@
2217
copyright = f"2015-{datetime.datetime.now().year}, Andrii Yurchuk"
2318
author = "Andrii Yurchuk"
2419

25-
version = ffmpy.__version__
26-
release = ffmpy.__version__
20+
version = "0.4.0"
21+
release = "0.4.0"
2722

2823
language = "en"
2924

docs/index.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ ffmpy
1313

1414
At this moment *ffmpy* has wrappers for ``ffmpeg`` and ``ffprobe`` commands, but it should be possible to run other FFmpeg tools with it (e.g. ``ffserver``).
1515

16+
*ffmpy* requires Python 3.8 or greater.
17+
1618
Installation
1719
------------
1820
::
@@ -23,12 +25,12 @@ Quickstart
2325
----------
2426
::
2527

26-
>>> import ffmpy
27-
>>> ff = ffmpy.FFmpeg(
28-
... inputs={'input.mp4': None},
29-
... outputs={'output.avi': None}
30-
... )
31-
>>> ff.run()
28+
from ffmpy import FFmpeg
29+
ff = FFmpeg(
30+
inputs={'input.mp4': None},
31+
outputs={'output.avi': None}
32+
)
33+
ff.run()
3234

3335
This takes ``input.mp4`` file in the current directory as the input, changes the video container from MP4 to AVI without changing any other video parameters and creates a new output file ``output.avi`` in the current directory.
3436

ffmpy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
import subprocess
55
from typing import IO, Any, List, Mapping, Optional, Sequence, Tuple, Union
66

7-
__version__ = "0.3.3"
8-
97

108
class FFmpeg(object):
119
"""Wrapper for various `FFmpeg <https://www.ffmpeg.org/>`_ related applications (ffmpeg,

0 commit comments

Comments
 (0)