https://github.com/hyouteki/duck
Duck is a VCS built from scratch in Python. Duck stores commits/logs in JSON format.
https://github.com/hyouteki/duck
python vcs
Last synced: about 2 months ago
JSON representation
Duck is a VCS built from scratch in Python. Duck stores commits/logs in JSON format.
- Host: GitHub
- URL: https://github.com/hyouteki/duck
- Owner: hyouteki
- License: mit
- Created: 2023-08-13T09:43:40.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-21T18:25:57.000Z (over 1 year ago)
- Last Synced: 2025-02-13T06:01:43.174Z (3 months ago)
- Topics: python, vcs
- Language: Python
- Homepage:
- Size: 59.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Duck is a [VCS](https://en.wikipedia.org/wiki/Version_control) built from scratch in Python. Duck stores commits/logs in JSON format.
> [!WARNING]
> This is still in development...
> Keep your expectations low!!## Duck is planned to have support for
- [x] init
- [x] commit
- [x] diff
- [x] info
- [x] status
- [x] rollback
- [ ] compression & decompression in files
- [ ] making timeline a tree structure
- [ ] branching
- [ ] merging between branches
- [ ] recursive handling of subdirectories
- [ ] [python package](https://typer.tiangolo.com/tutorial/package/)
- [ ] TODOs and ISSUEs## Duck log structure
```
.duck
|
|___ commits
| |___ init
| |___ commit number 1
| |___ ...
|
|___ duck.log.json
|___ head
|___ commit timeline
|___ commit SHA
|___ message
|___ files
|___ new
|___ old
|___ changes
|___ del
|___ add
```
| name | type | description |
| :------- | :----------- | :--------------------------------------------------------------------------------------------------------- |
| init | subdirectory | initially commited files |
| commits | subdirectory | stores subdirectories which contain files that are either newly added or deleted in that particular commit |
| head | string | SHA of the latest commit |
| timeline | linked list | stores the sequence of commits (SHA) |
| SHA | string | SHA of that particular commit |
| message | string | commit message |
| files | JSON array | logs of changes done in that commit |
| new | array | list of newly added files |
| old | array | list of deleted files |
| changes | json | logs of changes in existing files |
| del | array | list of deleted lines in that particular file |
| add | array | list of newly added lines in that particular file |## Requirements
``` console
pip install typer[all] rich inquirer
```## TODO: Add documentation