{"id":1527,"date":"2019-05-09T12:52:50","date_gmt":"2019-05-09T16:52:50","guid":{"rendered":"http:\/\/www.jsylvest.com\/blog\/?p=1527"},"modified":"2019-11-26T07:10:33","modified_gmt":"2019-11-26T12:10:33","slug":"gifcrop-sh","status":"publish","type":"post","link":"https:\/\/www.jsylvest.com\/blog\/2019\/05\/gifcrop-sh\/","title":{"rendered":"gifcrop.sh"},"content":{"rendered":"\r\n<p>Recently I had to crop a lot of animated gifs down for a project. <a href=\"http:\/\/stackoverflow.com\/questions\/14036765\/how-do-i-crop-an-animated-gif-using-imagemagick\">This isn't hard to do with ImageMagick<\/a>\u2026<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">$ convert in.gif -coalesce -repage 0x0 -crop WxH+X+y +repage out.gif<\/pre>\r\n\r\n\r\n\r\n<p>\u2026but it does require some repetitive typing and mental arithmetic and rather mysterious incantations if you don't grok what all the coalescing and repaging is about. (I don't.) So I put together this <code>bash<\/code> script to handle that for me. Didn't Paul Graham say that if your coding is repetitive then the problem isn't your project, it's that <em>you're doing it wrong<\/em>? Specifically you're operating at the wrong level of abstraction.<\/p>\r\n\r\n\r\n\r\n<p>Because I found myself repetitively wrangling these ImageMagick commands into shape, I decided it was time to sidestep that problem and make a script to do the drudgery for me. Plus this way I can get things like the aspect ratio before and after the changes computed for me.<\/p>\r\n\r\n\r\n\r\n<pre class=\"code\"><span style=\"color: #838183; font-style: italic;\">#!\/bin\/bash<\/span>\r\n\r\n<span style=\"color: #000000; font-weight: bold;\">if<\/span> <span style=\"color: #000000;\">[<\/span> <span style=\"color: #0057ae;\">-z<\/span> <span style=\"color: #bf0303;\">\"<\/span><span style=\"color: #0057ae;\">$1<\/span><span style=\"color: #bf0303;\">\"<\/span> <span style=\"color: #000000;\">];<\/span> <span style=\"color: #000000; font-weight: bold;\">then<\/span> \r\n  <span style=\"color: #0057ae;\">echo<\/span> <span style=\"color: #bf0303;\">\"usage: gifcrop.sh infile.gif left right [top] [bottom] [suffix]\"<\/span>\r\n  <span style=\"color: #0057ae;\">exit<\/span>\r\n<span style=\"color: #000000; font-weight: bold;\">fi<\/span>\r\n\r\n<span style=\"color: #0057ae;\">echo -e<\/span> <span style=\"color: #bf0303;\">\"  opening<\/span> <span style=\"color: #ff00ff;\">\\t<\/span> <span style=\"color: #0057ae;\">${1}<\/span><span style=\"color: #bf0303;\">\"<\/span> <span style=\"color: #b07e00;\">1<\/span><span style=\"color: #000000;\">&gt;&amp;<\/span><span style=\"color: #b07e00;\">2<\/span>\r\n\r\n<span style=\"color: #838183; font-style: italic;\"># There are several ways to extract the name of the file that comes before<\/span>\r\n<span style=\"color: #838183; font-style: italic;\"># '.gif' so we can rename it with a suffix:<\/span>\r\n<span style=\"color: #838183; font-style: italic;\"># BASE=${1%.gif}<\/span>\r\nBASE<span style=\"color: #000000;\">=<\/span>$<span style=\"color: #000000;\">(<\/span><span style=\"color: #000000; font-weight: bold;\">basename<\/span> <span style=\"color: #010181;\">${1}<\/span> .gif<span style=\"color: #000000;\">)<\/span>\r\n<span style=\"color: #838183; font-style: italic;\">#BASE=$(echo ${1} | sed 's\/<span class='MathJax_Preview'><img data-recalc-dims=\"1\" src=\"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/plugins\/latex\/cache\/tex_4fd4a56c435d5c26b3c3c366f51b074e.gif?w=960&#038;ssl=1\" style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script>.gif\/\\1\/')<\/span>\r\n\r\n<span style=\"color: #838183; font-style: italic;\"># Set the margins to be cropped off (Left, Right, Top, Bottom):<\/span>\r\nL<span style=\"color: #000000;\">=<\/span><span style=\"color: #010181;\">$2<\/span>\r\nR<span style=\"color: #000000;\">=<\/span><span style=\"color: #010181;\">$3<\/span>\r\nT<span style=\"color: #000000;\">=<\/span><span style=\"color: #010181;\">${4:-0}<\/span> <span style=\"color: #838183; font-style: italic;\">#use argv[4] (or 0, if argv[4] is undef or empty)<\/span>\r\nB<span style=\"color: #000000;\">=<\/span><span style=\"color: #010181;\">${5:-0}<\/span> <span style=\"color: #838183; font-style: italic;\">#use argv[5] (or 0, if argv[5] is undef or empty)<\/span>\r\n\r\nSUFFIX<span style=\"color: #000000;\">=<\/span><span style=\"color: #010181;\">${6:-crop}<\/span> <span style=\"color: #838183; font-style: italic;\">#use argv[6] (or \"crop\", if argv[6] is undef or empty)<\/span>\r\n\r\n<span style=\"color: #838183; font-style: italic;\"># Get the original size of the image<\/span>\r\nW0<span style=\"color: #000000;\">=<\/span>$<span style=\"color: #000000;\">(<\/span>identify <span style=\"color: #010181;\">${1}<\/span> | <span style=\"color: #000000; font-weight: bold;\">head<\/span> <span style=\"color: #0057ae;\">-1<\/span> | <span style=\"color: #000000; font-weight: bold;\">awk<\/span> <span style=\"color: #bf0303;\">'{print<\/span> <span style=\"color: #0057ae;\">$3<\/span><span style=\"color: #bf0303;\">}'<\/span> | cut <span style=\"color: #0057ae;\">-d<\/span> <span style=\"color: #bf0303;\">'x'<\/span> <span style=\"color: #0057ae;\">-f<\/span> <span style=\"color: #b07e00;\">1<\/span><span style=\"color: #000000;\">)<\/span>\r\nH0<span style=\"color: #000000;\">=<\/span>$<span style=\"color: #000000;\">(<\/span>identify <span style=\"color: #010181;\">${1}<\/span> | <span style=\"color: #000000; font-weight: bold;\">head<\/span> <span style=\"color: #0057ae;\">-1<\/span> | <span style=\"color: #000000; font-weight: bold;\">awk<\/span> <span style=\"color: #bf0303;\">'{print<\/span> <span style=\"color: #0057ae;\">$3<\/span><span style=\"color: #bf0303;\">}'<\/span> | cut <span style=\"color: #0057ae;\">-d<\/span> <span style=\"color: #bf0303;\">'x'<\/span> <span style=\"color: #0057ae;\">-f<\/span> <span style=\"color: #b07e00;\">2<\/span><span style=\"color: #000000;\">)<\/span>\r\n\r\naspectOld<span style=\"color: #000000;\">=<\/span>$<span style=\"color: #000000;\">(<\/span><span style=\"color: #0057ae;\">printf<\/span> <span style=\"color: #bf0303;\">\"%4.3f\"<\/span> $<span style=\"color: #000000;\">(<\/span><span style=\"color: #0057ae;\">echo<\/span> <span style=\"color: #010181;\">$W0<\/span><span style=\"color: #000000;\">\/<\/span><span style=\"color: #010181;\">$H0<\/span> | <span style=\"color: #000000; font-weight: bold;\">bc<\/span> <span style=\"color: #0057ae;\">-l<\/span><span style=\"color: #000000;\">))<\/span>\r\n<span style=\"color: #0057ae;\">echo -e<\/span> <span style=\"color: #bf0303;\">\"  current size<\/span> <span style=\"color: #ff00ff;\">\\t<\/span> <span style=\"color: #0057ae;\">${W0}<\/span><span style=\"color: #bf0303;\">x<\/span><span style=\"color: #0057ae;\">${H0}<\/span><span style=\"color: #ff00ff;\">\\t<\/span><span style=\"color: #bf0303;\">(<\/span><span style=\"color: #0057ae;\">$aspectOld<\/span><span style=\"color: #bf0303;\">)\"<\/span> <span style=\"color: #b07e00;\">1<\/span><span style=\"color: #000000;\">&gt;&amp;<\/span><span style=\"color: #b07e00;\">2<\/span>\r\n\r\n<span style=\"color: #838183; font-style: italic;\"># Calculate the new size of the image<\/span>\r\n<span style=\"color: #0057ae;\">let<\/span> <span style=\"color: #bf0303;\">\"W1 =<\/span> <span style=\"color: #0057ae;\">$W0<\/span> <span style=\"color: #bf0303;\">- (<\/span><span style=\"color: #0057ae;\">$L<\/span> <span style=\"color: #bf0303;\">+<\/span> <span style=\"color: #0057ae;\">$R<\/span><span style=\"color: #bf0303;\">)\"<\/span>\r\n<span style=\"color: #0057ae;\">let<\/span> <span style=\"color: #bf0303;\">\"H1 =<\/span> <span style=\"color: #0057ae;\">$H0<\/span> <span style=\"color: #bf0303;\">- (<\/span><span style=\"color: #0057ae;\">$T<\/span> <span style=\"color: #bf0303;\">+<\/span> <span style=\"color: #0057ae;\">$B<\/span><span style=\"color: #bf0303;\">)\"<\/span>\r\naspectNew<span style=\"color: #000000;\">=<\/span>$<span style=\"color: #000000;\">(<\/span><span style=\"color: #0057ae;\">printf<\/span> <span style=\"color: #bf0303;\">\"%4.3f\"<\/span> $<span style=\"color: #000000;\">(<\/span><span style=\"color: #0057ae;\">echo<\/span> <span style=\"color: #010181;\">$W1<\/span><span style=\"color: #000000;\">\/<\/span><span style=\"color: #010181;\">$H1<\/span> | <span style=\"color: #000000; font-weight: bold;\">bc<\/span> <span style=\"color: #0057ae;\">-l<\/span><span style=\"color: #000000;\">))<\/span>\r\n<span style=\"color: #0057ae;\">echo -e<\/span> <span style=\"color: #bf0303;\">\"  new size<\/span> <span style=\"color: #ff00ff;\">\\t<\/span> <span style=\"color: #0057ae;\">${W1}<\/span><span style=\"color: #bf0303;\">x<\/span><span style=\"color: #0057ae;\">${H1}<\/span><span style=\"color: #ff00ff;\">\\t<\/span><span style=\"color: #bf0303;\">(<\/span><span style=\"color: #0057ae;\">$aspectNew<\/span><span style=\"color: #bf0303;\">)\"<\/span> <span style=\"color: #b07e00;\">1<\/span><span style=\"color: #000000;\">&gt;&amp;<\/span><span style=\"color: #b07e00;\">2<\/span>\r\n\r\nNEWNAME<span style=\"color: #000000;\">=<\/span><span style=\"color: #010181;\">${BASE}${SUFFIX}<\/span>.gif\r\n<span style=\"color: #0057ae;\">echo -e<\/span> <span style=\"color: #bf0303;\">\"  saving to<\/span> <span style=\"color: #ff00ff;\">\\t<\/span> <span style=\"color: #0057ae;\">${NEWNAME}<\/span><span style=\"color: #bf0303;\">\"<\/span> <span style=\"color: #b07e00;\">1<\/span><span style=\"color: #000000;\">&gt;&amp;<\/span><span style=\"color: #b07e00;\">2<\/span>\r\n\r\nconvert <span style=\"color: #010181;\">${1}<\/span> <span style=\"color: #0057ae;\">-coalesce -repage<\/span> <span style=\"color: #b07e00;\">0x0<\/span> <span style=\"color: #0057ae;\">-crop<\/span> <span style=\"color: #010181;\">${W1}<\/span>x<span style=\"color: #010181;\">${H1}<\/span><span style=\"color: #000000;\">+<\/span><span style=\"color: #010181;\">${L}<\/span><span style=\"color: #000000;\">+<\/span><span style=\"color: #010181;\">${T}<\/span> <span style=\"color: #000000;\">+<\/span>repage <span style=\"color: #010181;\">${NEWNAME}<\/span><\/pre>\r\n\r\n\r\n\r\n<p>Simply save this as something like <code>gifcrop.sh<\/code>, and then run it like so:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">$ gifcrop.sh coolpic.gif 10 20 30 40 _small<\/pre>\r\n\r\n\r\n\r\n<p>That will take 10 pixels off the left, 20 off the right, 30 from the top and 40 from the bottom. The result gets saved as <code>coolpic_small.gif<\/code>. The new version is saved as a second file with a suffixed name instead of over-writing because I found that I had to iterate many times to get the correct dimensions, so I wanted both new and original versions available for comparison.<\/p>\r\n\r\n\r\n\r\n<p>The final three arguments are optional, since most of the time I found myself adjusting the width but leaving the height alone, and I never encountered a situation in which I needed an alternative suffix besides \"crop\". So these two commands are identical:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">$ gifcrop.sh in.gif 10 20 0 0 crop<br \/>$ gifcrop.sh in.gif 10 20<\/pre>\r\n\r\n\r\n\r\n<p>This all depends on the format of the results that ImageMagick gives you from the <code>identify<\/code> command, which is used to get the current size of the input image. You may need to adjust these two lines:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">W0=$(identify ${1} | head -1 | awk '{print $3}' | cut -d 'x' -f 1)<br \/>H0=$(identify ${1} | head -1 | awk '{print $3}' | cut -d 'x' -f 2)<\/pre>\r\n\r\n\r\n\r\n<p>On my machine, <code>identify foo.gif | head -1<\/code> gives me this output:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">foo.gif[0] GIF 250x286 250x286+0+0 8-bit sRGB 128c 492KB 0.000u 0:00.030<\/pre>\r\n\r\n\r\n\r\n<p>The <code>awk<\/code> command isolates the <code>250x286<\/code> part, and the <code>cut<\/code> command pulls out the two dimensions from that.<\/p>\r\n\r\n\r\n\r\n<p>I should probably put in <code>--quiet<\/code> or <code>--verbose<\/code> options to suppress the output, but honestly I like seeing it as an error\/sanity check and adding more optional args would put me in a place where I should really re-write this to take in key\/value pairs instead of positionals. As an alternative to a <code>--quiet<\/code> option, you can just pipe the output of <code>stderr<\/code> to <code>\/dev\/null<\/code> to make it go away if it really bothers you, e.g.:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">gifcrop.sh foo.gif 100 100 2&gt; \/dev\/null<\/pre>\r\n\r\n\r\n<hr class=\"wp-block-separator is-style-default\" \/>\r\n\r\n\r\n<p>I suppose I can't have a blog post about animated gifs without including at least one animated gif. So here's the most recent use I've had for gifcrop.sh, editing a gif of the \"<a href=\"https:\/\/www.autodeskresearch.com\/publications\/samestats\">Datasaurus Dozen<\/a>\" for use in the Data Science class I'm teaching.<\/p>\r\n\r\n\r\n\r\n<div class=\"wp-block-image\">\r\n<figure class=\"aligncenter is-resized\"><a href=\"http:\/\/www.jsylvest.com\/blog\/?attachment_id=1542\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-1542\" src=\"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2019\/05\/DataSaurus_Dozen.gif?resize=670%2C269\" alt=\"Datasaurus Dozen\" width=\"670\" height=\"269\" \/><\/a>\r\n<figcaption>Original gif of twelve very different datasets, all with equivalent summary statistics.<\/figcaption>\r\n<\/figure>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-image\">\r\n<figure class=\"aligncenter is-resized\"><a href=\"http:\/\/www.jsylvest.com\/blog\/?attachment_id=1543\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-1543\" src=\"https:\/\/i0.wp.com\/www.jsylvest.com\/blog\/wp-content\/uploads\/2019\/05\/DataSaurus_Dozencrop.gif?resize=394%2C269\" alt=\"Datasaurus Dozen, cropped.\" width=\"394\" height=\"269\" \/><\/a>\r\n<figcaption>The same scatter plots, but with the statistics cropped out so as not to ruin the punchline in class.<\/figcaption>\r\n<\/figure>\r\n<\/div>\r\n","protected":false},"excerpt":{"rendered":"<p>Recently I had to crop a lot of animated gifs down for a project. This isn't hard to do with ImageMagick\u2026 $ convert in.gif -coalesce -repage 0x0 -crop WxH+X+y +repage out.gif \u2026but it does require some repetitive typing and mental &hellip; <a href=\"https:\/\/www.jsylvest.com\/blog\/2019\/05\/gifcrop-sh\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"gifcrop.sh: A simple script for cropping animated gifs","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[10],"tags":[49],"class_list":["post-1527","post","type-post","status-publish","format-standard","hentry","category-cs","tag-bash","wpautop"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3sddF-oD","jetpack-related-posts":[{"id":885,"url":"https:\/\/www.jsylvest.com\/blog\/2014\/01\/latitude-longitude-distance\/","url_meta":{"origin":1527,"position":0},"title":"Latitude-Longitude Distance","author":"jsylvest","date":"20 January 2014","format":false,"excerpt":"Updated: I noticed a floating point error when using this that I discuss correcting at the end of this post. I thought I would post some of the bite-sized coding pieces I've done recently. To lead off, here's\u00a0Ruby function to find the distance between two points given their latitude and\u2026","rel":"","context":"In &quot;CS \/ Science \/ Tech \/ Coding&quot;","block_context":{"text":"CS \/ Science \/ Tech \/ Coding","link":"https:\/\/www.jsylvest.com\/blog\/category\/cs\/"},"img":{"alt_text":"Protip: You can win every exchange just by being one level more precise than whoever talked last. Eventually, you'll defeat all conversational opponents and stand alone.","src":"https:\/\/i1.wp.com\/imgs.xkcd.com\/comics\/actually.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":328,"url":"https:\/\/www.jsylvest.com\/blog\/2013\/05\/command-line-history\/","url_meta":{"origin":1527,"position":1},"title":"Command line history","author":"jsylvest","date":"12 May 2013","format":false,"excerpt":"Jude Robinson :: The single most useful thing in bash Create ~\/.inputrc and fill it with this: \"\\e[A\": history-search-backward \"\\e[B\": history-search-forward set show-all-if-ambiguous on set completion-ignore-case on This allows you to search through your history using the up and down arrows \u2026 i.e. type cd \/ and press the up\u2026","rel":"","context":"In &quot;CS \/ Science \/ Tech \/ Coding&quot;","block_context":{"text":"CS \/ Science \/ Tech \/ Coding","link":"https:\/\/www.jsylvest.com\/blog\/category\/cs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":226,"url":"https:\/\/www.jsylvest.com\/blog\/2013\/04\/ruby\/","url_meta":{"origin":1527,"position":2},"title":"Ruby","author":"jsylvest","date":"25 April 2013","format":false,"excerpt":"Coding Horror :: Jeff Atwood :: Why Ruby? I've always been a little intrigued by Ruby, mostly because of the absolutely gushing praise Steve Yegge had for the language way back in 2006. I've never forgotten this. For the most part, Ruby took Perl's string processing and Unix integration as-is,\u2026","rel":"","context":"In &quot;CS \/ Science \/ Tech \/ Coding&quot;","block_context":{"text":"CS \/ Science \/ Tech \/ Coding","link":"https:\/\/www.jsylvest.com\/blog\/category\/cs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":95,"url":"https:\/\/www.jsylvest.com\/blog\/2013\/02\/remembering-armen-alchian\/","url_meta":{"origin":1527,"position":3},"title":"Armen Alchian &#038; Unnecessary Mathematical Fireworks","author":"jsylvest","date":"27 February 2013","format":false,"excerpt":"Cato Daily Podcast :: Remembering Armen Alchian Don Boudreaux discussing Armen Alchian's preference for clear prose over \"mathematical pyrotechnics\" reminded me of a few neural networks researchers I know. I won't name names, because it wasn't a favorable comparison. There's far too much equation-based whizz-bangery going on in some papers.\u2026","rel":"","context":"In &quot;Business \/ Economics&quot;","block_context":{"text":"Business \/ Economics","link":"https:\/\/www.jsylvest.com\/blog\/category\/business-2\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1043,"url":"https:\/\/www.jsylvest.com\/blog\/2017\/04\/will-ai-steal-our-jobs\/","url_meta":{"origin":1527,"position":4},"title":"Will AI steal our jobs?","author":"jsylvest","date":"5 April 2017","format":false,"excerpt":"As an AI researcher, I think I am required to have an opinion about this. Here's what I have to say to the various tribes. AI-pessimists: please remember that the Luddites have been wrong about technology causing\u00a0economic cataclysm\u00a0every time so far. We're talking about several consecutive centuries of wrongness. ((I\u2026","rel":"","context":"In &quot;Business \/ Economics&quot;","block_context":{"text":"Business \/ Economics","link":"https:\/\/www.jsylvest.com\/blog\/category\/business-2\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":762,"url":"https:\/\/www.jsylvest.com\/blog\/2014\/03\/ousterhout-on-performance-improvements\/","url_meta":{"origin":1527,"position":5},"title":"Ousterhout on Performance Improvements","author":"jsylvest","date":"22 March 2014","format":"aside","excerpt":"The best performance improvement is the transition from the nonworking state to the working state. \u2014 John Ousterhout","rel":"","context":"In &quot;Art&quot;","block_context":{"text":"Art","link":"https:\/\/www.jsylvest.com\/blog\/category\/art\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/posts\/1527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/comments?post=1527"}],"version-history":[{"count":15,"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/posts\/1527\/revisions"}],"predecessor-version":[{"id":1668,"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/posts\/1527\/revisions\/1668"}],"wp:attachment":[{"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/media?parent=1527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/categories?post=1527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jsylvest.com\/blog\/wp-json\/wp\/v2\/tags?post=1527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}