Commit graph

26 commits

Author SHA1 Message Date
google-labs-jules[bot]
aaa8ab3966 fix: Resolve broken build and improve testing
This commit fixes a critical build issue where the application was being compiled as an archive instead of an executable. This was caused by the absence of a `main` package.

The following changes have been made to resolve this and improve the development process:

- A `main.go` file has been added to the root of the project to serve as the application's entry point.
- A `Taskfile.yml` has been introduced to standardize the build, run, and testing processes.
- The build process has been corrected to produce a runnable binary.
- An end-to-end test (`TestE2E`) has been added to the test suite. This test builds the application and runs it with the `--help` flag to ensure the binary is always executable, preventing similar build regressions in the future.
2025-11-01 23:55:14 +00:00
Snider
da5a8f3a44 broken @jules 2025-11-01 23:36:04 +00:00
Snider
e02162d67a Merge remote-tracking branch 'origin/main' into feature-github-release-downloader
# Conflicts:
#	cmd/all.go
#	cmd/collect_github_repo.go
#	go.mod
#	go.sum
2025-11-01 23:34:39 +00:00
Snider
23589ccf99 feat: Add .idea to .gitignore and create go.work.sum for dependency management 2025-11-01 23:30:52 +00:00
google-labs-jules[bot]
ed8189e35c feat: Resolve merge conflict, fix tests, and add github release command
This commit resolves a merge conflict by restructuring the `collect` command and its subcommands. The `collect git` and `collect github-release` commands have been consolidated under the new `collect github` command to provide a more organized and user-friendly command structure.

This commit also fixes a failing test in the `vcs` package by adding the necessary git config to the test setup.

Finally, this commit introduces the `collect github release` command, which allows downloading assets from the latest GitHub release of a repository. The command supports version checking, specific file downloads, and packing all assets into a DataNode.
2025-11-01 23:28:32 +00:00
google-labs-jules[bot]
4c6827d21b feat: Update collect pwa command to use flags and update documentation
This commit updates the `collect pwa` command to use the `--uri` and `--output` flags instead of positional arguments. This makes the command's usage more consistent with the other `collect` subcommands.

The documentation for the `collect pwa` command has also been updated to reflect the new flags and their usage.
2025-11-01 23:20:46 +00:00
Snider
e3c9d0fc17
Revise README content for clarity and accuracy
Updated README.md for improved clarity and corrected terminology.
2025-11-01 22:50:02 +00:00
Snider
661617f7a8
Revise README for Borg Data Collector
Updated README to clarify purpose and features of Borg Data Collector.
2025-11-01 22:47:07 +00:00
google-labs-jules[bot]
07db4443af feat: Add collect github command and resolve merge conflict
This commit introduces a new `collect github` command with two subcommands:
- `repo`: Clones a GitHub repository. This functionality was previously under the `collect git` command.
- `release`: Downloads assets from the latest GitHub release of a repository.

The `release` subcommand supports the following features:
- Version checking against a provided version string using the `--version` flag.
- Downloading a specific file from the release using the `--file` flag.
- Downloading all assets from the release and packing them into a DataNode using the `--pack` flag.
- Specifying an output directory for the downloaded files using the `--output` flag.

This commit also resolves a merge conflict by restructuring the `collect` command and its subcommands. The `collect git` and `collect github-release` commands have been consolidated under the new `collect github` command to provide a more organized and user-friendly command structure.
2025-11-01 22:22:32 +00:00
Snider
1658ad9e92
#3 from Snider/repo-maintenance
Repo maintenance
2025-11-01 21:55:08 +00:00
google-labs-jules[bot]
52a07f46be feat: Add ability to download from GitHub releases
This commit introduces a new command `collect github-release` that allows downloading assets from the latest GitHub release of a repository.

The command supports the following features:
- Downloading a specific file from the release using the `--file` flag.
- Downloading all assets from the release and packing them into a DataNode using the `--pack` flag.
- Specifying an output directory for the downloaded files using the `--output` flag.

This commit also includes a project-wide refactoring of the Go module path to `github.com/Snider/Borg` to align with Go's module system best practices.
2025-11-01 19:03:04 +00:00
google-labs-jules[bot]
dc114b21bb feat: Add --user flag to collect all user repos
This commit adds a `--user` flag to the `collect git` command, allowing it to fetch all public repositories for a given GitHub user or organization.

