1
0

Compare commits

..

No commits in common. "2b9c4cda7a4f170d8706a29128388a10bcf878e6" and "94e2cd24f7925c32c4cff9ecfe453aefbe0d055a" have entirely different histories.

7 changed files with 19 additions and 25 deletions

View File

@ -1,7 +1,3 @@
# WARNING!
# THIS IS AN AUTOGENERATED FILE!
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN!
name: Package Python name: Package Python
on: on:
push: push:

View File

@ -1,7 +1,3 @@
# WARNING!
# THIS IS AN AUTOGENERATED FILE!
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN!
name: Run Python tests (through Pytest) name: Run Python tests (through Pytest)
on: on:

View File

@ -1,7 +1,3 @@
# WARNING!
# THIS IS AN AUTOGENERATED FILE!
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN!
name: Verify Python project can be installed, loaded and have version checked name: Verify Python project can be installed, loaded and have version checked
on: on:

View File

@ -1,7 +1,3 @@
<!-- WARNING! -->
<!-- THIS IS AN AUTOGENERATED FILE! -->
<!-- MANUAL CHANGES CAN AND WILL BE OVERWRITTEN! -->
# Conventions # Conventions
When contributing code to this project, you MUST follow the requirements When contributing code to this project, you MUST follow the requirements

View File

@ -1,6 +1,8 @@
<!-- WARNING! --> <!--- WARNING --->
<!-- THIS IS AN AUTOGENERATED FILE! --> <!--- THIS IS AN AUTO-GENERATED FILE --->
<!-- MANUAL CHANGES CAN AND WILL BE OVERWRITTEN! --> <!--- MANUAL CHANGES CAN AND WILL BE OVERWRITTEN --->
# Markdown Message Conversion # Markdown Message Conversion
@ -82,10 +84,12 @@ pip install -r requirements.txt
Full list of requirements: Full list of requirements:
- [beautifulsoup4](https://pypi.org/project/beautifulsoup4/) - [beautifulsoup4](https://pypi.org/project/beautifulsoup4/)
## Contributing ## Contributing
Feel free to submit pull requests. Please follow the [Code Conventions](CONVENTIONS.md) when doing so. Feel free to submit pull requests. Please follow the [Code Conventions](CONVENTIONS.md) when doing so.
### Testing ### Testing
Testing requires the [pytest](https://docs.pytest.org/en/stable/) library. Testing requires the [pytest](https://docs.pytest.org/en/stable/) library.
@ -102,6 +106,7 @@ Test coverage can be run using the [`pytest-cov`](https://pypi.org/project/pytes
pytest --cov=libpurple_to_markdown test pytest --cov=libpurple_to_markdown test
``` ```
## License ## License
``` ```

View File

@ -1 +1 @@
__version__ = '0.1.11' __version__ = '0.1.10'

View File

@ -1,6 +1,8 @@
# WARNING! # WARNING
# THIS IS AN AUTOGENERATED FILE! #
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN! # THIS IS AN AUTOGENERATED FILE.
#
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN.
import re import re
@ -78,22 +80,25 @@ python -m libpurple_to_markdown LOG_DIRECTORY --output OUTPUT_FOLDER --skip-this
PACKAGE_DESCRIPTION_SHORT = """ PACKAGE_DESCRIPTION_SHORT = """
Conversion script from various messaging formats to markdown.""".strip() Conversion script from various messaging formats to markdown.""".strip()
def parse_version_file(text: str) -> str: def parse_version_file(text: str) -> str:
text = re.sub('^#.*', '', text, flags=re.MULTILINE) match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
match = re.match(r'^\s*__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
if match is None: if match is None:
msg = 'Malformed _version.py file!' msg = 'Malformed _version.py file!'
raise Exception(msg) raise Exception(msg)
return match.group(2) return match.group(2)
with open(PACKAGE_NAME + '/_version.py') as f: with open(PACKAGE_NAME + '/_version.py') as f:
version = parse_version_file(f.read()) version = parse_version_file(f.read())
REQUIREMENTS_MAIN = [ REQUIREMENTS_MAIN = [
'beautifulsoup4', 'beautifulsoup4',
] ]
REQUIREMENTS_TEST = [] REQUIREMENTS_TEST = []
setup( setup(
name=PACKAGE_NAME, name=PACKAGE_NAME,
version=version, version=version,