nas 3fbb803f2a documentation of the config, worflow, and handled format | 3 år sedan | |
---|---|---|
README.md | 3 år sedan | |
install.sh | 3 år sedan | |
syncWeb.pl | 3 år sedan |
SyncWeb is a perl script aiming to synchronize various content accross the web. If we should make this tool accessible, we could never reach exhaustivity that we would need before writing a user friendly interface. So this is more dedicated to power user and integrators.
This script need two ressources :
The ressource list will specify format of each ressource to get, the format to export, and where to export. The script wille visit these ressources, generate a signature (hash), and compare it to the signature of the last visit. If the signature change, the script will convernt and export the new content in the format and place specified.
The content could be in an html tag, targeted by the specified css selector.
The configuration file describe how to connect to a ressources; each ressources are in the import or the export section, depending if this connector is used to send a content or to get a content. CONNECTOR_TYPE has to be choosen between handled types, like :
{
export => {
NAME => {
type => CONNECTOR_TYPE,
[…]
},
[…]
},
import => {
NAME => {
[…]
}
}
}
You could use many connectors of the same type you like, but each name shall be unique. The rest of the configuration depend of the type you use.
The file type may the most easy one :
type => 'file',
path => 'relative/path/to/file'
format => FORMAT
It would convert the content in the handled format, and write it to the file in the place at that path name. The FORMAT shall be choosen between the handled list :
In our case, we want to let people use their own documentations repository (websites) and to centralize this data on a wiki.