LAUNCHPAD: my web page which is effectively "home" for me on my browser(s). This is a doc. file about: a) How to edit launchpad.html b) How to transfer files between iMac and unix. This doc file is called all of these: "launchpad" "unix2mac" "DOClaunchpad" DIRECTORY STRUCTURES There are 3 (Unix) dirs involved, with csh aliases for them in []: 1) [cdw] ~/public_html/ 2) [cdp] ~/public_html/pickup/ 3) [cdpl] ~/public_html/pickup/launch/ Dir 1) Is the root of my web-visible files in Unix Dir 2) Is where files in Unix can be "offered to" a browser (rather than my normal web pages which are for displaying information etc.) Dir 3) Is for storing backed up versions of launchpad.html The key file, which is the point of this whole setup, is "launchpad.html" which I use as a private set of links to other things: in effect a private "home" for me when using my web browser(s). Currently I have 2 distinct ones: "lp1" = "launchpad.html" "lp2" = "launchpad2.html" NORMAL STATE Backed up at very top level of my OneDrive; AND by unix auto-backups. Multiple copies on Macs at: desktop, dir: "excelPatterns" Unix dir "pickup" is visible to browsers. (~/public_html/pickup) Unix dir ~/public_html/pickup/launch/ holds current and old versions of the file "launchpad.html" The version there of "launchpad.html" is the currently used one. Unix files ~/public_html/launchpad.html and ~/public_html/pickup/launch/launchpad.html are hardlinks or Symlinks to each other. But the leftover version in CDP is the old version (could delete it after doing the bak command). If in fact you wanted to collect it from pickup, have to watch out for this; and copy it from the [launch] dir up one to the [pickup] dir. FROM UNIX TO MAC (2) is where a browser can pick up these files from Unix (when required) by going to: https://steve.psy.gla.ac.uk/pickup/ (~/public_html/pickup/ in Unix) and clicking on any file there. If it is an .html file then the browser loads and shows it; but can also then do Save-As in the browser to store it as an html file on the mac. From there you can change its type to .txt from .html, and then use Textedit to open the html file as text; and perhaps edit it on the Mac. FROM MAC TO UNIX Not quite so easy, but you: a) On Unix get the file open and in a text editor (treating HTML as text) b) Create a file in Unix with the desired name e.g. "newLaunchpad.html"; Edit it using vi e.g. touch newLaunchpad.html; vi newLaunchpad.html (in vi) :set noai (In mac TextEdit:) select all and copy whole text (Back in vi:) a [append], (in Textedit: paste V) (in vi) , :w [save (the unix file)] OVERALL APPROACH I probably find editing HTML easier in Unix. And organising backups of versions is easier there too. MAIN AIM OF THE EDIT I'M DOING NOW (APRIL 2024) Idea is to have small links at top of launchpad to both Unix and local Mac desktop versions of launchpad. And to do this for at least two different launchpads: launchpad1 (main one) and launchpad2 (small one that is a bit of fun). Also, to redesign the top lines of my launchpad, to put the links I most often want and use there. STRATEGY FOR DOING AN EDIT of LAUNCHPAD * Get browser window open with Launchpad version from the "LP-unix" bookmark; * Goto Unix, and to the directory (3) [cdpl] .../pickup/launch/ * Edit launchpad.html there in Unix; testing by refreshing browser view of it * Save in various places ESP. in OneDrive at the very top level as files, not in a Onedrive folder. The files "launchpad.html" in dirs (1) and (3) are hardlinked to each other: editing one, edits the other in effect. The one in (dir. 2) is not. So the overall strategy for doing a major edit of Launchpad is: [ 0) Check that the file in (dir. 2) is the version you want to start from.] 1) Edit the one in (dir. 2) (possibly backing up as you go); 1b) but looking at it to see the effect of the edits in the browser using dir(2) "pickup" and clicking /refreshing on file "launchpad.html" there. 2) Only when you want to publish / adopt it, should you copy the new version on to the version in (1) or (3). 3) And do cmd "bak launchpad.html" if you haven't already. 4) Possibly but seldom you might manually prune the number of .bak versions you have (and move = rename files so they re-form into a numerical order with no gaps). 5) Then pick up the new version in the browser and Save-As the version on to the Mac Desktop (in both iMac and laptop). 6) Finally do the backups both manually in Unix and to OneDrive at the top level. ======================= OLD DOC. ======================= PROC IN UNIX (mainly): [First: get browser open on "LP-unix"] (* chdir to ~/public_html/pickup [csh alias: "cdp"]) * chdir /home/steve/public_html/pickup/launch ["cdpl"] * vi launchpad.html * Test it by repeated clicking in browser on "LP-unix" * bak launchpad.html * In Unix still, bak launchpad.html * Do "Save Page as ..." [html only] --> launchpad.html file on iMac desktop. Move/copy that to normal place(s) on desktop. * Save by dragging that into OneDrive (at its root / top level) -------------------------------------------------------- ALT. PROC (less good) * Edit using TextEdit on iMac desktop copy of Launchpad.html * Do "Save Page as ... [html only] --> an .html file on desktop. * Save by dragging that into OneDrive (root / top level) ALT. PROC 2 (less good) * Edit using TextEdit on iMac desktop copy of Launchpad.html * Then go to proc in Unix: open files as directed, but once created new version of a kind, delete its whole contents and paste in from TextEdit of the version on iMac desktop. BASIC POSSIBLE ACTIONS Moving (copies of) files: E.g. From Unix pickup into a browser == "pickup --> browser" Pickup --> Browser open browser on https://steve.psy.gla.ac.uk/pickup/q.html open browser on https://steve.psy.gla.ac.uk/pickup/launch/launchpad.html Browser --> desktop (Mac) In browser, save page-as Desktop (Mac) --> OneDrive Drag desktop file into OneDrive window (currently for me, Chrome window) Desktop --> Unix On Mac, open app TextEdit; open file "Launchpad.html" In Unix touch (e.g.) "newLaunchpad.html" vi "newLaunchpad.html"; set noai In TextEdit: select all and copy whole text Back in vi: a [append], paste V, , save (the unix file).