https://github.com/mauricelambert/pyoneliner
This package implement a code OneLiner for python (write a script and get it in oneline).
https://github.com/mauricelambert/pyoneliner
bash batch oneliner pypi-package python3
Last synced: about 2 months ago
JSON representation
This package implement a code OneLiner for python (write a script and get it in oneline).
- Host: GitHub
- URL: https://github.com/mauricelambert/pyoneliner
- Owner: mauricelambert
- License: gpl-3.0
- Created: 2021-01-15T08:14:48.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-15T08:16:29.000Z (over 5 years ago)
- Last Synced: 2025-02-15T14:05:09.873Z (over 1 year ago)
- Topics: bash, batch, oneliner, pypi-package, python3
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# OneLiner
## Description
This package implement a code OneLiner for python (write a script and get it in oneline).
## Requirements
This package require :
- python3
- python3 Standard Library
## Installation
```bash
pip install PyOneliner
```
## Examples
### Command lines
1. For python console:
```bash
PyOneLiner script.py
PyOneLiner script.py --mode "uu"
```
2. For bash console:
```bash
PyOneLiner script.py --mode "base64" --console "bash"
PyOneLiner script.py --mode "unicode" --console "bash"
```
3. For windows cmd:
```bash
PyOneLiner script.py --mode "gzip" --console "batch"
PyOneLiner script.py --mode "ord" --console "batch"
```
### Python3
```python
from PyOneLiner import OneLiner
from os import system
oneliner = OneLiner("script.py", type_="python")
oneliner.xor()
oneline = oneliner.done()
exec(oneline)
oneliner.ascii85()
oneline = oneliner.done()
exec(oneline)
oneliner = OneLiner("script.py", type_="bash") # Linux
oneliner.lzma()
oneline = oneliner.done()
system(oneline)
oneliner.binary()
oneline = oneliner.done()
system(oneline)
oneliner = OneLiner("script.py", type_="batch") # Windows
oneliner.base16()
oneline = oneliner.done()
system(oneline)
oneliner.bz2()
oneline = oneliner.done()
system(oneline)
```
## Link
[Github Page](https://github.com/mauricelambert/PyOneLiner)
## Licence
Licensed under the [GPL, version 3](https://www.gnu.org/licenses/).