May 112017
 

Part 2 of installing Solus Linux on a 2012 Macbook Pro.

Part 1- simply booting the liveCD to even allow installation is here:
https://stephen.yearl.us/installing-solus-linux-on-a-macbook-pro-9

Rebooting after install lead to, you guessed it, the Black Screen of Death again. Solus was installed, accepting all defaults (and therefore one humongous / paritiion), to /dev/sdb2, /dev/sda1 is the EFI partition on which rEFInd was installed when running OSX MacOS.

❯ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdb      8:16   0   477G  0 disk
├─sdb2   8:18   0 473.2G  0 part /
└─sdb1   8:17   0   3.7G  0 part [SWAP]
sdc      8:32   1   3.9G  0 disk
sda      8:0    0 465.8G  0 disk
├─sda2   8:2    0   465G  0 part
├─sda3   8:3    0 619.9M  0 part
└─sda1   8:1    0   200M  0 part

#1 boot back into MacOS, mount EFI paritition:

sudo /Users/yearluk/Downloads/refind-bin-0.10.7/mountesp
❯  cd /Volumes/ESP/loader/entries
nano Solus-lts-4.9.22-17.conf

#2 CHANGE:

title Solus 2017.04.18.0
linux /EFI/com.solus-project/kernel-com.solus-project.lts.4.9.22-17
initrd /EFI/com.solus-project/initrd-com.solus-project.lts.4.9.22-17
options root=PARTUUID=c96bc351-b364-4c61-9fe6-8489f0ceec8f quiet ro splash resume=UUID=8f7d1509-fe95-4e47-8017-41611ad0a14c

TO:

title Solus 2017.04.18.0
linux /EFI/com.solus-project/kernel-com.solus-project.lts.4.9.22-17
initrd /EFI/com.solus-project/initrd-com.solus-project.lts.4.9.22-17
options root=PARTUUID=c96bc351-b364-4c61-9fe6-8489f0ceec8f ro nomodeset nouveau.blacklist=1  resume=UUID=8f7d1509-fe95-4e47-8017-41611ad0a14c text 3

#3 Repeat steps #3 through #8 from Part 1 (#7 this time wasmodprobe nvidia)

#4 update entire system

sudo eopkg up

#5 using the Apple bootloader [hold opt key whilst booting] to boot… boots graphically now.

May 082017
 

I’ve been sunning* Solus as guest in a Parallels virtual machine on a macOS Sierra 10.12.4 host for a couple of months now, and I am delighted and impressed, so impressed I bought the company** wanted to install this on Apple iron. Solus installed beautifully on an 2010 Lenovo X201 and on a new and cheap and plastically Dell Inspiron 14-3452, so it should have no probs installing on a mid-2012, 15.4″ Hi-Res MBP. Right? Right? Wrong!

[*] s/sunning/running/ but gonna let that stand because, as typos go, this is pretty funny
[**] Showing my age… thanks Victor Kiam!

So, minus the bits where I was as angry frustrated as a guy who met a stranger in the Alps [may not be SFW. Depends where you work.]:

————————–
EDIT: 2017-05-11
#001 Disable SIP (System Integrity Protection)
Reboot, holding CMD+R

❯ csrutil disable

Reboot

❯ csrutil status
System Integrity Protection status: disabled.

————————–

#01 Grab the 2017-04-18 ISO torrent from https://solus-project.com/download/
#02 Burn to a 16GB shiny-new USB thumdrive using etcher.
#03 Press opt (alt) key at boot, select the livecd image

and, Mr. Franklin, it balked. Black Screen of Death. If you do the googles this usually has something to do with graphics *and stuff*. Which, for me, means:

❯ system_profiler SPDisplaysDataType | grep -i chipset
      Chipset Model: Intel HD Graphics 4000
      Chipset Model: NVIDIA GeForce GT 650M

Boot at runlevel 3, wired connection and all that. Run the usual dmesg | less,journalctl | less,linux-driver-management status, modprobeand the googles. Poke and prod and pull hair, and finally…

—————

#1 Press opt (alt) key at boot, select the livecd image
#2 Immediately press ‘e’ and edit the kernel command line parameters (boot options), replacing “quiet splash” with “nomodeset nouveau.blacklist=1 3”. Full KMS now reads:

