当前位置: 首页 > news >正文

广州外贸营销型网站建设公司我是seo关键词

广州外贸营销型网站建设公司,我是seo关键词,网站banner代码,西宁网站建设最好的公司哪家好背景需求: 过年了,我想用幼儿的名字写对联,但是我根本不会写,于是尝试让AI来写。 1.我班的孩子的名字都是2字和3字的 2.惊喜发现,AI它很快就能生成带名字的对联 但是观察发现,如果是二个名字的对联&#…

背景需求:

过年了,我想用幼儿的名字写对联,但是我根本不会写,于是尝试让AI来写。

1.我班的孩子的名字都是2字和3字的

2.惊喜发现,AI它很快就能生成带名字的对联

但是观察发现,如果是二个名字的对联,它就用这两个字做头字,但如果三个字、四个字,它会随机取第1字、第3字、第2字中的两个(1和3,或者2和3),而不是用最后面两个字(2和3,不包含姓,1)

可是我希望只用幼儿的“名”,所以我把幼儿的名字变成2个字(两个名字就保留,三个名字删除姓氏,四个名字删除姓氏和第第二个字。)

再次输入:并且希望它变成个表格,方便我用Python遍历

关键词

(幼儿名字,保留最后两个字)

“XX

XX

XX

对每个名字,写一幅5字对联,如果名字是三个字就用后面2个字写,如果是名字只有二个字,就用着两个字写。表格形式呈现

只有两个字,对联肯定就用这两个字了。

素材准备

EXCLE:把AI表格复制到EXCEL内

两个WORD模版

对联(A4一页两条对联*2,必须是2的倍数)

这里是30人,15张A4

横批(A4一页五条*1,必须是5的倍数)
这里是30人,6张A4

代码展示:

