diff --git a/jekyll-to-hugo b/jekyll-to-hugo new file mode 100644 index 0000000..c733699 --- /dev/null +++ b/jekyll-to-hugo @@ -0,0 +1,4 @@ +from main import main + +if __name__ == "__main__": + main() diff --git a/readme.md b/readme.md index 9601ff6..ad7e6a1 100644 --- a/readme.md +++ b/readme.md @@ -2,15 +2,33 @@ Jekyll to Hugo Converter is a simple tool to convert Jekyll posts to Hugo posts. -You can also use it to convert your WordPress blog into a Hugo blog. Tutorial coming soon. +I've used this tool to convert [my blog](https://blog.nuculabs.dev) from WorPress to Jekyll to Hugo. -Note: -- This tool is still under development. -- This tool is not perfect, it will not convert everything. If you find a bug, please open a PR. +Note: This tool is not perfect, it will not convert everything. If you find a bug, please open a PR. + +## Table of Contents + +* [Usage](#usage) + * [PiPy](#pipy) + * [Python From Source](#python-from-source) + * [Docker](#docker) +* [Configuration](#configuration) +* [License](#license) ## Usage -### Python +### PiPy + +If you have Python installed, you can use the following commands: + +```bash +pip install jekyll-to-hugo +jekyll-to-hugo +``` + +You will need to create a `config.yaml` file in the current directory. See example [here](./config.yaml). + +### Python From Source If you have Python installed, you can use the following commands: @@ -39,5 +57,14 @@ docker build -t jekyll-to-hugo . docker run -it --rm -v $(pwd):/app jekyll-to-hugo ``` +## Configuration + +The configuration file is a YAML file. See example [here](./config.yaml). +The configuration file path can be configured with the `CONFIG_PATH` environment variable. + +## License + +This project is licensed under the GPL-3.0 license - see the [LICENSE](LICENSE) file for details. + --- Made with ❤️ by [NucuLabs.dev](https://blog.nuculabs.dev) \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..d956c9d --- /dev/null +++ b/setup.py @@ -0,0 +1,28 @@ +import setuptools + +with open("readme.md", "r") as fh: + long_description = fh.read() + +setuptools.setup( + name="jekyll-to-hugo", + version="0.0.1", + author="Denis Nutiu", + author_email="nuculabs@outlook.com", + description="Python library for converting jekyll md files to Hugo.", + long_description=long_description, + long_description_content_type="text/markdown", + url="nuculabs.dev", + packages=setuptools.find_packages(), + classifiers=[ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + ], + scripts=["jekyll-to-hugo"], + install_requires=[ + "beautifulsoup4==4.12.2", + "PyYAML==6.0", + "soupsieve==2.4.1", + "pydantic==1.10.8", + ], + python_requires=">=3.10", +)