initrd root=live:CDLABEL=SolusLiveBudgie ro rd.luks=0 rd.md=0 nomodeset nouveau.blacklist=1 text 3

#3 Login prompt. User is “live”, there is no password
#4 Become root, password is “root”
#5 Unload nouveau (open source NVIDIA drivers)

# modprobe -r nouveau

#6 get more drivers from the Solus repository

# eopkg it nvidia-glx drivers

#7 load Intel (integrated) graphics

# modprobe i915

#8 Boot graphically

# /sbin/init 5

#9 Install and…
#10 sell as lakefront property
#11 PROFIT!

Apr 172017
 

Playing with Solus recently got me to thinking that maybe I could live again in a Linux world, but rather than running Linux in a Virtual Machine (that would currently be Parallels 12 for me), what if I dit it the other way around? That is, run OS X 10.12.4 (macOS Sierra) as a guest and Linux as a host…

Download MacOS Sierra from AppStore.

Reboot.

❯ hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
❯ hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
❯ hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
❯ asr restore -source /Volumes/install_app/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/
cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/BaseSystem.chunklist
cp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/BaseSystem.dmg
❯ hdiutil detach /Volumes/install_app
❯ hdiutil detach /Volumes/OS\ X\ Base\ System/
❯ hdiutil convert /tmp/Sierra.cdr.dmg -format UDTO -o /tmp/Sierra.iso
mv /tmp/Sierra.iso.cdr ~/Desktop/Sierra.iso

I grabbed this off the internets somewhere, and I do not know whence. Thanks to the original author, whoever she he may be.
EDIT [2017-05-08]: Found you: https://gist.github.com/arobb/447a962af4f07ef81e79987d686275e5

Mar 192017
 

# Disable “Eject” in keyboard settings. It is the first entry under “Sound and Media”
# create a file, ~/.Xmodmap, adding the line:

keycode 151 = BackSpace

# run

xmodmap ~/.Xmodmap

# add that to wherever your startup scripts are for persistence

The keycode mappings I got from xev, kind of like “keyboard viewer” in OS X. Its available in the Solus repo:

sudo eopkg install xev
Mar 112017
 

Still playing with Solus OS, and liking it more and more. The eopkg repository of software is a little thin in comparison to the likes of Debian-based apt-get and Arch’s AUR, but most of the things I want are there. And if they are not there I am thinking maybe I should review my needs… I am in the process of planning for a life without OS X/MacOS after all, so a prefect time for reflection. This is also part of the reason I am attracted to Solus… because not everything is there, and because not everything is answered by a quick google search, I have to take some effort to actually find things out again. Some nostalgia there.

 

Cloudage

Librevault is… “transfers data directly from one device to another. You can use it in your local network, and it will work even without Internet access.” So not exactly cloud storage. In fact not even close to that. So why do I think I need it? I don’t. But I wont know until I try. Chances are I can get away with continuing with Dropbox, but since I am working on a major change of OS I might as well kinda think about previous tools and workflows and so on. Anyway there is no librevault in the Solus repository. Compiling time!

Not to flog a dead horse, but what follows is what worked for me, soup to nuts. Playing with librevault will have to wait a few days, cause the weather is awesome and I’ve a potato patch to dig out of raw sod up the orchard, Besides rclone and Google drive are working for what I need *at the moment*… and all that is, is, primarily, syncing files from the MacOS partition to the Solus partition. Google drive will have to go though when the time is right.

$ sudo eopkg it -c system.devel
$ sudo eopkg it cryptopp-devel libboost-devel libicu-devel openssl-devel protobuf-devel
$ sudo eopkg it qca-qt5 qt5-base-devel qt5-svg-devel qt5-tools-devel qt5-websockets-devel

$ mkdir ~/usr/src
$ cd ~/usr/src
$ git clone https://github.com/Librevault/librevault.git
$ cd librevault && git submodule update --init
$ mkdir build && cd build
# $ cmake .. && cmake --build .
$ cmake --pthread .. && cmake --pthread --build .
$ sudo make install

DICE!
Install the project…
— Install configuration: “RelWithDebInfo”
— Installing: /usr/local/bin/librevault-daemon
— Installing: /usr/local/bin/librevault-gui
— Installing: /usr/local/share/applications/Librevault.desktop
— Installing: /usr/local/share/icons/hicolor/scalable/apps/librevault.svg
— Installing: /usr/local/bin/librevault-cli

