Skip to content

Instantly share code, notes, and snippets.

View Zokhoi's full-sized avatar

Zokhoi Zokhoi

View GitHub Profile
@Zokhoi
Zokhoi / ftml-spec.md
Last active October 26, 2022 12:04
FTML Format Specifications (draft)

FTML Format Specification v1.0 draft

Foundation Text Markup Language

(Alternatively, ftml: the markup language)

This document contains the specification of FTML, a file format created to store source code of pages on Wikidot that contains the essential information to recreate the page.

1. Encodings and Meta

The requirements for encodings and meta of the file format are:

  • The file may use any of CRLF or LF end of line schemes.
@Zokhoi
Zokhoi / WikidotRevPostCount.js
Last active July 15, 2020 15:10
WikidotRevPostCount.js
const got = require('got');
const cheerio = require('cheerio');
class WD {
// Modified from https://github.com/resure/wikidot-ajax/blob/master/index.js
constructor(baseURL) {
this.baseURL = `${baseURL}/ajax-module-connector.php`;
}
async req(url, params) {
const wikidotToken7 = Math.random().toString(36).substring(4);
return await got.post(url, {