When I wanted to copy a table such as the Web or spreadsheet to the clipboard and record it in markdown such as Backlog, it was sober and troublesome, so I made a command. ..
It is also posted on PyPI. This is the source code.
It looks like the following.
pip install clipable
I haven't done anything difficult here, and anyone with the following two libraries can make it by instant killing.
--pandas (to create a table from the clipboard and output it as markdown) --pyperclip (to copy to clipboard)
This time I used poetry to manage the dependencies.
poetry new package name
Create a new project with
poetry add package name
Add the dependent packages in.
Create a file called cli.py under the folder with the same name as the newly created package name. Create the main function there. And after that, add script settings so that you can execute commands with toml.
pyproject.toml
[tool.poetry.scripts]
clipable = "clipable.cli:main"
This was basically the important thing.
later
poetry build
Build with
poetry publish
Then you can register with PyPI.
With Poetry, it was too easy to publish the package and I was impressed.
-From Python package development using Poetry to PyPI release
Recommended Posts