mirror of
https://codeberg.org/scip/anydb.git
synced 2025-12-17 12:31:02 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc1b08d6f9 | ||
|
|
bd5c1e3abb | ||
|
|
57026e11aa | ||
|
|
d0fb560bb2 | ||
|
|
f2bc21e03a |
4
.github/workflows/pushimage.yaml
vendored
4
.github/workflows/pushimage.yaml
vendored
@@ -22,13 +22,13 @@ jobs:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
|
||||
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991
|
||||
with:
|
||||
push: true
|
||||
tags: ghcr.io/tlinden/anydb:${{ github.ref_name}}
|
||||
|
||||
- name: Build and push latest Docker image
|
||||
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355
|
||||
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991
|
||||
with:
|
||||
push: true
|
||||
tags: ghcr.io/tlinden/anydb:latest
|
||||
|
||||
17
.github/workflows/release.yaml
vendored
17
.github/workflows/release.yaml
vendored
@@ -10,10 +10,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.22.11
|
||||
|
||||
@@ -30,3 +30,16 @@ jobs:
|
||||
tag: ${{ github.ref_name }}
|
||||
file: ./releases/*
|
||||
file_glob: true
|
||||
|
||||
- name: Build Changelog
|
||||
id: github_release
|
||||
uses: mikepenz/release-changelog-builder-action@v5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
mode: "PR"
|
||||
|
||||
- name: Create Release
|
||||
uses: mikepenz/action-gh-release@v0.2.0-a03
|
||||
with:
|
||||
body: ${{steps.github_release.outputs.changelog}}
|
||||
|
||||
21
anydb.pod
21
anydb.pod
@@ -448,17 +448,20 @@ The following template variables can be used:
|
||||
|
||||
=over
|
||||
|
||||
=item B<Key> - string
|
||||
=item B<.Key> - string
|
||||
|
||||
=item B<Value> - string
|
||||
=item B<.Value> - string
|
||||
|
||||
=item B<Bin> - []byte
|
||||
=item B<.Bin> - []byte
|
||||
|
||||
=item B<Created> - time.Time
|
||||
=item B<.Created> - timestamp.Time
|
||||
|
||||
=item B<Tags> - []string
|
||||
To retrieve a string representation of the timestamp, use C<.Created.AsTime>.
|
||||
If you need a unix timestamp since epoch, use C<.Created.Unix>.
|
||||
|
||||
=item B<Encrypted> bool
|
||||
=item B<.Tags> - []string
|
||||
|
||||
=item B<.Encrypted> bool
|
||||
|
||||
=back
|
||||
|
||||
@@ -473,12 +476,12 @@ Only show the keys of all entries:
|
||||
Format the list in a way so that is possible to evaluate it in a
|
||||
shell:
|
||||
|
||||
eval $(anydb get foo -m template -T "key='{{ .Key }}' value='{{ .Value }}' ts='{{ .Created}}'")
|
||||
echo "Key: $key, Value: $value"
|
||||
eval $(anydb get foo -m template -T "key='{{ .Key }}' value='{{ .Value }}' ts='{{ .Created.AsTime}}'")
|
||||
echo "Key: $key, Value: $value, When: $ts"
|
||||
|
||||
Print the values in CSV format ONLY if they have some tag:
|
||||
|
||||
anydb list -m template -T "{{ if .Tags }}{{ .Key }},{{ .Value }},{{ .Created}}{{ end }}"
|
||||
anydb list -m template -T "{{ if .Tags }}{{ .Key }},{{ .Value }},{{ .Created.AsTime}}{{ end }}"
|
||||
|
||||
|
||||
=head1 CONFIGURATION
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/tlinden/anydb/common"
|
||||
)
|
||||
|
||||
var Version string = "v0.1.3"
|
||||
var Version string = "v0.1.4"
|
||||
|
||||
type BucketConfig struct {
|
||||
Encrypt bool
|
||||
|
||||
@@ -139,8 +139,9 @@ Type "# using template output mode you can freely design how to print stuff"
|
||||
Enter
|
||||
Type "# here, we print the values in CSV format ONLY if they have some tag"
|
||||
Enter
|
||||
Type "# also note, that we're printing the creation timestamp as epoch"
|
||||
Sleep 1s
|
||||
Type `anydb ls -m template -T "{{ if .Tags }}{{ .Key }},{{ .Value }},{{ .Created}}{{ end }}"`
|
||||
Type `anydb ls -m template -T "{{ if .Tags }}{{ .Key }},{{ .Value }},{{ .Created.AsTime.Unix}}{{ end }}"`
|
||||
Enter
|
||||
Sleep 3s
|
||||
|
||||
|
||||
Reference in New Issue
Block a user