Now, do I go to the trouble of packaging this? Other’s who better know what they are doing in this area will prolly get it done soon enough, but why not give it a shot, eh? If I am going to be living with Solus I might as well get to know her a little better.

Mar 072017
 

tl;dr

I feel that after ten years I can no longer countenance the purchase of a new Apple laptop should my existing machine shit the bed. All that nonsense associated with the race to thinness and the resultant lack of expandability of the newer machines, where everything is soldered or glued into place, has me pretty upset. Oh, and the OS itself has been getting more annoying with each release since Snow Leopard. So I am planning for a day without OS X/ MacOS. After a few distro trials (ongoing) I’ve come down to:

Linux Mint 18.1

Solus OS

True OS

 With the thinking that Solus will be “The One”.

Problem: iPhone 5, iOS: 10.2.1 (14D27) will not mount under Solus OS.

iPhones, generally, used to mount fine prior to the iOS 10 release. The developers of

libimobiledevice

have rectified this, but many down stream distos have not quite caught up. Solution is to build oneself. Or wait. I didn’t want to wait…. in large part because Solus’s packaging system eopkg is completely rewritten and not based on AUR or apt-get I wanted to get to poke around it some more.

My hand-compiling of this is probably moot since Solus, being a rolling release, will eventually catch up. It probably will have by the time any reads this.

$ sudo eopkg it -c system.devel git
$ sudo eopkg it -c libtool pkg-config python-devel ibplist-devel libusb-devel fuse-devel

$ mkdir -p ~/usr/src
$ cd ~/usr/src

$ for x in libusbmuxd usbmuxd  ifuse; do git clone https://github.com/libimobiledevice/${x}.git;done

$ cd ~/usr/src/libusbmuxd
$ ./autogen.sh --prefix="$HOME/usr"
$ make && make install

$ cd ~/usr/src/libimobiledevice
$ ./autogen.sh --prefix="$HOME/usr"
$ make && make install

$ cd ~/usr/src/usbmuxd
$ ./autogen.sh --prefix="$HOME/usr"
$ make && sudo make install

$ cd ~/usr/src/ifuse
$ ./autogen.sh --prefix="$HOME/usr"
$ make && make install

$ mkdir -p ~/usr/mnt
$ ~idevice_id -l
$ ~/usr/bin/idevicepair pair

$ nautilus &
$ ls $ ls ~/usr/mnt/

All the real work was done by someone else (isn’t it always?), here: https://gist.github.com/samrocketman/70 … 33c259a0fc

Mar 012017
 

Having used the most excellent Hurricane Electric for the longest time I decided to relocate. In so doing I realised that I was moving from a PHP 5.2 to a PHP 7.1 environment. Gulp! Has it been that long. Expecting lots o’ issues, but amazingly no. Just the tiniest of tiny issues:

PHP Warning:  preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/wp-content/plugins/codecolorer/codecolorer-core.php on line 50

So, comment out:

  function BeforeHighlightCodeBlock($content) {
    $content = preg_replace('#(\s*)\[cc([^\s\]_]*(?:_[^\s\]]*)?)([^\]]*)\](.*?)\[/cc\2\](\s*)#sie', '$this->PerformHighlightCodeBlock(\'\\4\', \'\\3\', $content, \'\\2\', \'\\1\', \'\\5\');', $content);
    $content = preg_replace('#(\s*)\<code(.*?)\>(.*?)\</code\>(\s*)#sie', '$this->PerformHighlightCodeBlock(\'\\3\', \'\\2\', $content, \'\', \'\\1\', \'\\4\');', $content);
    return $content;
  }

adding

  function BeforeHighlightCodeBlock($content) {
    $content = preg_replace_callback('#(\s*)\[cc([^\s\]_]*(?:_[^\s\]]*)?)([^\]]*)\](.*?)\[/cc\2\](\s*)#si', function($matches){
      return $this->PerformHighlightCodeBlock($matches[4], $matches[3], $matches[2], $matches[1], $matches[5]);
    }, $content);
    $content = preg_replace_callback('#(\s*)\<code(.*?)\>(.*?)\</code\>(\s*)#si', function($matches){
      return $this->PerformHighlightCodeBlock($matches[3], $matches[2], '', $matches[1], $matches[4]);
    }, $content);
    return $content;
  }