- The `collect git` command was modified to accept a `--user` flag.
- The previous `all` command's functionality has been integrated into the `collect git` command.
- The documentation and examples have been updated to reflect the new flag.
2025-10-31 22:54:50 +00:00
Snider
575b862fd0
Enhance Go CI workflow with coverage reporting
Updated Go workflow to use go-version-file and added coverage report upload.
2025-10-31 22:19:01 +00:00
google-labs-jules[bot]
c68626985e feat: Add go.work, update module path, and add examples
This commit introduces several maintenance improvements to the repository.

- A `go.work` file has been added to define the workspace and make the project easier to work with.
- The module path in `go.mod` has been updated to use a GitHub URL, and all import paths have been updated accordingly.
- `examples` and `docs` directories have been created.
- The `examples` directory contains scripts that demonstrate the tool's functionality.
- The `docs` directory contains documentation for the project.
- Tests have been added to the `pkg/github` package following the `_Good`, `_Bad`, `_Ugly` convention.
- The missing `pkg/borg` package has been added to resolve a build error.
2025-10-31 22:15:05 +00:00
Snider
73b814f1de
#2 from Snider/feature-pwa-downloader
Add PWA Download and Serve Commands
2025-10-31 21:37:31 +00:00
google-labs-jules[bot]
8e82bada06 feat: Add recursive website downloader and progress bar
This commit introduces a new `collect website` command that recursively downloads a website to a specified depth.

- A new `pkg/website` package contains the logic for the recursive download.
- A new `pkg/ui` package provides a progress bar for long-running operations, which is used by the website downloader.
- The `collect pwa` subcommand has been restored to be PWA-specific.
2025-10-31 21:35:53 +00:00
Snider
adfa1d3d51
Downgrade Go version from 1.25 to 1.24 2025-10-31 21:31:23 +00:00
Snider
e9c4b53399
Update Go workflow to use version 1.25 2025-10-31 21:30:08 +00:00
Snider
457e572615
VCS and PWA processing statuses
Added detailed VCS and PWA processing steps to README.
2025-10-31 21:21:35 +00:00
google-labs-jules[bot]
bd65eefcd3 refactor: Use DataNode for repository collection
This commit refactors the repository collection functionality to use the new `DataNode` package instead of the old `trix` package.

The `collect` and `all` commands have been updated to use the new `vcs` package, which clones Git repositories and packages them into a `DataNode`. The `trix` package and its related commands (`cat`, `ingest`) have been removed.
2025-10-31 21:03:26 +00:00
google-labs-jules[bot]
5149b64403 feat: Implement DataNode and update PWA commands
This commit introduces a new `DataNode` package, which provides an in-memory, `fs.FS`-compatible filesystem with a `debme`-like interface. The `DataNode` can be serialized to and from a TAR archive, making it suitable for storing downloaded assets.

The `pwa` and `serve` commands have been refactored to use the `DataNode`. The `pwa` command now packages downloaded PWA assets into a `DataNode` and saves it as a `.dat` file. The `serve` command loads a `.dat` file into a `DataNode` and serves its contents.
2025-10-31 20:47:11 +00:00
google-labs-jules[bot]
efee04bfdb feat: Add PWA download and serve commands
This commit introduces two new commands: `pwa` and `serve`.

The `pwa` command downloads a Progressive Web Application (PWA) from a given URL. It discovers the PWA's manifest, downloads the assets referenced in the manifest (start URL and icons), and packages them into a single `.tar` file.

The `serve` command takes a `.tar` file created by the `pwa` command and serves its contents using a standard Go HTTP file server. It unpacks the tarball into an in-memory filesystem, making it a self-contained and efficient way to host the downloaded PWA.
2025-10-31 20:32:46 +00:00
Snider
7a1381e4ef
Merge pull request #1 from Snider/feature-borg-data-collector
feat: Implement core data collection and Trix cube functionality
2025-10-31 20:10:19 +00:00
google-labs-jules[bot]
21f9a9ca74 feat: Implement core data collection and Trix cube functionality
This commit introduces the core functionality of the Borg Data Collector.

- Adds the `collect` command to clone a single Git repository and store it in a Trix cube.
- Adds the `collect all` command to clone all public repositories from a GitHub user or organization.
- Implements the Trix cube as a `tar` archive.
- Adds the `ingest` command to add files to a Trix cube.
- Adds the `cat` command to extract files from a Trix cube.
- Integrates Borg-themed status messages for a more engaging user experience.
2025-10-31 05:02:29 +00:00
Snider
c68d13a5b7
README 2025-10-31 00:50:29 +00:00
Snider
44646e6556
Add EUPL v. 1.2 license
Added the European Union Public Licence v. 1.2 to the project.
2025-10-31 00:10:08 +00:00