Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Add CLI option to run in offline mode. #52

Merged
merged 1 commit into from
Sep 24, 2023

Conversation

eli64s
Copy link
Owner

@eli64s eli64s commented Sep 24, 2023

Add CLI option to run readme-ai offline, generating the same README output excluding the LLM generated text sections.

  • This option can be used by passing the -offline-mode flag to the CLI.

  • Useful for users who want to generate READMEs without an API key, or want a nice baseline template to work off of.

  • Running in offline mode still produces an almost complete README file!

    README Output (Without OpenAI API)


    readme-ai

    ◦ ▶︎ INSERT-DESCRIPTION

    ◦ Developed with the software and tools below.

    GNU%20Bash tqdm SVG precommit OpenAI Python AIOHTTP Docker GitHub%20Actions Pytest Markdown JSON

    GitHub top language GitHub code size in bytes GitHub commit activity GitHub license

    📖 Table of Contents


    📍 Overview

    ▶︎ INSERT-DESCRIPTION


    📦 Features

    ▶︎ INSERT-DESCRIPTION


    .
    ├── CHANGELOG.md
    ├── CODE_OF_CONDUCT.md
    ├── CONTRIBUTING.md
    ├── Dockerfile
    ├── LICENSE
    ├── Makefile
    ├── README.md
    ├── examples
    │   ├── imgs
    │   │   ├── badges.png
    │   │   ├── cli-demo.png
    │   │   ├── code-summaries.png
    │   │   ├── contributing-guide.png
    │   │   ├── demo.png
    │   │   ├── feature-table.png
    │   │   ├── license.png
    │   │   ├── repository-tree.png
    │   │   ├── roadmap.png
    │   │   ├── streamlit-demo.png
    │   │   ├── terminal-demo.svg
    │   │   └── usage-instructions.png
    │   ├── readme-energy-forecasting.md
    │   ├── readme-fastapi-redis.md
    │   ├── readme-go.md
    │   ├── readme-java.md
    │   ├── readme-javascript.md
    │   ├── readme-kotlin.md
    │   ├── readme-lanarky.md
    │   ├── readme-mlops.md
    │   ├── readme-pyflink.md
    │   ├── readme-python.md
    │   ├── readme-rust-c.md
    │   └── readme-typescript.md
    ├── poetry.lock
    ├── pyproject.toml
    ├── readmeai
    │   ├── __init__.py
    │   ├── builder.py
    │   ├── conf
    │   │   ├── badges.json
    │   │   ├── conf.toml
    │   │   ├── dependency_files.toml
    │   │   ├── ignore_files.toml
    │   │   ├── language_names.toml
    │   │   └── language_setup.toml
    │   ├── conf.py
    │   ├── factory.py
    │   ├── logger.py
    │   ├── main.py
    │   ├── model.py
    │   ├── parse.py
    │   ├── preprocess.py
    │   └── utils.py
    ├── requirements.txt
    ├── scripts
    │   ├── build_image.sh
    │   ├── build_pypi.sh
    │   ├── clean.sh
    │   ├── run.sh
    │   ├── run_batch.sh
    │   └── test.sh
    ├── setup
    │   ├── environment.yaml
    │   └── setup.sh
    └── tests
        ├── __init__.py
        ├── conftest.py
        ├── test_builder.py
        ├── test_conf.py
        ├── test_factory.py
        ├── test_logger.py
        ├── test_main.py
        ├── test_model.py
        ├── test_parse.py
        ├── test_preprocess.py
        └── test_utils.py
    
    8 directories, 69 files

    ⚙️ Modules

    File Summary
    .dockerignore Summary of .dockerignore
    .gitignore Summary of .gitignore
    .pre-commit-config.yaml Summary of .pre-commit-config.yaml
    CHANGELOG.md Summary of CHANGELOG.md
    CODE_OF_CONDUCT.md Summary of CODE_OF_CONDUCT.md
    CONTRIBUTING.md Summary of CONTRIBUTING.md
    Dockerfile Summary of Dockerfile
    LICENSE Summary of LICENSE
    Makefile Summary of Makefile
    README.md Summary of README.md
    poetry.lock Summary of poetry.lock
    pyproject.toml Summary of pyproject.toml
    requirements.txt Summary of requirements.txt
    .git
    File Summary
    HEAD Summary of HEAD
    config Summary of config
    description Summary of description
    index Summary of index
    packed-refs Summary of packed-refs
    shallow Summary of shallow
    hooks
    File Summary
    applypatch-msg.sample Summary of applypatch-msg.sample
    commit-msg.sample Summary of commit-msg.sample
    fsmonitor-watchman.sample Summary of fsmonitor-watchman.sample
    post-update.sample Summary of post-update.sample
    pre-applypatch.sample Summary of pre-applypatch.sample
    pre-commit.sample Summary of pre-commit.sample
    pre-merge-commit.sample Summary of pre-merge-commit.sample
    pre-push.sample Summary of pre-push.sample
    pre-rebase.sample Summary of pre-rebase.sample
    pre-receive.sample Summary of pre-receive.sample
    prepare-commit-msg.sample Summary of prepare-commit-msg.sample
    push-to-checkout.sample Summary of push-to-checkout.sample
    update.sample Summary of update.sample
    info
    File Summary
    exclude Summary of exclude
    logs
    File Summary
    HEAD Summary of HEAD
    refs
    File Summary
    heads
    File Summary
    main Summary of main
    remotes
    File Summary
    origin
    File Summary
    HEAD Summary of HEAD
    objects
    File Summary
    info
    File Summary
    pack
    File Summary
    pack-681c03b1731f3121ff32bafeb3d01b67f449529c.idx Summary of pack-681c03b1731f3121ff32bafeb3d01b67f449529c.idx
    pack-681c03b1731f3121ff32bafeb3d01b67f449529c.pack Summary of pack-681c03b1731f3121ff32bafeb3d01b67f449529c.pack
    refs
    File Summary
    heads
    File Summary
    main Summary of main
    remotes
    File Summary
    origin
    File Summary
    HEAD Summary of HEAD
    tags
    File Summary
    .github
    File Summary
    release-drafter.yml Summary of release-drafter.yml
    workflows
    File Summary
    build-docker-image.yml Summary of build-docker-image.yml
    publish-pypi-package.yml Summary of publish-pypi-package.yml
    release-drafter.yml Summary of release-drafter.yml
    examples
    File Summary
    readme-energy-forecasting.md Summary of readme-energy-forecasting.md
    readme-fastapi-redis.md Summary of readme-fastapi-redis.md
    readme-go.md Summary of readme-go.md
    readme-java.md Summary of readme-java.md
    readme-javascript.md Summary of readme-javascript.md
    readme-kotlin.md Summary of readme-kotlin.md
    readme-lanarky.md Summary of readme-lanarky.md
    readme-mlops.md Summary of readme-mlops.md
    readme-pyflink.md Summary of readme-pyflink.md
    readme-python.md Summary of readme-python.md
    readme-rust-c.md Summary of readme-rust-c.md
    readme-typescript.md Summary of readme-typescript.md
    imgs
    File Summary
    badges.png Summary of badges.png
    cli-demo.png Summary of cli-demo.png
    code-summaries.png Summary of code-summaries.png
    contributing-guide.png Summary of contributing-guide.png
    demo.png Summary of demo.png
    feature-table.png Summary of feature-table.png
    license.png Summary of license.png
    repository-tree.png Summary of repository-tree.png
    roadmap.png Summary of roadmap.png
    streamlit-demo.png Summary of streamlit-demo.png
    terminal-demo.svg Summary of terminal-demo.svg
    usage-instructions.png Summary of usage-instructions.png
    readmeai
    File Summary
    init.py Summary of init.py
    builder.py Summary of builder.py
    conf.py Summary of conf.py
    factory.py Summary of factory.py
    logger.py Summary of logger.py
    main.py Summary of main.py
    model.py Summary of model.py
    parse.py Summary of parse.py
    preprocess.py Summary of preprocess.py
    utils.py Summary of utils.py
    conf
    File Summary
    badges.json Summary of badges.json
    conf.toml Summary of conf.toml
    dependency_files.toml Summary of dependency_files.toml
    ignore_files.toml Summary of ignore_files.toml
    language_names.toml Summary of language_names.toml
    language_setup.toml Summary of language_setup.toml
    scripts
    File Summary
    build_image.sh Summary of build_image.sh
    build_pypi.sh Summary of build_pypi.sh
    clean.sh Summary of clean.sh
    run.sh Summary of run.sh
    run_batch.sh Summary of run_batch.sh
    test.sh Summary of test.sh
    setup
    File Summary
    environment.yaml Summary of environment.yaml
    setup.sh Summary of setup.sh
    tests
    File Summary
    init.py Summary of init.py
    conftest.py Summary of conftest.py
    test_builder.py Summary of test_builder.py
    test_conf.py Summary of test_conf.py
    test_factory.py Summary of test_factory.py
    test_logger.py Summary of test_logger.py
    test_main.py Summary of test_main.py
    test_model.py Summary of test_model.py
    test_parse.py Summary of test_parse.py
    test_preprocess.py Summary of test_preprocess.py
    test_utils.py Summary of test_utils.py

    🚀 Getting Started

    Dependencies

    Please ensure you have the following dependencies installed on your system:

    - ℹ️ Dependency 1

    - ℹ️ Dependency 2

    - ℹ️ ...

    🔧 Installation

    1. Clone the readme-ai repository:
    git clone https://github.com/eli64s/readme-ai
    1. Change to the project directory:
    cd readme-ai
    1. Install the dependencies:
    ▶︎ INSERT-DESCRIPTION

    🤖 Running readme-ai

    ▶︎ INSERT-DESCRIPTION

    🧪 Tests

    ▶︎ INSERT-DESCRIPTION

    🛣 Roadmap

    • ℹ️ Task 1: Implement X
    • ℹ️ Task 2: Implement Y
    • ℹ️ ...

    🤝 Contributing

    Contributions are always welcome! Please follow these steps:

    1. Fork the project repository. This creates a copy of the project on your account that you can modify without affecting the original project.
    2. Clone the forked repository to your local machine using a Git client like Git or GitHub Desktop.
    3. Create a new branch with a descriptive name (e.g., new-feature-branch or bugfix-issue-123).
    git checkout -b new-feature-branch
    1. Make changes to the project's codebase.
    2. Commit your changes to your local branch with a clear commit message that explains the changes you've made.
    git commit -m 'Implemented new feature.'
    1. Push your changes to your forked repository on GitHub using the following command
    git push origin new-feature-branch
    1. Create a new pull request to the original project repository. In the pull request, describe the changes you've made and why they're necessary.
      The project maintainers will review your changes and provide feedback or merge them into the main branch.

    📄 License

    This project is licensed under the ℹ️ LICENSE-TYPE License. See the LICENSE-Type file for additional info.


    👏 Acknowledgments

    - ℹ️ List any resources, contributors, inspiration, etc.


@eli64s eli64s added enhancement New feature or request feature labels Sep 24, 2023
@eli64s eli64s merged commit f122c1d into main Sep 24, 2023
1 check passed
@eli64s eli64s deleted the feature/generate-readme-offline branch September 24, 2023 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant