tis-xml-copy-editor

1.3.1.0-1
XML Copy Editor is a fast, free, validating XML editor
232 downloads
Download
See build result See VirusTotal scan
tis-xml-copy-editor icon
  • package : tis-xml-copy-editor
  • name : XML Copy Editor
  • version : 1.3.1.0-1
  • categories : Utilities
  • maintainer : WAPT Team,Tranquil IT,Amel FRADJ
  • installed_size :
  • editor :
  • licence : opensource_free,wapt_public
  • signature_date : 2024-09-23T15:02:01.000000
  • size : 19.55 Mo
  • locale :
  • target_os : windows
  • impacted_process :
  • architecture : x64
  • Homepage : http://xml-copy-editor.sourceforge.net/
package           : tis-xml-copy-editor
version           : 1.3.1.0-1
architecture      : x64
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      : 35467789-52b6-48e8-9443-df32526e9f36
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:02:01.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         : QwMB/YToEckfCxDzMvZ1z64l5uhnLkF5lAtjrhtYbxX5pVf44tXT7hpANkNbO1zVkwBPzXb2Rt6FDTULTaW30nT4CrL3/qAbsQqfXmhr5jqURcBwwGZZ5liq+ZASWDBy5zuRSStijHJaeWlPsrJq/0aQuGB2OGm59cUSCKJvcZ8MZ96iRdQqc6UxP0GynIIrettL0B6YZMNJlpvQfjpCFVbDRWQEp+Rv3cauyfPIl4DKfLzr4vADwXXcZmnMK96OSOmB0NpPiV2O0ltyuHV8BaSwe8jM4v5fvYblXCVZRYWhZ3orvhWIRoS/MdRwja0twhWIv6H1xVg/Y1M4v+WSbw==
# -*- 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
00b7ebb86b444f28b86e49f4efce26751020c7aec89d599613a2e096a0356ec5 : WAPT/control
e94e0072081bea03919354ae940aa6327e9ec5af23bedd65311de083aa43a860 : WAPT/icon.png
a8a9996f7a7d32a94ce54eb9035654419e88f5f3884039a30a10f26f536e1b61 : luti.json
02bcb56fed712f3b33f4f8dd68f8211ea92c8cd6dacd34a0394a7e0a6c78c088 : setup.py
2ea58f36e64aa35a6e5ded7ca23da447719b4f8f5c2d421d002b972d5423ddb7 : update_package.py
7ba6900595d0ca68b79b2c14a43538d1190bf717228651701d40fc693660caf4 : xmlcopyeditor-1.3.1.0-x64-install.exe