顯示具有 Soft軟體相關 標籤的文章。 顯示所有文章
顯示具有 Soft軟體相關 標籤的文章。 顯示所有文章

2024年3月3日 星期日

數個m4a音檔,轉換成單一 MP3

 情境:手機之「語音備忘錄」(錄音程式),產出格式為m4a音檔,但想轉換成MP3音檔🎶

 📌需預先備妥轉換程式:  

💚(開放源碼)ffmpeg轉檔工具,支援跨平台系統

💚可先安裝好Chocolatey工具,直接於Windows命令提示模式下,執行安裝ffmpeg指令
choco install ffmpeg

💚安裝 ffmpeg工具後, 執行python m4a_to_mp3.py,可將單一m4a音檔 或多個m4a(需先將自己錄好的m4a音檔,預先改檔名成 file1.m4a 、file2.m4a、 file3.m4a、  ~,以利PYHTON程式做轉換) ,轉換成Mp3音樂檔案格式

💚解決方式:可使用Python程式(如下藍色部分,另存成m4a_to_mp3.py),將數個m4a檔(檔名自file1.m4a 、file2.m4a、系統會自動將所有file*.m4a檔合併起來),最後轉換成單一MP3音檔(Output.mp3)

import os

def convert_m4a_to_mp3(input_files, output_file):
    # 確認輸入來源之檔案,是否存在?
    for file in input_files:
        if not os.path.exists(file):
            print(f"來源檔案 '{file}' 不存在.")
            return False
    
    # 合併清單M4A檔案
    input_list_path = 'input_list.txt'
    with open(input_list_path, 'w') as f:
        for file in input_files:
            f.write(f"file '{file}'\n")
    
    try:
        os.system(f"ffmpeg -f concat -safe 0 -i {input_list_path} -c copy merged.m4a")
    except Exception as e:
        print(f"合併檔案時,發生錯誤: {e}")
        return False
    
    # 轉換為MP3格式
    try:
        os.system("ffmpeg -i merged.m4a -acodec libmp3lame -ab 256k -ar 44100 -y output.mp3")
    except Exception as e:
        print(f"轉換檔案時,發生錯誤: {e}")
        return False
    
    # 删除臨時交換檔案
    os.remove(input_list_path)
    os.remove("merged.m4a")
    
    print("合併 & 轉檔完成.")
    return True

if __name__ == "__main__":
    input_files = []
    output_file = "output.mp3"  # 輸出MP3檔案名稱
    file_index = 1
    while True:
        file_name = f"file{file_index}.m4a"
        if os.path.exists(file_name):
            input_files.append(file_name)
            file_index += 1
        else:
            break

    if len(input_files) == 0:
        print("未找到file1.m4a 聲檔,系統將合併file1.m4a file2.m4a ~ 依序載入到最後,並自動轉出成Output.mp3格式.")
    else:
        if convert_m4a_to_mp3(input_files, output_file):
            print(f"轉換檔案完成,輸出檔案名稱為 '{output_file}'")
 




2024年2月28日 星期三

HEIC 2 JPG 圖檔轉換(1鍵完成數百筆HEIC圖檔轉換)

情境:因iPhone拍攝出來的照片為HEIC格式,但一次有數百張要轉換成JPG圖檔格式,所以可事先安裝好跨平台影像處理軟體 ,並搭配BATCH批次檔程式,即可一鍵完成圖檔轉換工作。

(開放源碼)需先安裝好ImageMagick工具程式。

BATCH批次檔,如下(藍色部分):

@echo off
setlocal enabledelayedexpansion

rem 指定HEIC資料夾路徑(將所有要轉換的HEIC圖檔,複製到此D:\TEMP資料夾)
set "input_folder=D:\temp"

rem 確保轉檔後,輸出資料夾存在 (即D:\temp\output)
if not exist "%input_folder%\output" mkdir "%input_folder%\output"

rem 逐一捉取HEIC所有檔案,將D:\temp資料夾中的每個HEIC檔案,進行抽取
for %%i in ("%input_folder%\*.heic") do (
    rem 產出檔案名稱(以輸入來源為基準,做為檔名)
    set "filename=%%~ni"

    rem 執行CLI命令提示方式,進行圖檔轉換處理
    convert "%%i" -quality 100 -limit memory 32MiB -limit map 64MiB -write "%input_folder%\output\!filename!.jpg"
)

echo 圖檔轉換完成。
pause



