Example #1
0
        static void Main(string[] args)
        {
            if (args.Length != 2)
            {
                Console.WriteLine("Useage: PhotoUploader photos_src database_dest (no trailing slashes)");
                return;
            }
            else
            {
                g_RootPath = args[0];
                g_DBPath   = args[1];
            }

            g_conn = GetConnection();

            try
            {
                Log(3, "Starting");

                Log(2, "Deleting Database");
                DeleteFullDatabase();

                g_AlbumList = new AlbumList();
                g_PlaceList = new PlaceList();

                Log(2, "Reading ABM files and adding to the database.");
                DoRecursiveWalk(g_RootPath);
                Log(3, "Done.");
            }
            finally
            {
                g_conn.Close();
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            if (args.Length != 2)
            {
                Console.WriteLine("Useage: PhotoUploader photos_src database_dest (no trailing slashes)");
                return;
            }
            else
            {
                g_RootPath = args[0];
                g_DBPath = args[1];
            }

            g_conn = GetConnection();

            try
            {
                Log(3, "Starting");

                Log(2, "Deleting Database");
                DeleteFullDatabase();

                g_AlbumList = new AlbumList();
                g_PlaceList = new PlaceList();

                Log(2, "Reading ABM files and adding to the database.");
                DoRecursiveWalk(g_RootPath);
                Log(3, "Done.");
            }
            finally
            {
                g_conn.Close();
            }
        }