'''
幼儿姓名的对联制作
星火讯飞(AI生成对联、AI生成Python代码)、阿夏
20250114
'''
import openpyxl
import os 
import docx
from docx import Document
from docx.shared import Pt 
from docx.shared import RGBColor
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
from docx.oxml.ns import qn
import randomimport os,time
import docx
from docx import Document
from docx.shared import Inches,Cm,Pt
from docx.shared import RGBColor
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
from docx.oxml.ns import qnfrom docxtpl import DocxTemplate
import pandas as pd
from docx2pdf import convert
from docx.shared import RGBColortxt='华文隶书'
path=r'C:\Users\jg2yXRZ\OneDrive\桌面\对联'# 打开Excel文件
workbook = openpyxl.load_workbook(path+r'\名字.xlsx')# 选择活动的工作表
sheet = workbook.active# 创建一个空列表来存储单元格数据
data_list = []# 遍历工作表中的所有行和列
for row in sheet.iter_rows(min_row=2, values_only=True):for cell in row:data_list.append(cell)# 打印结果
print(data_list)# 将列表分为每5个一组的嵌套列表
nested_list = [data_list[i:i + 5] for i in range(0, len(data_list), 5)]# 打印结果
print(nested_list)print('---------1、制作对联----------')# 遍历嵌套列表并提取特定索引的值(不要第2列的名字)
extracted_values = [[str(sublist[0]), str(sublist[0]), sublist[2], sublist[3]] for sublist in nested_list if len(sublist) >= 5]# 打印结果
print(extracted_values)# 将 extracted_values 取消嵌套
flattened_list = [item for sublist in extracted_values for item in sublist]# 打印结果
print(flattened_list)# 每10个元素提取一次
chunks = [flattened_list[i:i + 8] for i in range(0, len(flattened_list), 8)]# 打印结果
print(chunks)
print(len(chunks))# 创建临时文件夹
new_folder = path+r'\零时文件夹'
os.makedirs(new_folder, exist_ok=True)for nn in range(0,int(len(chunks))):    doc = Document(path+r'\对联.docx')# 单元格位置3*4格bg=[]for x in range(0,2):        # 4行for y in range(0,2):    # 3列ww=f'{x:02}{y:02}'bg.append(ww)for x in range(0,2):        # 4行for y in range(2,4):    # 3列ww=f'{x:02}{y:02}'bg.append(ww)print(bg)   # ['00', '01', '00', '01', '00', '01', '00', '01', '00', '01', '00', '01', '00', '01', '00', '01']table = doc.tables[0]          # 4567(8)行for t in range(len(bg)):   # 02pp = int(bg[t][0:2])    qq = int(bg[t][2:4])  k = chunks[nn][t] print(pp, qq, k)print(k)  # 写入序号和生肖名称run = table.cell(pp, qq).paragraphs[0].add_run(' '.join(map(str, k)))    # 在单元格0,0(第1行第1列)输入第0个图图案run.font.name = txt # 输入时默认华文彩云字体# run.font.bold = True  # 是否加粗run.font.bold = False  # 是否加粗run.font.color.rgb = RGBColor(200, 200, 200) # 数字小,颜色深0-255if pp == 0:run.font.size = Pt(28)  # 如果单元格是(0,X),就把输入的文字的字体改成28else:run.font.size = Pt(116)  # 其他情况下保持默认字体大小r = run._elementr.rPr.rFonts.set(qn('w:eastAsia'), txt) # 将输入语句中的中文部分字体变为华文行楷table.cell(pp, qq).paragraphs[0].alignment = WD_PARAGRAPH_ALIGNMENT.CENTER # 居中    doc.save(new_folder + fr'\\{nn:02}.docx')import os
from docx2pdf import convert
from PyPDF2 import PdfMerger# 定义文件夹路径
input_folder = new_folder
output_folder = path+r'\PDF'
os.makedirs(output_folder,exist_ok=True)merged_pdf_path = os.path.join(output_folder, '01对联.pdf')# 确保输出文件夹存在
os.makedirs(output_folder, exist_ok=True)# 将DOCX文件转换为PDF
convert(input_folder)# 获取转换后的PDF文件列表
pdf_files = [f for f in os.listdir(input_folder) if f.endswith('.pdf')]# 创建PDF合并器对象
merger = PdfMerger()# 将所有PDF文件添加到合并器中
for pdf in pdf_files:pdf_path = os.path.join(input_folder, pdf)merger.append(pdf_path)# 将合并后的PDF保存到指定位置
merger.write(merged_pdf_path)
merger.close()print(f"所有PDF已合并并保存到 {merged_pdf_path}")import shutil
shutil.rmtree(new_folder)print('---------1、制作横批----------')# 遍历嵌套列表并提取特定索引的值(不要第2列的名字)
extracted_values = [[str(sublist[0]), str(sublist[4])] for sublist in nested_list if len(sublist) >= 5]# 打印结果
print(extracted_values)# 将 extracted_values 取消嵌套
flattened_list = [item for sublist in extracted_values for item in sublist]# 打印结果
print(flattened_list)# 每10个元素提取一次(1个人2条,一页需要5人,10个一组,等于30条等于6页
chunks = [flattened_list[i:i + 10] for i in range(0, len(flattened_list), 10)]# 打印结果
print(chunks)
print(len(chunks))# 创建临时文件夹
new_folder = path+r'\零时文件夹'
os.makedirs(new_folder, exist_ok=True)for nn in range(0,int(len(chunks))):    doc = Document(path+r'\横批.docx')# 单元格位置3*4格bg=[]for x in range(0,5):        # 4行for y in range(0,2):    # 3列ww=f'{x:02}{y:02}'bg.append(ww)print(bg)   # ['00', '01', '00', '01', '00', '01', '00', '01', '00', '01', '00', '01', '00', '01', '00', '01']table = doc.tables[0]          # 4567(8)行for t in range(len(bg)):   # 02pp = int(bg[t][0:2])    qq = int(bg[t][2:4])  k = chunks[nn][t] print(pp, qq, k)print(k)  # 写入序号和生肖名称run = table.cell(pp, qq).paragraphs[0].add_run(' '.join(map(str, k)))    # 在单元格0,0(第1行第1列)输入第0个图图案run.font.name = txt  # 输入时默认华文彩云字体# run.font.bold = True  # 是否加粗run.font.bold = False  # 是否加粗run.font.color.rgb = RGBColor(200, 200, 200) # 数字小,颜色深0-255if qq == 0:run.font.size = Pt(28)  # 如果单元格是(0,X),就把输入的文字的字体改成28else:run.font.size = Pt(109)  # 华文隶书字体下横批最大109,否则就两行了r = run._elementr.rPr.rFonts.set(qn('w:eastAsia'), txt) # 将输入语句中的中文部分字体变为华文行楷table.cell(pp, qq).paragraphs[0].alignment = WD_PARAGRAPH_ALIGNMENT.CENTER # 居中    doc.save(new_folder + fr'\\{nn:02}.docx')import os
from docx2pdf import convert
from PyPDF2 import PdfMerger# 定义文件夹路径
input_folder = new_folder
output_folder = path+r'\PDF'
os.makedirs(output_folder,exist_ok=True)merged_pdf_path = os.path.join(output_folder, '02横批.pdf')# 确保输出文件夹存在
os.makedirs(output_folder, exist_ok=True)# 将DOCX文件转换为PDF
convert(input_folder)# 获取转换后的PDF文件列表
pdf_files = [f for f in os.listdir(input_folder) if f.endswith('.pdf')]# 创建PDF合并器对象
merger = PdfMerger()# 将所有PDF文件添加到合并器中
for pdf in pdf_files:pdf_path = os.path.join(input_folder, pdf)merger.append(pdf_path)# 将合并后的PDF保存到指定位置
merger.write(merged_pdf_path)
merger.close()print(f"所有PDF已合并并保存到 {merged_pdf_path}")import shutil
shutil.rmtree(new_folder)print('---------3、对联横批合并----------')# 定义文件夹路径
input_folder = path+r'\PDF'
output_folder = path
os.makedirs(output_folder,exist_ok=True)merged_pdf_path = os.path.join(output_folder, f'01幼儿姓名的对联横批{int(len(flattened_list)/4)}人.pdf')# 确保输出文件夹存在
os.makedirs(output_folder, exist_ok=True)# 将DOCX文件转换为PDF
convert(input_folder)# 获取转换后的PDF文件列表
pdf_files = [f for f in os.listdir(input_folder) if f.endswith('.pdf')]# 创建PDF合并器对象
merger = PdfMerger()# 将所有PDF文件添加到合并器中
for pdf in pdf_files:pdf_path = os.path.join(input_folder, pdf)merger.append(pdf_path)# 将合并后的PDF保存到指定位置
merger.write(merged_pdf_path)
merger.close()print(f"所有PDF已合并并保存到 {merged_pdf_path}")import shutil
shutil.rmtree(input_folder)

