A command-line tool to export attachments from a Homebox instance.
- Export all attachments
- Organize downloads into folders by item name
The exported files will be organized in the following structure:
export/
${ITEM_NAME}_${SHORT_ID}/
attachment1.jpg
attachment2.pdf
...
This is recommended for users that already have go installed.
go install github.com/kusold/homebox-export/cmd/homebox-export@latest
docker run --rm -it --env-file .env -v ./export:/export ghcr.io/kusold/homebox-export:latest
homebox-export export -server http://homebox.local -user admin -pass secret
Create a .env
file:
HOMEBOX_SERVER=http://homebox.local
HOMEBOX_USER=admin
HOMEBOX_PASS=secret
#HOMEBOX_OUTPUT=./my-backup
#HOMEBOX_PAGESIZE=50
Then run:
homebox-export export
Usage: homebox-export <command> [options]
Commands:
export Download all items and their attachments
help Show this help message
version Show version information
Export Options:
-server Homebox server URL
-user Username for authentication
-pass Password for authentication
-output Output directory (default: ./export)
-pagesize Number of items per page (default: 100)
Environment Variables:
HOMEBOX_SERVER Server URL
HOMEBOX_USER Username
HOMEBOX_PASS Password
HOMEBOX_OUTPUT Output directory
HOMEBOX_PAGESIZE Number of items per page
This project uses Task for build automation. To get started:
- Install Task
- Create a
.env
file with your Homebox credentials - Run development commands:
# Build and run
task
# Just build
task build
# Just run
task run
# Clean build artifacts
task clean
- First open an issue to discuss what you would like to change. This prevents you from doing work that might not be accepted.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -am 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request