相關查詢:
ImageMagick(支援跨平台系統)

2024年2月4日 星期日

藉由AI神器,試作 軟體解讀工具

 情境:想透過AI神器幫忙,確認是否有相關類似功能之軟體,包含軟體版權、功能簡介,及官方網站,進行軟體的解讀。

說明一:因為AI主要以英文為主,故先將想查詢資訊以中文打好,再經由翻譯軟體或請AI神器預先翻成英文去提問,或許可獲得更多的資訊,最後再轉換成繁體中文呈現。建議可將要查的軟體相關關鍵字(或者是過去自己寫的部落格之軟體文章貼進去,就彷彿跳進時空之旅🌌)用"""      """,(三重引用符號)標示起來軟體解讀PROMPT提示詞如下面藍色部分

說明二:使用方式,請將下面PROMPT提示詞樣版,複製貼到AI神器去查詢。

Now that you are a software usage criticism, please analyze the content of each topic based on the resource help I have provided and write about it in a blog format.
First of all, please find out if the features are available based on the resource help I provided, and if it is an open source resource, please describe it separately.
Analyze the copyright (e.g., open source, commercial software, etc.), whether it supports cross-platform (list the details), the advantages of the software (list the supported file formats), the installation method and the matters that need to be paid attention to when you use it (do you need to prepare the environment first?). Please list them in a simple table.

Finally, please list relevant resources, such as the official website, and the more popular websites on the Internet for users who go to Google to search for the software in different languages (e.g. English, Japanese, Chinese).

Please convert the results to Traditional Chinese for a complete and detailed description and table presentation.

I provide the following resources:
"""

https://github.com/upscayl/upscayl 像素不足功能,調整圖像大小。

ImageMagick: https://imagemagick.org/ ,可用於各種圖像處理任務,包括命令提示方式 調整圖像大小


"""

 