May 232016
 

Not entirely sure how I managed to hose my user directory, but I did, and it followed a boot into safe mode (reboot and SHIFT) in order to update an ancient MacPorts installation; homebrew sort of replaced that for my usage. OK, no biggie. I have back ups right? I do, but those back up in recent months have been based on Apple’s Time Machine. I changed to this from Carbon Copy Cloner by means of experiment. CCC has been bullet-proof, and I have always used it for family members, but there was something enticing about the seeming simplicity of Time Machine… something that is great for restoring files, but not so great, it turns out, for a full system restore. Suffice to say that a combination of backup solutions really is the way to go.

There’s no point in documenting the failures of Time Machine to restore my system “as was”, better to say that from a hosed user directory (specifically something with ~/Applications and ~/Library), and after several attempts to restore:

Boot into guest user account and copy busted ~ dir to an external spinning platter hd.

Get new drive from Amazon of the UK; not the best price, but next day delivery, and that is pretty important right now. The Old Crucial MX100 500 GB drive may or may not be fsked, but It has gone through A LOT of write cycles over the past two years, and I could do with an additional drive in case of future failures anyway, so not pissing about, got the Samsung Evo 850, 500GB, and a few dongles. Very happy with the purchases, actually.

sammy-850-evo

sammy-850-evo and accessories

New, clean OS X 10.11.5 install

Hey… it’s an opportunity to clear out years of crud… old compilers, settings weird dot files all sorts of “system shit” that’s accumulated over the past 12 freaking years, and more than a couple of Macs, and to throw out apps that haven’t been used in Lord knows how long. It’s a bit of a PITA, but I think less so, perhaps, than dealing with all the quirks of years of accumulated cruft.

———
With the Sammy external, CMD+R boot into recovery mode, and select install new OS on the Sammy. OS X check the validity of the current system on disk and then goes and downloads El Cap. in this case. About 4 hours. Boot from the external drive. Create new admin user, log into iCloud with AppleID, then install:
## Apps
* Dropbox
* 1password
* HMA
* Firefox
Lord only knows what add ons and such I had installed. I guess these will come back to me on an as-needed basis
¡¡¡ Carbon Copy Cloner !!!
Alfred 2 because this is the way my fingers now work. And somewhat amazingly, and old post of mine proves to be surprisingly useful, and that is sort of the purpose of this blog thingamajig.  http://stephen.yearl.us/alfred-2-workflows/
* Flycut
* homebrew
brew install git (and zsh, imagemagick, lame, openssl, lua, tokyo-cabinet, urlview, npm)
brew cask install macvim
brew cask install mactex
brew install dnscrypt –with-plugins
— MUCH MUCH MORE AS AND WHEN REQUIRED

TexStudio
Skim PDF Reader

AppCleaner
Grand Perspective
Transmission

Textmate,
bundles and packages to come later
nvAlt
Sublime Text 3
IA Writer

Skype
WhatsApp
VLC
Screenflow 5
Handbrake
Pixelmator
Boom 2

Parallels
add VMs later… win 10, win 95 (yeah, really!), PC-BSD

Karabiner
Hammerspoon
Maid — a gem — deal with gems later!

## “Files”
* copy over ~/.zshrc, ~/Documents, ~/Music (Launch iTunes… all good), ~/Pictures (launch Photos… all good)
And now a working system that sort of is mine, but is not. Much tweaking remains.

Parallels VMs (Win 98, Win 10, Ubuntu Gnome) — didn’t back these up. Oh well. Never really used them much anyway.

=====
To do:

Source Tree
Newer git tools? The whole git issue is going to be interesting when I get to look at that.
Mathematica 9 — lost the license key?

Fonts — Cousine, Nitti, Yale?, Ancient Greek, Office Code Pro…Computer Modern…??
color profiles
NTFS drivers and shit
Bit torrent Sync ?
Mega ?
Cloud app ?
Google drive?
Rubies and management
Rails, pythons etc.
npm, node js etc
macports? Quite possibly the thing that got me into this mess, but then again this is a fresh install

Fluid app — protonmail, gmail, dict.cc, keybr

Adobe — EEK!!

