semvec/pypi-packages huggingface dataset:
lineExtractor 0.0.2
A python CLI tool that allows you to extract certain lines from text files and transfer them to another file
License: MIT

# Line Extractor

Line Extractor is a Python CLI for extracting certain lines from text files given specified rules.

## Why you should use this CLI tool

If you're trying to read through thousands of lines of logs or just want to see every time the word "Donkey" shows up in the Shrek movie script this tool can help you do that. Instead of greping with regex you can use a more intutive CLI.

I created this tool because I got tired of reading through EC2 logs finding the lines beginning with certain phrases or ending with other phrases. So if this tool helps you out feel free to let me know!

## Installation

Use the package manager [pip](https://pypi.org/project/pip/) to install Line Extractor.

```bash
pip install lineExtractor
```

## Usage

General Format

```bash
lineExtractor [Options] source_file destination_file
```

Open the help menu

```bash
lineExtractor -h
```

Get all lines that contain the word "bee" and put them into output.txt

```bash
lineExtractor -c bee beeMovie.txt output.txt
```

Get all lines that start with "Hello" regardless of casing and put them into hello.txt

```bash
lineExtractor -b Hello -i speech.txt hello.txt
```

## Contributing

[Github](https://github.com/kvanland/lineExtractor/)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## Author

[Kyle Van Landingham](https://kvanland.github.io/)

## License

[MIT](https://choosealicense.com/licenses/mit/)
coub-api 0.3.0
Api wrapper for coub.com
License: MIT
Requires Python: >=3.6,<4.0
Keywords: coub,coub-api,api-wrapper

===============================
Api-wrapper for coub.com
===============================

.. image:: https://travis-ci.com/Derfirm/coub_api.svg?branch=master
    :target: https://travis-ci.com/Derfirm/coub_api
    :alt: Build Status

.. image:: https://codecov.io/gh/Derfirm/coub_api/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/Derfirm/coub_api
    :alt: Coverage Status

.. image:: https://img.shields.io/pypi/v/coub_api.svg
    :target: https://github.com/Derfirm/coub_api
    :alt: pypi version

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/ambv/black
    :alt: Codestyle: Black

.. image:: https://api.codacy.com/project/badge/Grade/47a10071a0d442c6b0827b7e80c55bde
    :target: https://www.codacy.com/manual/Derfirm/coub_api
    :alt: code quality badge

Key Features
============
- response are fully-annotated with pydantic_
- test work on snapshots from real http-answers (can easy inspect responses)
- own OAuth2-server

.. _pydantic: https://pydantic-docs.helpmanual.io/

Getting started
===============
Initiate Api client
___________________
.. code-block:: python

    import os
    from coub_api import CoubApi

    api = CoubApi()
    os.environ.get("coub_access_token")
    api.authenticate(access_token)  # required for some authenticated requests


Get coub details
________________
.. code-block:: python

    coub = api.coubs.get_coub("1jf5v1")
    print(coub.id, coub.channel_id)

Create Coub
___________
.. code-block:: python

    api.coubs.init_upload()) # {"permalink":"1jik0b","id":93927327}
    api.coubs.upload_video(93927327, "video.mp4")
    api.coubs.upload_audio(93927327, "audio.mp3"))
    api.coubs.finalize_upload(93927327, title="Awesome CAT", tags=["cat", "animal"]))
    api.coubs.get_upload_status(93927327))  # {"done": False, "percent_done": 0}
    # wait a minute
    api.coubs.get_upload_status(93927327))  # {"done": True, "percent_done": 100}



Get weekly hot coubs
____________________
.. code-block:: python

    from coub_api.schemas.constants import Period

    api.timeline.hot(period=Period.WEEKLY, order_by="likes_count")


Get 5 page of random section with cars
______________________________________
.. code-block:: python

    from coub_api.schemas.constants import Section, Category

    current_page = 1
    max_page = 5
    while current_page <= max_page:
        response = api.timeline.section(section=Section.RANDOM, category=Category.CARS, page=current_page)
        print(f"processing {current_page} of {max_page}")
        for coub in response.coubs:
            print(coub.permalink)
        current_page += 1
        max_page = min(max_page, response.total_pages)



OAuth2-Server
===============
How to use:
___________
- Create Your Own_ application
- Run server

.. code-block:: RST

    coub-oauth2-server

- Enter Your Application Id and Secret and grant access the Coub server.
- Copy access token and start use it!

.. _Own: http://coub.com/dev/applications