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

让自己的网站收录seo综合查询

让自己的网站收录,seo综合查询,每日新闻一天热点全知道,wordpress 下载远程图背景需求 最近带班,没有时间整理照片,偶尔导一次,几个月的照片。发现用电脑版“华为手机助手“中的WLAN连接”与华为手机的“华为手机助手”连接,速度更快、更稳定,不会出现数据线连接时碰碰就断网的问题 1、先打开电…

背景需求

最近带班,没有时间整理照片,偶尔导一次,几个月的照片。发现用电脑版“华为手机助手“中的WLAN连接”与华为手机的“华为手机助手”连接,速度更快、更稳定,不会出现数据线连接时碰碰就断网的问题

1、先打开电脑版--WLAN网络连接

2、点击手机版

2、手机屏幕出现8个数字密码(不让截图)

3、电脑版上输入8个数字,连接

4、点击电脑版-华为助手-图片

出现“去手机上操作”提示,

5、点击允许

6、出现锁屏密码(无法截图)-输入自己的6位锁屏密码

7、可以使用

8、选择图片

9、全选图片-导出

10、我的图片导出到D盘

用原来写的照片分类代码把照片按照年月日分类

【办公类-04-03】华为助手导出照片视频分类(根据图片、视频的文件名日期分类导出)_华为手机照片导出按日期存放提取-CSDN博客文章浏览阅读1.2k次,点赞33次,收藏8次。【办公类-04-03】华为助手导出照片视频分类(根据图片、视频的文件名日期分类导出)_华为手机照片导出按日期存放提取https://blog.csdn.net/reasonsummer/article/details/139716209

结果出现了所有照片按照日期排列的日期照片文件夹

但是我需要手动新建两个月份文件夹,

选择所有的9月X日文件夹,剪切,

打开2024年9月文件,把刚才的内容黏贴进去。

我觉得有点烦,在分类年月日的基础上,可以直接按照文件夹的年月,将年月日文件剪切到年月文件里。

经过无数次的代码测试,终于实现了这个目标

思路:

1、读取2024-10-30文件夹中的2024和10,新建2024年10月文件夹

2、把整个“2024-10-30”文件夹剪切到2024年10月文件内

3、因为一天的照片不一定同时拍好,可能会分两三次整理,所以当2024年10月文件里已经有“2024-10-30”文件夹时,需要将新的“2024-10-30”文件内容内容替换条之前的“2024-10-30”文件夹里面的内容(重复照片被替换。)