作品展示

用红色A4纸打印出来(因为红色纸已经做了蛇年红包和福字贴,不够了,我只打印了当天来园孩子的名字)

裁纸机切割

没来的孩子纸张背面又打印了一位来园孩子的名字对联

教学展示

时间:2025年1月14日

班级:中2班

人数:11人

看视频:了解对联的习俗(桃符)及贴法

对联和横批配好了,按学号摆放,幼儿找自己的名字

按学号来领取(先男后女)

幼儿描对联(要求是各种黑色笔、但幼儿用了黑色和彩色笔)

剪对联

这位孩子把灰色部分都描粗了,很像毛笔字

大部分孩子都是线描,把灰色变成黑色线条即可


准备贴门帘

(黏贴雌雄扣,雄扣,尖头)

因为不确定幼儿会把雌帖贴在红对联背面的什么位置,我就随即贴了很多雄扣,最好是剪一块,但我没有准备,只能“将就”使用用

幼儿贴对联及合影

 

感悟

1.AI模型太强大了:用AI批量写幼儿的姓名藏头诗,它写的太好了,都是吉祥的祝福,有语境,有内涵,仿佛家长取名时就是考虑到这些意义。

2.幼儿写对联方式:用Python批量制作成对联横批样式,幼儿用黑色笔描画。制作属于自己的独特对联。大部分幼儿对汉字不感兴趣,只是描红了。个别孩子颜色选择、画笔选择和添画图案上进行了设计。

