tis-xml-copy-editor icon

XML Copy Editor

Paquet d’installation silencieuse pour XML Copy Editor

1.3.1.0-1

  • package: tis-xml-copy-editor
  • name: XML Copy Editor
  • version: 1.3.1.0-1
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT,Amel FRADJ
  • licence: opensource_free,wapt_public
  • target_os: windows
  • architecture: x86
  • signature_date:
  • size: 19.91 Mo
  • homepage : http://xml-copy-editor.sourceforge.net/

package           : tis-xml-copy-editor
version           : 1.3.1.0-1
architecture      : x86
section           : base
priority          : optional
name              : XML Copy Editor
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Amel FRADJ
description       : XML Copy Editor is a fast, free, validating XML editor
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : windows
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : XML Copy Editor est un éditeur XML rapide, gratuit et validant
description_pl    : XML Copy Editor to szybki, darmowy i sprawdzający poprawność edytor XML
description_de    : XML Copy Editor ist ein schneller, kostenloser, validierender XML-Editor
description_es    : XML Copy Editor es un editor XML rápido, gratuito y validador
description_pt    : O XML Copy Editor é um editor XML rápido, gratuito e de validação
description_it    : XML Copy Editor è un editor XML veloce, gratuito e convalidante
description_nl    : XML Copy Editor is een snelle, gratis, validerende XML-editor
description_ru    : XML Copy Editor - это быстрый, бесплатный, проверяющий XML-редактор
audit_schedule    : 
editor            : 
keywords          : 
licence           : opensource_free,wapt_public
homepage          : http://xml-copy-editor.sourceforge.net/
package_uuid      : 2b2e6c00-42a5-4789-8a4c-649030ae73fb
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : e94e0072081bea03919354ae940aa6327e9ec5af23bedd65311de083aa43a860
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-09-23T15:03:13.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : b5Fuj10rxImeeOoC56JrxpNRUvuhziIVSjw5w8t0EiDY3/Gh1q/rzFEDqCG0sM38cDE8cXlcfPTlHbEgMaCBKVbG0wp/wB1zTdmM1jIlaYdVhV+Sb1z/tBHIIk0TVJlbufhd6FctWTABVPnhS9o0YntdrSi41k4oIqYIeTXxATU0KHFoO9LRDTXYi/3GflDL2nQUv7o7EAJ3s0wLhUqYlsjhRdafNdg+h48DiyRWM0qVY+dPsmmXmIRshs76HMCF0MgV15t5u7IulJYqwuOx2GqNsaaW8PyAPNB7Js1J+WzCqdIanHiAIj7s8kcA4oXLeBq9vbVAQoJkhN1Ox5IxGQ==

# -*- coding: utf-8 -*-
from setuphelpers import *

r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
{
   "key":"XML Copy Editor_is1",
   "name":"XML Copy Editor version 1.3.1.0",
   "version":"1.3.1.0",
   "install_date":"2024-09-18 00:00:00",
   "install_location":"C:\\Program Files\\XML Copy Editor\\",
   "uninstall_string":"\"C:\\Program Files\\XML Copy Editor\\unins000.exe\"",
   "publisher":"Zane U. Ji",
   "system_component":0,
   "win64":true
  }

"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def install():
    # Declaring local variables
    bin_name = glob.glob('xmlcopyeditor-*-install.exe')[0]
    # Installing the software

    install_exe_if_needed(bin_name,
        silentflags='/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP /ALLUSERS',
        key='XML Copy Editor_is1',
        min_version=control.get_software_version(),
    )



# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import requests


def update_package():
    # Déclaration des variables locales
    package_updated = False
    proxies = get_proxies_from_wapt_console()
    if not proxies:
        proxies = get_proxies()
    arch_dict = {
        "x64":"-x64-install.exe",
        "x86":"-x86-install.exe"
        
    }    

    url = "https://sourceforge.net/projects/xml-copy-editor/files/xmlcopyeditor-windows/"
    response = requests.get(url)
    headers = bs_find_all(url,"th","headers")

    if headers:
        first_header = headers[0]
        a_tag = first_header.find("a")
        if a_tag:
            first_link = a_tag['href']
            version = first_link.split('/')[-2]
            print(f"First version found: {version}")

     # Trouver tous les éléments <tr> avec la classe file et le titre correspondant à la version
    requet = requests.get(url + version).text
    rows = bs_find_all(requet, "tr",  class_name="file")
    target_title = f"xmlcopyeditor-{version}{arch_dict[control.architecture]}"
    download_link = None
    for row in rows:
        if row.get('title') == target_title:
            a_tag = row.find("a", title=f"Click to download {target_title}")
            if a_tag:
                download_link = a_tag['href']
                break
    if download_link:
        print(f"Download link found: {download_link}")
   
   
    latest_bin = target_title
    download_url = download_link
    
    # Downloading latest binaries
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin,proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    

    # Changing version of the package
    if Version(version, 4) > Version(control.get_software_version(), 4):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating update-package-sources
    return package_updated

    # # Changing version of the package and validating update-package-sources
    # return complete_control_version(control, version)

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
96ef9a3b87eb6784b410ecc1ea721879c1991e5f834d5a87fe2e08acb8ff217b : WAPT/control
e94e0072081bea03919354ae940aa6327e9ec5af23bedd65311de083aa43a860 : WAPT/icon.png
c92efc31344c880bfc88ba0c5ec6548f048d838b9f3c95def25926b53321073f : luti.json
02bcb56fed712f3b33f4f8dd68f8211ea92c8cd6dacd34a0394a7e0a6c78c088 : setup.py
2ea58f36e64aa35a6e5ded7ca23da447719b4f8f5c2d421d002b972d5423ddb7 : update_package.py
892328da826350b2070c45bcf9e8f2d6a68b624e16d55bc40fe192bd4ab5b265 : xmlcopyeditor-1.3.1.0-x86-install.exe