Apr 252016
 
Monty Borle Brook

2016-04-25 Monday

Another walk through Well Meadow, along the eastern bank of the Severn, late this morning. All pretty standard stuff. Monty’s leash walking is getting better. Did come across a male black lab– off leash, of course– who came over to invade his space again. Monts did kick off a little, as the other dog refused to be called back to his owner.

More apologies from the other dog owner. Wondering if Monts feels more constrained/threatened by being on a leash when the others are not? Tricky thing there is, how can I trust him off leash if he does not show complete awesomeness off it? Maybe try a long trailing thing?

More baseball cricket action in the yard late afternoon as I attached some wire stock fencing to the main gate. It was rather an unintentional game, for I had left the Montster in the house, back door shut. And that sort of reminded me that yesterday, on the way back from cricket, I swore that I had closed an internal door. Apparently the dawg opens lever -handled doors.

And he eats green olives. Smart fellow.
First week here: http://stephen.yearl.us/rescue-doggie-diary

 

2016-04-26 Tuesday (wrote Mr. Kipling)

So the fella is still following me around the house, from room to room. Not pushy, and hasn’t gotten in the way yet, even in the darkness of night. He has taken himself into the bedroom a couple of times, but this is never really for very long.

Monts behaved somewhat beautifully when meeting a couple of cats… and he had some free run chasing sticks in a public place. Admittedly there was no one around, and I could see a good distance if anyone were to come into our world, but still. Gotta start the trust somewhere.

Montry free on Well Meadow

Monty free on Well Meadow

 

2016-04-27 Wednesday

No structured walk today, just fetch-the-ball in the garden.

And early-evening the dog that has too many names [0] just went run about again. Irony of all Ironies when I was adding more stock fence to the gateway out front. So I took to driving around the village all slow and shit looking in people’s gardens, and at kids and dog walkers looking for signs of distress.

Next up on Highley Facebook Page will be “watch out for paedo in blue car!” ☺

I did spot him up by the old telephone exchange, and he did come back and jump in the car when I opened the door and called. That’s good. But still. GRRRR! Assdog has no road sense at all. I don’t mind him going out by himself. He just needs to let me know where’s he’s going, who he will be with, and what time he will be back. Otherwise he is GROUNDED!

[0] Montgomery, Montesquieu, Monty, Monts, Monticello, Montessori, Montreal, the Montster

 

2016-04-28 Thursday

So he has the idea that balls and sticks are to be fetched and brought back; balls are dropped for a human to re-throw, sticks are for holding on to, and playing tug. Dropping something on command is not something that he is used to, but I’m sure we can use his doing so with a ball to advantage there. No concept of “leave it” either. I go to pick up a non-ball, and he’s on it. Again using the ball knowledge as a base, I think there is something definite there from which to work.

Lots of anal licking… some anti-worm medicine ordered.

 

2016-04-29 Friday

Met a couple of doggies off leash down by the Donkey Bridge, and all went where there. Encountered the same dogs on another loop, and again no issue. No hackles at all second time around as Montster was sort on involved in trying to understand “drop” (stick), “leave it”, and “pick up”. This with one of the dogs– some kind of rough haired terrier– somewhat in his face.

Monts walking again excellently at heel, coming back when called (but not yet tested under stress), and fetching stick on a trailing lead. All good stuff!

Walk through Bridgnorth High Street…. no probs with other dogs, yelling kids out of school, and people eating pasties and chips and shit. Bit of shopping in TFM, and again sitting nicely. Stopping and sitting at road crossings, all good.

 

2016-05-30/31 Saturday/Sunday

Brook walks, but for the most part just hangin’ in the garden cutting grass and getting fence posts in place. Lots of fetch and recall. Being cautious and locking the back door when I am not paying attention to him– since he can open the door. Git! Grabbed a 1/2Kg of cheddar off the counter on Sunday. Grrr. Cheese banditry will not be tolerated 🙂

Apr 242016
 

IA Writer to WordPress

0. Wha?

With the coming of the new doggie into the house, perhaps I will again add more content to the bloggy thing that I have kinda sorta not really been keeping over the last little while.

Probably this has been done by someone else on the Intertubz, but ach, why not. I have some time on my hands, so here are running notes in IA Writer that will make its way to a WordPress post by some means or other. There’s nothing special about IA writer, by the way. Well, there is, but not for the purposes of the WordPress posting. The same code should work with any plain-ish text file coming from any editor.