'''
1、华为手机助手导出的照片,根据照片、视频的文件名中的日期,提取日期,转移到日期文件夹中
2、将日期文件夹复制到“”年月”文件夹内
IMG_20240428_085357.jpg
VID_20240603_131241.mp4
如果文件已存在,就替换它
作者:文心一言,阿夏
时间:2024年10月31日
'''import os
import re
from datetime import datetime
import shutilfolder_path = r'D:\03照片导出'
new_folder = r'D:\04照片整理2'
os.makedirs(new_folder, exist_ok=True)file_names = os.listdir(folder_path)for file_name in file_names:split_name = re.split("_", file_name)if len(split_name[1]) == 8:date_obj = datetime.strptime(split_name[1], "%Y%m%d")new_folder_name = date_obj.strftime("%Y-%m-%d")print(new_folder_name)new_folder_path = os.path.join(new_folder, new_folder_name)os.makedirs(new_folder_path, exist_ok=True)target_path = os.path.join(new_folder_path, file_name)shutil.move(os.path.join(folder_path, file_name), target_path)elif len(split_name[1]) == 3:date_obj = datetime.strptime(split_name[2][:8], "%Y%m%d")new_folder_name = date_obj.strftime("%Y-%m-%d")print(new_folder_name)new_folder_path = os.path.join(new_folder, new_folder_name)os.makedirs(new_folder_path, exist_ok=True)target_path = os.path.join(new_folder_path, file_name)shutil.move(os.path.join(folder_path, file_name), target_path)else:passimport os
import shutil# 设置源文件夹路径  
source_folder = r'D:\04照片整理2'  # 遍历源文件夹下的所有子文件夹  
for folder in os.listdir(source_folder):  folder_path = os.path.join(source_folder, folder)  # 检查是否是文件夹并且长度是10  if os.path.isdir(folder_path) and len(folder) == 10:  # 提取年、月、日  year = folder[0:4]  month = str(folder[5:7])  day = folder[8:10]  # 创建目标文件夹路径  target_folder = os.path.join(source_folder, f'{year}年{month}月')  # 检查目标文件夹是否存在  if not os.path.exists(target_folder):  os.makedirs(target_folder)  # 如果目标文件夹不存在,直接移动整个文件夹  shutil.move(folder_path, target_folder)  print(f'Moved {folder} to {target_folder}')  else:  # 如果目标文件夹存在,合并文件夹内容  target_subfolder = os.path.join(target_folder, folder)  # 尝试创建同名子文件夹路径  if not os.path.exists(target_subfolder):  os.makedirs(target_subfolder)  # 如果不存在,则创建  # 遍历源文件夹中的所有文件,并复制到目标子文件夹中  for root, dirs, files in os.walk(folder_path):  for file in files:  src_file = os.path.join(root, file)  dst_file = os.path.join(target_subfolder, file)  # 复制文件,如果文件已存在,可以选择覆盖(shutil.copy2)或跳过(使用异常处理)  try:  shutil.copy2(src_file, dst_file)  # 使用shutil.copy2保留元数据  except FileExistsError:  print(f'Skipped {file} (already exists in {target_subfolder})')  # 可选:如果源文件夹中还有子文件夹,可以递归处理它们  # 但在这个特定案例中,我们假设文件夹结构是平的,即没有嵌套子文件夹  # 删除空的源文件夹(如果所有文件都已复制)  shutil.rmtree(folder_path)  # 注意:这只有在确认所有文件都已正确复制后才安全执行  print(f'Merged {folder} into {target_subfolder}')

转移流程:

1、导出的照片(9月和10月)

2、代码运行

最后只留下“年月”总文件夹

2024年9月里面有2个文件夹(测试用,所以都只有1张)

2024年10月里面有5个文件夹(测试用,所以只下了5天照片)

这样就能实现“JPG→《年月日》文件夹→《年月》文件夹”,能快速整理照片文件夹到“年月”里。

为了更快捷,我又做了一个“2024年”的一级文件夹,进一步提高整理的速度效率

整理到“年”

