the Silent Chronotransponder

The Silent Chronotransponder interface's protocol
the Silent Chronotransponder • 2015-03-26 10:00
The Silent Chronotransponder interface's protocol

The interface accepts an input file, interprets it, and generates a response. The file format and the response format are standarized.

File format

First two lines are the username and password. They are optional and are ignored if the username and password are included in separate CGI inputs (not implemented - 23.03.2015).

The rest of the file are the post entries divided by empty lines.
Each entry consists of the following lines:
1 - post time.
2 - options
3 - subject
The rest - content

The post time has the following format:
Code: Select all
yyyy-mm-dd hh

Anythinng can be used as the separator, not only "-". Only the digits' positions are important. The times are UTC.

The options are single characters, currently implemented options are:
They can be uppercase or lowercase. If no options are used the line can't be left empty. Use something that's not a character instead. For example, "_"

Sending new posts

The post time must be in the future.
Allowed options:
b-Disable BBcode
s-Disable smilies
u-Do not automatically parse URLs
a-Attach a signature
n-Notify me when a reply is posted
v-Very silent.

There are special tags that can be included in the post content:
[br] - is a tag that will be replaced with a newline character. It's because in the input file the post can't have empty lines.
[ong], [ung], [ong=decree], [ung=decree] are tags that will be replaced by text generated by ongomome.

The post will get an ID:
Code: Select all

For example the post of user "kxa" posted at 09:00 23.09.2019 will get an ID:
Code: Select all
This means that a user can send only one post each hour.

The reply after this post is one line.
Code: Select all
2019092309_6B7861 posted.
means that the post was successfully uploaded. If instead of "posted" there is something else, the post was not uploaded and the text is the error message.

Changing post's contents

To change a post upload the new post with the same time and it will be replaced. If the password is different than in the post it will not be replaced.
The [ong] and [ung] tags will be replaced with the same text that was in the previous post. If there are more tags, the missing text will be generated. If there are less tags, the unused text will be forgotten.
This will not work with posts uploaded before 23.03.2015 or edited from a different interface.

Removing a post

To remove a post send an entry that consists of the post time and the option "r". The subject and content lines are ignored and don't have to be included. If the password is different than in the post it will not be removed.

There will be a single line reply.

Code: Select all
2019092309_6B7861 removed.
means that the post with the id 2019092309_6B7861 was removed.
If instead of "removed" there was something else the post was not removed.

Reading a post

To read a post send an entry with the post time and the option "q". The subject and content lines are ignored and don't have to be included. If the password is different than in the post it will not be read. But the password is checked only for the posts that are still waiting to be sent. So you can see other people's posts if they were already sent.

The reply will consist of 3 lines:
the subject, the options, the subject, options, and content.

Code: Select all
2019092309_6B7861 subject test
2019092309_6B7861 options AU
2019092309_6B7861 content this is a post[br]and this is an ongtext[ong]

In the post's content all newline characters will be replaced by [br] tags.
If the post was uploaded before 23.03.2015 or the post was edited from a different interface, instead of the [ong] and [ung] tags will be the text that replaced them.

If the post was already sent to the OTT and it's ID is known there will also be a line with the ID. For example:
Code: Select all
2019092309_6B7861 ID 9760848

A list of posts

To see a list of your posts waiting to be sent, send an entry with a post time and the l option. The post time is ignored but has to be included. Other lines don't have to be included. If you also want to see your posts that were already sent, use the lf options.

The list will not include posts with a different password. The password is not checked for posts that were already sent to the OTT.

For each post there will be a reply of one line with the post's subject.
For example
Code: Select all
2019092309_6B7861 subject test
2019092310_6B7861 subject test2
2019092311_6B7861 subject test4
2019092312_6B7861 subject test20


The posts can be previewed locally, without uploading, using this preview script: preview.awk

back to the Silent Chronotransponder