Version 0.1.1

dev 0.1.1
Andrew Cassidy 3 years ago
parent 53cbdc4455
commit 8d8455898c

@ -0,0 +1,36 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Upload Python Package
on:
release:
types: [ published ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Install pypa/build
run: python -m pip install build --user
- name: Build a binary wheel and source tarball
run: python -m build --sdist --wheel --outdir dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

@ -1,9 +1,19 @@
# Changelog
All notable changes to this project will be documented in this file
## 0.1.1 - 2021-04-16
yaclog-ksp is [now available on PyPi!](https://pypi.org/project/yaclog-ksp/)
### Changed
- generator will now use change values instead of nodes when possible for more concise output files.
## 0.1.0 - 2021-04-16
First release
### Added
- `yaclog-ksp` command line tool for converting markdown changelogs to KerbalChangelog configs

@ -4,7 +4,7 @@ A command line tool for converting markdown changelogs to [KerbalChangelog] conf
## Installation
run `pip install git+https://github.com/drewcassidy/yaclog-ksp.git`
run `pip install yaclog-ksp`
## Usage

@ -64,12 +64,6 @@ def main(inpath, outpath, name):
# add entries
for section, entries in version.sections.items():
for entry in entries:
e_node = v_node.add_new_node('CHANGE')
if section:
# KerbalChangelog only actually cares about the first character,
# so dont bother correcting "Fixed"->"Fix", etc
e_node.add_value('type', section.title())
bullets = re.findall(r'^[\t ]*[-+*] (.*?)$', entry, flags=re.MULTILINE)
@ -82,9 +76,20 @@ def main(inpath, outpath, name):
change = bullets[0]
subchanges = bullets[1:]
e_node.add_value('change', change)
for sc in subchanges:
e_node.add_value('subchange', sc)
if section or len(subchanges) > 0:
e_node = v_node.add_new_node('CHANGE')
if section:
# KerbalChangelog only actually cares about the first character,
# so dont bother correcting "Fixed"->"Fix", etc
e_node.add_value('type', section.title())
e_node.add_value('change', change)
for sc in subchanges:
e_node.add_value('subchange', sc)
else:
v_node.add_value('change', change)
with open(outpath, 'w') as fp:
fp.write('KERBALCHANGELOG\n')

Loading…
Cancel
Save