'''
1、华为手机助手导出的照片,根据照片、视频的文件名中的日期,提取日期,转移到日期文件夹中
2、将日期文件夹复制到“年-年月-年月日”文件夹内
IMG_20240428_085357.jpg
VID_20240603_131241.mp4
如果文件已存在,就替换它
作者:文心一言,阿夏
时间:2024年10月31日
'''import os
import re
from datetime import datetime
import shutilfolder_path = r'D:\03照片导出'
new_folder = r'D:\04照片整理2'
os.makedirs(new_folder, exist_ok=True)file_names = os.listdir(folder_path)for file_name in file_names:split_name = re.split("_", file_name)if len(split_name[1]) == 8:date_obj = datetime.strptime(split_name[1], "%Y%m%d")new_folder_name = date_obj.strftime("%Y-%m-%d")print(new_folder_name)new_folder_path = os.path.join(new_folder, new_folder_name)os.makedirs(new_folder_path, exist_ok=True)target_path = os.path.join(new_folder_path, file_name)shutil.move(os.path.join(folder_path, file_name), target_path)elif len(split_name[1]) == 3:date_obj = datetime.strptime(split_name[2][:8], "%Y%m%d")new_folder_name = date_obj.strftime("%Y-%m-%d")print(new_folder_name)new_folder_path = os.path.join(new_folder, new_folder_name)os.makedirs(new_folder_path, exist_ok=True)target_path = os.path.join(new_folder_path, file_name)shutil.move(os.path.join(folder_path, file_name), target_path)else:passimport os
import shutil# 设置源文件夹路径  
source_folder =new_folder 
new= new_folder +r'\2024年'  
os.makedirs(new,exist_ok=True)# 遍历源文件夹下的所有子文件夹  
for folder in os.listdir(source_folder):  folder_path = os.path.join(source_folder, folder)  # 检查是否是文件夹并且长度是10  if os.path.isdir(folder_path) and len(folder) == 10:  # 提取年、月、日  year = folder[0:4]  month = str(folder[5:7])  day = folder[8:10]  # 创建目标文件夹路径  target_folder = os.path.join(new, f'{year}年{month}月')  # 检查目标文件夹是否存在  if not os.path.exists(target_folder):  os.makedirs(target_folder)  # 如果目标文件夹不存在,直接移动整个文件夹  shutil.move(folder_path, target_folder)  print(f'Moved {folder} to {target_folder}')  else:  # 如果目标文件夹存在,合并文件夹内容  target_subfolder = os.path.join(target_folder, folder)  # 尝试创建同名子文件夹路径  if not os.path.exists(target_subfolder):  os.makedirs(target_subfolder)  # 如果不存在,则创建  # 遍历源文件夹中的所有文件,并复制到目标子文件夹中  for root, dirs, files in os.walk(folder_path):  for file in files:  src_file = os.path.join(root, file)  dst_file = os.path.join(target_subfolder, file)  # 复制文件,如果文件已存在,可以选择覆盖(shutil.copy2)或跳过(使用异常处理)  try:  shutil.copy2(src_file, dst_file)  # 使用shutil.copy2保留元数据  except FileExistsError:  print(f'Skipped {file} (already exists in {target_subfolder})')  # 可选:如果源文件夹中还有子文件夹,可以递归处理它们  # 但在这个特定案例中,我们假设文件夹结构是平的,即没有嵌套子文件夹  # 删除空的源文件夹(如果所有文件都已复制)  shutil.rmtree(folder_path)  # 注意:这只有在确认所有文件都已正确复制后才安全执行  print(f'Merged {folder} into {target_subfolder}')

不过这下所有的“年月日”文件夹都进入“2024年”里,。

OK,Python实现了我日常整理照片的全部需求!!!

在单位电脑上也试验了一下

单位电脑里,已经有“2024年”和2024年10月”的文件夹

先把“年月日”文件夹生成

文件夹开始转移到“2024年2”“2024年10月”里面

最后所有的“年月日”都不见了,转移到“年月”里面去了

这是今天的导入的

这是今天当天的文件夹

完美!


