d-link


Named-link JSON
Version 0.2.4 PyPI version JSON
download
home_pagehttps://github.com/PgNetwork01/d-link
SummaryA Python library to extract data from a Python script and push it to a GitHub Pages repository.
upload_time2024-09-09 12:28:44
maintainerNone
docs_urlNone
authorPg Network
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # D-link

`d-link` is a Python library designed to extract data from a Python script and push it to a GitHub Pages repository. This allows you to dynamically update content on your GitHub Pages site based on values from your Python code.

## Features

- Extract constants and other data from Python scripts.
- Push extracted data to a GitHub Pages repository.
- Easy setup and configuration.

## Installation

You can install the `d_link` library using pip:

```bash
pip install d_link
```

## Usage

### 1. Configure the Repository

First, configure the GitHub repository URL and authentication token:

```python
from d_link import DataToGitHub

# Initialize DataToGitHub with the path to your Python script
data_to_github = DataToGitHub(script_path="path/to/your/script.py")

# Configure the repository (run this once)
data_to_github.configure_repository()

# Optionally, display current settings
data_to_github.display_settings()
```

### 2. Push Data to GitHub

Once configured, you can push data from your Python script to GitHub Pages:

```python
from d_link import DataToGitHub

# Initialize DataToGitHub with the path to your Python script
data_to_github = DataToGitHub(script_path="path/to/your/script.py")

# Push data from the Python script to GitHub Pages
data_to_github.push_data()
```

## Configuration

The `configure_repository` method prompts you to enter:

- **GitHub Repository URL**: The URL of the GitHub repository where you want to push data.
- **GitHub Personal Access Token**: Used for authentication with GitHub.

Ensure that the GitHub Pages site is set up to display or use the data in `data.json`.

## Troubleshooting

- **Library Not Found**: Ensure the library is installed with `pip install d_link`. Verify installation with `pip show d_link`.
- **Path Issues**: Confirm that the file paths in your script are correct and accessible.
- **Authentication Errors**: Verify your GitHub personal access token and repository URL are accurate and have the necessary permissions.

## Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your changes.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Contact

For any questions or issues, please open an issue on the [GitHub repository](https://github.com/PgNetwork01/d-link) or contact [Web Wizard](mailto:wert.ed00@gmail.com).
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PgNetwork01/d-link",
    "name": "d-link",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Pg Network",
    "author_email": "gamerzp780@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/11/4f/4ada078b4cde2ac531e77ec00a9f87c8ccd24ba83e320954fe2e685b8de2/d_link-0.2.4.tar.gz",
    "platform": null,
    "description": "# D-link\r\n\r\n`d-link` is a Python library designed to extract data from a Python script and push it to a GitHub Pages repository. This allows you to dynamically update content on your GitHub Pages site based on values from your Python code.\r\n\r\n## Features\r\n\r\n- Extract constants and other data from Python scripts.\r\n- Push extracted data to a GitHub Pages repository.\r\n- Easy setup and configuration.\r\n\r\n## Installation\r\n\r\nYou can install the `d_link` library using pip:\r\n\r\n```bash\r\npip install d_link\r\n```\r\n\r\n## Usage\r\n\r\n### 1. Configure the Repository\r\n\r\nFirst, configure the GitHub repository URL and authentication token:\r\n\r\n```python\r\nfrom d_link import DataToGitHub\r\n\r\n# Initialize DataToGitHub with the path to your Python script\r\ndata_to_github = DataToGitHub(script_path=\"path/to/your/script.py\")\r\n\r\n# Configure the repository (run this once)\r\ndata_to_github.configure_repository()\r\n\r\n# Optionally, display current settings\r\ndata_to_github.display_settings()\r\n```\r\n\r\n### 2. Push Data to GitHub\r\n\r\nOnce configured, you can push data from your Python script to GitHub Pages:\r\n\r\n```python\r\nfrom d_link import DataToGitHub\r\n\r\n# Initialize DataToGitHub with the path to your Python script\r\ndata_to_github = DataToGitHub(script_path=\"path/to/your/script.py\")\r\n\r\n# Push data from the Python script to GitHub Pages\r\ndata_to_github.push_data()\r\n```\r\n\r\n## Configuration\r\n\r\nThe `configure_repository` method prompts you to enter:\r\n\r\n- **GitHub Repository URL**: The URL of the GitHub repository where you want to push data.\r\n- **GitHub Personal Access Token**: Used for authentication with GitHub.\r\n\r\nEnsure that the GitHub Pages site is set up to display or use the data in `data.json`.\r\n\r\n## Troubleshooting\r\n\r\n- **Library Not Found**: Ensure the library is installed with `pip install d_link`. Verify installation with `pip show d_link`.\r\n- **Path Issues**: Confirm that the file paths in your script are correct and accessible.\r\n- **Authentication Errors**: Verify your GitHub personal access token and repository URL are accurate and have the necessary permissions.\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please fork the repository and submit a pull request with your changes.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\r\n\r\n## Contact\r\n\r\nFor any questions or issues, please open an issue on the [GitHub repository](https://github.com/PgNetwork01/d-link) or contact [Web Wizard](mailto:wert.ed00@gmail.com).\r\n```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python library to extract data from a Python script and push it to a GitHub Pages repository.",
    "version": "0.2.4",
    "project_urls": {
        "Homepage": "https://github.com/PgNetwork01/d-link"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd6e2aead191f09548d53bc802958dbf420b4c88ec181387aefca228fe90ad37",
                "md5": "d3e2a1c03c6fef248ba900e20f79003a",
                "sha256": "0ec73fb535fee91be1e44f5fa32b6c70baa78b76d5ab00351a5b8b8b019b3850"
            },
            "downloads": -1,
            "filename": "d_link-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d3e2a1c03c6fef248ba900e20f79003a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6026,
            "upload_time": "2024-09-09T12:28:41",
            "upload_time_iso_8601": "2024-09-09T12:28:41.866823Z",
            "url": "https://files.pythonhosted.org/packages/cd/6e/2aead191f09548d53bc802958dbf420b4c88ec181387aefca228fe90ad37/d_link-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "114f4ada078b4cde2ac531e77ec00a9f87c8ccd24ba83e320954fe2e685b8de2",
                "md5": "549e7a9a0e241f7b3556867bc4584add",
                "sha256": "5fb9910ddc36ccc3c25d8d1f8516874fbf9afbee8a3547b1c481baa93c5626a7"
            },
            "downloads": -1,
            "filename": "d_link-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "549e7a9a0e241f7b3556867bc4584add",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4271,
            "upload_time": "2024-09-09T12:28:44",
            "upload_time_iso_8601": "2024-09-09T12:28:44.871220Z",
            "url": "https://files.pythonhosted.org/packages/11/4f/4ada078b4cde2ac531e77ec00a9f87c8ccd24ba83e320954fe2e685b8de2/d_link-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-09 12:28:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PgNetwork01",
    "github_project": "d-link",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "d-link"
}
        
Elapsed time: 0.44534s