Giter VIP home page Giter VIP logo

obsessive_compulsive_editor's Introduction

Obsessive Compulsive Editor (O.C.E.)

Overview

Obsessive Compulsive Editor (O.C.E.) is a versatile multimedia management tool built using Python and customtkinter for a user-friendly graphical interface. This program combines downloading, renaming, basic video/audio editing, and tagging functionalities into one cohesive package.

Installation

  1. Clone the Repository:

    git clone https://github.com/robinawilliams/obsessive_compulsive_editor.git
    
  2. Change Directories:

    cd obsessive_compulsive_editor
    
  3. Install Method (Automatic Install):

    1. Run Install Script:
      ./install.sh
      
  4. Install Method (Manual Install):

    1. Install Dependencies:

      pip install -r requirements.txt
      
    2. Install Tkinter:

      • Arch: sudo pacman -S tk
      • Debian: sudo apt-get install tk
      • Fedora: sudo dnf install tk
    3. Configure the template files:

      • Customize the configuration file "config.ini.template" as needed and remove the .template extension.
      • Customize the json file "dictionary.json.template" as needed and remove the .template extension.

Usage

Running the Project

  • Execute the command:
    python gui.py
    

Modules

File Renamer

Rename files (or folders)

  • Drag and drop a file into the window or choose "Browse File" to select one.
  • Categories:
    • Use tabs to separate the categories by weight or show all categories.
    • Use category buttons to add words to the renaming queue.
    • Click the same category button again to remove words from the renaming queue.
  • Choose "Output Directory" to select the output folder. Leave blank to default to current directory.
  • Type in the prefix text entry field to add custom text as a prefix to the renaming queue.
  • Type in the custom text entry field to add custom text to the renaming queue.
  • Type in the suffix text entry field to add custom text as a suffix to the renaming queue.
  • Use "Undo" to revert the last category added to the queue.
  • Use "Undo File Rename" to revert the last file rename operation.
  • Use "Clear" to remove everything.
  • "Move to Trash" sends the selected file to the trash.
  • "Reload Last File" reloads the last used file.
  • Click "Rename" to rename the file with the changes in the queue.
  • "Send to Editor" sends the selected file to the Editor module.
  • "Send to Name Normalizer" sends the selected file to the Name Normalizer module.
  • "Send to Tagger" sends the selected file to the Tagger module.
  • "Trash and NO-GO" sends the selected file to the trash and creates a NO-GO record.

Checkboxes/Radio Buttons

  • "Placement" determines where to place words in the renaming process.
    • Prefix: At the beginning of the file name {prefix_text} {custom_text} {categories_text} {base_name} {suffix_text}.
    • Special Character: At the first special character found in the file name {prefix_text} {left side of -} {categories_text} {custom_text} {right side of -} {suffix_text}
    • Special Character is set to - by default. See special_character_var in config.ini to change.
    • This will revert to {prefix_text} {categories_text} {custom_text} {base_name} {suffix_text} if no special character is found.
    • Suffix: At the end of the file name {prefix_text} {base_name} {categories_text} {custom_text} {suffix_text}.
  • "Reset Output Dir." resets the output directory on each run.
  • "Suggest Output Dir." attempts to find an artist in the file and matching folder in the Artist Directory.
  • "Move Up One Dir." moves the file up one directory.
    • This overrides "Suggest Output Dir."
  • "Move Text" moves text within special characters to the end of the file.
    • Use " - " and "__-__" in the preprocessed file name. For example, "Artist - WORDS TO MOVE__-__ .mp3"
  • "Add Artist Common Categories" common categories for the artist to the queue, e.g. Taylor Swift (Country, Pop).

Name Normalizer

