This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
def read_text_from_file(file_path): | |
""" | |
Aceasta functie returneaza continutul unui fisier. | |
file_path: calea catre fisierul din care vrei sa citesti | |
""" | |
#with open(file_path, encoding='utf8') as f: | |
with open(file_path, 'r', encoding='utf-8', errors='ignore') as f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import unidecode | |
from docx import Document | |
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT | |
from datetime import datetime | |
def add_content_to_meta(html_content, content_to_add): | |
meta_pattern = r'<meta name="description" content="(.*?)">' | |
match = re.search(meta_pattern, html_content) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
def read_text_from_file(file_path): | |
""" | |
Aceasta functie returneaza continutul unui fisier. | |
file_path: calea catre fisierul din care vrei sa citesti | |
""" | |
with open(file_path, 'r', encoding='utf-8', errors='ignore') as f: | |
text = f.read() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
def load_json(file_path): | |
with open(file_path, 'r', encoding='utf-8') as file: | |
return json.load(file) | |
def compare_json_files(file1_path, file2_path): | |
data1 = load_json(file1_path) | |
data2 = load_json(file2_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
import re | |
# Calea către folderul cu fișierele HTML | |
folder_path = r'e:\Carte\BB\17 - Site Leadership\Principal 2022\ro' | |
# Calea către fișierul categorii.json | |
json_file_path = os.path.join(folder_path, 'categorii.json') | |
# Deschide fișierul categorii.json și încarcă conținutul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Chestia este ca... | |
- Totusi, mai cuget. | |
- IN mare parte | |
- este de dorit ca | |
- cand spunem * avem in vedere, | |
- Este de așteptat că operele vor avea fie un caracter interdisciplinar | |
- Tocmai asta e castigul pe care ni-l dau inimile reci. | |
- Pornind de la aceasta conceptie.. | |
- In fond, este vorba de un nou fel de a privi lucrurile | |
- Odata sincronizat sufletul cu locul, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import json | |
# Specifică calea către folderul cu fișierele HTML | |
folder_path = r'e:\Carte\BB\17 - Site Leadership\Principal 2022\en' | |
# Lista fișierelor HTML de procesat | |
html_files = [ | |
'leadership-and-attitude.html','leadership-magic.html','successful-leadership.html','hr-human-resources.html','leadership-laws.html','total-leadership.html','leadership-that-lasts.html','leadership-principles.html','leadership-plus.html','qualities-of-a-leader.html','top-leadership.html','leadership-impact.html','personal-development.html','leadership-skills-and-abilities.html','real-leadership.html','basic-leadership.html','leadership-360.html','leadership-pro.html','leadership-expert.html','leadership-know-how.html','leadership-journal.html','alpha-leadership.html','leadership-on-off.html','leadership-deluxe.html','leadership-xxl.html','leadership-50-extra.html','leadership-fusion.html','leadership-v8.html','leadership-x3-silver.html','leadership-q2-sensitive.html','leadership-t7-hybrid.html','leadershi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
import re | |
# Calea către folderul cu fișierele HTML | |
folder_path = r'e:\Carte\BB\17 - Site Leadership\Principal 2022\en' | |
# Calea către fișierul categorii.json | |
json_file_path = os.path.join(folder_path, 'categorii.json') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------- | |
# Name: module1 | |
# Purpose: | |
# | |
# Author: Castel | |
# | |
# Created: 22/01/2022 | |
# Copyright: (c) Castel 2022 | |
# Licence: <your licence> | |
#------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
, translate, search, result, info, into, your, language | |
StrYourSearch="Your search"; //Your search | |
StrNewSearch="New Search"; //New Search | |
StrCloseWindow="Close Window"; //Close Window | |
StrFind="Found"; //Find | |
StrItems="item(s)"; //items | |
strResultPage="Result Page"; //Result Page | |
strPrevious="Previous"; //Previous | |
strNext="Next"; //Next |
NewerOlder