190 lines
7.9 KiB
HTML
190 lines
7.9 KiB
HTML
<!DOCTYPE html>
|
|
<html prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article# " lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Command-Line blog posts | duckland.org news</title>
|
|
<link href="../assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
|
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="../rss.xml">
|
|
<link rel="canonical" href="http://www.duckland.org/posts/200805command-line-blog-posts.html">
|
|
<!--[if lt IE 9]><script src="../assets/js/html5.js"></script><![endif]--><meta name="author" content="Don Harper">
|
|
<link rel="prev" href="200804dvtm-dynamic-virtual-terminal-manager.html" title="dvtm - dynamic virtual terminal manager" type="text/html">
|
|
<link rel="next" href="200808so-you-need-a-calendar.html" title="So you need a calendar?" type="text/html">
|
|
<meta property="og:site_name" content="duckland.org news">
|
|
<meta property="og:title" content="Command-Line blog posts">
|
|
<meta property="og:url" content="http://www.duckland.org/posts/200805command-line-blog-posts.html">
|
|
<meta property="og:description" content="Command-Line blog posts
|
|
|
|
So, it only seems fitting that I should talk about a command-line interface to posting on this blog. No, I do not mean using links or the like, but a way to post from the com">
|
|
<meta property="og:type" content="article">
|
|
<meta property="article:published_time" content="2008-05-07T18:05:00-05:00">
|
|
<meta property="article:tag" content="blogging">
|
|
<meta property="article:tag" content="cli">
|
|
<meta property="article:tag" content="linux">
|
|
<meta property="article:tag" content="software">
|
|
</head>
|
|
<body>
|
|
<a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
|
|
|
|
<!-- Menubar -->
|
|
|
|
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"><div class="container">
|
|
<!-- This keeps the margins nice -->
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
<a class="navbar-brand" href="http://www.duckland.org/">
|
|
|
|
<span id="blog-title">duckland.org news</span>
|
|
</a>
|
|
</div>
|
|
<!-- /.navbar-header -->
|
|
<div class="collapse navbar-collapse navbar-ex1-collapse">
|
|
<ul class="nav navbar-nav">
|
|
<li>
|
|
<a href="../index.html">Home</a>
|
|
</li>
|
|
<li>
|
|
<a href="../stories/about.html">About me</a>
|
|
</li>
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">My Sites<b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
<li>
|
|
<a href="http://www.donaldharper.com">My Photo Blog</a>
|
|
</li>
|
|
<li>
|
|
<a href="http://p365.donaldharper.com">My Attempt at a Project 365</a>
|
|
</li>
|
|
<li>
|
|
<a href="http://www.duckland.org">My Personal and Tech Blog</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Social Sites<b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
<li>
|
|
<a href="https://twitter.com/duckunix">My Twitter</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://plus.google.com/+DonHarper/">My Google+</a>
|
|
</li>
|
|
<li>
|
|
<a href="http://www.linkedin.com/in/donaldharper/">My LinkedIN</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<a href="../archive.html">Archive</a>
|
|
</li>
|
|
<li>
|
|
<a href="../categories/index.html">Tags</a>
|
|
</li>
|
|
<li>
|
|
<a href="../rss.xml">RSS</a>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
<ul class="nav navbar-nav navbar-right"></ul>
|
|
</div>
|
|
<!-- /.navbar-collapse -->
|
|
</div>
|
|
<!-- /.container -->
|
|
</nav><!-- End of Menubar --><div class="container" id="content">
|
|
<div class="body-content">
|
|
<!--Body content-->
|
|
<div class="row">
|
|
|
|
|
|
<article class="post-text h-entry hentry postpage" itemscope="itemscope" itemtype="http://schema.org/Article"><header><h1 class="p-name entry-title" itemprop="headline name"><a href="#" class="u-url">Command-Line blog posts</a></h1>
|
|
|
|
<div class="metadata">
|
|
<p class="byline author vcard"><span class="byline-name fn">Don Harper</span></p>
|
|
<p class="dateline"><a href="#" rel="bookmark"><time class="published dt-published" datetime="2008-05-07T18:05:00-05:00" itemprop="datePublished" title="2008-05-07">2008-05-07</time></a></p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</header><div class="e-content entry-content" itemprop="articleBody text">
|
|
<h1>Command-Line blog posts</h1>
|
|
|
|
<p>So, it only seems fitting that I should talk about a command-line interface to posting on this blog. No, I do not mean using <a href="http://links.twibright.com"> links</a> or the like, but a way to post from the command line.</p>
|
|
|
|
<p>So, this post is being typed up in <a href="http://www.vim.org">vim</a> on my <a href="http://www.fedoraproject.org">Fedora 8</a> laptop. I will use this great little tool I found called <em>wppost</em> to post. <em>wwpost</em> is part of the <a href="http://www.perl.org">perl</a> module <a href="http://search.cpan.org/~leocharre/WordPress-Post-1.04">WordPress::Post</a>.</p>
|
|
|
|
<p>A brief summary of its commands are bellow:</p>
|
|
|
|
<pre><code> -c category, can be a list separated by commas, no spaces
|
|
-t title
|
|
-i description, main body of post, if it has a slash, it is interpreted as a file to slurp
|
|
like a text or html file
|
|
-D iso formatted date for post, can be left out
|
|
-T if there are image attachments, place them as thumbnails only, with link, not just resized
|
|
</code></pre>
|
|
|
|
<p>Some usage examples taken from the man page:</p>
|
|
|
|
<pre><code> Most basic of usage, (provided you have a ~/.wppost file)
|
|
|
|
wppost -t 'hi everyone' -i 'i just wanted to say hello'
|
|
|
|
If you want to specify two different categories:
|
|
|
|
wppost -t 'Another Apple' -i 'Apples are really great. I do love them so.' -c food,rant -D 20071231
|
|
|
|
If the body of the post is in a file
|
|
|
|
wppost -t 'title here' -i ./content.txt
|
|
|
|
If the content of the post is in a file and you want to use the file
|
|
name as the title
|
|
|
|
wppost -i ./Title_Here.txt
|
|
|
|
If you want to have file attachments:
|
|
|
|
wppost -t 'recent photos' -i 'these are recent pictures i took' ./*jpg
|
|
</code></pre>
|
|
|
|
<p>Pretty cool, huh? <img alt=":)" src="http://www.duckland.org/wp-includes/images/smilies/icon_smile.gif"></p>
|
|
|
|
<p>Peace out!</p>
|
|
</div>
|
|
<aside class="postpromonav"><nav><ul itemprop="keywords" class="tags">
|
|
<li><a class="tag p-category" href="../categories/blogging.html" rel="tag">blogging</a></li>
|
|
<li><a class="tag p-category" href="../categories/cli.html" rel="tag">cli</a></li>
|
|
<li><a class="tag p-category" href="../categories/linux.html" rel="tag">linux</a></li>
|
|
<li><a class="tag p-category" href="../categories/software.html" rel="tag">software</a></li>
|
|
</ul>
|
|
<ul class="pager">
|
|
<li class="previous">
|
|
<a href="200804dvtm-dynamic-virtual-terminal-manager.html" rel="prev" title="dvtm - dynamic virtual terminal manager">Previous post</a>
|
|
</li>
|
|
<li class="next">
|
|
<a href="200808so-you-need-a-calendar.html" rel="next" title="So you need a calendar?">Next post</a>
|
|
</li>
|
|
</ul></nav></aside></article>
|
|
</div>
|
|
<!--End of body content-->
|
|
|
|
<footer>
|
|
Contents © 2015 <a href="mailto:duck@duckland.org">Don Harper</a> - Powered by <a href="http://getnikola.com" rel="nofollow">Nikola</a>
|
|
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script src="../assets/js/all-nocdn.js"></script><script>jQuery("a.image-reference").colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script><!-- fancy dates --><script>
|
|
moment.locale("");
|
|
fancydates(1, "YYYY-MM-DD");
|
|
</script><!-- end fancy dates -->
|
|
</body>
|
|
</html>
|