pd (Product Development and Deployment)
pd is a command-line tool that helps you with various development and deployment tasks.
| Feature | Description | |
|---|---|---|
| 1 | Project initialization (init) |
Quickly initialize new development projects (e.g. FastAPI, Electron etc) |
| 2 | Content downloading (down) |
Download content from the internet (YouTube, Libgen). |
| 3 | File conversion (conv) |
Convert files into other formats (Image, Audio, Video). |
| 4 | EC2 instance management (ec2) |
Manage EC2 instances (launch, terminate). |
| 5 | Image editing (edit) |
Edit images (scale, round, favicon, logo variants etc). |
| 6 | Web utilities (web) |
Inspect or view web pages in the terminal. |
| 7 | Environment management (env) |
Setup and configure development environment (zsh, vim, git, etc). |
| 8 | Nginx management (nginx) |
Manage Nginx configuration files (proxy, static resources). |
See COMMANDS for more details.
Installation
pip install zf-pd
This installs a pd command in your system (even though the package name is zf-pd).
Like other shell tools, pd stores its config in ~/.pdconfig.json.
See CONFIG for more details.
Usage
Initializing a new Project
$ pd init fastapi --name /path/to/fastapi-test
This will create a new FastAPI project called fastapi-test inside /path/to directory.
Downloading a YouTube video
pd down youtube -l https://www.youtube.com/watch?v=... -f mp4 # or mp3, text etc
This will output a file called {TITLE}.txt at the current directory.
Downloading a Book
pd down libgen -n "Sun Tzu" -t "The Art of War"
This will output a file called The Art of War.pdf at the current directory.
Generating logo varations
$ pd edit logos -p /path/to/logo.png -t iOS - "20%"
# Outputs
# /path/to/logo40.png
# /path/to/logo60.png
# ...
This will generate all required iOS logos with 20% border radius at /path/to directory.
Resizing multiple images
You can use the resize command to resize multiple images at once. You specify the dimensions using -d "512x512" and
-n specifies no suffix.
$ pd edit resize -p path/to/folder/*.png -d "512x512" -n
# Outputs
# Resized image saved as path/to/folder/0.png
# Resized image saved as path/to/folder/1.png
Converting MP4 to MP3
$ pd conv video -p /path/to/file.mp4 -f mp3
This will output a file called file.mp3 at /path/to directory.
Processing a modern webpage
$ pd web view -l https://zeffmuks.com
This will display the renderred HTML source of the web page in the terminal.
You can query the rendered HTML using htmlq.
$ pd web view -l https://zeffmuks.com | htmlq ".css-17vaxo2"
<p class="chakra-text css-17vaxo2">Fast JSON5 Python Library</p>
...
<p class="chakra-text css-17vaxo2">Next Generation Content Platform</p>
Launching an EC2 instance
You can launch an EC2 instance using a launch template as below:
$ pd ec2 launch -n ec2-test -c 1
This will launch 1 EC2 instance called ec2-test using the launch template specified in ~/. pdconfig.json.
Check out the CONFIG.md for more details.
Generating an Nginx Config
You can generate a Nginx configuration file using the generate command.
$ pd nginx generate -h localhost -p 80 -d example.com -s /path/to/static
This will generate Nginx configuration for the given host, port, domain, and static file path.
License
MIT License
Metadata
Release files for zf-pd 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zf_pd-1.2.0.tar.gz | 7.3 MB | Without provenance | Details for zf_pd-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zf_pd-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for zf_pd-1.2.0-py3-none-any.whl |
Total release size: 14.6 MB
Release files / zf_pd-1.2.0.tar.gz
| Download URL | zf_pd-1.2.0.tar.gz |
|---|---|
| Size | 7.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bd74998e2abc477c527b809c87dedd5d8ee49c438e64c97a5ec61c118621a35
|
|
BLAKE2b-256 checksum How to use checksums |
2a04a5088b0dafbc877749a300a825b6e49f1a557f8441ca2c245943ecd5b2d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.11
|
Release files / zf_pd-1.2.0-py3-none-any.whl
| Download URL | zf_pd-1.2.0-py3-none-any.whl |
|---|---|
| Size | 7.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
afd97494e39e6e7b89bb10c0a249c65308f6d13ef2942e2ce75d5f16571313e1
|
|
BLAKE2b-256 checksum How to use checksums |
62a4e98c444a7e2bfa343ad049acf346ce34fcdf9fdab3d3a01ab3129e62865d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.11
|
Security for zf-pd 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.