Imagemagick 1次性,以命令提示方式,將iPhone之 heic圖檔,轉換成JPG圖檔
convert *.heic -quality 90 -resize 50% -write output/*.jpg

 

Image UpScaling 相片解析度調整工具

 情境:有時照片像素不足,較不清晰,可透過開放源碼相關免費軟體資源,幫忙做轉換處理

  軟體名稱 (版權、跨平台支援否)           安裝方式(含使用)、支援檔案類型

Upscayl

(開源、支援跨平台)

https://github.com/upscayl/upscayl/discussions

依作業系統不同,下載安裝檔安裝

(支援PNG, JPEG, BMP, TIFF, WebP)

ImageMagick

(開源、支援跨平台)

https://www.imagemagick.org/discourse-server/

同上 (支援GIF, PNG, JPEG, PDF, SVG )

convert input.jpg -resize 640x480 utput.jpg

 

相關查詢:

Upcayl imageupscaling

照片模糊  去噪點 除霧 去噪點

2023年12月7日 星期四

jpg2txt圖檔轉換為文字檔(PYTHON)

作業環境前置準備:

 安裝必要性元件(辨識核心元件tesseract-ocr 需下載安裝,外加要辦識之語系)

 

安裝相關套件

 pip install pillow

 pip install pytesseract

 

 PYTHON程式,如下:

# -*- coding: utf-8 -*-
'''
python取圖檔,辨識中文
'''
#'開啟檔案總管 (開啟轉換後之檔案使用)'
import os,sys
import subprocess
import glob
from os import path

from PIL import Image
import pytesseract

#'開啟GUI 取得來源檔(準備欲轉換聲音來源,開啟檔案對話視窗宣告處理)
import tkinter as tk
from tkinter import filedialog

root = tk.Tk()
root.withdraw()

file_path = filedialog.askopenfilename(initialdir = "/",title = "Select file for OCR (選擇欲辨識圖檔轉文字檔)",filetypes = (("JPG files","*.jpg"),("JPEG files","*.jpeg"),("All files","*.*")))

#'預設位址如下,但如安裝不同處,需告訴PYHTON 辨識核心元件在哪,如此方能辦識處理
pytesseract.pytesseract.tesseract_cmd = 'C:/Program Files/Tesseract-OCR/tesseract.exe'

img = Image.open(file_path)
text1 = pytesseract.image_to_string(img, lang='chi_tra')


with open('file.txt', mode = 'w') as f:
    f.write(text1)
    f.close()

#'將剛才圖檔辨識後結果,以檔案總管直接將它開啟查閱
subprocess.Popen('explorer "file.txt"')
    




2022年8月19日 星期五

Json2Csv(JavaScript Object Notation轉換成CSV格式)

 作法1:( react-gh-pages離線套件)
將JSON格式轉換成CSV純文字讀取格式工具
步驟1:下載解壓縮 react-gh-pages
步驟2:開啟json-gh-pages資料夾下之 index.html
步驟3:將JSON格式貼於上方視窗,即可轉換成 CSV純文字格式 (預設20筆,點選Download the entire CSV)



作法2:(搭配Notepad++ 外掛工具)
經由Notepad++外掛方式(Plug-in)


作法3:(Python程式)

#'開啟檔案總管 (開啟轉換後之檔案使用)'

import subprocess

import os

import pandas as pd

#'開啟GUI 取得來源檔(準備捉取JSON之來源檔案路徑)

import tkinter as tk

from tkinter import filedialog

root = tk.Tk()


file_path = filedialog.askopenfilename(initialdir = "/",title = "Select file for JSON to csv(選擇欲處理之JSON檔案)",filetypes = (("Json files","*.json"),("Text files","*.txt"),("all files","*.*")))

df = pd.read_json (open(file_path, "r", encoding="utf8"))

print(df)  # 顯示讀取出之DataFrame資訊

input ("Press any key to continue!")


df.to_csv (r'd:\json2csv\Convert_Json_File.csv', index = None)

#將剛產出之CSV文字檔,直接開啟顯示出來

subprocess.Popen('explorer "d:\json2csv\Convert_Json_File.csv"')

2022年1月12日 星期三

正規表示式Regular Expression ( FQDN filter)

 將純文字格式下,篩選出FQDN (Domain Name名稱)

TEXTのうちドメイン名までを正規表現を用いて抽出する(FQDN)
 Regular expression which will match a valid domain name

 

背景說明:

公司因業務需要,原始來源為PDF格式,需將其內文中之FQDN網域位址,提取出來。可先經由pdftotext將PDF檔,轉換成TEXT格式後,再經由grep指令將FQDN抽出。


下列為BATCH批次檔

 
rem  將PDF檔先轉換成暫存純文字檔案
pdftotext %1 txtTempPDF.txt

rem 將PDF轉換完成為TEXT文字檔後,經由grep工具取出FQDN網域相關資訊
grep -E '[a-zA-Z0-9.\-_]{1,63}\.[a-zA-Z0-9.\-_]{1,63}' txtTempPDF.txt  -o > Tipip_FQDN.txt

rem 開啟經由grep篩選出之FQDN資訊
explorer Tipip_FQDN.txt

 

相關篩選IP參考資訊:

 (OpenSource)Pdftotext  ,PDF文字轉換工具

https://myblog-johnnyit.blogspot.com/2021/09/pdfip.html

 

2021年9月27日 星期一

PDF檔轉換成純文字檔,並抽取出IP資訊

Regular expression IPv4 addresses cover the range 0.0.0.0 to 255.255.255.255
IPv4 アドレスにマッチする正規表現

步驟一:

備妥PDF轉換成TEXT環境套裝程式

依作業系統環境,選擇下載套裝程式
https://miktex.org/download

步驟二:
安裝執行basic-miktex
備妥PDF轉換純文字程式,PDFTOTEXT

步驟三:
下列為BATCH批次檔
rem  將PDF檔先轉換成暫存純文字檔案
pdftotext %1 txtTempPDF.txt

rem 將PDF轉換完成為TEXT文字檔後,經由grep工具取出IP資訊
grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' txtTempPDF.txt  -o > Tipip.txt

rem 開啟經由grep篩選出之IP資訊
explorer Tipip.txt



參考資訊:
grep 過濾篩選指令

Windows環境,直接執行UnixLike指令

Utility programs (e.g. "grep") in the cygwin bash environment 相關執行檔案


2020年9月16日 星期三

auto-py-to-exe 轉換PY程式成為EXE

Step1:

安裝執行auto-py-to-exe圖形GUI界面之PYTHON轉換EXE套件程式

Step2:

將前個PYTHON程式( PYTHON旋轉PDF之程式載入),即可產出EXE執行檔


參考資訊:

auto-py-to-exe PYTHON轉換成EXE執行檔套件


2010年12月19日 星期日

Kalendar

又近年末之到來,前幾年公司有廠商會提供免費之桌曆,但近年來彷彿受到金融海嘯寒冬之影響,拿不到桌曆只好上網找資源

點選Outlook 行事曆 | 選擇列印 | 列印樣式: 週曆樣式 | 選擇開始日期與結束日期


桌曆查詢:
Wochekalendar Drucker,週曆
卓上カレンダー,桌曆
カレンダー

2010年10月21日 星期四

FreeDownloadManager續傳軟體

(開放源碼)Free Download Manager,續傳軟體,因公司需下載文件類型檔案,不管是使用Firefox/IE/Chrome,均下載不到一半時自動斷訊,安裝本軟體後,即可將下載一半自動中斷問題克服

Microsoft Download Manager,

Orbit Downloader,可自Myspace、YouTube、Imeem、Pandora、Rapidshare 等網站,進行影音檔之下載工具


相關軟體

WebPerformance網頁效能相關工具

Windows Performance Tools (WPT) Kit,效能分析


Open Web Analytics,網站分析工具


UIZE,

相關查詢:
Firebug,

Explorer檔案總管

qmmander,


Ultra Explorer, 檔案總管


Explorer++,檔案總管

SearchMyFiles ,搜尋特定檔案或資料夾,內含特定關鍵字工具

CSearcher ,文字相關檔案之關鍵字搜尋工具。


微軟內建搜尋,本文:關鍵字


相關查詢:

http://myblog-johnnyit.blogspot.tw/2008/05/find.html

2009年10月30日 星期五

2009年8月5日 星期三

出現某些項目無法顯示沒有足夠空間可以顯示

開始 右鍵 內容(R) 自訂(C) ,將功能表的程式數目(N)調高,最大為30,其對應機碼位置


雖可突破最大設定值30的限制,但實際執行時仍會提示無足夠空間訊息


相關軟體:
Open Menu+ ,可變換視窗選單工具
Vista Start Menu,
start menu x,
Startmenu7,

DSHUTDOWN,關機及開啟遠端主機軟體

DSHUTDOWN,關機及開啟遠端主機軟體

相關軟體:
(開放源碼)http://sourceforge.net/projects/wake-on-lan/
FUSION Soluciones Informaticas Wake On LAN

PsShutdown微軟提供遠端開機或重開機及鎖定電腦程式

其他:
Speed up Shutdown Windows, 取消詢問直接予以關機機碼設定

2009年1月7日 星期三

shutdownguard禁止自動重新開機

shutdownguard,雖已檢視電腦是否有異常裝置或系統日誌亦無異常資訊,但有時仍無故重新開機,如不想重新安裝電腦,可嘗試安裝本軟體測試,記得如欲重新開機要由視窗右下方之SysTray圖示來關閉電腦

2008年12月8日 星期一

AutoCAD DWG檢視軟體

Autodesk DWF Viewer

提供DWG格式檔(作者為日本人)之檢視

XPS檔案格式讀取軟體

下載安裝微軟提供套件,即可讀取


安裝XPS Essentials Pack時,發生錯誤 1722. Windows Installer 封裝有問題。安裝時所要執行的程式並未如預期完成。請連絡您的支援人員或封裝製造商。
動作: SCUpdateInstallAction

重新安裝,且過程選項請選擇"不要登入"即可正常安裝

2008年10月1日 星期三

SwfTools工具

PDF2SWF,提供多個SWF檔案相關套件,可將圖檔或PDF或字型檔轉換成SWF影音格式
swfdump可下 -atpud參數,將SWF相關明細資訊(反組譯,16進制)顯示出來

SwfReplacer,無SWF原始來源,可協助將SWF相關檔案中之文字、圖檔、MovieClip等檔案開發結構資源解析工具

FlashBuilder,可將SWF檔案轉換成EXE執行檔

相關軟體:  (網頁Flash(*.SWF)檔案下載)
(開放源碼)flasm,下flasm -d example.swf > foo.flm 可執行SWF檔案反組譯
jpexs flash decompiler,
(MOZILLA PUBLIC LICENSE)SWF Investigator,SWFScan,掃描SWF影音檔案之安全性工具


相關開發工具查詢:
Open Source Flash Project
foxarcade

Open Source Media Framework
Text Layout Framework
(OpenSource)HippoHX,支援Window及Mac,提供相關API,開發出相關SWF格式應用程式

相關查詢:
Flash製作開發
Flash Develop,

相關參考資源:
osflash.org