Name Normalize a file or folder containing files for easy use with other modules. You can include/exclude certain file types in the Add/Remove window.

  • Drag and drop a file/folder into the window or choose "Browse" to select one.
  • "Append __-__"
  • "Artist Identifier"
  • "Include subdirectories"
  • "Remove @"
  • "Remove all symbols"
  • "Remove most symbols"
  • "Remove ampersands"
  • "Remove angle brackets"
  • "Remove asterisks"
  • "Remove backslashes"
  • "Remove carets"
  • "Remove colons"
  • "Remove commas"
  • "Remove curly braces"
  • "Remove custom text"
  • "Remove dashes"
  • "Remove dollars"
  • "Remove double quotes"
  • "Remove emdashes"
  • "Remove endashes"
  • "Remove equal signs"
  • "Remove extra whitespace"
  • "Remove hashtags"
  • "Remove non-ASCII symbols"
  • "Remove numbers"
  • "Remove parenthesis"
  • "Remove percents"
  • "Remove pipes"
  • "Remove plus signs"
  • "Remove question marks"
  • "Remove semicolons"
  • "Remove single quotes"
  • "Remove square brackets"
  • "Remove text following the first '('"
  • "Remove text following the first '#'"
  • "Remove underscores"
  • "Title the name"
  • "Replace custom text"
  • "Case-sensitive/Case-insensitive"
  • "Include subdirectories"
  • "Reset entries"
  • "Output Directory"
  • "Remove Text"
  • "Clear"
  • "Undo Name Normalizer"
  • "Reload Last File"
  • "Interrupt"
  • "Normalize"
  • "Send to Editor" sends the selected file to the Editor module.
  • "Send to File Renamer" sends the selected file to the File Renamer module.
  • "Send to Tagger" sends the selected file to the Tagger module.

Editor

Make basic edits to multimedia files.

  • Drag and drop a file/folder into the window or choose "Browse" to select an input method (multimedia file, .txt file containing file paths, or a directory with multimedia files to edit).
  • "Rotate Video" determines how much to rotate the video ("Left", "Right", "Flip") or mirror. Use "None" to disable rotation.
  • "Increase Audio (dB)" determines how much to amplify the audio, e.g. "5.0" for 5 decibels.
  • "Keep Audio" determines whether to keep the audio track or mute it.
  • "Normalize Audio" determines whether to normalize the audio to 0db.
  • "Search Type" determines whether to use a sentence (matching entire sentence/phrase) as opposed to a fragment ( matching individual word) for supercut operations.
  • "Supercut Term" is the query for supercut operations.
  • "Transcribe" to transcribe the file(s) in the input.
  • "Auto-supercut" to automatically transcribe (if necessary), get the most used words excluding common words, and create a supercut. The audio is automatically normalized to 0db.
  • "Supercut" to automatically transcribe (if necessary) and create a supercut using the user provided query. The audio is automatically normalized to 0db.
  • "Trim (Minutes:Seconds)" determines how much to trim the clip, e.g. "01:05" "05:00" to trim one minute and five seconds from the start of clip and everything past the five-minute mark.
  • "Output Directory" to select the output directory for the file(s). Default is the initial directory of the file if none is explicitly provided.
  • "Clear Values" to clear all value entries in the frame.
  • "Clear Everything" to clear all entries in the frame.
  • "Reload Last File" reloads the last used file.
  • "Interrupt" to interrupt a process.
  • "Process Edit(s)" to process multimedia file(s) in the provided input method.
  • "Send to File Renamer" sends the selected file to the File Renamer module.
  • "Send to Name Normalizer" sends the selected file to the Name Normalizer module.
  • "Send to Tagger" sends the selected file to the Tagger module.
  • "Remove successful lines from input file" to remove the successful lines from the input file.
  • "Normalize Editor output names" to remove edit instructions like "(VIDEO EDIT) [01:05-05:00]".
  • "Ignore 'supercut'" to ignore files with supercut in the file name (prevent operations on outputs from prior runs).
  • "Reset entries" after processing.

Downloader

