A command line interface, and set of scripts for web tasks
Project description
Super Web Scripts
A command line interface, and set of scripts for common web tasks.
Quick-start
Installation
From PyPi
run pip install sws
or sudo pip3 install sws
.
From source
- Clone the github repo (https://github.com/Descent098/sws)
- cd into the 'sws' root directory (where setup.py is) and run
pip install .
orsudo pip3 install .
You can validate it is installed properly by typing sws
into your terminal, the output should look like this:
Super Web Scripts; A command line interface, and set of scripts for web tasks.
Usage:
sws [-h] [-v]
sws redirects <url> [-t]
sws youtube <url> [<path>]
sws ssl <hostname> [-e] [-c]
Options:
-h --help Show this help message and exit
-v --version Show program's version number and exit
-e --expiry If specified will check the expiry of ssl cert/domain
-c --cert If specified will print the full details of the SSL cert
-t --trace If specified will show the full trace of the provided url
Documentation
User Documentation can be found at https://kieranwood.ca/sws/.
Development-Contribution guide
Installing development dependencies
There are a few dependencies you will need to use this package fully, they are specified in the extras require parameter in setup.py but you can install them manually:
nox # Used to run automated processes
pytest # Used to run the test code in the tests directory
mkdocs # Used to create HTML versions of the markdown docs in the docs directory
Just go through and run pip install <name>
or sudo pip3 install <name>
. These dependencies will help you to automate documentation creation, testing, and build + distribution (through PyPi) automation.
Folder Structure
A Brief explanation of how the project is set up for people trying to get into developing for it
/sws/command_line_utility.py
The main entrypoint for the sws command.
/sws/utilities
Contains all the core logic that is used by the main entrypoint.
/docs
Contains markdown source files to be used with mkdocs to create html/pdf documentation.
**Before you can use this you will need to setup the mkdocs.yml file **
/tests
Contains tests to be run before release
**Before you can use this you will need to create tests, for more details take a look at pytest **
Root Directory
setup.py: Contains all the configuration for installing the package via pip.
LICENSE: This file contains the licensing information about the project.
CHANGELOG.md: Used to create a changelog of features you add, bugs you fix etc. as you release.
mkdocs.yml: Used to specify how to build documentation from the source markdown files.
noxfile.py: Used to configure various automated processes using nox, these include;
- Building release distributions
- Releasing distributions on PyPi
- Running test suite agains a number of python versions (3.5-current)
If anything to do with deployment or releases is failing, this is likely the suspect.
There are 4 main sessions built into the noxfile and they can be run using nox -s <session name>
i.e. nox -s test
:
- build: Creates a source distribution, builds the markdown docs to html, and creates a universal wheel distribution for PyPi.
- release: First runs the build session, then asks you to confirm all the pre-release steps have been completed, then runs twine to upload to PyPi
- test: Runs the tests specified in /tests using pytest, and runs it on python versions 3.5-3.8 (assuming they are installed)
- docs: Serves the docs on a local http server so you can validate they have the content you want without having to fully build them.
.gitignore: A preconfigured gitignore file (info on .gitignore files can be found here: https://www.atlassian.com/git/tutorials/saving-changes/gitignore)
Changelog
V0.1.0; February 4th 2020
Initial release went out on github and PyPi. Ported functionality from kuws package.
Features:
- Trace redirects
- Download YouTube videos directly from command line
- Check SSL status information and expiry date
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sws-0.1.0.tar.gz
.
File metadata
- Download URL: sws-0.1.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd67e93e09c46915777ccfcf853d1142335cdf4049838721d26d222efec7843e |
|
MD5 | 1e205cc8a6c348ad4f34027aa083f5c1 |
|
BLAKE2b-256 | 9399be617f9b2cf541d2a56d3fd074b158d8cdf44b1347d2f0f55fa8c371c375 |
File details
Details for the file sws-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: sws-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f886772e9f8a5015b87ab2e00c7008340245d33aa31bfbf71df1a21ffc7be9b |
|
MD5 | 66bee277694ea2520b65ee341282c998 |
|
BLAKE2b-256 | 193146b7750e8adf400e6143ab3e8021600a292fddc9730922f60d7a20b53e74 |