From 6176e96386d485700760892a9b20faacb2618f34 Mon Sep 17 00:00:00 2001 From: ys Date: Wed, 25 Dec 2024 23:03:38 +0100 Subject: [PATCH] update notes - exif tool --- .gitignore | 1 + notes/zettlekasten/.obsidian/appearance.json | 3 +- notes/zettlekasten/.obsidian/graph.json | 2 +- notes/zettlekasten/.obsidian/workspace.json | 31 +- .../Backup and Restore Solution.md | 2 +- .../Metadata Manipulation.md | 334 ++++++++++++++++++ 6 files changed, 355 insertions(+), 18 deletions(-) create mode 100644 notes/zettlekasten/1 - Fleeting Notes/Metadata Manipulation.md diff --git a/.gitignore b/.gitignore index 085c4fe..7815003 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.pyc *.db +notes/zettlekasten/.obsidian/ diff --git a/notes/zettlekasten/.obsidian/appearance.json b/notes/zettlekasten/.obsidian/appearance.json index 4be7969..cd51caa 100644 --- a/notes/zettlekasten/.obsidian/appearance.json +++ b/notes/zettlekasten/.obsidian/appearance.json @@ -1,3 +1,4 @@ { - "theme": "obsidian" + "theme": "obsidian", + "cssTheme": "GitHub Theme" } \ No newline at end of file diff --git a/notes/zettlekasten/.obsidian/graph.json b/notes/zettlekasten/.obsidian/graph.json index 42a46ec..925e44f 100644 --- a/notes/zettlekasten/.obsidian/graph.json +++ b/notes/zettlekasten/.obsidian/graph.json @@ -17,6 +17,6 @@ "repelStrength": 10, "linkStrength": 1, "linkDistance": 250, - "scale": 1, + "scale": 0.6666666666666666, "close": true } \ No newline at end of file diff --git a/notes/zettlekasten/.obsidian/workspace.json b/notes/zettlekasten/.obsidian/workspace.json index daead56..c12ab0c 100644 --- a/notes/zettlekasten/.obsidian/workspace.json +++ b/notes/zettlekasten/.obsidian/workspace.json @@ -13,12 +13,12 @@ "state": { "type": "markdown", "state": { - "file": "1 - Fleeting Notes/Synology NAS.md", + "file": "1 - Fleeting Notes/Metadata Manipulation.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "Synology NAS" + "title": "Metadata Manipulation" } }, { @@ -101,7 +101,7 @@ } ], "direction": "horizontal", - "width": 633.5 + "width": 375.5 }, "right": { "id": "0ba52521b266806f", @@ -189,10 +189,10 @@ "state": { "type": "file-properties", "state": { - "file": "1 - Fleeting Notes/Synology NAS.md" + "file": "1 - Fleeting Notes/Metadata Manipulation.md" }, "icon": "lucide-info", - "title": "File properties for Synology NAS" + "title": "File properties for Metadata Manipulation" } } ], @@ -214,24 +214,25 @@ }, "active": "33923136d84ea6a5", "lastOpenFiles": [ + "1 - Fleeting Notes/Metadata Manipulation.md", "MOCS/Linux Wflow.md", - "1 - Fleeting Notes/Firejail.md", + "1 - Fleeting Notes/Backup and Restore Solution.md", "1 - Fleeting Notes/Synology NAS.md", "3 - References/Linux Services.md", - "1 - Fleeting Notes/Exposing Virtual machines to LAN.md", - "1 - Fleeting Notes/Backup and Restore Solution.md", - "1 - Fleeting Notes/LLMs.md", - "1 - Fleeting Notes/Omar Khayyam.md", - "1 - Fleeting Notes/Russel Conjugation.md", - "1 - Fleeting Notes/Tiling Managers.md", - "1 - Fleeting Notes/Untitled.md", "3 - References/Networking.md", + "3 - References/Dual Booting.md", "3 - References/Hacker News.md", - "3 - References/Solving Techniques.md", + "1 - Fleeting Notes/Untitled.md", + "1 - Fleeting Notes/Russel Conjugation.md", + "1 - Fleeting Notes/Omar Khayyam.md", + "1 - Fleeting Notes/Firejail.md", + "1 - Fleeting Notes/Exposing Virtual machines to LAN.md", "MOCS/Puzzles.md", "MOCS/Persian Poetry.md", + "1 - Fleeting Notes/LLMs.md", + "1 - Fleeting Notes/Tiling Managers.md", + "3 - References/Solving Techniques.md", "3 - References/Knight Moves 6.md", - "3 - References/Dual Booting.md", "Templates/MOC.md", "Untitled.canvas", "().md", diff --git a/notes/zettlekasten/1 - Fleeting Notes/Backup and Restore Solution.md b/notes/zettlekasten/1 - Fleeting Notes/Backup and Restore Solution.md index cad428d..63da4d6 100644 --- a/notes/zettlekasten/1 - Fleeting Notes/Backup and Restore Solution.md +++ b/notes/zettlekasten/1 - Fleeting Notes/Backup and Restore Solution.md @@ -1,6 +1,6 @@ --- tags: -parents: +parents: "[[Linux Wflow]]" date/time: 2024-11-17T22:16:00 --- [Rest and Relax](https://relax-and-recover.org/rear-user-guide/index.html) - implement solution on laptop and desktop diff --git a/notes/zettlekasten/1 - Fleeting Notes/Metadata Manipulation.md b/notes/zettlekasten/1 - Fleeting Notes/Metadata Manipulation.md new file mode 100644 index 0000000..f5fce68 --- /dev/null +++ b/notes/zettlekasten/1 - Fleeting Notes/Metadata Manipulation.md @@ -0,0 +1,334 @@ +--- +tags: +parents: "[[Linux Wflow]]" +date/time: 2024-12-25T22:42:00 +--- + +# USECASE + +- AQA GCSE paper - name messed up therefore rename with metadata + +``` +exiftool -s '-FileName<${Description}_${Title}.%e' *.pdf +``` + + +# COPILOT + +92dl92: whats the difference between the free account and paid one + +GitHub Copilot: The main differences between a free GitHub account and a paid one (GitHub Pro) include: + +1. **Private Repositories**: + - Free: Unlimited private repositories with a limited number of collaborators. + - Pro: Unlimited private repositories with unlimited collaborators. + +2. **Features**: + - Free: Basic features including issues, pull requests, and project management tools. + - Pro: Additional features such as advanced code review tools, required reviewers, and more. + +3. **Actions and Packages**: + - Free: Limited usage of GitHub Actions and Packages. + - Pro: Increased usage limits for GitHub Actions and Packages. + +4. **Support**: + - Free: Community support. + - Pro: Email support. + +5. **Insights and Analytics**: + - Free: Basic insights. + - Pro: Advanced insights and analytics. + +For more detailed information, you can visit the [GitHub Pricing page](https://github.com/pricing). + +92dl92: i meant copilot + +GitHub Copilot: The main differences between the free and paid versions of GitHub Copilot are: + +1. **Availability**: + - Free: GitHub Copilot is available for free to verified students, teachers, and maintainers of popular open-source projects. + - Paid: Available to individual developers and organizations with a subscription. + +2. **Features**: + - Both free and paid versions offer the same core features, including code suggestions, autocompletion, and assistance with writing code. + +3. **Usage Limits**: + - Free: May have some usage limitations or restrictions based on the specific program (e.g., student or open-source maintainer). + - Paid: No usage limitations within the scope of the subscription. + +For more detailed information, you can visit the [GitHub Copilot Pricing page](https://github.com/features/copilot). + +92dl92: do you know about the exiftool + +GitHub Copilot: Yes, ExifTool is a powerful command-line application for reading, writing, and editing metadata in a wide variety of file formats. It is commonly used for handling EXIF data in images, but it supports many other types of metadata and file formats as well. + +### Key Features: +- **Read and Write Metadata**: Supports a wide range of metadata formats including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP, and ID3. +- **Batch Processing**: Can process multiple files at once. +- **File Format Support**: Works with many file types including JPEG, PNG, TIFF, RAW, PDF, and more. +- **Customizable**: Allows for extensive customization and scripting. + +### Basic Usage: +To use ExifTool, you can run commands in the terminal. Here are some basic examples: + +- **View Metadata**: + ```sh + exiftool filename.jpg + ``` + +- **Write Metadata**: + ```sh + exiftool -Artist="Your Name" filename.jpg + ``` + +- **Copy Metadata from One File to Another**: + ```sh + exiftool -TagsFromFile src.jpg dst.jpg + ``` + +- **Remove All Metadata**: + ```sh + exiftool -all= filename.jpg + ``` + +### Installation: +On a Linux system, you can install ExifTool using the package manager. For example, on Ubuntu: +```sh +sudo apt-get install exiftool +``` + +For more detailed information and advanced usage, you can refer to the [ExifTool documentation](https://exiftool.org/). + +92dl92: i would like to use exiftool to rename a file based on the value of two or three metadata items + +GitHub Copilot: You can use ExifTool to rename files based on metadata values by specifying the desired metadata tags in the rename command. Here is an example of how to do this: + +### Example Command: +Suppose you want to rename a file based on the date and time it was taken (`DateTimeOriginal`) and the camera model (`Model`): + +```sh +exiftool '-FileName_.pdf where metad data are strings + +GitHub Copilot: To rename a file based on the `Description` and `Title` metadata tags using ExifTool, you can use the following command: + +### Command: +```sh +exiftool '-FileName<${Description}_${Title}.%e' filename.pdf +``` + +### Explanation: +- `'-FileName<${Description}_${Title}.%e'`: This specifies the new filename format. The `<` operator is used to assign the value of the metadata tags to the filename. `${Description}` and `${Title}` are the metadata tags, and `%e` is the original file extension. +- `filename.pdf`: This is the original file. + +### Example: +If the original file is named `filename.pdf` and the metadata values are: +- `Description`: "ProjectReport" +- `Title`: "Q4Summary" + +The resulting filename would be: +``` +ProjectReport_Q4Summary.pdf +``` + +### Batch Processing: +To rename multiple PDF files in a directory based on their `Description` and `Title` metadata, you can use a wildcard: + +```sh +exiftool '-FileName<${Description}_${Title}.%e' *.pdf +``` + +### Recursive Processing: +To rename all PDF files in the current directory and its subdirectories based on their `Description` and `Title` metadata, use the `-r` flag: + +```sh +exiftool -r '-FileName<${Description}_${Title}.%e' ./*.pdf +``` + +This command will rename all `.pdf` files in the current directory and its subdirectories based on their `Description` and `Title` metadata. + +For more detailed information and advanced usage, refer to the [ExifTool documentation](https://exiftool.org/). + \ No newline at end of file