MagicPaper
A magical extendable paper to have fun with ...
Just like someone who said: it's not much, but it's honest work :) .
What's this?
It's just papers in terminal! You can create combinations of them that leads to something interesting ...
Let's try
It's just simple (as it is)
from magic_paper import Paper
paper = Paper()
print(paper)
+---------+
|█████████|
|█████████|
|█████████|
+---------+
Now combine them ...
paper = Paper(right=Paper(bottom=Paper(right=Paper())))
print(paper)
+---------+---------+
|█████████|█████████|
|█████████|█████████|
|█████████|█████████|
+---------+---------+---------+
|█████████|█████████|
|█████████|█████████|
|█████████|█████████|
+---------+---------+
You can change sizes
vertical_paper = Paper(width=3)
print(vertical_paper)
horizontal_paper = Paper(height=1)
print(horizontal_paper)
combined = Paper(width=3, bottom=Paper(height=1))
print(combined)
+---+
|███|
|███|
|███|
+---+
+---------+
|█████████|
+---------+
+---+
|███|
|███|
|███|
+---------+
|█████████|
+---------+
You can use EmptyPaper for gaps.
from magic_paper import EmptyPaper, Paper
combined = Paper(
height=1,
bottom=Paper(
width=3,
bottom=EmptyPaper(
bottom=Paper(
width=3,
bottom=Paper(
height=1,
right=EmptyPaper(height=1, right=Paper(height=1), bring_back=True),
),
),
bring_back=True,
),
),
right=EmptyPaper(
height=1,
right=Paper(
height=1,
bottom=EmptyPaper(
width=5,
right=Paper(
width=3,
bottom=EmptyPaper(
bring_back=True,
bottom=Paper(
width=3,
),
),
),
bring_back=True,
),
),
bring_back=True,
),
)
print(combined)
+---------+ +---------+
|█████████| |█████████|
+---+-----+ +-----+---+
|███| |███|
|███| |███|
|███| |███|
+---+ +---+
+---+ +---+
|███| |███|
|███| |███|
|███| |███|
+---------+ +---------+
|█████████| |█████████|
+---------+ +---------+
Use >>, <<, /, ^ to create new combination of papers.
maze = (
Paper()
>> (
Paper()
/ ( # Guess what this dose ...
Paper()
>> (
Paper()
>> (
Paper()
>> (
Paper() # <- On top of this <-
# |
^ ( #----- Attach everything inside this ( ) ----
# |
Paper() # <------------ this ------------- |
# | |
<< Paper() # Attach this on the left of -- |
# |
) # ---------------------------------------------
)
)
)
)
)
)
print(maze)
How it's going to looks like:
------>-------->-------
+---------+---------+ +---------+---------+ |
|█████████|█████████| |█████████|█████████| |
|█████████|█████████| |█████████|█████████| v
|█████████|█████████| |█████████|█████████| |
+---------+---------+---------+---------+---------+ |
--<------ |█████████|█████████|█████████|█████████| |
^ |█████████|█████████|█████████|█████████| |
| |█████████|█████████|█████████|█████████| v
| +---------+---------+---------+---------+ |
--------<---------<--------<---------<-------
Now it's time for you to imagine ...
zero_six_seven = Paper(
right=Paper(
right=Paper(
right=EmptyPaper(
right=Paper(
right=Paper(
right=Paper(
right=EmptyPaper(
right=Paper(
right=Paper(
right=Paper(
bottom=Paper(
bottom=Paper(
bottom=Paper(bottom=Paper())
)
)
)
)
),
bring_back=True,
),
bottom=Paper(
bottom=Paper(
bottom=Paper(
bottom=Paper(
left=Paper(
left=Paper(
top=Paper(
top=Paper(right=Paper())
)
)
)
)
)
)
),
)
)
),
bring_back=True,
),
bottom=Paper(
bottom=Paper(
bottom=Paper(
bottom=Paper(
left=Paper(
left=Paper(top=Paper(top=Paper(top=Paper())))
)
)
)
)
),
)
)
)
print(zero_six_seven)
You will need an screen with higher width, if shape below looks wired!
+---------+---------+---------+ +---------+---------+---------+ +---------+---------+---------+
|█████████|█████████|█████████| |█████████|█████████|█████████| |█████████|█████████|█████████|
|█████████|█████████|█████████| |█████████|█████████|█████████| |█████████|█████████|█████████|
|█████████|█████████|█████████| |█████████|█████████|█████████| |█████████|█████████|█████████|
+---------+---------+---------+ +---------+---------+---------+ +---------+---------+---------+
|█████████| |█████████| |█████████| |█████████|
|█████████| |█████████| |█████████| |█████████|
|█████████| |█████████| |█████████| |█████████|
+---------+ +---------+ +---------+---------+---------+ +---------+
|█████████| |█████████| |█████████|█████████|█████████| |█████████|
|█████████| |█████████| |█████████|█████████|█████████| |█████████|
|█████████| |█████████| |█████████|█████████|█████████| |█████████|
+---------+ +---------+ +---------+---------+---------+ +---------+
|█████████| |█████████| |█████████| |█████████| |█████████|
|█████████| |█████████| |█████████| |█████████| |█████████|
|█████████| |█████████| |█████████| |█████████| |█████████|
+---------+---------+---------+ +---------+---------+---------+ +---------+
|█████████|█████████|█████████| |█████████|█████████|█████████| |█████████|
|█████████|█████████|█████████| |█████████|█████████|█████████| |█████████|
|█████████|█████████|█████████| |█████████|█████████|█████████| |█████████|
+---------+---------+---------+ +---------+---------+---------+ +---------+
Metadata
Release files for MagicPaper 1.1.1
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 |
|---|---|---|---|---|
| MagicPaper-1.1.1.tar.gz | 5.3 kB | Without provenance | Details for MagicPaper-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| MagicPaper-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for MagicPaper-1.1.1-py3-none-any.whl |
Total release size: 10.6 kB
Release files / MagicPaper-1.1.1.tar.gz
| Download URL | MagicPaper-1.1.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ca178caa51b857e61bfe7fb8532ec02a345baea3f80c51aee72db6ef1b0ca0d
|
|
BLAKE2b-256 checksum How to use checksums |
f7c37586c69e2a8f64e0f522d0ea5c05920348451788ca6e16b9cb03a089b3e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / MagicPaper-1.1.1-py3-none-any.whl
| Download URL | MagicPaper-1.1.1-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3badbd336b66f4c721f58028e489fd835b21af9458f98d0730a6638e6da1ad29
|
|
BLAKE2b-256 checksum How to use checksums |
5ac863ed791996cc3f04a5d3f67ba4f79ed6b6fddb25afd6683a844c58c68e97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for MagicPaper 1.1.1
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.