Why bother? Well, I think that the primary reason a lot of my notes have not made it to the blog is that it is just such a PITA to go out of my way to make a blog posting. If it all just sorta “works” from my usual workflows than that would perhaps be a very different situation. Not that I think I have anything particularly interesting or unique to say

1. This file

Is written in markdown, with metadata at the head:


Title: IA Writer to Wordpress  
Author: yearlus  
Email: [email protected]  
Date: 2016-04-26  
Format: complete  
post_status: draft  
post_date: 2016-04-26
post_title: IA Writer to Wordpress  
category: tech  
post_tag: text, editors, Ruby, code, Wordpress, workflow  


# [%Title]

2. Markdown processors

Four Ruby processors for playing with markdown are briefly alluded to here: markdown-processing-ruby

And I went ahead and played with two of these:

Redcarpet


$ gem install redcarpet -n /usr/local/bin

Kramdown


$ gem install kramdown -n /usr/local/bin

But neither of these processors support (yet!) the metadata blocks of MultiMarkdown. And kramdown does not recognise the back-tick code-fence (“` “`), only the tilda code-fence (~~~ ~~~)

So, install Fletcher Penney’s MultiMarkdown, and test:


$ brew install multimarkdown
$ multimarkdown ~/_scratch/IA-Writer-to-WP-Coleman-Notes.txt &gt; ~/_scratch/IA-Writer-to-WP-Coleman-Notes.html

Gives some very nice HTML, including interpolation of the metadata (of this file), and writing of that metadata:


<head>
    <meta charset="utf-8"/>
    <title>IA Writer to Wordpress</title>
    <meta name="author" content="yearlus"/>
    <meta name="email" content="[email protected]"/>
    <meta name="date" content="2016-04-26"/>
    <meta name="format" content="complete"/>
    <meta name="post_status" content="draft"/>
    <meta name="post_date" content="2016-04-26"/>
    <meta name="post_title" content="IA Writer to Wordpress"/>
    <meta name="category" content="tech"/>
    <meta name="post_tag" content="text, editors, Ruby, code, Wordpress, workflow"/>
</head>

So the process for this exercise seems clear:
1. “~~shell out” to markdown and produce an html file~~
2. process that html with nokogiri
3. post to WordPress

No need to shell out, apparently. tillsc has already built a Ruby extension library around MultiMarkdown, Ruby MultiMarkdown 4, so
I guess the awkward bit would be how best to execute the ruby script that pulls all this together… from a services menu item, maybe? And then how to deal with edits… something in the metadata at the head of the file? A call to getPost call to XML RPC to see if an existing post “matching” (on what criterion?) that about to be posted exists? But what to check on? Is the old post deleted? I suppose when one starts thinking about these things then one might just as well produce an actual interface to WordPress, but why bother when there are so many such things anyway?

Maybe I will look into that… but I am reasonably happy with the fact that this post came from iA Writer, and without too much trouble either. Next up? A horror-show of a MultiMarkdown file in iA Writer to to see how much gets translated into a decent-ish looking post.

3. Code

Posting to WordPress is pretty straightforward. All the heavy lifting is done by the rubypress gem, which makes this sort of thing doggone simple (see what I did there!). Here a block of code from that thing I wrote a while ago that scraped a Koine Greek “Word of the Day” from Ἡ Καινὴ Διαθήκη. Last post here


# ========== Post to Wordpress ==========
if options[:wordpress_write] == 'yes'
  wp = Rubypress::Client.new(
    host:      "#{config['wp']['host']}",
    username:  "#{config['wp']['username']}",
    password:  "#{config['wp']['password']}",
    path:      "#{config['wp']['path']}")

  wp.newPost(
    blog_id:    '0',
    content:    {
      post_status:   'draft',
      post_date:     Time.now,
      post_title:    "#{html_title}",
      terms_names:  {
        post_tag:     ['greek', 'koine', 'κοινή', 'language'],
        category:     ['Greek']
      },
      post_content:  "#{wp_content}"
    }
  )
end
# ========== END WP Post ==========

 


posted with wpiawriter v. 0.1

Social Widgets powered by AB-WebLog.com.