Download multimedia files from yt-dlp compatible URLs.

  • Drag and drop a line separated text file into the window or choose "Browse" to select a line separated text file with URLs to complete a batch download operation.
  • "URL Entry" to enter compatible URLs for a single download operation.
  • "Output Directory" to select the output directory for the file(s). Default is the initial output directory of the file if none is explicitly provided.
  • "Clear Values" to clear all value entries in the frame.
  • "Clear Everything" to clear all entries in the frame.
  • "Reload Last File" reloads the last used file.
  • "Interrupt" to interrupt a process.
  • "Process download(s)" to process downloads of the multimedia file(s) in the provided input method.
  • "Remove successful lines from input file" to remove the successful lines from the text input file.
  • "Normalize download names" to automatically remove square brackets (including the text inside), replace/remove text according to the Custom Text to Replace dictionary, and extra whitespace.
  • "Set tags automatically" to automatically set the metadata tags for the downloaded multimedia file.
  • "Suppress tag prompts" to suppress tag prompts when the automatic process runs into issues.
  • "Reset entries" after processing.

Tagger

Set metadata tags for multimedia files.

  • Drag and drop a file/folder into the window or choose "Browse" to select an input method (multimedia file, .txt file containing file paths, or a directory with multimedia files to tag).
  • "Artist Entry" to enter an artist to set as the artist tag.
  • "Title Entry" to enter a title to set as the title tag
  • "Output Directory" to select the output directory for the file(s). Default is the initial directory of the file if none is explicitly provided.
  • "Clear Values" to clear all value entries in the frame.
  • "Clear Everything" to clear all entries in the frame.
  • "Reload Last File" reloads the last used file.
  • "Interrupt" to interrupt a process.
  • "Process Tag(s)" to process tags of the multimedia file(s) in the provided input method.
  • "Remove successful lines from input file" to remove the successful lines from the text input file.
  • "Suppress tag prompts" to suppress tag prompts when the process runs into issues.
  • "Reset entries" after processing.

Add/Remove

Artist

  • "Add Artist" to add artists to the Artist File.
  • "Remove Artist" to remove artists to the Artist File.
  • "Automatically add record for Common Categories" to also create an A.C.C. record.
  • "Add Artist C.C." to add an artist record to the common categories dictionary.
  • "Remove Artist C.C." to remove an artist record from the common categories dictionary.
  • "Browse Artist" to select the artist to add/remove common categories to.
  • "Detect Artist" to detect the artist in the selected file in the File Renamer module.
  • "Add A.C.C." to add a common category to the artist's list.
  • "Remove A.C.C." to remove a common category from the artist's list.

Category

  • "Add Category" to add a category to the dictionary and update the category tabview.
  • Add a weight to the category to influence position. The lower weight, the higher the precedence.
  • "Remove Category" to remove a category from the dictionary and update the category tabview.

Custom Tab Name

  • "Add Custom Tab" to add a custom tab name for the corresponding weight.
  • "Remove Custom Tab" to remove a custom tab name.

Custom Text to Replace

  • "Add CTR" to add a custom text to replace record in the dictionary.
  • "Replace with" to provide text to replace. If left empty, the text is replaced with an empty string.
  • "Remove CTR" to remove the custom text to replace record in the dictionary.

Exclude

  • "Add Exclude" to add a folder to be excluded from the Suggest Output Directory search.
  • "Remove Exclude" to remove a folder to be excluded from the Suggest Output Directory search.

File Extensions

  • Include Extensions
    • "Add File Ext." to add a file extension to the list of file extensions to be included during operations.
    • "Remove File Ext." to remove a file extension from the list of file extensions to be included during operations.
  • Exclude Extensions
    • "Add File Ext." to add a file extension to the list of file extensions to be excluded during operations.
    • "Remove File Ext." to remove a file extension from the list of file extensions to be excluded during operations.
  • Editor File Extensions
    • "Add File Ext." to add a file extension to the list of file extensions for the Editor to operate on (moviepy compatible extensions only).
    • "Remove File Ext." to remove a file extension from the list of file extensions for the Editor to operate on.

