Metadata-Version: 2.4
Name: ezcl1p
Version: 0.1.0
Summary: Fetch code/text from cl1p.net URLs and export to .py, .docx, or clipboard
Author-email: Pawaskar <you@example.com>
License: MIT
Keywords: cl1p,clipboard,scraper,cli
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28
Requires-Dist: beautifulsoup4>=4.11
Provides-Extra: docx
Requires-Dist: python-docx>=1.0; extra == "docx"
Provides-Extra: clipboard
Requires-Dist: pyperclip>=1.8; extra == "clipboard"
Dynamic: license-file

```
================================================================================
```

```
                                  ezcl1p
```

```
================================================================================
Fetch code or text from any cl1p.net URL and export it to a .py file,
a Word (.docx) document, or your clipboard — straight from the command line.
================================================================================
```

```
--------------------------------------------------------------------------------
INSTALLATION
```

```
Basic install:
```

```
    pip install ezcl1p
```

```
Full install (includes Word export + clipboard support):
```

```
    pip install "ezcl1p[docx,clipboard]"
```

```
--------------------------------------------------------------------------------
USAGE
```

```
    ezcl1p <slug> [options]
<slug> is the path part of the cl1p URL.
For example, for the URL   https://cl1p.net/DL_9   the slug is:   DL_9
You may also pass the full URL instead of just the slug:
    ezcl1p https://cl1p.net/DL_9 -py
```

```
--------------------------------------------------------------------------------
OPTIONS
```

```
--------------------------------------------------------------------------------
    -py               Export the fetched content as a .py file
    -w                Export the fetched content as a .docx Word document
    -c                Copy the fetched content to the clipboard
    -o, --output FILE Use a custom output filename (works with -py and -w)
    -h, --help        Show help message and exit
At least one of -py, -w, or -c must be provided.
```

```
--------------------------------------------------------------------------------
EXAMPLES
--------------------------------------------------------------------------------
Save the content as a Python file (creates DL_9.py):
    ezcl1p DL_9 -py
Save the content as a Word document (creates DL_9.docx):
    ezcl1p DL_9 -w
Copy the content to the clipboard:
    ezcl1p DL_9 -c
```

```
Perform all three actions at once:
```

```
    ezcl1p DL_9 -py -w -c
```

```
Save with a custom filename:
```

```
    ezcl1p DL_9 -py -o my_script.py
    ezcl1p DL_9 -w -o notes.docx
```

```
Pass the full URL instead of the slug:
```

```
    ezcl1p https://cl1p.net/DL_9 -py
```

```
--------------------------------------------------------------------------------
PROGRAMMATIC USE (Python API)
```

```
The package can also be imported and used inside your own Python code:
```

```
    from my_library import fetch, save_py, save_docx, copy_to_clipboard
```

```
    text = fetch("DL_9")           # returns the textarea contents
    save_py(text, "script.py")     # writes a .py file
    save_docx(text, "script.docx") # writes a .docx file
    copy_to_clipboard(text)        # copies to the system clipboard
```

```
Individual helpers may require python-docx (for save_docx) or pyperclip
(for copy_to_clipboard). Install extras with:
```

```
    pip install "ezcl1p[docx,clipboard]"
```

```
--------------------------------------------------------------------------------
HOW IT WORKS
```

`1. Builds the URL  https://cl1p.net/<slug>.` 

`2. Downloads the page with `requests`.` 

`3. Parses it with `BeautifulSoup`.` 

`4. Extracts the text from the <textarea> element whose id is "cl1pTextArea".` 

`5. Exports the extracted text according to the chosen flags.` 

```
BEHAVIOUR SUMMARY
```

```
    Command                          Result
    -------------------------------  ---------------------------------
    ezcl1p DL_9 -py                  Creates DL_9.py
    ezcl1p DL_9 -w                   Creates DL_9.docx
    ezcl1p DL_9 -c                   Copies content to clipboard
    ezcl1p DL_9 -py -w -c            Does all three
    ezcl1p DL_9 -py -o script.py     Saves to custom script.py
    ezcl1p <full-url> -py            Full URL also accepted
```

```
--------------------------------------------------------------------------------
DEPENDENCIES
```

```
Required:
```

```
    requests
```

```
    beautifulsoup4
```

```
Optional (only when using the corresponding feature):
```

```
    python-docx   -> required for -w / save_docx()
```

```
    pyperclip     -> required for -c / copy_to_clipboard()
```

```
LICENSE
```

# `MIT License` 

```
Copyright (c) 2026 Pawaskar
```

```
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
```

```
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
```

```
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
```

```
--------------------------------------------------------------------------------
NOTES
```

- `cl1p.net documents expire automatically after a short time, so fetch them promptly after they are created.` 

- `If the textarea is empty or missing, the tool prints an error and exits with a non-zero status code.` 

- `PyPI renders README.md as Markdown; this file is intentionally plain text and works equally well as a package description or a standalone doc. ================================================================================` 

