Git Product home page Git Product logo

publify's Introduction

Publify

The Ruby on Rails publishing software formerly known as Typo

Build status Code Climate Reviewed by Hound

What's Publify?

Publify is a simple but full featured web publishing software. It's built around a blogging engine and a small message system connected to Twitter.

Publify follows the principles of the IndieWeb, which are self hosting your Web site, and Publish On your Own Site, Syndicate Everywhere.

Publify has been around since 2004 and is the oldest Ruby on Rails open source project alive.

Features

  • A classic multi user blogging engine
  • Short messages with a Twitter connection
  • Text filters (Markdown, SmartyPants, @mention to link, #hashtag to link)
  • A widgets system and a plugin API
  • Custom themes
  • Advanced SEO capabilities
  • Multilingual : Publify is (more or less) translated in English, French, German, Danish, Norwegian, Japanese, Hebrew, Simplified Chinese, Mexican Spanish, Italian, Lithuanian, Dutch, Polish, Romanian…

Demo site

You can give Publify a try at the demo site.

The demo is reset every hour.

Install

Download

You can download the latest Publify stable release.

If you want to run the master branch, you can clone the Publify repository. However, random things may be broken there at any time, so tread carefully!

Running the master branch in production is not recommended!

Install Publify locally

To install Publify you need the following:

  • CRuby (MRI) 2.5, 2.6 or 2.7
  • Ruby on Rails 5.2.x
  • A database engine, MySQL, PgSQL or SQLite3
  • A compatible JavaScript installation for asset compilation. See the execjs readme for details.
  • ImageMagick (used by mini_magick).
  1. Unzip Publify archive
  2. Rename database.yml.yourEngine as database.yml
  3. Edit database.yml to add your database name, login and password.
$ bundle install
$ rake db:setup
$ rake db:migrate
$ rake db:seed
$ rake assets:precompile
$ rails server

You can now launch you browser and access 127.0.0.1:3000.

Install Publify on a server

You can use your preferred installation method (e.g., Capistrano) to install Publify on a server. You will also need to set up the environment so it contains at least SECRET_KEY_BASE. Your web server may allow you to set this, or you can consider using a tool like dotenv.

Install Publify on Heroku

In order to install Publify on Heroku, you’ll need to do some minor tweaks.

First of all, you need to set up Amazon S3 storage to be able to upload files on your blog. Set Heroku config vars.

heroku config:set PROVIDER=AWS
heroku config:set AWS_ACCESS_KEY_ID=<your_aws_access_key_id>
heroku config:set AWS_SECRET_ACCESS_KEY=<your_aws_secret_access_key>
heroku config:set AWS_BUCKET=<your_aws_bucket_name>

Next, you need to update Gemfile. You should remove the mysql2 and sqlite3 gems, set the Ruby version, and add rails_12factor. The top of your Gemfile should look something like this:

source 'https://rubygems.org'

ruby '2.7.4' # Or whichever version you're running
gem 'pg'
gem 'rails_12factor'

gem 'rails', '~> 5.2.6'

Next, to regenerate the Gemfile.lock, run:

bundle install

Commit your updated Gemfile and Gemfile.lock:

git commit -am 'Update bundle for Heroku'

Create a file Procfile containing the following:

web: bundle exec puma -C config/puma.rb

Commit your new Procfile:

git add Procfile
git ci -m 'Tell Heroku how to run Rails'

You also need to set Rails' secret key base. Generate one using rake secret, then set the Heroku config var:

heroku config:set SECRET_KEY_BASE=<your_generated_secret>

Push the repository to Heroku.

When deploying for the first time, Heroku will automatically add a Database plugin to your instance and links it to the application. After the first deployment, don't forget to run the database migration and seed.

heroku run rake db:migrate db:seed

If application error has occurred after migration, you need to restart Heroku server.

heroku restart

Resources

Maintainers

Current Maintainers

Frédéric de Villamil blog: http://t37.net

Matijs van Zuijlen blog: http://www.matijs.net/blog/

Thomas Lecavelier blog: http://blog.ookook.fr/

Yannick François blog: http://elsif.fr

Previous Maintainers & Notable Contributors

Cyril Mougel blog: http://blog.shingara.fr

Davide D'Agostino blog: http://www.lipsiasoft.com

Piers Cawley blog: http://www.bofh.org.uk/

Scott Laird

Kevin Ballard blog: kevin.sb.org

Patrick Lenz

Seth Hall

And many more cool people who’ve one way or another contributed to Publify.

Original Author: Tobias Luetke blog: http://blog.leetsoft.com/

Enjoy, The Publify team

publify's People

Contributors

andyw8 avatar apsheronets avatar basmoura avatar dependabot-support avatar dependabot[bot] avatar e-tobi avatar emiddleton avatar emk avatar eostrom avatar fdevillamil avatar flameeyes avatar giniouxe avatar graaff avatar hernamvel avatar hmallett avatar kantena avatar kevin-genon avatar larstobi avatar mcary avatar mthmulders avatar mvz avatar ook avatar pdcawley avatar randomecho avatar shingara avatar skudo avatar stevenwilkin avatar szymon-jez avatar victorps avatar weijen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

publify's Issues

kaminari missing in 6.1.0

$ git checkout release_6_1_0
$ thin

Visit the site and get:
NoMethodError (undefined method page' for #<ActiveRecord::Relation:0x0000000321b0f8>): app/controllers/articles_controller.rb:27:inindex'

Adding 'gem "kaminari"' to the Gemfile fixes the problem. The gem is listed in later editions of the Gemfile but not in 6.1.0.

oEmbed integration

I would like to request a feature for next version, that could easily improve typo user experience: oEmbed integration. This integration can be done using ruby-oembed project (https://github.com/judofyr/ruby-oembed/) and the simple use case is the following:

John want's to post a youtube video on his blog.
In order to post a youtube video, john needs to get the video link url and paste the url in the post text.
When this post is displayed, it will show a youtube player instead of the video url (by using oembed).

This will work with many other websites like flickr, vimeo, etc.

Bug on user creation

Error appear on user's creation on a fresh install, this bug happen in last release too.

NoMethodError in Admin::UsersController#new

app/models/config_manager.rb:45:in block in add_setting_writer' app/models/user.rb:56:ininitialize'
app/controllers/admin/users_controller.rb:11:in new' app/controllers/admin/users_controller.rb:11:innew'

Articles rendered as password protected

I had my typo blog running on Heroku, after some views all my articles claimed to be password protected. I restarted the instances and they went back to their defined behavior of "public" posts. Unable to find anything in the logs and have no idea what caused it. So hopefully other people have ran into this as well and can give further details.

redirects menu item can't change to select statue

Admin page, left side menu. If you click "redirects" menu item, it can't be marked as active like other menu items.

I found the menu action is "/admin/redirects", but the final page is "/admin/redirects/new". This make the active adjustment failed.

ActionView::Template::Error (settings was supposed to be a Hash, but was a String)

I was creating a new article on adimn page. and then met this error, twice.

Completed 500 Internal Server Error in 25ms

ActionView::Template::Error (settings was supposed to be a Hash, but was a String):
17: <%= _("Published") %>

18: <%= _("Password:") %>

19: <%= get_post_types %>

20: <%= password_field :article, :password, :class => 'small' %>
21:


22:
23: <%= save( _("Publish") + " »") %>

app/models/config_manager.rb:32:in block in add_setting_reader' app/views/admin/content/_form.html.erb:20:in_app_views_admin_content__form_html_erb___830313344_96779760__873441234'
app/views/admin/shared/_edit.html.erb:4:in block in _app_views_admin_shared__edit_html_erb__111173687_96787210_874100232' app/views/admin/shared/_edit.html.erb:2:in_app_views_admin_shared__edit_html_erb__111173687_96787210_874100232'
app/views/admin/content/new.html.erb:3:in _app_views_admin_content_new_html_erb__1042887415_96817920_204045985' app/controllers/admin/content_controller.rb:186:innew_or_edit'
app/controllers/admin/content_controller.rb:36:in `edit'

bignum too big to convert into `long'

I was having a lot of issues with a previous install of Typo so I started completely fresh using sqlite3 instead of mysql. I switched back and forth between rails server for development and phusion passenger for production while getting it setup.

Not sure exactly when, but after I made some changes in development (articles, settings, etc) I restarted apache, tried to access /admin on production and an attempt to route me to this page occurred:

admin/settings/update_database

And in the log is this:

Started GET "/admin/settings/update_database" for 209.33.214.243 at 2011-10-28 13:20:02 -0400
  Processing by Admin::SettingsController#update_database as HTML
  Parameters: {"id"=>nil}
Completed 500 Internal Server Error in 13ms

RangeError (bignum too big to convert into `long'):
  app/controllers/admin/settings_controller.rb:39:in `[]'
  app/controllers/admin/settings_controller.rb:39:in `update_database'

I deleted the database and the cache then ran

rake db:create
rake db:migrate

And after entering my blog name and admin email on the initial setup I clicked on "continue to admin" and was immediately routed to admin/settings/update_database with the same error.

EDIT: The change is when I added a model and a migration.

Administrator cannot modified user settings as user password confirmation is required

I have enabled the user registration option, and the users can register in my blog. But if i logon as blog administrator, and i select a user profile, i cannot make changes to the user profiles, because (user) password confirmation is always required (or better the password confirmation does not match). The only way to make changes in user profiles, is to set a new password for the user - but i think think it's not so good. I'm using Typo edge version.

Simplify profiles/rights system

The typo profiles and rights system is complex and hard to understand. There are Profile models and Rights models. Profiles also have modules (a list of symbols). It seems modules are used (in the Typo login system plugin), but Rights are not. It is not clear to me why modules are a property of profiles, since it seems they cannot be edited. Here is my proposal:

  • Remove Rights model, since it is not used at all.
  • Specify modules for each kind of user (admin, publisher, contributor) in code, not in the Profile model.
  • If the Profile model was only used for specifying the modules, remove that too.

Gemfile in deployment environments

The Gemfile has a lot of conditions in it that cause serious problems in environments where the deployment environment uses a different database back end than the local development environment.

What happens is even though the Gemfile.lock is checked in and up-to-date when Gemfile is evaluated it comes up with new dependencies because of the conditions contained within checking for the database adapter and ruby version. As a result Rails is unable to load because Bundler flips its lid seeing the discrepancy between the checked in Gemfile.lock and the Gemfile.lock from evaluating Gemfile.

Use schema.rb to install Typo

Maintaining the migrations is a pain in the butt in the face of changes to Rails and improved insights in how they should be set up.

Also, the proces of using db:migrate to create a new Typo installation is fragile and slow.

I would like to figure out how we can move to using schema.rb and maybe clean up the existing migrations, or renumber them to use timestamps, and how we can move the seed data outside of the migrations.

Perhaps one option would be to only support upgrades from the previous major version. This means we need to keep the migrations from the previous major version to the current release, but we can wrap all older migrations up in one giant initial migration. New installations just use schema.rb with db:schema:load plus seed data.

Having schema.rb in the repository would also speed up Travis CI builds which I'm now experimenting with.

textfilter showed always as 'none', even if set before to markdown

Steps to reproduce:

  • add a article
  • change textfilter to markdown
  • save as draft
  • edit that article
    --> it will show 'none' as textfilter

Looking at the db showed that it's actually set to markdown.

  • if you now save the article in the edit view (either manually or by auto save), it sets the textfilter back to 'none' in the database as well.

Configuring Base_URL

I recently created a typo blog and am hosting it on Heroku. Everything was working fine except when I changed my DNS settings from heroku's default URL to a custom url www.myurl.com instead of herokuname.herokuapp.com, the base url of the sidebar links like the category pages updated to www.myurl.com but the article urls like "read full article" on the homepage remained "herokuname.herokuapp.com"

I looked in the code and saw that there was a value in the database in the blogs data called base_url and when I looked at it in the console I saw that it was herokuname.herokuapp.com so I changed it to www.myurl.com

That created a situation where the article url bases were now listed as www.myurl.com/www.myurl.com/

Then I set the base_url to an empty string, now the url bases looked correct (www.myurl.com) but when I clicked those links I would get an error. Upon inspecting the log file I saw they were 500 errors with no other info. So I changed the base_url back to herokuname.herokuapp.com and now they look like herokuname.herokuapp.com/herokuname.herokuapp.com. The admin still works fine at www.myurl.com/admin or herokuname.herokuapp.com/admin.

Any help you can give me with this would be greatly appreciated.

Date format on blog post page not localized

And look at the list of blog posts, the date on these blog posts is specified as "29/11/2009" -- that is, %D/%m/%Y. They should be in the short date format specific to the locale, i.e. "11/29/2009".

Starting from http://guides.rubyonrails.org/i18n.html#adding-date-time-formats
base_helper.rb:
def format_date(date)
I18n.l date, :format => :short
end
def format_date_time(date)
I18n.l date, :format => :short
end
The odd thing is that the format_date method seems to take a datetime... I cheated and just changed the strftime to be US format.

Running typo not on port 3000

I have tried to run typo on a different port to 3000 using both webbrick and thin.
In both cases the likes have been mixed up and some stay on 3000 and some switch to 4000 as per to -p statement.

Have I missed something or is there a bug. I wish to run other rails software and port switching is important for this.

Visual Editor does not handle <>'s

Ugh. Damn formatting and lack of preview. Let's try again:
Create a new page.
Use the Visual Editor.
Type TEST inside of <>'s. Maybe this will work:
Publish

Ah - actually it is just a problem when you return to the visual editor to edit the page.

This is a terrible hack diff, and it only works for Page. I don't like it.
But it does show the problem and a workaround.
While I'm here... There seem to be 3ish ways to display the visual editor. Seems like some of the partials could be removed.
Swapping between the visual and HTML editor never works the way I expect it to. I should open another ticket...

Patch : http://s3.amazonaws.com/activereload-lighthouse/assets/7bda2ffefe9a050e3f437acd36bc931c0575e7f8/diff.txt?AWSAccessKeyId=1AJ9W2TX1B2Z7C2KYB82&Expires=1313140866&Signature=vl3UpnJqdYVAixyV0WCuXo48vn0%3D

Media Library - Page isn't refreshed after upload

Using Chromium 18.0.1025.168 Ubuntu 12.04
Go to "Media Library" -> "Browse", chose a file to upload and press "Upload" button.
Once, upload finishes page isn't refreshed (web developer console / network shows success status). Uploaded file(s) will appear when you refresh the page.

Also, noticed there's no error handling (or it's broken) if file is too large etc.

The same issue occurs on demo instance.

Migrations out of order

When are you going to fix the migrations ordering? I have a scripted install for postgres that I can't make work due to this.

Article.published_at uses timezone adjusted date that can prevent post showing up

The created_at and updated_at dates were defined in UTC, but the published_at date was defined in UTC+7 -- as a result, the state was moved to "publication_pending" and the article did not show up in the archives, nor in the main page.

I figured out eventually that if I just set the published_at date to something beyond the adjusted timezone then the article would show up, but this was still something I had to do through the console -- a non-developer wouldn't have been able to get around this.

Confirmed. It is due to this line:

In app/controllers/admin/content_controller.rb

...
@article.published_at = Time.parse(params[:article][:published_at]).utc rescue nil
When Time.parse receives a string from the form that contains "GMT+0000 (UTC)", it can not determine the timezone.
The line should be changed to:
@article.published_at = Time.strptime(params[:article][:published_at], "%B %e, %Y %I:%M %p GMT%z").utc rescue nil

switching between html and ckeditor completely fucks up formatting

There are various issue with the ckeditor. It's not usable at all.
Beside the fact that it produces horrible html, switching between raw editor and ckeditor fucks up formatting. It's nearly impossible to edit a article after creation with that editor. It is completely impossible to edit a manually article written in html without fucking up formatting.
I know this is not a simple issue, but I would be awesome if we had a very simple 'WYSIWYG' editor, maybe rendering markdown or textile to keep the content editable by hand.

undefined method `lang' for nil:NilClass

NoMethodError (undefined method lang' for nil:NilClass): app/controllers/application_controller.rb:40:inload_lang'

REPRODUCTION:
Create a new, empty database.
Point Typo at it in dev mode.
Start up the rails server.
Go to http://localhost:3000

Migrations will run until eventually you see this:

Migrating to RemoveNotificationsTable (105)
   (1.4ms)  DROP TABLE `notifications`
   (0.8ms)  INSERT INTO `schema_migrations` (`version`) VALUES ('105')
  Blog Load (0.2ms)  SELECT `blogs`.* FROM `blogs` ORDER BY id LIMIT 1
Completed 500 Internal Server Error in 11282ms

NoMethodError (undefined method `lang' for nil:NilClass):
  app/controllers/application_controller.rb:40:in `load_lang'

Submitting should save the article text, too

It appears that when using the visual editor and submitting with either "save as draft" or "publish" doesn't save the actual article text.
This is because the textarea is display:none; visibility: hidden and invisible form elements don't get sent. (Instead of relying on the textarea, you could, for instance, copy the content with every keyup event to an <input type="hidden" /> which would definitely get sent with the submit.)

Also, when using the "preview" button, at least the text should be saved first, maybe by triggering the autosave before the preview window is opened.

article.password not a String, but something else

Date: Mon, 26 Sep 2011 19:10:35 -0500
From: henry74 [email protected]
To: [email protected]
Subject: [typo] errors with latest typo blog v 6.0.9

I downloaded the latest version and attempted to upgrade from 6.0.4.
I've tried it on both 1.8.7 and 1.9.2 and I've gotten similar but
different errors related to YAML. See below:

Ruby 1.8.7

ActionView::Template::Error (undefined method `empty?' for

<YAML::PrivateType:0xb5cf2118 @value="", @type_id="null">):

1: <% if article.password.nil? or article.password.empty? %>
2:   <%= render 'articles/article_content', { :article => article } %>
3: <% else %>
4:   <%= render 'articles/password_form', { :article => article } %>

app/views/articles/_protected_article_content.html.erb:1:in
_app_views_articles__protected_article_content_html_erb___984258178__622293848_3709598' app/controllers/articles_controller.rb:211:inrender_paginated_index'
app/controllers/articles_controller.rb:38:in index' app/controllers/articles_controller.rb:37:inindex'

Ruby 1.9.2

ActionView::Template::Error (undefined method `empty?' for

<Syck::PrivateType:0xbe42f18 @type_id="null", @value="">):

1: <% if article.password.nil? or article.password.empty? %>
2:   <%= render 'articles/article_content', { :article => article } %>
3: <% else %>
4:   <%= render 'articles/password_form', { :article => article } %>

app/views/articles/_protected_article_content.html.erb:1:in
_app_views_articles__protected_article_content_html_erb__815734403_99983130_96183190' app/controllers/articles_controller.rb:211:inrender_paginated_index'
app/controllers/articles_controller.rb:38:in block (2 levels) in index' app/controllers/articles_controller.rb:37:inindex'

Thoughts?

ckeditor image file upload not working

I get Raise : ” NoMethodError in CkeditorController#upload undefined method `original_filename’ for nil:NilClass ”.

typo-6.0.9/vendor/plugins/easy-ckeditor/app/controllers/ckeditor_controller.rb
at line: 210

  • unless [Tempfile, StringIO].include? file.class
  • unless [ActionDispatch::Http::UploadedFile].include? file.class

Small error or misunderstunding

Hello, I'm using your this blog system, and I found a little error using PostgreSQL. On the feedback controller on line 145 the instruction executes a query to the database and makes it delete comments analazing the "state" field content. If it has "presumed_spam" or "spam" it cause a true. The problem is that the original instruction:

Feedback.delete_all('state in ("presumed_spam", "spam")')

you use double quotes to represent string values inside the query. So the problem is that PostgreSQL use single quotes to do this. By using double quotes, PostgreSQL interpret this as another field. I get errors that said PostgreSQL couldn't find presumed_spam or spam fields. My solution to my problem was to change this instruction by altering the quotes like this:

Feedback.delete_all("state in ('presumed_spam', 'spam')")

For my particular situation works fine, but for other databases, you should look for a solution.

Thanks, I hope you can figure out a solution for everyone. And thanks for this great blog system.

Return of the multiple save drafts

It turns out there are still circumstances where multiple drafts are saved. I'm providing as much information as possible in the hopes that any of it may be the key:

I was investigating the behavior of the calender widget.
All other fields were empty.
It was between 00:00 and 01:00, which is a time when my date does not match the server date.

TypeError in Admin/content#index - can't convert Time into String

With a clean installation of Typo 6.1.0 stable on Ruby 1.9.3p327 and Rails 3.0.10 (ubuntu 12.04 with 64 bits), every time I click in (any of these):

Total posts.
All Articles.
Save and publish and article.

I get the following error. I am using rails server -e production and I did the migration of the database with RAILS_ENV="production". I have also check it with passenger and apache, but always the same. I have just configured the database and the migration went fine.

Please, could you tell me if this is a known bug or I am missing something? I have searched but I didn't find anything related to this. Thank you very much in advanced.

The error:

TypeError in Admin/content#index

Showing /home/inratep/typo/app/views/admin/content/index.html.erb where line #34 raised:

can't convert Time into String
Extracted source (around line #34):

31: %>
32: <%= collection_select_with_current(:search, :user_id, User.find(:all), "id", "name", @search[:user_id].to_i, true) %>
33:
34: <%= collection_select_with_current(:search, :published_at, Article.find_by_published_at.to_s, "publication", "publication", @search[:published_at], true) %>
35:
36:
37:

Rails.root: /home/inratep/typo

Application Trace | Framework Trace | Full Trace
app/models/content.rb:139:in block in find_by_published_at' app/models/content.rb:138:inmap!'
app/models/content.rb:138:in find_by_published_at' app/models/article.rb:278:infind_by_published_at'
app/views/admin/content/index.html.erb:34:in block in _app_views_admin_content_index_html_erb__2639098025472312047_28978660__2592303760768779516' app/views/admin/content/index.html.erb:9:in_app_views_admin_content_index_html_erb__2639098025472312047_28978660__2592303760768779516'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.