Python + Mysql

https://realpython.com/python-mysql/

https://dev.mysql.com/doc/connector-python/en/preface.html



https://www.geeksforgeeks.org/working-with-pdf-files-in-python/
https://www.geeksforgeeks.org/extract-text-from-pdf-file-using-python/
https://qxf2.com/blog/extracting-data-from-pdfs-python/


https://www.metachris.com/pdfx/
https://softwarerecs.stackexchange.com/questions/76210/software-to-extract-the-list-of-references-and-title-from-a-pdf-of-a-research-pa
https://pypi.org/project/refextract/
https://stackoverflow.com/questions/62365767/extract-references-from-pdf-python
https://discuss.python.org/t/pdf-extraction-with-python-wrappers/40384

Merging and Revitalizing

Today I started the process of trying to merge my two WordPress blogs. The older one, from 2005 through 2008, and this one, running from 2010-2011. I have the SQL dump from of the original blog. I think I have the original blog setup: WordPress version and all the plugins. So I loaded the SQL dump and started playing with that. I also had hosted version of the data on a hidden URL. I was able to export the blog data as a WXR file. But I am not sure that this really exports all the data that was in the SQL dump. So I am going to have to try revitalizing the old blog with the old plugins. And then replace the main domain location with localhost or something.

I decided to use MAMP and pull all development to my local machine. I have run into a few challenges.

  1. I have some sort of SQL error in the syntax of my Gallery 2 install (it was a parallel install to the WP install where I posted all of my photos linked to in my posts.) I think I can get by without fixing this error. So this is not really a big deal.
  2. All of my links in my posts have my old domain name in the links. I need to either:
    • Change the old domain to my new domain
    • Change the old domain to new shortcode looking like /?=123 so that the interconnectedness of the posts remains on may new blog where ever I host it.

    Obviously I would prefer the later. But I have two questions:

    1. How would I do that technically? It would require a massive search and replace through the whole SQL database.
    2. What will happen to the new items which come into the altered blog. By this I mean if both blogs have post IDs which start at 1 and go to some higher number. How do I perserve the interconnectedness of the second blog? because the second blog will be connected with short links like /?=123.

Running and using MySQL On OSX

Installing
The best tutorial for running MySQL on OS X is actually found on the MySQL website.

However, there is a really cool System Preference pane that turns on or off the MySQL server/service. This either only works in OSX 10.5 or in 32-bit mode on OSX 10.6.

I downloaded mysql-5.1.42-osx10.5-x86_64.dmg from MySQL.com and the included preference pane works on OSX 10.6.2. (Even though it says it is for OSX 10.5.)

I just installed it without uninstalling a previous version of MySQL. I was brought over to a New MBP from an older MBP running OSX 10.5 (via Apple Genius at the Apple store), which was running MySQL. So I don’t know if the older version is still there somewhere or if the /local/ folder was not brought over in the transfer.

It seems that I have avoided the issues mentioned here:

Using
As far as editing the MySQL databases there used to be an app called CocoaMySQL. But as the link says the project has been abandoned. I heard it rumored on O’Reilley that it was because the app didn’t keep up with changes mad in MySQL past MySQL version 4.0. So CocoaMySQL can still be used on OSX 10.6 with a MySQL version 4 Database, but not with MySQL version 5.

However, there is an new app called Sequel Pro. It is available on Google Code and boast to work on OSX 10.5 with MySQL version 3-5. (I am about to test it on OS X 10.6, though the application was last updated in Dec. ’09, so it should work on 10.6.)

Of course there is always PhpMyAdmin.