buku/tests/genbm.sh
Arun Prakash Jana 8feeeedaab
Add bash scriptlet to auto-generate dummy records.
Usage:

    genbm.sh n
where, n = number of bookmarks to generate.

The scriptlet works offline, no internet connection is required.

Note: this scriptlet can be used in Travis CI environment.
2017-10-12 23:07:38 +05:30

21 lines
543 B
Bash
Executable File

#!/bin/bash
# Scriptlet to auto-generate Buku bookmarks
# Usage: genbm.sh n
# where, n = number of records to generate
#
# Author: Arun Prakash Jana (engineerarun@gmail.com)
if [ "$#" -ne 1 ]; then
echo "usage: genbm n"
exit 1
fi
count=0
while [ $count -lt "$1" ]; do
url=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)
buku -a https://www.$url.com --title Dummy bookmark for testing. --tag auto-generated, dummy bookmark --comment Generated from the test script $count.
let count=count+1
done