@@ -25,6 +25,11 @@ namespace CalibreImport
2525 [ DisplayName ( "CalibreImport" ) ]
2626 [ COMServerAssociation ( AssociationType . AllFiles ) ] //needed for Directory Opus, apparently.
2727 [ COMServerAssociation ( AssociationType . ClassOfExtension , ".epub" , ".pdf" , ".mobi" , ".azw" , ".azw3" , ".fb2" , ".djvu" , ".lrf" , ".rtf" , ".txt" , ".doc" , ".docx" , ".odt" , ".htm" , ".html" , ".cbz" , ".cbr" , ".pdb" , ".snb" , ".tcr" , ".zip" , ".rar" ) ]
28+
29+ // Welcome to CalibreImport, the main class of this Shell Extension.
30+ // This class is responsible for creating the context menu and handling the calibredb.exe import process.
31+ // It uses the SharpShell library to create a COM server that integrates with Windows Explorer.
32+ // The class is decorated with various attributes to specify its COM visibility and associations with file types.
2833 public class CalibreImport : SharpContextMenu
2934 {
3035 private List < string > _supportedExtensions = new List < string > ( ) ;
@@ -203,10 +208,11 @@ protected override ContextMenuStrip CreateMenu()
203208 }
204209
205210 // Define a non-generic delegate type
211+ // whatever that means
206212 public delegate void ReportProgressDelegate ( int progress ) ;
207213
208214 // Primary import handler that processes single or multiple files
209- // Manages Calibre process state and handles user interaction during import
215+ // Manages Calibre process state, and handles user interaction during import
210216 private void ExecuteImport ( string selectedLibrary = null , ReportProgressDelegate reportProgress = null )
211217 {
212218 try
@@ -551,7 +557,7 @@ private void LoadSupportedExtensions()
551557 } ;
552558 }
553559
554- // Get list of supported file extensions
560+ // Get the list of supported eBook file extensions
555561 private static List < string > GetFileExtensions ( )
556562 {
557563 var extensions = new List < string > ( ) ;
@@ -610,7 +616,7 @@ private void KillCalibre()
610616 }
611617 }
612618
613- // Get list of Calibre libraries from gui.json
619+ // Call on the CalibreLibraryManager class to retrieve the list of Calibre libraries
614620 private List < CalibreLibrary > GetCalibreLibraries ( )
615621 {
616622 return CalibreLibraryManager . GetLibraries ( ) ;
0 commit comments