Skip to content

n30w/MetadataUtility

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metadata Utility

Automation for Digital Archives 2022, written in python. Interprets data from text files and writes to Excel file for easy copy and paste into master google sheet.

Python version 3.10+ required!

  • In Python 3.10, the match syntax similar switch was introduced. A module in this program uses match

Required dependencies

  • pandas
  • openpyxl
  • youtube-dl
  • pafy
  • pytube

Notes

I'm using the Jetbrains PyCharm IDE. Installed dependencies in the project folder's venv folder.

Since YouTube removed dislikes being shown, I edited the youtube-dl, backend_youtube_dl.py and commented out:

  • self._likes = self._ydl_info['like_count']
  • self._dislikes = self._ydl_info['dislike_count']
  • self._rating = self._ydl_info['average_rating']

Useful Links

General

Python

GUI Creation

Virtual Environments

Dependencies

Github

Note about Intel and ARM support

Support for intel and arm is weird. To get this to work in pycharm or even run this with the needed dependencies for this project, one must first open terminal, go to the venv bin directory of this project then type:

env /usr/bin/arch -x86_64 /bin/zsh/

conda deactivate

source $(pwd)/activate

python3 (path to main.py)

Using anaconda venv to run this on M1 architecture

I used anaconda package manager to solve the issue of M1 problems regarding the system architecture, x86_64 and arm64. I installed Anaconda and miniforge. I first installed anaconda-navigator, then installed miniforge via brew install miniforge. I then ran the command:

conda create --name (name of environment) python=3.10

conda activate (name of environment)

Now that the conda venv is activated, you can then use pip3 to install pip3 packages like pafy, youtube_dl, or pytube.

conda install (package name)

I used this new environment for the Python project.

Note about JetBrains PyCharm IDE environment interpreter

To add the Anaconda environment, I went to my project interpreter settings at the bottom right, and clicked add interpreter. I added a new conda environment, selected existing environment, and set the interpreter path to:

/Users/(username)/opt/anaconda3/envs/(environment name)/bin/python

The environment name is the one created in the previous section, using the conda create --name command. I set the conda executable path to:

/Users/(username)/opt/anaconda3/bin/conda

After adding, PyCharm should run the main.py flawlessly.

About

Automation for Digital Archives 2022

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages