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

feat: Add support for syncing sections of code with README #25

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

kvankova
Copy link
Owner

This PR adds support for syncing only sections of code with README. Sections are depicted in README as

  ```language:path/to/script:section_name
  ```

For example, we have the following README file:

# README

This is a readme.

```python:main.py:A
```

The main.py file contains the following code:

print("Hello, world!")

# code_embedder:A start
print("Embedding successful")
# code_embedder:A end

Once the workflow runs, the code block section will be updated in the README file with the content of the section A from the script located at main.py and pushed to the repository 🚀.

# README

This is a readme.

```python:main.py:A
print("Embedding successful")
```

With any changes to the section A in main.py, the code block section is updated in the README file with the next workflow run.

Closes #9

@kvankova kvankova merged commit b383d90 into main Oct 29, 2024
2 checks passed
@kvankova kvankova deleted the kv_add_copy_section branch October 29, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add functionality to paste only a part of the script
1 participant