后续:

门上扣子清理

因为横批封住了门,所以拍照期间,两位搭档老师都是从后门走来。

中午,搭档说:我刚才看见门上有白色东西,我想它们一直有吗?平时怎么没有注意到?”

我说:是我刚才贴的,我会拔下来的

第二天孩子们做“换装书”制作

我让他们把门上的白色扣子手抠下来,用在“换装书”作品上。两位女孩说:扣不动(黏贴太牢了)

于是我预先把扣子抠下一半,然后他们再硬拔下来。

门上的雌雄扣被开了个口子,孩子容易捏着边,硬拔了(照片没有拍)

依靠动作快的孩子们,总算把门上的扣子回收的收尾工作做好了。孩子们对“拔钉子”有一定的参与兴趣。

后续思考:

1、制作独一无二的名字对联,很有意义。家长看照片时觉得“很有新意。”

2、学号数字比较小,在红色背景下看不清楚,下次把学号字体换成黑体,用黑色。

3.、对联反面的扣子黏贴位置,如何确定


文章转载自:
http://dinncologger.tqpr.cn
http://dinncofinancially.tqpr.cn
http://dinncofoliiform.tqpr.cn
http://dinncogroats.tqpr.cn
http://dinncoverjuiced.tqpr.cn
http://dinncobig.tqpr.cn
http://dinncokatalyst.tqpr.cn
http://dinncoproud.tqpr.cn
http://dinncodisentitle.tqpr.cn
http://dinncooverspray.tqpr.cn
http://dinncosamite.tqpr.cn
http://dinncoburdensome.tqpr.cn
http://dinncoergotin.tqpr.cn
http://dinncosemidilapidation.tqpr.cn
http://dinncosuperscalar.tqpr.cn
http://dinncofortunetelling.tqpr.cn
http://dinncosega.tqpr.cn
http://dinncooutkitchen.tqpr.cn
http://dinncoinsistence.tqpr.cn
http://dinncopancytopenia.tqpr.cn
http://dinncosubdebutante.tqpr.cn
http://dinncoestimate.tqpr.cn
http://dinncoexcusable.tqpr.cn
http://dinncomonoideism.tqpr.cn
http://dinncomortification.tqpr.cn
http://dinncowiredrawn.tqpr.cn
http://dinncotouraco.tqpr.cn
http://dinncoconserve.tqpr.cn
http://dinncocolorable.tqpr.cn
http://dinncodecorum.tqpr.cn
http://dinncoidola.tqpr.cn
http://dinncoiambus.tqpr.cn
http://dinncomagnetosheath.tqpr.cn
http://dinncoquatorzain.tqpr.cn
http://dinncodaimio.tqpr.cn
http://dinncogastroptosis.tqpr.cn
http://dinncodeoxidant.tqpr.cn
http://dinncowinebibbing.tqpr.cn
http://dinncotelefilm.tqpr.cn
http://dinncohebetic.tqpr.cn
http://dinncobreach.tqpr.cn
http://dinncosurmullet.tqpr.cn
http://dinncosolodize.tqpr.cn
http://dinncodetritus.tqpr.cn
http://dinncoconstruable.tqpr.cn
http://dinncounyoke.tqpr.cn
http://dinncomobilize.tqpr.cn
http://dinncoroscian.tqpr.cn
http://dinncolandline.tqpr.cn
http://dinncounaccountable.tqpr.cn
http://dinncodepressible.tqpr.cn
http://dinncogovernorship.tqpr.cn
http://dinncobetcher.tqpr.cn
http://dinncomultiprocessor.tqpr.cn
http://dinncowetproof.tqpr.cn
http://dinncointrospectiveness.tqpr.cn
http://dinncodehortatory.tqpr.cn
http://dinncomelamed.tqpr.cn
http://dinncobarytron.tqpr.cn
http://dinncofilmgoer.tqpr.cn
http://dinncoquaquaversal.tqpr.cn
http://dinncotylopod.tqpr.cn
http://dinncopacify.tqpr.cn
http://dinncotilburg.tqpr.cn
http://dinncoplume.tqpr.cn
http://dinncofrostbound.tqpr.cn
http://dinncoregensburg.tqpr.cn
http://dinncobrimmer.tqpr.cn
http://dinncosomatic.tqpr.cn
http://dinncofcc.tqpr.cn
http://dinncovalera.tqpr.cn
http://dinncosubfamily.tqpr.cn
http://dinncosomatotonic.tqpr.cn
http://dinncononpolicy.tqpr.cn
http://dinncoimbalm.tqpr.cn
http://dinncosouchong.tqpr.cn
http://dinncosnootful.tqpr.cn
http://dinncopallia.tqpr.cn
http://dinncomarrowfat.tqpr.cn
http://dinncogarfish.tqpr.cn
http://dinncooutrush.tqpr.cn
http://dinncoseapiece.tqpr.cn
http://dinncoyachtie.tqpr.cn
http://dinncosarajevo.tqpr.cn
http://dinncorude.tqpr.cn
http://dinncohillcrest.tqpr.cn
http://dinncoprise.tqpr.cn
http://dinncoantistreptococcal.tqpr.cn
http://dinncoaneroid.tqpr.cn
http://dinncoborah.tqpr.cn
http://dinncounavailing.tqpr.cn
http://dinncosmegma.tqpr.cn
http://dinncodisappointing.tqpr.cn
http://dinncotried.tqpr.cn
http://dinncohighgate.tqpr.cn
http://dinncobreakable.tqpr.cn
http://dinncolinguate.tqpr.cn
http://dinncoplastotype.tqpr.cn
http://dinncoworked.tqpr.cn
http://dinncosugarhouse.tqpr.cn
http://www.dinnco.com/news/97839.html

