Scriblogify:   Scribble Your Blogs
1 raco scriblogify:   Running Scriblogify
2 Scriblogify API
scriblogify
3 Scribble Utilities for Blog Posts
the-jump
blogsection
7.7

Scriblogify: Scribble Your Blogs

Ryan Culpepper <ryanc@racket-lang.org>

This package provides a raco subcommand for processing Scribble documents into a form suitable for uploading as blog posts. It can also be configured to do the uploading itself.

Development Development of this library is hosted by GitHub at the following project page:

https://github.com/rmculpepper/scriblogify

Copying This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License and GNU Lesser General Public License for more details.

1 raco scriblogify: Running Scriblogify

Scriblogify installs a raco subcommand so that it can be run using raco scriblogify. See Scriblogify API for how to run Scriblogify from Racket code.

Scriblogify can be used as a local document processor, or with a little configuration it can be used to automatically process and upload blog posts (including embedded images).

To use Scriblogify as a local document processor, just call raco scriblogify on the Scribble source of the document to process:

  raco scriblogify document.scrbl

The script compiles document.scrbl using Scribble and prints the processed HTML to standard output. You can try running it on this source file.

The following command-line options are relevant:

There are some restrictions on the Scribble documents:
  • a title must be present; it is used as the blog post title

  • an author must be present, but it is ignored

  • margin-notes should not be used

Scriblogify must be configured before it can automatically post blog entries for you. You can configure Scriblogify using the following command:

  raco scriblogify --setup

That command starts a local configuration servlet and opens a browser window with the servlet’s address. The servlet guides you through the process of granting Scriblogify access to your Blogger and (optionally) Picasa Web accounts; access is necessary for Scriblogify to upload posts on your behalf. Access to your Picasa Web account is necessary only if you want to post blog enries that have embedded (computed) images; you don’t need to grant Picasa Web access if your posts won’t have images or if you explicitly link to manually uploaded images.

Once you have created a profile using the setup servlet, you can process and upload your blog entries in one step:

  raco scriblogify -p profile document.scrbl

Scriblogify uploads posts in “draft” mode, so you’ll still have to log in and click “Publish” to make your post public.

The following additional command-line options are relevant:
  • -p profile or --profile profile: uploads using the Blogger and (optionally) Picasa Web account associated with profile

  • -f or --force: overwrite an existing blog post with the same title

Finally, you should update your blog with CSS styles for Scribble elements. This package includes a basic CSS file based on the default Scribble style files but with unnecessary styles removed.

(Hint: To upload custom CSS, start at your blog’s main page, then click the “Design” link at the top right, select the “Template” link on the left margin, click the “Customize” button, select “Advanced”, then scroll down to “Add CSS”. Add your CSS in the text box to the right, then click the “Apply to Blog” button.)

2 Scriblogify API

 (require scriblogify) package: scriblogify

procedure

(scriblogify file    
  [#:profile profile    
  #:link-to-pre? link-to-pre?    
  #:overwrite? overwrite?    
  #:verbose? verbose?    
  #:temp-dir temp-dir    
  #:docs-base-url docs-base-url])  void?
  file : string?
  profile : (or/c symbol? #f) = #f
  link-to-pre? : any/c = #f
  overwrite? : any/c = #f
  verbose? : any/c = #f
  temp-dir : (or/c path-string? #f) = #f
  docs-base-url : string?
   = 
(if link-to-pre?
    "http://pre.racket-lang.org/docs/html/"
    "http://docs.racket-lang.org/")
Same as raco scriblogify, described in raco scriblogify: Running Scriblogify.

3 Scribble Utilities for Blog Posts

The following utilities are intended for use within Scribble documents representing blog posts.

 (require scriblogify/scribble-util)
  package: scriblogify

procedure

(the-jump)  block?

Marks the “jump”—the boundary between the part of the post displayed in abbreviated contexts and the rest of the post.

procedure

(blogsection preflow ...+)  part-start?

  preflow : pre-content?
Like section, but not numbered.