Crates.io | twitimer |
lib.rs | twitimer |
version | 0.1.0 |
source | src |
created_at | 2022-07-17 06:06:37.117935 |
updated_at | 2022-07-17 06:16:14.912804 |
description | A tool for scheduled tweet. |
homepage | https://github.com/iochen/twitimer |
repository | https://github.com/iochen/twitimer |
max_upload_size | |
id | 627109 |
size | 123,244 |
A tool for scheduled tweet.
Twitimer is a tool for scheduled tweet with send and delete time set by user in advance.
However, twitimer is not a daemon program. Thus, twitimer should be triggered by outside job scheduler like cron and systemd timer.
We currently only provide binary executable file in GitHub Release page for Linux amd64 architecture.
As a result, the installation instructions below are only tested for Linux amd64 architecture.
Please build it yourself and carefully adapt the instructions below if your system architecture is not Linux amd64.
$ sudo wget 'https://github.com/iochen/twitimer/releases/download/v0.1.0/twitimer' -O /usr/bin/twitimer
$ sudo chmod +x /usr/bin/twitimer
$ cargo install twitimer
If you are not a Twitter developer, go and apply for one.
After the successful application:
Execute and answer all questions to generate twitimer database.
$ twitimer init
Notice: Consumer {Key, Secret} are API Key and API Key Secret above
Notice: Access {Key, Secret} are Access Token and Access Token Secret above
$ crontab -e
Then insert a new line like below
* * * * * /usr/bin/twitimer cron
$ twitimer new
Just wait and check whether everything works well as expected!
You can set environment variable(s) shown below to configure twitimer
TWITIMER_DB
to specify twitimer database path{UNIX timestamp}
Where
{UNIX timestamp}
stands for UNIX timestamp, example: 1431648000
, 1658035509
{Year}-{Month}-{Day} {Hour}:{Minute}:{Second} {Timezone}
Where
{Year}
stands for year, example: 2022
, 2032
, 02033
{Month}
stands for month, example: 02
, 3
, 11
{Day}
stands for day, example: 04
, 9
, 27
{Hour}
stands for hour, example: 06
, 7
, 11
{Minute}
stands for minute, example: 08
, 4
, 59
{Second}
stands for second, example: 05
, 0
, 32
{Timezone}
stands for timezone, example: +9
, -7
, 0
example: 2022-02-12 13:23:45 +9
now+{Hours}h{Minutes}m
or
now+{Hours}h
or
now+{Minutes}m
Where
{Hours}
stands for hours left till now, example: 0
, 3
, 72
{Minutes}
stands for minutes left till now, example: 0
, 5
, 86
example: now+3h
or now+2h30m
or now+87m
x.y.z
and x.y.(z+1)
MIT License