#dev 2018-10-05

2018-10-05 UTC
#
tantek__
what is MarsEdit
#
Loqi
MarsEdit is a Mac desktop app for blogging, specifically supporting posting to your WordPress blog https://indieweb.org/MarsEdit
#
tantek__
[manton]: is there a public issue tracker for MarsEdit? our wiki page is very short (just the dfn)
#
tantek__
(or other public place to make feature requests)
[schmarty] joined the channel
#
[manton]
Nothing public. I'm pretty familiar with MarsEdit and can probably fill in some more details on that page.
#
tantek__
thank manton that would be great. even a few "How to" sentences for feature requests, bug reports etc.
#
tantek__
And if you know of a history of asking for indieweb standards support like Micropub, good to document that too
[jgmac1106] joined the channel
#
[manton]
I added some more to that page. Mostly from memory and could certainly be expanded with more IndieWeb-related details.
[tantek] joined the channel
#
GWG
Who posts photo metadata when they post a photo?
#
GWG
I'm looking for ideas to redo presentations
#
GWG
I just redid data storage
renem joined the channel
#
@jgmac1106
↩️ Though I showed the webmention badging prototype to my VP and CIO and he was like, “Wait we can send badges from our domain, using  just HTML files?” and was amazed. Simple is complex and complexity masks failed attempts at simple too often. (http://jgregorymcverry.com/7705-2/)
(twitter.com/_/status/1048030850019938305)
Kongaloosh and [tantek] joined the channel
#
[tantek]
So true
#
@jgmac1106
Wow! What great memories. Somehow I get a webmention from Google+ on a three year old post. It was  launch of #Walkmyworld 2015. We had kids from Australia to Austin blogging. Emerged from @NCTE poetry project about Robert Hass. http://jgregorymcverry.com/walkmyworld-2015-connect-before-content/ (http://jgregorymcverry.com/7713-2/)
(twitter.com/_/status/1048054240550313984)
wagle, petermolnar, [tantek], tantek__, cweiske, angelo2, [Vincent], gRegorLove, [Vanessa] and [jgmac1106] joined the channel
#
[jgmac1106]
I know how to build a form and know how to have the data post to a server, but how can I trigger the creation of a new html file from a form? That is today's learning goal
#
cweiske
a script on a server needs to create that file
#
cweiske
browser --[POST]--> server -> script -> creates file
#
[jgmac1106]
makes sense, thx
#
cweiske
what scripting language do you use?
#
[jgmac1106]
I was just going to use javascript and JQuery
#
cweiske
javascript running on the server?
#
[jgmac1106]
oooh server side, I havent decided yet. Want to make something easier for others to use
#
[jgmac1106]
probably just PHP
#
[jgmac1106]
or Python, but I know more PHP
#
cweiske
<?php file_put_contents('/path/to/file', 'content'); ?>
#
cweiske
<?php file_put_contents('/path/to/file', $_POST['content']); ?>
#
cweiske
<?php file_put_contents('/path/to/' . $_POST['filename'], $_POST['content']); ?>
#
cweiske
note that the last one is insecure, because I could set "/../../../../etc/passwd" as filename
#
[jgmac1106]
cweiske++
#
Loqi
cweiske has 22 karma in this channel over the last year (30 in all channels)
#
[jgmac1106]
yeah I don't even really want to store the data, just want to be able to generate the html files for the webmention badging app I am working on
#
[jgmac1106]
alas I have to take kids to school today, cutting into my morning hack time
#
@jgmac1106
@toolness @iamjessklein  working on browser –@POST–> server -> script -> creates file for webmention badges this weekend. need to strip away JSON-LD and get down to just the badge builder.  https://github.com/jgmac1106/badgemaker-prototype (http://jgregorymcverry.com/7721-2/)
(twitter.com/_/status/1048164881655111680)
#
@jgmac1106
maybe it is best to start with https://indieweb.org/Webmention-developer#Libraries and build out…..still think I will start with just getting the file output with the microformats I want, connect the badge builder, and then worry about sending/receiving (http://jgregorymcverry.com/7723-2/)
(twitter.com/_/status/1048173099513008129)
#
jeremycherfas
I have a PHP script on my local server that writes stuff to my Known instance. I would quite like to automate it as a cron job. Current problem is that when I call the file from the terminal it fails to find a file it needs to read. When I call it from the browser, it finds that file. So, do I need to provide an absolute URL for the file to read?
#
cweiske
what's the file name?
#
jeremycherfas
The one I need to read? RSSCache.txt
#
jeremycherfas
It lives in the same directory as reading-2-known.php which is the one I run from the terminal
KartikPrabhu joined the channel
#
cweiske
where do you run the script from?
#
cweiske
do you "cd /path/to/my/script" and then "php reading-2-known.php"?
[TimApple] joined the channel
#
jeremycherfas
I assume the PHP knows where it is and looks in its directory for the file. Do I need to CD into that directory first?
[jgmac1106] and [schmarty] joined the channel
#
GWG
Anyone convert ID3 tags to MF2?
#
[schmarty]
GWG: /Screech does, but i no longer really use that feature.
#
GWG
I want to convert length in the mp3 file to duration.
#
[schmarty]
GWG: screech grabs that and sends it in the micropub creation request for the post. my backend stores it and i use it to render the RSS feed.
#
[schmarty]
but i don't use it in my rendered mf2 in the page
#
GWG
I am going down the media rabbit hole
#
GWG
I want to display media with some metadata
#
[jgmac1106]
gwg look at tthe podcasting plugin I use, it pulls that data
#
[jgmac1106]
nothing wrong with mvp, pick one feature and push, add more later
#
cweiske
jeremycherfas, if you only open "RSSCache.txt", then php tries to resolve the path based on the current working directory
#
cweiske
which is the path you are currently on in your shell
#
GWG
WordPress parses audio and video tags, but doesn't save them
#
cweiske
s/on/at/
#
GWG
So, I need to
#
cweiske
so you either fopen(__DIR__ . 'RSSCache.txt') to provide a full path to the file, solving all current working directory problems
#
cweiske
or cd in your shell to the correct directory
#
cweiske
and the run "php working-index.php"
#
jeremycherfas
I'm not sure where I was in the shell. I just tried for the first time. I need to go back and read about direrctories in PHP.
#
jeremycherfas
I thought it would be easy to just run the PHP with cron. But maybe it is actually easier to make another script that includes the CD and that then runs the PHP, and let that be the script that Cron runs.
#
Zegnat
It is actually easier to do what cweiske showed and make your paths start with the __DIR__ constant.
#
Zegnat
PHP always sets that constant equal to the directory the current file is in.
#
jeremycherfas
OK. I'll try that first.
#
jeremycherfas
Thanks both.
[Rose] joined the channel
#
Zegnat
The reason it checks files relative to the current working directory in your terminal is to make it easier to write cli tools.
#
Zegnat
Well. One of the reasons. But that's an easy one to conceptualise.
#
[Rose]
I use __DIR__ too, and dirname() as well.
[tantek] joined the channel
#
jeremycherfas
Arggh. DIR does not include the trailing slash.
#
Zegnat
Haha, it does not. And looks like cweiske forgot it in his example too
#
Zegnat
Let me apologise on behalf of every PHP programmer that has gone before you 😉
#
tantek
GWG, I was very happy to get at least a minor step towards a more undo-able posting UX done Wednesday night - a 10 min delay for when items show up in my Atom feed
#
tantek
(continued from #indieweb)
#
Zegnat
Is that Atom feed only or h-feed as well, tantek?
#
GWG
I saw that, tantek
#
tantek
Zegnat: currently Atom feed only.
#
GWG
Did it have the desired effect though?
#
tantek
I'm hoping to work with h-feed consumers to properly support WebSub and WebSub updates
#
tantek
GWG it did! It worked (tested it during HWC SF)
#
tantek
and now I feel like I have more time to fix-up a post if I make any typos before people with classic feed readers see it and cache it
#
Zegnat
I think I might be subscribed to your h-feed as an atom feed, through granary. So my classic feed reader is going to see stuff before being undone depending on polling, hmm
#
jeremycherfas
Thanks zegnat, on behalf of every PHP programmer that will come after me.
#
jeremycherfas
In other news, it works. From Terminal. Not made it to Cron yet because I need to test further. And the code is now very crufty.
[jgmac1106] joined the channel
#
Zegnat
jeremycherfas++ Sounds like a victory to me
#
Loqi
jeremycherfas has 10 karma in this channel over the last year (22 in all channels)
#
jeremycherfas
A tactical one, maybe.
#
dougbeal
GWG: camera stats on mouseover would be awesome for images that have it
#
dougbeal
What is EXIF
#
Loqi
Exif is the Exchangeable Image File Format, the most common format to embed image metadata into images https://indieweb.org/EXIF
#
[jgmac1106]
how does flickr handle metadata of photos?
#
dougbeal
jgmac1106: trying to go back far enough to find a direct upload... the instagram uploads are... strange
#
dougbeal
jgmac1106: looks like a pretty limited display... unless smugmug migration is the cause
#
[jgmac1106]
no every photo has exif data unless people putting that in themeselves
#
sknebel
flickr shows the camera model and some basic details if available, + an option to show all the data (or at least a large set of it, they might hide some by default)
#
aaronpk
I think the old design used to show more at first but they've trimmed it down a little
#
sknebel
I think they've had this display for a long time, but I might be misremembering: https://www.flickr.com/photos/22020982@N05/39446898795/
#
sknebel
camera, lens, basic settings, click for more
#
aaronpk
Welp the mobile app doesn't show any of it
[schmarty] joined the channel
#
aaronpk
Wait they do, just not on all photos
#
sknebel
if they don't have that data, there's only the "view exif" link on desktop too
[daniel], [manton], [Rose] and KartikPrabhu joined the channel
#
dougbeal
sknebel: Im getting things like "Camera ID - 8632
#
dougbeal
Camera Type - Digital SLR"
#
sknebel
dougbeal: where?
[jgmac1106], [Vincent], [eddie] and calumryan joined the channel
#
[schmarty]
[tantek]: i just ported my shorturl generation (2 sets of newbase60 dates) to Hugo templates (which have no real loops to speak of and no easy way to bring in external Go libs) and I feel like a haxx0r 😂
#
[schmarty]
(err, one 3-digit newbase60 date, one 3-digit newbase60 seconds-in-day)
#
[jgmac1106]
@schmary just realized if I want to put all these parts on Glitch I should probably build a node app coorect?
#
[jgmac1106]
[schmarty], sorry
#
[schmarty]
[jgmac1106] depends what you mean by parts, but as far as i understand glitch.com runs javascript serverside via node, yep.
#
[schmarty]
back in a while. flying to atlanta.
#
[jgmac1106]
right now just building the forms and the outputs
#
[jgmac1106]
was gonna start with PHP but might use their starter pack for others
#
[jgmac1106]
...and there are a ton of express apps
[tantek] joined the channel
#
[tantek]
Schmarty wow! Awesome!!!
#
[tantek]
Zegnat why not subscribe directly to my Atom feed?
#
[schmarty]
[tantek] it's part of my "stop talking about it and port the site to Hugo" push to get my build times down below ~1-2 minutes. :}
[AkyRhO], [TimApple], [chrisaldrich], [daniel], tantek__, snarfed and [tantek] joined the channel
#
[tantek]
Well that’s a good Undo time window too :)
swentel joined the channel
#
sknebel
dougbeal: ah. I *think* that's flickr internal code for the camera model, not EXIF
#
dougbeal
sknebel: possibly, but it puts it under Show EXIF button
#
sknebel
yeah, but I remember looking into that at some point and the IDs didn't match any external documentation I could find
#
dougbeal
I will capture some display examples from desktop
#
sknebel
and it's not exactly uncommon to call all image metadata EXIF
[tmiller] joined the channel
#
[jgmac1106]
got to here on the webmention badging app which wasn't too far...https://github.com/jgmac1106/badgemaker-prototype just trying to get the template output files made first
#
Loqi
[jgmac1106] badgemaker-prototype: Prototype for an SVG-based badge maker.
#
[jgmac1106]
going back to read student blogs for awhile before redefining variables and writing functions
#
GWG
petermolnar, what extra exif parameters did you add to WordPress? I vaguely remember you working on that
[schmarty], KartikPrabhu, [eddie], [cleverdevil], [jgmac1106], [tmiller] and [Rose] joined the channel
#
@ottonomy
↩️ If I show how this can be done and still be a valid Open Badge would you consider that 25% extra effort on the creation side may be worth it to make it portable/verifiable? Maybe one extra data property with a string value that is created by the generator? https://github.com/ottonomy/webmention-badges/blob/master/examplebadge.html#L10
(twitter.com/_/status/1048303845267238912)
[grantcodes] joined the channel
#
[grantcodes]
If I have a post that has a created date and a published date and I want the permalink to include the date what is the opinion on the date I should use?
#
gRegorLove
I would lean towards published, especially if it's not publicly available before then in a stream or feed.
#
gRegorLove
I do similarly with event posts. the dt-start is used in the permalink, but it has an earlier dt-published
#
gRegorLove
May be more on /url_design
#
[grantcodes]
Oh the irony of the article about bad url design being a 404 now
#
[grantcodes]
The article is still there. Just doesn't work with a trailing slash
#
[grantcodes]
So I also updated it
#
[grantcodes]
But still no thoughts on created vs published date there.
#
gRegorLove
Time to add our own :)
#
gRegorLove
What are your thoughts?
#
aaronpk
i don’t really display created date anywhere, but I use published date and the event date for the URL
#
gRegorLove
WordPress uses the published date field, regardless of back- or forward-dating
tantek__ and [Rose] joined the channel
#
[grantcodes]
Not sure what I think really yet.
#
[grantcodes]
The only place I currently use it intentionally is for photo posts where the photo could have been taken ages ago but not published for a long time
#
GWG
Gregorlove, WordPress has date and date modified. I've backdated posts
#
gRegorLove
Right. the slug in archives is the published date.
#
GWG
Which can be set earlier
#
gRegorLove
We're agreeing :)
#
GWG
Good
#
[grantcodes]
Ha wow that's from a while back
#
GWG
I may have misunderstood
#
GWG
grantcodes, get the reference?
#
[grantcodes]
I saw rolling stone I think it was has some stuff in there they had backdated from magazines before the internet existied
#
[grantcodes]
GWG: Yep. And I thought 1999 was quite a while ago 😛
#
GWG
Check out the oldest post on my site
#
@rubygems
jekyll-webmention_io (3.3.0): This Gem includes a suite of tools for managing webmentions in Jekyll: * Tags *… https://rubygems.org/gems/jekyll-webmention_io
(twitter.com/_/status/1048322249491668992)
strugee and chrisaldrich joined the channel