Skip to content

Commit

Permalink
0.5.1 release (#43)
Browse files Browse the repository at this point in the history
* Replace 3.9 list with 3.8 List. Closes #42

Signed-off-by: houfu <[email protected]>

* Bump to 0.5.1

Signed-off-by: houfu <[email protected]>

* Add claude_xml.yml workflow

Signed-off-by: houfu <[email protected]>

* Fix error

Signed-off-by: houfu <[email protected]>

* New cli command markdown

Signed-off-by: houfu <[email protected]>

* New image for Readme

Signed-off-by: houfu <[email protected]>

* Convert files to a list

Signed-off-by: houfu <[email protected]>

* Let's try this again...

Signed-off-by: houfu <[email protected]>

* Update claude_xml.yml

* Update claude_xml.yml

* Delete .github/workflows/claude_xml.yml

---------

Signed-off-by: houfu <[email protected]>
  • Loading branch information
houfu authored Nov 7, 2024
1 parent c5c1c24 commit 894f82e
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "redlines"
version = "0.5.0"
version = "0.5.1"
description = "Compare text, and produce human-readable differences or deltas which look like track changes in Microsoft Word."
readme = "README.md"
dependencies = [
Expand All @@ -24,7 +24,7 @@ redlines = 'redlines.cli:cli'

[tool.poetry]
name = "redlines"
version = "0.5.0"
version = "0.5.1"
description = "Compare text, and produce human-readable differences or deltas which look like track changes in Microsoft Word."
authors = ["houfu <[email protected]>"]
license = "MIT"
Expand Down
29 changes: 29 additions & 0 deletions redlines/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
```
Compares the strings SOURCE and TEST and outputs the redline in the terminal.
```sh
markdown
```
Compares the strings SOURCE and TEST and outputs the redline as a markdown.
## OPTIONS
```sh
-h, --help
Expand Down Expand Up @@ -140,3 +145,27 @@ def simple_text(source, test):

redlines = Redlines(source, test)
print(redlines.output_rich)


@cli.command()
@click.argument("source", required=True)
@click.argument("test", required=True)
@click.option(
"markdown_style",
"--markdown-style",
"-m",
type=click.Choice(["red_green", "none", "red", "ghfm", "bbcode", "streamlit"]),
default="red_green",
help="The markdown style to use.",
)
def markdown(source, test, markdown_style):
"""
Compares the strings SOURCE and TEST and outputs the redline as a markdown.
\f
@private
"""
from rich import print

redlines = Redlines(source, test, markdown_style=markdown_style)
print(redlines.output_markdown)
4 changes: 2 additions & 2 deletions redlines/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
"""It is used to detect space."""


def tokenize_text(text: str) -> list[str]:
def tokenize_text(text: str) -> List[str]:
return re.findall(tokenizer, text)


def split_paragraphs(text: str) -> list[str]:
def split_paragraphs(text: str) -> List[str]:
"""
Splits a string into a list of paragraphs. One or more `\n` splits the paragraphs.
For example, if the text is "Hello\nWorld\nThis is a test", the result will be:
Expand Down
Binary file modified repository-open-graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 894f82e

Please sign in to comment.