submit-urls
The submit-urls-bing.sh
Bash script refers to the sitemap and submits the
URLs of newer entries than the last submission through the Bing Webmaster
API.
Prerequisites
This script has been tested for Blogger on Debian on WSL and uses the following packages:
- curl to retrieve the sitemap and submit URLs
xq
included in theyq
package to transcode XML to JSON- jq to filter JSON data
- GnuPG to encrypt the configuration file
Install each package as needed. For example:
sudo apt install curl
python -m pip install yq -U
sudo apt install jq
sudo apt install gpg
Usage
This script will create and encrypt a ~/.config/submit-urls-bing.cfg.gpg
configuration file if it does not exist. It assumes that the default key of
GnuPG is your OpenPGP key pair.
Bing Webmaster
Prepare an API key for authorization, and replace the values of the following variables in the configuration file with yours:
SITEMAP
SITE_URL
API_KEY
Then:
submit-urls-bing.sh
Options
-n
: do not perform a POST request-s
: work silently
License
Link
- Bash Scripting to Submit Appropriate URLs through Bing Webmaster API: a blog post for more details