triptico.com

Un naufragio personal

Gruta - command line tool

Manipulates Gruta sources directly.

(C) Angel Ortega angel@triptico.com

Usage:

    gruta {command} {src} [{arguments} ...]

Where {src} is a Gruta source spec. Examples:

  • /var/www/site_dir/var (FS type)
  • dbi:SQLite:/var/www/site_dir/var/gruta.db (Perl DBI type)

approve_comment

    approve_comment {src} {topic_id} {story_id} {id}

Approves a comment

comment

    comment {src} {topic_id} {story_id} {id}

Dumps comment data

comments

    comments {src} [{max}]

Lists all comments

copy

    copy {src} {dst}

Copies the full source {src} to {dst}

create

    create {src}

Creates {src}

delete_comment

    delete_comment {src} {topic_id} {story_id} {id}

Deletes a comment

edit_story

    edit_story {src} {topic_id} {id}

Calls $EDITOR to edit story data

edit_topic

    edit_topic {src} {topic_id}

Edits topic data

filter_story

    filter_story {src} {topic_id} {id} {command}

Filters story data through command (STDIN, STDOUT)

import_rss

    import_rss {src} {topic_id} [{tag(s)}]

Import an RSS from STDIN into a topic

new_comment

    new_comment {src} {topic_id} {story_id} [{author}]

Adds a new comment from STDIN

new_story

    new_story {src} {topic_id} [{id}]

Creates a new story from STDIN

new_topic

    new_topic {src} {topic_id}

Creates a new topic from STDIN

pending_comments

    pending_comments {src}

Lists all comments with approval pending

related_stories

    related_stories {src} {topic_id} {id} [{max}]

Returns a list of stories related to the specified one

rename_tag

    rename_tag {src} {tag} [new tag]

Renames (or removes) a tag

search

    search {src} {topic(s)} {query}

Searches stories by content

set_story_date

    set_story_date {src} {topic_id} {id} {date}

Sets the date of a story (-, now)

stats

    stats {src}

Dumps statistics for {src}

stories

    stories {src} {topic_id}

Lists all stories of a topic

stories_by_date

    stories_by_date {src} {topic(s)} {num} {offset} [{from}] [{to}] [{future}]

Searches stories by date

stories_by_tag

    stories_by_tag {src} {topic(s)} {tag(s)}

Searches stories by tag(s)

story

    story {src} {topic_id} {id}

Dumps story data

story_comments

    story_comments {src} {topic_id} {story_id} [{include_not_approved}]

Lists all comments for a story

tags

    tags {src}

Lists all tags in {src}

top_ten

    top_ten {src} [{num}]

Shows the top N stories

topic

    topic {src} {topic_id}

Dumps topic data

topics

    topics {src}

Lists the topics in {src}

update_story

    update_story {src} {topic_id} {id}

Updates a story from STDIN

update_topic

    update_topic {src} {topic_id}

Updates a topic from STDIN

users_by_xdate

    users_by_xdate {src} [{max_date}]

Lists users by expiration date

Related

Visitor comments