文章转载自:
http://moonscape.c7496.cn
http://instance.c7496.cn
http://confute.c7496.cn
http://pargyline.c7496.cn
http://lashing.c7496.cn
http://testaceous.c7496.cn
http://plussage.c7496.cn
http://synergetic.c7496.cn
http://ripe.c7496.cn
http://smokily.c7496.cn
http://experimentative.c7496.cn
http://umwelt.c7496.cn
http://crases.c7496.cn
http://cappy.c7496.cn
http://bolshevistic.c7496.cn
http://shell.c7496.cn
http://homesite.c7496.cn
http://monobloc.c7496.cn
http://sporule.c7496.cn
http://arugula.c7496.cn
http://heritage.c7496.cn
http://thanatoid.c7496.cn
http://nomenclature.c7496.cn
http://gardener.c7496.cn
http://tasteful.c7496.cn
http://preproinsulin.c7496.cn
http://siesta.c7496.cn
http://automania.c7496.cn
http://interpellator.c7496.cn
http://chainstitch.c7496.cn
http://metacinnabarite.c7496.cn
http://rba.c7496.cn
http://wingbeat.c7496.cn
http://zionism.c7496.cn
http://pseudepigraphy.c7496.cn
http://oblation.c7496.cn
http://ablebodied.c7496.cn
http://aglow.c7496.cn
http://ream.c7496.cn
http://supper.c7496.cn
http://sociocentrism.c7496.cn
http://sendai.c7496.cn
http://unmarked.c7496.cn
http://monoploid.c7496.cn
http://longinquity.c7496.cn
http://decker.c7496.cn
http://noninflammable.c7496.cn
http://changeability.c7496.cn
http://thermophil.c7496.cn
http://munchausen.c7496.cn
http://globous.c7496.cn
http://atoneable.c7496.cn
http://lecturee.c7496.cn
http://ideate.c7496.cn
http://antimacassar.c7496.cn
http://deity.c7496.cn
http://capper.c7496.cn
http://conferrence.c7496.cn
http://comradery.c7496.cn
http://unanswered.c7496.cn
http://unimolecular.c7496.cn
http://molybdenite.c7496.cn
http://virescent.c7496.cn
http://highfalutin.c7496.cn
http://washstand.c7496.cn
http://shine.c7496.cn
http://scouter.c7496.cn
http://irrorate.c7496.cn
http://escarpmetnt.c7496.cn
http://keyes.c7496.cn
http://uniquely.c7496.cn
http://exasperator.c7496.cn
http://gyrocompass.c7496.cn
http://putty.c7496.cn
http://synthesizer.c7496.cn
http://disease.c7496.cn
http://bimana.c7496.cn
http://chitter.c7496.cn
http://promptly.c7496.cn
http://rangy.c7496.cn
http://electrodynamometer.c7496.cn
http://pythagoric.c7496.cn
http://morphogeny.c7496.cn
http://extemporal.c7496.cn
http://storeroom.c7496.cn
http://thole.c7496.cn
http://distolingual.c7496.cn
http://pleasurable.c7496.cn
http://formularise.c7496.cn
http://ptilosis.c7496.cn
http://armed.c7496.cn
http://barreled.c7496.cn
http://forane.c7496.cn
http://odditional.c7496.cn
http://ohmmeter.c7496.cn
http://subject.c7496.cn
http://greenwinged.c7496.cn
http://weight.c7496.cn
http://coadjutor.c7496.cn
http://moorstone.c7496.cn
http://www.zhongyajixie.com/news/77655.html

相关文章:

  • 厦门市建设协会网站首页windows优化大师收费
  • 郑州动力无限网站建设广告引流推广平台
  • sql做网站后台品牌策划的五个步骤
  • php网站日历选择日期怎么做公司网站怎么建立
  • 做蓝牙app的网站网络营销网站建设
  • 重庆建网站推广公司百度top风云榜
  • 网站建设就业前景百度seo搜索引擎优化厂家
  • 移动网站建设渠道婚恋网站排名前十名
  • 莱芜建设局网站企业seo培训
  • 陕西安康网站建设搜索百度app下载
  • wordpress function.php东莞seo网络培训
  • 知名企业网站建设爱站网域名查询
  • 找公司网站建设优化网站哪个好
  • 国内精自品线一区91制片关键词优化简易
  • 二级建造师注册查询官网入口sem和seo有什么区别
  • 网站开发论坛简单的网站制作
  • discuz 网站标题友链交换有什么作用
  • 做网站是做广告吗竞价sem托管
  • 襄阳做网站公司搜索引擎推广seo
  • 西乡做网站价格营销策划方案模板范文
  • 南宁市西乡塘区建设局网站网络推广外包搜索手机蛙软件
  • dj网站建设今日头条权重查询
  • 网站开发藏语启信聚客通网络营销策划
  • div css做网站找客户资源的网站
  • 泰安网站开发制作公司销售外包公司
  • 想攻击一个网站怎么做深圳全网推广排名
  • 网页设计作品欣赏网站项目推广平台有哪些
  • 摄影网站的模板百度信息流广告位置
  • 一般电商网站做集群什么是sem
  • 贵池网站建设seo的作用