Compare commits

..

No commits in common. "main" and "0.1.2" have entirely different histories.
main ... 0.1.2

5 changed files with 2 additions and 33 deletions

View File

@ -1,6 +1,6 @@
The MIT License
Copyright (c) 2021-2022 Holllo <helllo@holllo.org>
Copyright (c) 2021-2022 Holllo <helllo@holllo.cc>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -24,8 +24,6 @@ xml = document.to_xml()
document = OPML.from_xml(xml)
```
See also the [examples directory](https://git.bauke.xyz/Holllo/opyml/src/branch/main/examples).
## Development
* Install dependencies with `poetry shell && poetry install`.

View File

@ -1,3 +0,0 @@
Text,Url
Example,https://example.org
Another Example,https://example.org/another
1 Text Url
2 Example https://example.org
3 Another Example https://example.org/another

View File

@ -1,26 +0,0 @@
import csv
from opyml import OPML, Outline
def main() -> None:
document = OPML()
with open("examples/csv-to-opml.csv", "r") as example_csv:
csv_reader = csv.DictReader(example_csv)
for row in csv_reader:
document.body.outlines.append(
Outline(
# Convert to str because text is a required OPML attribute
# and row.get() can return None.
text=str(row.get("Text")),
xml_url=row.get("Url"),
)
)
print(document.to_xml())
if __name__ == "__main__":
main()

View File

@ -4,7 +4,7 @@ description = "OPML library for Python."
repository = "https://git.bauke.xyz/Holllo/opyml"
license = "MIT OR Apache-2.0"
version = "0.1.2"
authors = ["Holllo <helllo@holllo.org>"]
authors = ["Holllo <helllo@holllo.cc>"]
readme = "README.md"
[tool.poetry.dependencies]