# ____ __ __ ___ __ __ __ __
# / __ \ ____ _ / /_ ____ _ / /_ ____ _ _____ ___ |__ \ / / / // /_ ____ ___ / /
# / / / // __ `// __// __ `// __ \ / __ `// ___// _ \ __/ / / /_/ // __// __ `__ \ / /
# / /_/ // /_/ // /_ / /_/ // /_/ // /_/ /(__ )/ __// __/ / __ // /_ / / / / / // /
#/_____/ \__,_/ \__/ \__,_//_.___/ \__,_//____/ \___//____//_/ /_/ \__//_/ /_/ /_//_/
#
Ce programme, script python permet de fusionner un fichier html et une base de données personnelles écrite en python.
Database2html est une application écrite en python avec la librairie PySimpleGui comme interface graphique.
Cette application est l'adaptation d'une pile écrite avec livecode, par le même auteur de 2010 à 2021.
Livecode n'est plus opensource. Sa version community a été abandonnée. J'ai donc décidé de la réecrire en Python.
Cette application n'est pas forcemment intimement liée au site que je maintiens sur le même sujet.
Il devient donc possible d'utiliser tel quel ce programme, en modifiant seulement la base de données et les pages html servant de modèles.
Pour comprendre le fonctionnement du programme, il faut savoir qu'il permet de fusionner un fichier html servant de modèle et un fichier base de données au format texte.
Des fonctions de tri et de filtrage permettent de produire des pages spécifiques.
Le ficher modèle HTML a été créé avec l'éditeur "Bluefish".
Un peu comme un document de publipostage, il comporte des champs, notés $$MOT (où MOT correspond
au champ de la base de données RRHH) qui sont remplacés par leur vraie valeur pendant le traitement.')],
Le fichier modèle va comporter une zone, délimitée par les commentaires html
<!-- #RRHH fusion--> et <!--RRHH Fusion fin-->
qui correspond à la fusion avec la base de données. Cette fusion est une simple substitution avec répétition d'un motif.
Quitte à faire des substitutions, il est possible de faire d'autres remplacements paramétrables ou non (champ #date par exemple).
Le fichier de projet contient les instructions, les traitements, les opérations à effectuer.
Ce fichier contient aussi des conditions, des filtres pour chaque fiche de la base de données.
Elles se trouvent en début et commencent par un point d'interrogation.
On y trouve aussi les chaines de substitution, de remplacement. Elles commencent par un $ suivi de la chaîne simple à remplacer,
puis du ou des mots de substitution
Un traitement peut être sauvegardé et rechargé (projet de traitement).
Un super projet est fait d'une succession de projets.
L'objectif est de n'utiliser que le super projet.
Un projet sert surtout donc à la mise au point d\'un super projet. Sauf si le site est assez simple.
Yvo
Automatic translation with Google Translate without correction
This program, python script allows to merge an html file and a personal database written in python.
Database2html is an application written in python with the PySimpleGui library as a graphical interface.
This application is the adaptation of a stack written with livecode, by the same author from 2010 to 2021.
Livecode is no longer open source. Its community version has been discontinued. So I decided to rewrite it in Python.
This application is not necessarily closely linked to the site that I maintain on the same subject.
It therefore becomes possible to use this program as it is, by modifying only the database and the html pages serving as models.
To understand how the program works, you should know that it allows you to merge an html file serving as a template and a database file in text format.
Sorting and filtering functions make it possible to produce specific pages.
The HTML template file was created with the "Bluefish" editor.
A bit like a direct mail document, it has fields, denoted $$MOT (where MOT corresponds
to the RRHH database field) which are replaced by their true value during processing.')],
The template file will include a zone, delimited by the html comments
<!-- #RRHH merge--> and <!--RRHH Merge end-->
which corresponds to the merge with the database. This merge is a simple substitution with repetition of a pattern.
Even if it means making substitutions, it is possible to make other configurable or non-configurable replacements (#date field for example).
The project file contains the instructions, the processes, the operations to be performed.
This file also contains conditions, filters for each record in the database.
They are at the beginning and begin with a question mark.
There are also substitution and replacement strings. They start with a $ followed by the simple string to replace,
then substitute word(s)
A treatment can be saved and reloaded (treatment project).
A super project is made of a succession of projects.
The goal is to only use the super project.
A project is therefore mainly used to develop a great project. Unless the site is quite simple.
yvo
Автоматический перевод с помощью Google Translate без исправления
Эта программа, сценарий python, позволяет объединить html-файл и личную базу данных, написанную на python.
Database2html — это приложение, написанное на python с библиотекой PySimpleGui в качестве графического интерфейса.
Это приложение представляет собой адаптацию стека, написанного с помощью livecode одним и тем же автором с 2010 по 2021 год.
Livecode больше не является открытым исходным кодом. Его версия сообщества была прекращена. Поэтому я решил переписать его на Python.
Это приложение не обязательно тесно связано с сайтом, который я поддерживаю по той же теме.
Таким образом, становится возможным использовать эту программу как есть, изменяя только базу данных и HTML-страницы, служащие моделями.
Чтобы понять, как работает программа, вы должны знать, что она позволяет объединить html-файл, служащий шаблоном, и файл базы данных в текстовом формате.
Функции сортировки и фильтрации позволяют создавать определенные страницы.
Файл шаблона HTML был создан с помощью редактора "Bluefish".
Немного похоже на документ прямой почтовой рассылки, он имеет поля, обозначенные $$MOT (где MOT соответствует
в поле базы данных RRHH), которые при обработке заменяются их истинным значением.')],
Файл шаблона будет включать зону, разделенную комментариями html.
<!-- #RRHH слияние--> и <!--RRHH слияние конец-->
что соответствует слиянию с базой данных. Это слияние представляет собой простую замену с повторением шаблона.
Даже если это означает замену, можно сделать другие настраиваемые или не настраиваемые замены (например, поле #date).
Файл проекта содержит инструкции, процессы, операции, которые необходимо выполнить.
Этот файл также содержит условия, фильтры для каждой записи в базе данных.
Они находятся в начале и начинаются со знака вопроса.
Существуют также подстановочные и замещающие строки. Они начинаются с символа $, за которым следует простая строка для замены,
затем замените слово (а)
Лечение можно сохранить и перезагрузить (проект лечения).
Суперпроект состоит из последовательности проектов.
Цель состоит в том, чтобы использовать только суперпроект.
Таким образом, проект в основном используется для разработки большого проекта. Разве что сайт совсем простой.
Иво