Namecoin calendar notification daemon (ICS, CalDAV)

nccald

nccald is a simple daemon to provide calendar notifications for Namecoin name expirations.

The daemon periodically queries a Namecoin Core instance using the name_list RPC command and can do one or both of the following:

  • Generate an ICS calendar file listing names with their projected expiration dates
  • Push to a CalDav server

Usage

Daemon command line arguments:

nccald
  -service.xyz=etc.
  -nccald.calmargin=72h             Interval of uncertainty to allow in projected expiration calculation.
  -nccald.calquantum=72h            Projected expiration time is rounded to a multiple of this time interval.
  -nccald.calqueryinterval=10m      Query interval.
  -nccald.icspath=...               Write ICS calendar file to this path if specified.
  -nccald.caldavurl=...             Specify URL of a CalDAV calendar resource to update a CalDAV calendar if desired.
  -nccald.caldavusername=...        Username to use for CalDAV authentication.
  -nccald.caldavpassword=...        Password to use for CalDAV authentication.
  -nccald.namecoinrpcaddress=...    Address of Namecoin RPC server (e.g. "127.0.0.1:8336").
  -nccald.namecoinrpcusername=...   Username to use for Namecoin RPC.
  -nccald.namecoinrpcpassword=...   Password to use for Namecoin RPC.
  -nccald.namecoinrpccookiepath=... Path to cookie file to use for Namecoin RPC.
  -nccald.once=1                    Write ICS file/update CalDAV once and exit.

When the ICS calendar file is written, the file ${PATH}.tmp is first written and renamed over the original file (thus writes are atomic but inode number does change); therefore you can use inotify to watch for changes to the ICS file if you like.

Here is example usage for generation of an ICS file periodically:

nccald -nccald.namecoinrpccookiepath=~/.namecoin/.cookie -nccald.icspath=~/namecoin.ics

Here is example usage for updating a CalDAV resource periodically. Note that the URL given should be to a CalDAV calendar resource:

nccald
  -nccald.namecoinrpccookiepath=~/.namecoin/.cookie
  -nccald.caldavurl=https://example.com/calendars/my-calendar/
  -nccald.caldavusername=calendaruser
  -nccald.caldavpassword=calendarpassword

You can use -nccald.once=1 if you want to run a cron job instead of a persistent daemon:

nccald -nccald.once=1 ...

For debug logging, pass -xlog.severity=debug.

For a full list of options, run nccald -help.

Calculation of expiration dates

Since Namecoin name expiration is based on block height, exact calculations of a chronological expiration time are not possible. nccald calculates a conservative (that is, early) expiration time based on configurable margin and quantum values.

The expiration date of a name is guessed based on assuming each block averages 10 minutes; then the margin duration is subtracted. Finally, the resulting time is rounded down to a multiple of the quantum duration; this is to ensure that the estimated expiry date does not constantly fluctuate between different values as the block height changes.

If you want to increase your safety margin of how far in advance you renew names, increase -nccald.calmargin. If you are noticing “date jump” in which a projected expiration keeps moving from one calendar day to another, increase -nccald.calquantum.

Licence

© 2021 Hugo Landau <[email protected]>        GPLv3+ License
Similar Resources

Goals calendar is a Seinfeld calendar written in Google's Go (unfinished dead code)

Goals calendar ============== Goals calendar is a Seinfeld calendar written in Google's Go. Mark a red check each day you have done something for you

Jun 5, 2017

Go-notification - Realtime notification system with golang

Realtime notification system Used Apache kafka gRPC & PROTOBUF MongoDB restapi w

Aug 19, 2022

The implementation of Persian (Solar Hijri) Calendar in Go

Go Persian Calendar Go Persian Calendar provides functionality for conversion among Persian (Solar Hijri) and Gregorian calendars. A Julian calendar i

Dec 12, 2022

Calendar heatmap inspired by Github contribution activity

Calendar heatmap inspired by Github contribution activity

Self-contained, plain Go implementation of calendar heatmap inspired by Github contribution activity. $ go build $ echo '{ "2020-05-16": 8, "2

Dec 25, 2022

Simple CLI App for creating recurring google calendar events

Kronus A CLI App to help you stay in touch with the people that matter by leveraging the google calender API. You can create touchbase events for cont

Nov 7, 2022

Structural time package for jalali calendar

Jalali Structural time package for jalali calendar. This package support parse from string, json and time. Structures There are three data structures

Mar 21, 2022

An annual Advent calendar of programming puzzles

An annual Advent calendar of programming puzzles

🎄 Advent of Code 2021 🎄 Summary Advent of Code is an annual Advent calendar of programming puzzles. This year I am doing it in Go and Python. Runnin

Jun 16, 2022

A simple microservice designed in Go using Echo Microframework for sending emails and/or calendar invitations to users.

Calenvite A simple microservice designed in GO using Echo Microframework for sending emails and/or calendar invitations to users. Features Send emails