相关文章:

  • 上海网站开发一对一培训价格天机seo
  • 中国b2b网站前100名当下最流行的营销方式
  • vue可以做pc的网站数据分析师要学什么
  • 网站建设收费标准深圳seo优化
  • 设计作品欣赏网站google关键词分析工具
  • 安徽合肥网站建设销售新人怎么找客户
  • idc新人如何做自己的网站网页点击量统计
  • b2b还是自己做网站抖音关键词排名优化
  • 网站建设解决问题推广网站有哪些
  • 宿州做企业网站公司怎样建网站?
  • 怎么做网站填内容关键词优化的作用
  • 怎么看网站是否备案成功营销策划公司取名大全
  • 效果图设计师有前景吗seo教学实体培训班
  • 合肥网站建设模板网络公司经营范围
  • 高端的响应式网站建设公司cpa广告联盟
  • 天津建设电工证查询网站网络域名
  • 常州企业建站系统模板江苏seo技术教程
  • 网站建设服务器是什么意思青岛关键词排名提升
  • 设计素材网站都是有哪几个做个公司网站多少钱
  • 哪个网站做供求信息河北网站优化公司
  • 携程做网站的流程广告文案
  • 浙江省建设职业技术学院网站爱站长工具
  • 基础网站建设公司营销策划主要做些什么
  • 如何做自己网站云播品牌推广文案
  • 免费静态网页关键词优化简易
  • 九江php网站建设兼职樱花bt引擎
  • 毕业设计做网站教程国内b站不收费网站有哪些
  • 北京天津网站建设公司58百度搜索引擎
  • 网站的搜索功能实体店营销方案
  • 建站宝盒小程序公司搜索seo