gl_search


Namegl_search JSON
Version 0.4.1 PyPI version JSON
download
home_pagehttps://github.com/Bernardoow/gl_search
SummaryScript to help search code in self-hosted gitlab
upload_time2024-10-06 14:46:09
maintainerBernardo Gomes
docs_urlNone
authorBernardo Gomes
requires_python<4.0,>=3.9
licenseMIT
keywords gitlab search search code api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # gl-search

This is a lib that use gitlab api to search code.
This code is based in the lib [gitlab-search](https://github.com/phillipj/gitlab-search).

## About

It is a lib to search code at gitlab.
This search can be parameterized with params groups, extension, filename, path, max-workers and visibility.

## How install?

```bash
pip install gl_search
```

## How it works?

The lib use gitlab token (GITLAB_PRIVATE_TOKEN) to search.

## How to setup the token?

Get your token at gitlab and then execute following command to save at home user at the .gl-settings.toml file.

```bash
gl-search setup-token <token>
```

## Can I change gitlab official to self hosted?

Yes you can. Use following command to setup the gitlab-address

```bash
gl-search setup-gitlab-address <self-hosted-gitlab-address>
```

## Where I get gitlab token?

You can get on following link [gitlab-token](https://gitlab.com/-/profile/personal_access_tokens)
The TOKEN must be generated with scope read_api.

## Why this lib was built?

I had problem with repo visibility using a mentioned lib above so I built this script to resolve my problem.

## How to use

```bash
gl-search search test
```

This options is show up below.

```bash
➜  gl_search git:(main) ✗ gl-search search --help
Usage: gl-search search [OPTIONS] SEARCH_CODE_INPUT

  Search command.

Options:
  -p, --path TEXT                 search by Path
  -fn, --filename TEXT            search by filename
  -ext, --extension TEXT          code filename extension :: py,js,cs
  -g, --groups TEXT               search by gitlab group
  -mw, --max-workers INTEGER      number of parallel requests
  -v, --visibility [internal|public|private]
                                  repositories visibility
  -xdr, --max-delay-request INTEGER
  -d, --debug                     Debug :: show urls called.
  --help                          Show this message and exit.
```

## How was made the lib?

The lib was built using click, rich, request, ThreadPoolExecutor.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Bernardoow/gl_search",
    "name": "gl_search",
    "maintainer": "Bernardo Gomes",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": "bgomesdeabreu@gmail.com",
    "keywords": "gitlab, search, search code, api",
    "author": "Bernardo Gomes",
    "author_email": "bgomesdeabreu@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e5/e5/b8940eec73f8d48f83db0d43ef586e414064be2eddfd68c6d2171299ce3a/gl_search-0.4.1.tar.gz",
    "platform": null,
    "description": "# gl-search\n\nThis is a lib that use gitlab api to search code.\nThis code is based in the lib [gitlab-search](https://github.com/phillipj/gitlab-search).\n\n## About\n\nIt is a lib to search code at gitlab.\nThis search can be parameterized with params groups, extension, filename, path, max-workers and visibility.\n\n## How install?\n\n```bash\npip install gl_search\n```\n\n## How it works?\n\nThe lib use gitlab token (GITLAB_PRIVATE_TOKEN) to search.\n\n## How to setup the token?\n\nGet your token at gitlab and then execute following command to save at home user at the .gl-settings.toml file.\n\n```bash\ngl-search setup-token <token>\n```\n\n## Can I change gitlab official to self hosted?\n\nYes you can. Use following command to setup the gitlab-address\n\n```bash\ngl-search setup-gitlab-address <self-hosted-gitlab-address>\n```\n\n## Where I get gitlab token?\n\nYou can get on following link [gitlab-token](https://gitlab.com/-/profile/personal_access_tokens)\nThe TOKEN must be generated with scope read_api.\n\n## Why this lib was built?\n\nI had problem with repo visibility using a mentioned lib above so I built this script to resolve my problem.\n\n## How to use\n\n```bash\ngl-search search test\n```\n\nThis options is show up below.\n\n```bash\n\u279c  gl_search git:(main) \u2717 gl-search search --help\nUsage: gl-search search [OPTIONS] SEARCH_CODE_INPUT\n\n  Search command.\n\nOptions:\n  -p, --path TEXT                 search by Path\n  -fn, --filename TEXT            search by filename\n  -ext, --extension TEXT          code filename extension :: py,js,cs\n  -g, --groups TEXT               search by gitlab group\n  -mw, --max-workers INTEGER      number of parallel requests\n  -v, --visibility [internal|public|private]\n                                  repositories visibility\n  -xdr, --max-delay-request INTEGER\n  -d, --debug                     Debug :: show urls called.\n  --help                          Show this message and exit.\n```\n\n## How was made the lib?\n\nThe lib was built using click, rich, request, ThreadPoolExecutor.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Script to help search code in self-hosted gitlab",
    "version": "0.4.1",
    "project_urls": {
        "Homepage": "https://github.com/Bernardoow/gl_search",
        "Repository": "https://github.com/Bernardoow/gl_search"
    },
    "split_keywords": [
        "gitlab",
        " search",
        " search code",
        " api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "145e8c52101e381e61c8c9b3ffb4161694c661891785f72b9b3cafe41ac98fcb",
                "md5": "72976d5644a6585ce9747d1a0109fe2a",
                "sha256": "4facaacf8edc6442ba1146aa2be3947e77814d20fe8f4186b56c257ef22e8157"
            },
            "downloads": -1,
            "filename": "gl_search-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "72976d5644a6585ce9747d1a0109fe2a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 12193,
            "upload_time": "2024-10-06T14:46:07",
            "upload_time_iso_8601": "2024-10-06T14:46:07.746605Z",
            "url": "https://files.pythonhosted.org/packages/14/5e/8c52101e381e61c8c9b3ffb4161694c661891785f72b9b3cafe41ac98fcb/gl_search-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e5e5b8940eec73f8d48f83db0d43ef586e414064be2eddfd68c6d2171299ce3a",
                "md5": "a6e97d608f78a36542485b00fe571aad",
                "sha256": "38c1114bec515c19aaa880d6c431ff3b58fd8f4c13cb4fc0021a850acc480155"
            },
            "downloads": -1,
            "filename": "gl_search-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a6e97d608f78a36542485b00fe571aad",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 9165,
            "upload_time": "2024-10-06T14:46:09",
            "upload_time_iso_8601": "2024-10-06T14:46:09.219587Z",
            "url": "https://files.pythonhosted.org/packages/e5/e5/b8940eec73f8d48f83db0d43ef586e414064be2eddfd68c6d2171299ce3a/gl_search-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-06 14:46:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Bernardoow",
    "github_project": "gl_search",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "gl_search"
}
        
Elapsed time: 0.76118s