NO-GO

  • "Add NO-GO" to create a no-go file for the artist and optionally add it to the txt file for use with tampermonkey.
  • "Remove NO-GO" to remove the no-go file for the artist, the txt file, and the record in the common categories dictionary

"Clear" to clear all entries in the tab.

"Reset entries" resets the entries after operations.

Settings

Appearance

  • "Appearance" switches between light and dark mode.
  • "UI Scaling" switches between different scaling sizes for the user interface.

Artist

  • "Artist Search" attempts to identify the artist in other folders while conducting file renaming operations.
  • "Ignore Known Artists" ignores known artists (ones with directories in the Artist Directory or all artists present in the artist file) when conducting the Artist Search.
  • "Remove Artist Duplicates" removes duplicate entries of the artist when the Artist Identifier is used.
  • "Remove Word Duplicates" removes duplicate words/numbers in the file name (This is very aggressive).
  • "Artist Directory" sets the directory that Suggest Output Directory and Artist Search uses to find a match for an artist.
  • "Artist File" set the line delimited list of artists file that "Artist Identifier" uses to find a match for an artist.
  • "Open Artist File" to open the Artist file for editing in the default system program.

Logging

  • "Activate Logging" logs actions taken within the program.
  • "Open Log File" to open the Log file for editing in the default system program.

Messaging

  • "Show Messageboxes" displays messagebox notifications. False defaults to standard messaging in the frame.
  • "Show Confirmation Messageboxes" displays confirmation messagebox notifications. False defaults to standard messaging in the frame. Confirmation messageboxes will always be displayed.
  • "Fallback confirmation state" sets what the response is when confirmation messagebox notifications are suppressed.
  • "Truncate Text" to truncate text excessively long text in the file display on the File Renamer.

Misc

  • "Open File on Drag and Drop" (Linux only).
  • "Validate Entries" will try to verify entries in the GUI are valid and will reset them to the default value if not.
  • "Initial Directory" sets the initial directory when the user browses for an input.
  • "Initial Output Directory" sets the initial directory when the user browses for an output directory.
    • This may be overridden by "Suggest Output Dir."
  • "Open Config File" to open the configuration file for editing in the default system program.
  • "Open Dictionary File" to open the Dictionary file for editing in the default system program.

Reminders

  • "Create Double Check Reminder" creates an empty file for double-checking.
  • "Double Check Reminder Directory" sets the directory that reminders are saved to, if enabled.
  • "Open NO GO Artist File" to open the no-go artist file for editing in the default system program.
  • "Use Custom Tab Names" sets the tab names you set in the Dictionary.json file.

Tabs

  • "Use Custom Tab Names" to use the tab names that were specified in the Custom Tab Name add/remove tab.
  • "Sort Tab Names" sorts the standard tab names.
  • "Sort Tab Names (A-Z / Z-A)" sorts the standard tab names alphabetically or reverse alphabetically.

Files

  • Use "config.ini.template" as a template for configuring the tool. Remove the .template extension to use.
  • Use "dictionary.json.template" as a template for configuring the dictionaries/lists. Remove the .template extension to use.

Bug Reports and Contributions

If you encounter issues or want to contribute, use the "Issues" tab. For PRs, reference the related issue.

Known Issues

This project is a work in progress. Check the issues section for known problems.

Show Your Support

If you like this project, please share it.

FAQ

Q: I get the error "import _tkinter # If this fails, your Python may not be configured for Tk". How do I resolve this?

A: Install tkinter.

  • Arch: sudo pacman -S tk
  • Debian: sudo apt-get install tk
  • Fedora: sudo dnf install tk

Q: I get the error "import customtkinter as ctk # Customtkinter for a modern gui ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'customtkinter'". How do I resolve this?

A: The requirements haven't been installed. Install the requirements and try again.

  • pip install -r requirements.txt

obsessive_compulsive_editor's People

Contributors

robinawilliams avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.