Batterie de script servant à synchroniser du contenu web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nas 3fbb803f2a documentation of the config, worflow, and handled format 3 years ago
README.md documentation of the config, worflow, and handled format 3 years ago
install.sh add dependencies 3 years ago
syncWeb.pl add default column and value for inserting in mariadb 3 years ago

README.md

SyncWeb

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.

Workflow

This script need two ressources :

  • configuration file
  • ressource list

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.

Configuration file

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 :

  • file
  • sqlite3
  • mariadb
{
	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.

file

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 :

  • markdown

Export type

  • sqlite3
  • mariadb
  • file

Our user case

In our case, we want to let people use their own documentations repository (websites) and to centralize this data on a wiki.