Oct 29, 2022

Plan team's rotation on google calendar

google-rotation-planner Plan rota on google calendar. Usage Get a credentials.json file from GCloud and place it in the same folder as the executable.

Jul 4, 2022

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Advent of Code 2021 Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved

Dec 2, 2021

Collect stars by solving puzzles. Two puzzles will be made available on each day in the Advent calendar

Collect stars by solving puzzles. Two puzzles will be made available on each day in the Advent calendar; the second puzzle is unlocked when you complete the first. Each puzzle grants one star.

Dec 6, 2021

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. This repository holds my submission/answers for these challenges.

Advent of Code - Zach Howell's Answers Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels

Jan 4, 2022

API for managing the release calendar

dp-release-calendar-api API for managing the release calendar Getting started Run make debug Dependencies No further dependencies other than those def

Feb 10, 2022

Daemon based on liblxc offering a REST API to manage containers

Daemon based on liblxc offering a REST API to manage containers

LXD LXD is a next generation system container and virtual machine manager. It offers a unified user experience around full Linux systems running insid

Jan 9, 2023

An autocompletion daemon for the Go programming language

An autocompletion daemon for the Go programming language

An autocompletion daemon for the Go programming language VERY IMPORTANT: this project is not maintained anymore, look for alternatives or forks if you

Jan 7, 2023

dyndns client daemon

README for dyndnscd =================== dyndnscd is the dyndns client daemon. It is a daemon that continually polls for IP address changes an in the

Sep 29, 2021

Resolver (DNS) cache daemon.

Resolver (DNS) cache daemon.

RESCACHED(1) Manual Page NAME rescached - DNS resolver cache daemon. Table of Contents SYNOPSIS OPTIONS DESCRIPTION FEATURES BEHIND THE DNS HOW CACHE

Nov 17, 2022

A simple daemon which will watch files on your filesystem, mirror them to MFS, automatically update related pins, and update related IPNS keys.

A simple daemon which will watch files on your filesystem, mirror them to MFS, automatically update related pins, and update related IPNS keys.

ipfs-sync is a simple daemon which will watch files on your filesystem, mirror them to MFS, automatically update related pins, and update related IPNS keys, so you can always access your directories from the same address. You can use it to sync your documents, photos, videos, or even a website!

Dec 30, 2022

Kubernetes Reboot Daemon

Kubernetes Reboot Daemon

kured - Kubernetes Reboot Daemon Introduction Kubernetes & OS Compatibility Installation Configuration Reboot Sentinel File & Period Setting a schedul

Jan 3, 2023
Comments
  • Dependencies

    Dependencies

    Any reason not to use https://github.com/emersion/go-ical and https://github.com/emersion/go-webdav ? (Based on briefly looking at their issue trackers, they seem like a competent upstream.)

Related tags
⚡ HTTP/2 Apple Push Notification Service (APNs) push provider for Go — Send push notifications to iOS, tvOS, Safari and OSX apps, using the APNs HTTP/2 protocol.

APNS/2 APNS/2 is a go package designed for simple, flexible and fast Apple Push Notifications on iOS, OSX and Safari using the new HTTP/2 Push provide

Jan 1, 2023
A push notification server written in Go (Golang).
A push notification server written in Go (Golang).

gorush A push notification micro server using Gin framework written in Go (Golang) and see the demo app. Contents gorush Contents Support Platform Fea

Jan 8, 2023
Uniqush is a free and open source software system which provides a unified push service for server side notification to apps on mobile devices.

Homepage Download Blog/News @uniqush Introduction Uniqush (\ˈyü-nə-ku̇sh\ "uni" pronounced as in "unified", and "qush" pronounced as in "cushion") is

Jan 9, 2023
Chanify is a safe and simple notification tools. This repository is command line tools for Chanify.

Chanify is a safe and simple notification tools. For developers, system administrators, and everyone can push notifications with API.

Dec 29, 2022
cisasntyi: check iphone stock and send notification to your iphone

for buy iphone 13 notification cisasntyi: check iphone stock and send notification to your iphone install Bark app in your iphone first before you run

Aug 3, 2022
ntfy is a super simple pub-sub notification service. It allows you to send desktop notifications via scripts.

ntfy ntfy (pronounce: notify) is a super simple pub-sub notification service. It allows you to send desktop and (soon) phone notifications via scripts

Jan 9, 2023
Simple push notification system (android/fcm, apns/slideshow) written by Golang

Golang Push Notification Simple system push notification for android/fcm and apn

Dec 20, 2021
Arjuns-urgent-notification-backend - A simple Golang app that handles form JSON POST requests

Arjun's Urgent Notification Backend This is intended to let people urgently noti

Jan 7, 2022
An little library to create notification files with golang.

notifile With this no library you can easily create notification files for your Go projects. These must then be stored in the directory you specify so

Oct 5, 2022
May 11, 2023