Isar735.github.io
Creative Writing Ideas Teaching Ideas. This first grade writer's workshop bundle is aligned to the Common Core standards and helps students work through the writing process. Students will brainstorm Fun first grade worksheets for language arts include reading, reading readiness, rhyming, and thinking skills worksheets. Creative Writing Teaching Resources Lesson Plans.
Here s how you can use popular creative writing techniques to make your essays 5. Interesting details it comes to turn your abilities from writing creative. Writing Skills: Grade 6 (Flash Kids Harcourt Family Learning) Flash Kids Editors on Amazon.com. FREE shipping on qualifying offers. These workbooks. This unique four-year combined degree in laws and creative writing provides graduates with clear professional pathways as both legal and writing practitioners. SCU - Bachelor of Laws and Creative Writing Inspire your students to develop a passion for writing, practice reading comprehension, and build vocabulary and grammar skills with these language arts lesson plans. Here's how you can use popular creative writing techniques to make your essays more interesting and improve your marks.
5th Grade Writing Activities for Kids Education.com. Year 1 This year serves as an introduction to the study of English literature and creative writing at university level. You will discover your talents.
Creative writing in the maybe we can hone their skills and abilities then they will have developed some intricate and powerful writing abilities.
Fifth Grade Writing Activities. Fifth grade students need a little creative license when it comes to how they practice their writing skills. Sentence. Ever feel stumped? Uninspired? Blank? These creative writing prompts will kick your muse into high gear so you can start writing again. Be creative. Creative writing rubric for grade 2 – TallerDeEmpresa.com.
English and Creative Writing University of Salford. Grade 5 english creative writing - Tuinmeubelendeal.nl.
Fifth Grade Writing Worksheets and Printables. narrative, and creative writing skills. 5th grade Reading. Creative Writing Lesson Plan Collection Scholastic.com. Writing, Speaking, Listening, Interviewing, Communication. 19 TAC Chapter 110, Subchapter C - ritter.tea.state.tx.us. Skills of creative writing ideas ks2. about future job reflective? privacy in internet essay upsr telugu general essay improving essay writing skills grade.
Education rules concerning Texas Essential Knowledge and Skills (curriculum standards) for high school English language arts and reading. 34 new creative writing topics for grade 5 students are designed especially to inspire new thoughts and ideas in your students. Have you ever bothered to look at the creative writing careers that are available? Browse these job possibilities, and then go out there and make it happen.
Second Grade Writing Worksheets Printables. Writing proficiency isn’t a skill that can be taught or memorized overnight. It requires repeated exposure. Complete lesson plans for a creative writing course.
Do you know that creative writing isn’t easy? Silly question, I know. But do you know that there are a certain set of skills which you need to master Writing Topics Thoughtful Learning. Communication, in General. The single biggest problem in communication is the illusion that it has taken place. — George Bernard Shaw. If you cannot 7 Techniques from Creative Writing You Can Use to Improve. Free First Grade Worksheets:Reading, Phonics, Rhyming.
34 Exciting Creative Writing Topics for Grade 5 ⋆ Journal. Creative writing in the classroom: Fourth Grade Writing Worksheets and Printables - Education.com. Free Creative Writing Activities and Worksheets for Young.
Spectrum Writing, Grade 5 - Amazon.com: Online Shopping. Second Grade Writing Worksheets Printables - Education.com. Fifth Grade Writing Worksheets and Printables - Education.com. 20 Creative Writing Careers Writing Forward. Grade 5 english creative writing - commit your paper to us and we will do our best for you Use from our affordable custom term paper writing services Creative Writing Lesson Plans - Teacher2B.com. While the second grade 5 2004 creative writing rubrics for grade common core writing checklist a writing skills. Free creative writing activities for kindergarten-sixth grade. You may print worksheets for your own personal, non-commercial use. Nothing 25 Creative Writing Prompts Writing Forward. Skills of creative writing ideas ks2 - tetles.com. Creative writing skills for grade.
Spectrum Writing, Grade 5 Spectrum on Amazon.com. FREE shipping on qualifying offers. Spectrum® Writing for grade 5 guides students through A number of ideas which can be used as a stimulus for creative writing lessons. Fourth grade writing worksheets are a great tool for young writers. Check out these fourth grade writing worksheets with your 4th grade student.


doing [global options] command [command options] [arguments...]
A command line tool for remembering what you were doing and tracking what you've done.
doing
is a basic CLI for adding and listing "what was I doing" reminders in a TaskPaper-formatted text file. It allows for multiple sections/categories, tag-based time tracking, and flexible output formatting.
doing [global options] command [command options] [arguments...]
-f, --doing_file=arg - Specify a different doing_file (default: none)
--help - Show this message
--[no-]notes - Output notes if included in the template (default: enabled)
--stdout - Send results report to STDOUT instead of STDERR
--version - Display the program version
-x, --[no-]noauto - Exclude auto tags and default tags
help - Shows a list of commands and global options
help [command] - Shows help for any command (`doing help now`)
add_section - Add a new section to the "doing" file
again, resume - Repeat last entry as new entry
archive - Move entries between sections
cancel - End last X entries with no time tracked
choose - Select a section to display from a menu
colors - List available color variables for configuration templates and views
config - Edit the configuration file
done, did - Add a completed item with @done(date). No argument finishes last entry.
finish - Mark last X entries as @done
grep, search - Search for entries
import - Import entries from an external source
last - Show the last entry, optionally edit
later - Add an item to the Later section
mark, flag - Mark last entry as highlighted
meanwhile - Finish any running @meanwhile tasks and optionally create a new one
note - Add a note to the last entry
now, next - Add an entry
on - List entries for a date
open - Open the "doing" file in an editor
recent - List recent entries
sections - List sections
select - Display an interactive menu to perform operations (requires fzf)
show - List all entries
since - List entries since a date
tag - Add tag(s) to last entry
template - Output HTML and CSS templates for customization
today - List entries from today
undo - Undo the last change to the doing_file
view - Display a user-created view
views - List available custom views
yesterday - List entries from yesterday
Run doing config
to open your ~/.doingrc
file in the editor defined in the $EDITOR
environment variable.
See the SUPPORT section below for troubleshooting details.
The file that stores all of your entries is generated the first time you add an entry (with doing now
or doing later
). By default, the file is created in ~/what_was_i_doing.md
, but you can modify this in the config file.
The format of the "doing" file is TaskPaper-compatible. You can edit it by hand at any time (in TaskPaper or any text editor), but it uses a specific format for parsing, so be sure to maintain the dates and pipe characters.
Notes are anything in the list without a leading hyphen and date. They belong to the entry directly before them, and they should be indented one level beyond the parent item.
When using the now
and later
commands on the command line, you can start the entry with a quote and hit return, then type the note and close the quote. Anything after the first line will be turned into a TaskPaper-compatible note for the task and can be displayed in templates using %note
.
Notes can be prevented from ever appearing in output with the global option --no-notes
: doing --no-notes show all
.
Auto tagging (adding tags listed in .doingrc under autotag
and default_tags
) can be skipped for an entry with the -x
global option: doing -x done skipping some automatic tagging
.
A basic configuration looks like this:
---
doing_file: /Users/username/Dropbox/doing.taskpaper
current_section: Currently
default_template: '%date: %title%note'
default_date_format: '%Y-%m-%d %H:%M'
marker_tag: flagged
marker_color: yellow
tags_color: boldcyan
default_tags: []
editor_app: TaskPaper
config_editor_app: Sublime Text
:include_notes: true
views:
color:
date_format: '%F %_I:%M%P'
section: Currently
count: 10
wrap_width: 0
template: '%boldblack%date %boldgreen| %boldwhite%title%default%note'
order: desc
templates:
default:
date_format: '%Y-%m-%d %H:%M'
template: '%date | %title%note'
wrap_width: 0
today:
date_format: '%_I:%M%P'
template: '%date: %title%odnote'
wrap_width: 0
last:
date_format: '%_I:%M%P on %a'
template: '%title (at %date)%odnote'
wrap_width: 0
recent:
date_format: '%_I:%M%P'
template: '%date > %title%odnote'
wrap_width: 50
autotag:
whitelist:
- coding
- design
synonyms:
brainstorming:
- thinking
- idea
html_template:
haml:
css:
The config file is stored in ~/.doingrc
, and a skeleton file is created on the first run. Just run doing
on its own to create the file.
Any options found in a .doingrc
anywhere in the hierarchy between your current folder and your home folder will be appended to the base configuration, overriding or extending existing options. This allows you to put a .doingrc
file into the base of a project and add specific configurations (such as default tags) when working in that project on the command line. These can be cascaded, with the closest .doingrc
to your current directory taking precedence, though I'm not sure why you'd want to deal with that.
Possible uses:
default_tags
for a project so that every time you doing now
from within that project directory or its subfolders, it gets tagged with that project automatically.Any part of the configuration can be copied into these local files and modified. You only need to include the parts you want to change or add.
The one thing you'll probably want to adjust is the file that the notes are stored in. That's the doing_file
key:
doing_file: /Users/username/Dropbox/nvALT2.2/?? What was I doing.md
I keep mine in my nvALT folder for quick access and syncing between machines. If desired, you can give it a .taskpaper
extension to make it more recognizable to other applications. (If you do that in nvALT, make sure to add taskpaper
as a recognized extension in preferences).
You can rename the section that holds your current tasks. By default, this is Currently
, but if you have some other bright idea, feel free:
current_section: Currently
The setting editor_app
only applies to Mac OS X users. It's the default application that the command doing open
will open your WWID file in. Personally, I use editor_app: TaskPaper
. If this is blank, it will be opened by whatever the system default is for the doing file extension (default is .md
), or you can use -a app_name
or -b bundle_id
to override.
You can define a separate app to open the config file in when running doing config
. The key for this is config_editor_app
.
In the case of the doing now -e
command, your $EDITOR
environment variable will be used to complete the entry text and notes. Set it in your ~/.bash_profile
or whatever is appropriate for your system:
export EDITOR="mate -w"
The only requirements are that your editor be launchable from the command line and able to "wait." In the case of Sublime Text and TextMate, just use -w
like this: export EDITOR="subl -w"
.
The config also contains templates for various command outputs. Include placeholders by placing a % before the keyword. The available tokens are:
%title
: the "what was I doing" entry line%date
: the date based on the template's date_format
setting%shortdate
: a custom date formatter that removes the day/month/year from the entry if they match the current day/month/year%note
: Any note in the entry will be included here, a newline and tabs are automatically added.%odnote
: The notes with a leading tab removed (outdented note)%chompnote
: Notes on one line, beginning and trailing whitespace removed.%section
: The section/project the entry is currently in%hr
: a horizontal rule (-
) the width of the terminal%hr_under
: a horizontal rule (_
) the width of the terminal%n
: inserts a newline%t
: inserts a tab%[color]
: color can be black
, red
, green
, blue
, yellow
, magenta
, cyan
, or white
bg
to affect background colors (%bgyellow
)bold
and boldbg
for strong colors (%boldgreen
, %boldbgblue
)doing colors
to see the list%interval
: when used with the -t
switch on the show
command, it will display the time between a timestamp or @start(date) tag and the @done(date) tag, if it exists. Otherwise, it will remain empty.Date formats are based on Ruby strftime
formatting.
My normal template for the recent
command looks like this:
recent:
date_format: '%_I:%M%P'
template: '%date > %title%odnote'
wrap_width: 88
And it outputs:
$ doing recent 3
4:30am > Made my `console` script smarter...
Checks first argument to see if it's a file, if it is, that's the log
Else, it checks the first argument for a ".log" suffix and does a search in the user
application logs with `find` for it.
Otherwise, system.log.
I also made an awesome Cope wrapper for it...
12:00pm > Working on `doing` again.
12:45pm > I think this thing (doing) is ready to document and distribute
$
You can get pretty clever and include line breaks and other formatting inside of double quotes. If you want multiline templates, just use \n
in the template line, and after the next run it will be rewritten as proper YAML automatically.
For example, this block:
recent:
date_format: '%_I:%M%P'
template: "\n%hr\n%date\n > %title%odnote\n%hr_under"
wrap_width: 100
will rewrite to:
recent:
date_format: '%_I:%M%P'
template: |2-
%hr
%date
> %title%odnote
%hr_under
wrap_width: 100
and output my recent entries like this:
$ doing recent 3
-----------------------------------------------------------------------
4:30am
> Made my `console` script smarter...
Checks first argument to see if it's a file, if it is, that's the log
Else, it checks the first argument for a ".log" suffix and does a search in the user application
logs with `find` for it.
Otherwise, system.log.
I also made an awesome Cope wrapper for it...
_______________________________________________________________________
-----------------------------------------------------------------------
12:00pm
> Working on `doing` again.
_______________________________________________________________________
-----------------------------------------------------------------------
12:45pm
> I think this thing (doing) is ready to document and distribute
_______________________________________________________________________
$
You can create your own "views" in the ~/.doingrc
file and view them with doing view view_name
. Just add a section like this:
views:
old:
section: Old
count: 5
wrap_width: 0
date_format: '%F %_I:%M%P'
template: '%date | %title%note'
order: asc
tags: done finished cancelled
tags_bool: ANY
You can add additional custom views. Just nest them under the views
key (indented two spaces from the edge). Multiple views would look like this:
views:
later:
section: Later
count: 5
wrap_width: 60
date_format: '%F %_I:%M%P'
template: '%date | %title%note'
old:
section: Old
count: 5
wrap_width: 0
date_format: '%F %_I:%M%P'
template: '%date | %title%note'
The section
key is the default section to pull entries from. Count and section can be overridden at runtime with the -c
and -s
flags. Setting section
to All
will combine all sections in the output.
You can add new sections with doing add_section section_name
. You can also create them on the fly by using the -s section_name
flag when running doing now
. For example, doing now -s Misc just a random side note
would create the "just a random side note" entry in a new section called "Misc," if Misc didn't already exist.
The tags
and tags_bool
keys allow you to specify tags that the view is filtered by. You can list multiple tags separated by spaces, and then use tags_bool
to specify ALL
, ANY
, or NONE
to determine how it handles the multiple tags.
The order
key defines the sort order of the output. This is applied after the tasks are retrieved and cut off at the maximum number specified in count
.
Regarding colors, you can use them to create very nice displays if you're outputting to a color terminal. Example:
color:
date_format: '%F %_I:%M%P'
section: Currently
count: 10
wrap_width: 0
template: '%boldblack%date %boldgreen| %boldwhite%title%default%note'
You can also specify a default output format for a view. Most of the optional output formats override the template specification (html
, csv
, json
). If the view
command is used with the -o
flag, it will override what's specified in the file.
You can use the following colors in view templates. Set a foreground color with a named color:
%black
%red
%green
%yellow
%blue
%magenta
%cyan
%white
You can also add a background color (%bg[color]
) by placing one after the foreground color:
%white%bgblack
%black%bgred
...etc.
There are bold variants for both foreground and background colors
%boldblack
%boldred
... etc.
%boldbgblack
%boldbgred
... etc.
And a few special colors you'll just have to try out to see (or just run doing colors
):
%softpurple
%hotpants
%knightrider
%flamingo
%yeller
%whiteboard
Any time you use one of the foreground colors it will reset the bold and background settings to their default automatically. You can force a reset to default terminal colors using %default
.
For commands that provide an HTML output option, you can customize the templates used for markup and CSS. The markup uses HAML, and the styles are pure CSS.
To export the default configurations for customization, use doing templates --type=[HAML|CSS]
. This will output to STDOUT where you can pipe it to a file, e.g. doing templates --type=HAML > my_template.haml
. You can modify the markup, the CSS, or both.
Once you have either or both of the template files, edit .doingrc
and look for the html_template:
section. There are two subvalues, haml:
and css:
. Add the path to the templates you want to use. A tilde may be substituted for your home directory, e.g. css: ~/styles/doing.css
.
Keywords in your entries can trigger automatic tagging, just to make life easier. There are three tools available: default tags, whitelisting, and synonym tagging.
Default tags are tags that are applied to every entry. You probably don't want to add these in the root configuration, but using a local .doingrc
in a project directory that defines default tags for that project allows anything added from that directory to be tagged automatically. A local .doingrc
in my Marked development directory might contain:
---
default_tags: [marked,coding]
And anything I enter while in the directory gets tagged with @marked and @coding.
A whitelist is a list of words that should be converted directly into @tags. If my whitelist contains "design" and I type doing now working on site design
, that's automatically converted to "working on site @design."
Synonyms allow you to define keywords that will trigger their parent tag. If I have a tag called @design, I can add "typography" as a synonym. Then entering doing now working on site typography
will become "working on site typography @design."
White lists and synonyms are defined like this:
autotag:
synonyms:
design:
- typography
- layout
brainstorming
- thinking
- idea
whitelist:
- brainstorming
- coding
Note that you can include a tag with synonyms in the whitelist as well to tag it directly when used.
Adding entries:
now, did - Add an entry
later - Add an item to the Later section
done - Add a completed item with @done(date). No argument finishes last entry.
meanwhile - Finish any @meanwhile tasks and optionally create a new one
again, resume - Duplicate the last entry as new entry (without @done tag)
The doing now
command can accept -s section_name
to send the new entry straight to a non-default section. It also accepts --back=AMOUNT
to let you specify a start date in the past using "natural language." For example, doing now --back=25m ENTRY
or doing now --back="yesterday 3:30pm" ENTRY
.
If you want to use --back
with doing done
but want the end time to be different than the start time, you can either use --took
in addition, or just use --took
on its own as it will backdate the start time such that the end time is now and the duration is equal to the value of the --took
argument.
You can finish the last unfinished task when starting a new one using doing now
with the -f
switch. It will look for the last task not marked @done and add the @done tag with the start time of the new task (either the current time or what you specified with --back
).
doing done
is used to add an entry that you've already completed. Like now
, you can specify a section with -s section_name
. You can also skip straight to Archive with -a
.
doing done
can also backdate entries using natural language with --back 15m
or --back "3/15 3pm"
. That will modify the starting timestamp of the entry. You can also use --took 1h20m
or --took 1:20
to set the finish date based on a "natural language" time interval. If --took
is used without --back
, then the start date is adjusted (--took
interval is subtracted) so that the completion date is the current time.
When used with doing done
, --back
and --took
allow time intervals to be accurately counted when entering items after the fact. --took
is also available for the doing finish
command, but cannot be used in conjunction with --back
. (In finish
they both set the end date, and neither has priority. --back
allows specific days/times, --took
uses time intervals.)
All of these commands accept a -e
argument. This opens your command line editor (as defined in the environment variable $EDITOR
). Add your entry, save the temp file, and close it. The new entry is added. Anything after the first line is included as a note on the entry.
doing again
(or doing resume
) will duplicate the last @done entry (most recently completed) with a new start date (and without the @done tag). To resume the last entry matching specific tags, use --tag=TAG
. You can specify multiple tags by separating with a comma. Multiple tags are combined with 'AND' by default (all tags must exist on the entry to match), but you can use --bool=
to set it to 'OR' or 'NOT'. By default the new entry will be added to the same section as the matching entry, but you can specify a section with --in=SECTION
.
doing meanwhile
is a special command for creating and finishing tasks that may have other entries come before they're complete. When you create an entry with doing meanwhile [entry text]
, it will automatically complete the last @meanwhile item (dated @done tag) and add the @meanwhile tag to the new item. This allows time tracking on a more general basis, and still lets you keep track of the smaller things you do while working on an overarching project. The meanwhile
command accepts --back [time]
and will backdate the @done tag and start date of the new task at the same time. Running meanwhile
with no arguments will simply complete the last @meanwhile task.
See doing help meanwhile
for more options.
Modifying entries:
finish - Mark last X entries as @done
cancel - Mark last X entries as @done without completion date
tag - Tag last entry
note - Add a note to the last entry
Finishing
doing finish
by itself is the same as doing done
by itself. It adds @done(timestamp) to the last entry. It also accepts a numeric argument to complete X number of tasks back in history. Add -a
to also archive the affected entries.
doing finish
also provides an --auto
flag, which you can use to set the end time of any entry to 1 minute before the start time of the next. Running a command such as doing finish --auto 10
will go through the last 10 entries and sequentially update any without a @done tag with one set to the time just before the next entry in the list.
As mentioned above, finish
also accepts --back "2 hours"
(sets the finish date from time now minus interval) or --took 30m
(sets the finish date to time started plus interval) so you can accurately add times to completed tasks, even if you don't do it in the moment.
Both done
and finish
accept an --archive
switch which immediately moves the completed entries to the Archive section with a @from(Project)
tag.
You can finish the last entry containing a specific tag or combination of tags using the --tag
flag. Multiple tags are separated by commas. By default tags are combined with an AND boolean, meaning the entry must contain all specified tags to be considered. For example, to finish the last entry containing both "@work" and "@project1", you would use:
doing finish --tag=work,project1
You can change the boolean using --bool=OR
(last entry containing any of the specified tags) or --bool=NOT
(last entry containing none of the tags).
You can also include a --no-date
switch to add @done
without a finish date, meaning no time is tracked for the task. doing cancel
is an alias for this. Like finish
, cancel
accepts a count to act on the last X entries, as well as --archive
and --section
options. cancel
also accepts the --tag
and --bool
flags for tag filtering.
Tagging and Autotagging
tag
adds one or more tags to the last entry, or specify a count with -c X
. Tags are specified as basic arguments, separated by spaces. For example:
doing tag -c 3 client cancelled
... will mark the last three entries as @client @cancelled. Add -r
as a switch to remove the listed tags instead.
You can optionally define keywords for common tasks and projects in your .doingrc
file. When these keywords appear in an item title, they'll automatically be converted into @tags. The whitelist
tags are exact (but case insensitive) matches.
You can also define synonyms
, which will add a tag at the end based on keywords associated with it. When defining synonym
keys, be sure to indent but not hyphenate the keys themselves, while hyphenating the list of synonyms at the same indent level as their key. See playing
and writing
in the example below for illustration. Follow standard YAML syntax.
To add autotagging, include a section like this in your ~/.doingrc
file:
autotag:
whitelist:
- doing
- mindmeister
- marked
- playing
- working
- writing
synonyms:
playing:
- hacking
- tweaking
- toying
- messing
writing:
- blogging
- posting
- publishing
Tag transformation
You can include a transform
section in the autotag config which contains pairs of regular expressions and replacement patterns separated by a colon. These will be used to look at existing tags in the text and generate additional tags from them. For example:
autotag: transform: - (\w+)-\d+:$1
This creates a search pattern looking for a string of word characters followed by a hyphen and one or more digits, e.g. @projecttag-12
. Do not include the @ symbol in the pattern. The replacement ($1
) indicates that the first matched group (in parenthesis) should be used to generate the new tag, resulting in @projecttag
being added to the entry.
Annotating
note
lets you append a note to the last entry. You can specify a section to grab the last entry from with -s section_name
. -e
will open your $EDITOR
for typing the note, but you can also just include it on the command line after any flags. You can also pipe a note in on STDIN (echo "fun stuff"|doing note
). If you don't use the -r
switch, new notes will be appended to the existing notes, and using the -e
switch will let you edit and add to an existing note. The -r
switch will remove/replace a note; if there's new note text passed when using the -r
switch, it will replace any existing note. If the -r
switch is used alone, any existing note will be removed.
You can also add notes at the time of entry by using the -n
or --note
flag with doing now
, doing later
, or doing done
. If you pass text to any of the creation commands which has multiple lines, everything after the first line break will become the note.
If a string passed to now
, later
, or done
has a parenthetical at the end, the parenthetical will be removed from the title and its contents added as a note. So doing now Working on @project1 (Adding some unit tests)
would create an entry titled "Working on @project1" with a note "Adding some unit tests." This is the equivalent of doing now Working on @project1 -n "Adding some unit tests"
.
Displaying entries:
show - List all entries
recent - List recent entries
today - List entries from today
yesterday - List entries from yesterday
last - Show the last entry
grep - Show entries matching text or pattern
doing show
on its own will list all entries in the "Currently" section. Add a section name as an argument to display that section instead. Use "all" to display all entries from all sections.
You can filter the show
command by tags. Simply list them after the section name (or all
). The boolean defaults to ANY
, meaning any entry that contains any of the listed tags will be shown. You can use -b ALL
or -b NONE
to change the filtering behavior: doing show all done cancelled -b NONE
will show all tasks from all sections that do not have either @done or @cancelled tags.
Use -c X
to limit the displayed results. Combine it with -a newest
or -a oldest
to choose which chronological end it trims from. You can also set the sort order of the output with -s asc
or -s desc
.
The show
command can also show the time spent on a task if it has a @done(date) tag with the -t
option. This requires that you include a %interval
token in template -> default in the config. You can also include @start(date) tags, which override the timestamp when calculating the intervals.
If you have a use for it, you can use -o csv
on the show or view commands to output the results as a comma-separated CSV to STDOUT. Redirect to a file to save it: doing show all done -o csv > ~/Desktop/done.csv
. You can do the same with -o json
.
doing yesterday
is great for stand-ups (thanks to Sean Collins for that!). Note that you can show yesterday's activity from an alternate section by using the section name as an argument (e.g. doing yesterday archive
).
doing on
allows for full date ranges and filtering. doing on saturday
, or doing on one month to today
will give you ranges. You can use the same terms with the show
command by adding the -f
or --from
flag. doing show @done --from "monday to friday"
will give you all of your completed items for the last week (assuming it's the weekend).
You can also show entries matching a search string with doing grep
(synonym doing search
). If you want to search with regular expressions or for an exact match, surround your search query with forward slashes, e.g. doing search /project name/
. If you pass a search string without slashes, it's treated as a fuzzy search string, meaning matches can be found as long as the characters in the search string are in order and with no more than three other characters between each. By default searches are across all sections, but you can limit it to one with the -s SECTION_NAME
flag. Searches can be displayed with the default template, or output as HTML, CSV, or JSON.
Modifying the last entry
If you want to make a change to the last entry added, use doing last -e
. The -e
flag opens the last entry (including note) in your editor, and when you close your editor, your doing file will be updated with any changes you made to the entry.
You can choose the last entry in a specific section by including the -s
flag, so doing last -s Later -e
would edit the most recent entry in the Later section.
You can also use text search or a tag filter to get an entry earlier than the most recent one. A tag search with doing last --tag=project1 -e
will edit the last entry tagged @project1
. Multiple tags can be combined with commas, and you can use --bool
to specify whether the search is AND
(matches all tags given), OR
(matches any tag given), or NOT
(matches none of the tags).
You can edit the last entry that matches a search string with --search=QUERY
. QUERY
can either be a raw string, or you can surround it with slashes to search by regex (doing last --search="/project./" -e
). If the string is raw text, fuzzy matching will be used, so the characters must be in order but can be separated by up to three other characters.
Both --tag
and --search
can be constrained to a single section with -s SECTION
.
Views
view - Display a user-created view
views - List available custom views
Display any of the custom views you make in ~/.doingrc
with the view
command. Use doing views
to get a list of available views. Any time a section or view is specified on the command line, fuzzy matching will be used to find the closest match. Thus, lat
will match Later
, etc..
Sections
sections - List sections
choose - Select a section to display from a menu
add_section - Add a new section to the "doing" file
Utilities
archive - Move entries between sections
open - Open the "doing" file in an editor (OS X)
config - Edit the default configuration
Archiving
COMMAND OPTIONS
-k, --keep=arg - Count to keep (ignored if archiving by tag) (default: 5)
-t, --to=arg - Move entries to (default: Archive)
-b, --bool=arg - Tag boolean (default: AND)
The archive
command will move entries from one section (default: Currently
) to another section (default: Archive
).
doing archive
on its own will move all but the most recent 5 entries from currently
into the archive.
doing archive other_section
will archive from other_section
to Archive
.
doing archive other_section -t alternate
will move from other_section
to alternate
. You can use the -k
flag on any of these to change the number of items to leave behind. To move everything, use -k 0
.
You can also use tags to archive. You define the section first, and anything following it is treated as tags. If your first argument starts with @
, it will assume all sections and assume any following arguments are tags.
By default, tag archiving uses an AND
boolean, meaning all the tags listed must exist on the entry for it to be moved. You can change this behavior with -b OR
or -b NONE
(ALL
and ANY
also work).
Example: Archive all Currently items for @client that are marked @done
doing archive @client @done
Bash: See the file doing.completion.bash
in the git repository for full bash completion. Thanks to fcrespo82 for getting it started.
Zsh: See the file doing.completion.zsh
in the git repository for zsh completion. Courtesy of Gabe Anzelini.
Fish: See the file doing.fish
in the git repository for Fish completion. This is the least complete of all of the completions, but it will autocomplete the first level of subcommands, and your custom sections and views for the doing show
and doing view
commands.


1
Not a Bad Thing
Justin Timberlake
Not a Bad Thing
4:42
2
A Sky Full Of Stars
Coldplay
A Sky Full Of Stars
3:34
3
Problem
Arianna Grande - Iggy Azalea
Problem
5:12
4
Summer
Calvin Harris
Summer
4:53
5
Falling For You
The 1975
The 1975
3:58
6
Sing
The 1975
The 1975
12:27
7
Not a Bad Thing
Justin Timberlake
Not a Bad Thing
4:42
8
A Sky Full Of Stars
Coldplay
A Sky Full Of Stars
3:34
9
Problem
Arianna Grande - Iggy Azalea
Problem
5:12
10
Summer
Calvin Harris
Summer
4:53
11
Falling For You
The 1975
The 1975
3:58
12
Sing
The 1975
The 1975
12:27


[v0.5] AB - Alpha-Beta Release
12-Jun-2012
[v0.4.1] Re-structured scientific blog and wiki
15-Nov-2011
[v0.4] Alpha soft-launch at WhereCampDC (Washinton, USA)
11-Jun-2011
[v0.3] App released at One Health Congress (Melbourne, Australia)
14-Feb-2011
[v0.2] Map viewing client switched to custom interface
16-Jan-2011
[v0.1.5] Demo released
22-Oct-2010
[v0.1] Launched at Ecohealth (London)
20-Aug-2010
Source code moved to GitHub
15-Aug-2011
Source code moved to Launchpad
21-Oct-2010
Source code moved to BitBucket
12-Jun-2009


first item description
2nd item description
3rd item description
4th item description
5th item description


This is really just to render some
background page forcing Chrome to
preload the plugin code such that the
popup opens quickly later on.
See http://stackoverflow.com/questions/20139744/browseraction-opens-slowly-unless-already-open-in-a-tab
and http://stackoverflow.com/questions/26276815/my-chrome-extension-popup-opens-after-a-few-seconds-its-slow-compared-to-other


{% extends 'base.html' %} {% block content %}
Interested in money in Illinois politics? This site makes available bulk downloads of Illinois campaign contributions and expenditures from the Illinois State Board of Elections going back to 1994.
We built Election Money to give journalists, activists and citizens better access to and documentation for this historical data.
This is a DataMade project done in collaboration with the Illinois Campaign for Political Reform (ICPR) that was spawned at a meeting held in Chicago with the Sunlight Foundation and sponsored by the McCormick Foundation. We built this site to increase the access to campaign contribution data for journalists, activists and curious citizens.
Since launching in July 2014, we've gotten some great local and national press coverage about this site, and more importantly, journalists are using it as a resource for their election coverage!
Found a bug? Report it on our issue tracker.
Have a suggestion? Contact DataMade.
All the code for this site is open source. It consists of a scraper and this website to display the data. It was built with:
All the code for this project is available on Github:
Lists of and links to each individual file are also available via an API for those of you who plan on using this data to build your own app.
API endpoints available:
For each endpoint, a list of files is returned in JSON format:
# example response from http://electionmoney.org/list/candidates/ [ { "modified_date": "Jul 25, 2014 01:27 PM", "name": "Candidates.csv", "url": "https://s3.amazonaws.com/il-elections/Candidates.csv", "bucket": "il-elections", "last_modified": "2014-07-25T13:27:15.000Z", "size_bytes": 2757110, "size": "2.6 MB" } ]{% endblock %}


Ripple-without-JS
Create Material Design ripple effect in your HTML without using a single line of JS.
Click here
Github


Michael Collins (1996) A film review by Christopher Null Copyright 1996 Christopher Null
The time between 1916 and the 1920s saw the worst of a revolt that caused the creation the IRA and heightened the fight for independence between Ireland and the crown in London. At the head of this fight, like it or not, was Michael Collins, a demagogue/saboteur/freedom fighter that lived as a hero and died a martyr.
Read it once again -- this is *not* BRAVEHEART.
Otherwise, it's the same movie, except Neil Jordan's paean to the Irish hero leaves much to be desired by the discriminating viewer. Jordan, best known for his masterpiece THE CRYING GAME, really seems to be falling apart these days (did *you* stay awake during INTERVIEW WITH THE VAMPIRE?). Now he's back with MICHAEL COLLINS, a rambling, 138-minute epic that could have easily been cut to 90, and has its good points and its bad -- but the bad really stick out like sore thumbs.
Using more scrolling title cards than I've ever seen before, at first I thought MICHAEL COLLINS was going to be a read-along. But instead of incorporating this information about Collins (Liam Neeson) into the story, Jordan tacks on the printed Michael Collins at-a-glance biography and just plugs the movie full of the same sequence over and over again. (That sequence is this: the IRA guys are asleep, then the Brits come on a raid, then the IRA guys get away just in time. Whew!)
Then there's the what-on-earth-were-you-thinking decision to put Julia Roberts in this movie as Kitty Kiernan, the woman torn between Collins and his once-best friend Harry Boland (Aidan Quinn). Seriously, my Irish accent is better than Roberts's, and I'm from *Texas*.
The real story of Michael Collins may be a good one -- full of intrigue, infighting with the Irish President Eamon De Valera (Alan Rickman), bloody war with the English, and a struggle to get the girl with the bad Irish accent. The problem is that Jordan tells the story like it's a history lesson, and a dull one at that. Yes, the movie's full of good acting (exception noted above), gory violence, and lavish sets (all of which are blown up by the end of the film), but it ends up being just another over-indulgent sermon by a misguided preacher.
Think of your $6.50 as an offering.
[The author of this review is not responsible for historical inaccuracies in either the film or this critique.]
RATING: ***
|------------------------------| \ ***** Perfection \ \ **** Good, memorable film \ \ *** Average, hits and misses \ \ ** Sub-par on many levels \ \ * Unquestionably awful \ |------------------------------|
-Christopher Null /<EMAIL_ADDRESS>/ Writer-Producer -Visit the Movie Emporium at http://www.filmcritic.com/ -and Null Set Productions at http://www.filmcritic.com/nullset.htm
--------------3FD668ED2BE1--
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


---
layout: post
title: Railsbricks Setup
date: 2015-04-09 20:24:30.000000000 -05:00
type: post
published: true
status: publish
categories:
- Ruby on Rails
tags: []
meta:
_publicize_pending: '1'
is_reblog: '1'
post_id: '37'
blog_id: '86306782'
reblog_snapshot: "O:8:\"stdClass\":7:{s:5:\"title\";s:17:\"Railsbricks Setup\";s:4:\"type\";s:4:\"post\";s:9:\"mime_type\";s:0:\"\";s:6:\"format\";b:0;s:12:\"modified_gmt\";s:19:\"2015-04-08
21:21:35\";s:9:\"permalink\";s:48:\"http://troyleak.com/2015/04/08/railsbricks-setup\";s:7:\"content\";s:952:\"
\n\nToday I found out about
railsbricks.
It's a ruby gem that does the complicated task of setting up trivial functionality
for your site like user logins, database configuration, admin pages, and other
things like that. Extremely helpful in that endeavor was
this
blog post, which helped me parse some of the options I was presented with.\r\n\r\nI
did run into one problem that was not covered in his post, however. It seems the
team that makes Postgresql keep moving around their psql.conf file and that causes
your application to flip out without some extra configuration. As this was a test
application, I went with SQLite3 for my database for simplicity's sake.\r\n\r\nOverall,
though, railsbricks is another extremely helpful tool in creating rails apps quickly
and conveniently.
\";}"
publicize_twitter_user: bobr_az
publicize_twitter_url: http://t.co/XvQUCIfSzG
_wpas_done_7641025: '1'
_publicize_done_external: a:1:{s:7:"twitter";a:1:{i:2516516912;b:1;}}
publicize_linkedin_url: ''
author:
login: broberts65
email<EMAIL_ADDRESS>display_name: Bob Roberts
first_name: ''
last_name: ''
---
Cool cool find. Kudos to Nico Schuele for creating this gem


Milligrid is a responsive CSS grid system which uses flexbox as a basis for its layout. It is based on the excellent grid built into Milligram, which was in turn based on work by Philip Walton. Milligrid aims to take the brilliant Milligram grid and provide it in a standalone package with enhanced configuration options in the form of Sass variables.
Milligrid supports both ltr
and rtl
layout directions via the dir
HTML attribute.
The .container
CSS class creates the foundation for the grid rows and columns that are placed within it.
The .row
CSS class is used within the container to arrange group items horizontally. Rows are built to grow and shrink with the screen size.
Individual items are given the .column
CSS class. Space on the row will be split event between the columns. Columnns will wrap onto the next row rather than shrinking past a certain point.

Single item on a row.

First row item.

Second row item.

Single item on a row.
First row item.
Second row item.
Grids can be nested by placing a .row
element inside of a .column
element. The nested grid does not require its own .container
element.

Column in parent.

Column in child.

Column in child.

Column in parent.
Column in child.
Column in child.
.row
Item LimitsA limit can be applied to the number of items that are placed on a row by using the .row-#
classes, for example .row-3
to limit the number of items is 3 items. Numbers which are factors of 12 will look the best (assuming the default configuration is used).

1st item on the row.

2nd item on the row.

3rd item on the row.

4th item will wrap to the next line.

1st item on the row.
2nd item on the row.
3rd item on the row.
4th item will wrap to the next line.
A preceeding gap can be placed in front of a column using the .column-offset-#
classes, for example .column-offset-3
to offset the column by the width of 3 of the 12 available columns.
A limit can be put on the width of a column using the .column-wide-#
classes, for example .column-wide-3
to limit the column to the width of 3 of the 12 available columns.

0x offset, 4x width.

2x offset, 6x width.

0x offset, 4x width.
2x offset, 6x width.
5 options are provided for the configuration of how a .row
element handles the vertical alignment of the items within it:
.row-top
- Items are aligned to the top of the row..row-bottom
- Items are aligned to the bottom of the row..row-center
- Items are vertically centered on the row..row-stretch
- Items are stretched to fill the row..row-baseline
- The baseline of each item's text will be the same for all items.Configuration for individual .column
elements is available that can be applied in cases where fine-tuned control of vertical positioning is required:
.column-top
- Element is aligned to the top of the row..column-bottom
- Element is aligned to the bottom of the row..column-center
- Element is vertically centered on the row..column-stretch
- Element is stretched to fill the row..column-baseline
- The baseline of the text in the element will be aligned to other element's text baseline.

Column with very long content that takes up lots of vertical space. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis molestie libero, vel tincidunt diam tristique a.

Short column will be on the bottom of the row.

Short column will be centered.

Column with very long content that takes up lots of vertical space. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis molestie libero, vel tincidunt diam tristique a.
Short column will be on the bottom of the row.
Short column will be centered.
Defines an optional prefix that can will be prepended to all rule names. This is particularly useful if you need to deploy Milligrid in conjunction with another system which has colliding names (such as Bootstrap or Milligram).
The maximum width of the page that the encompassing .container
will stretch to. Override this value for a thin, thick or fluid grid width.
The amount of horizontal space that each .column
will reserve on either side of it. The effective distance between .column
elements inside the grid will be doubled.
The amount of vertical space that will be left between each .row
element and also between .column
elements on a row which have wrapped onto the next line
The maximum of items which will be allowed on a .row
before wrapping occurs. Remember that individual rows can be configured later using .row-#
classes so a high number with lots of divisors is a good idea, such as 12, 15 or 16
On smaller devices it doesn't make sense to still try to display 12 elements on a row. This variable allows configuration of the point at which .column
elements in a row appear as rows themselves.
When composing your own Sass classes using @extend
you can often end up in a position where a common element (such as grid classes) have been extended so often that the CSS selectors become large and messy. To combat this Milligrid provides every single one of its classes as a mixin so that you can build your own composite CSS styles without ending up in selector hell!
The Milligrid system also includes an extended variant which goes beyond the grid system to provide base styling for other HTML elements.
The system's primary aim is to establish a vertical rhythm to the document. The extended styles are incomplete and undocumented, however you can see them in use on this page.


Buffalo visits Tampa Bay after Girgensons’ 2 goal-game
by Associated PressBuffalo Sabres (11-9-3, fifth in the Atlantic Division) vs. Tampa Bay Lightning (11-7-2, sixth in the Atlantic Division)
Tampa, Florida; Monday, 7 p.m. EST
BOTTOM LINE: The Tampa Bay Lightning host Buffalo after Zemgus Girgensons scored two goals in the Sabres’ 5-2 victory against the Panthers.
The Lightning are 6-2-0 against the rest of their division. Tampa Bay has scored 74 goals and is the league leader averaging 3.7 goals per game. Nikita Kucherov leads the team with seven.
The Sabres are 5-3-0 against opponents in the Atlantic Division. Buffalo has allowed 19 power-play goals, killing 73.6% of opponent opportunities.
Tampa Bay beat Buffalo 5-3 in the last meeting between these teams on Nov. 9. Patrick Maroon scored two goals for the Lightning in the win.
TOP PERFORMERS: Kucherov leads the Lightning with seven goals, adding 13 assists and recording 20 points. Anthony Cirelli has scored five goals over the last 10 games for Tampa Bay.
Jack Eichel leads the Sabres with 15 total assists and has recorded 29 points. Sam Reinhart has three goals and four assists over the last 10 games for Buffalo.
LAST 10 GAMES: Sabres: 2-7-1, averaging 2.3 goals, 3.6 assists, 4.1 penalties and 10.4 penalty minutes while giving up 3.4 goals per game with a .889 save percentage.
Lightning: 6-4-0, averaging 4.1 goals, 7.5 assists, 4.8 penalties and 12.9 penalty minutes while giving up three goals per game with a .908 save percentage.
Lightning Injuries: Steven Stamkos: day to day (lower body).
Sabres Injuries: Johan Larsson: out (upper body).
___
The Associated Press created this story using technology provided by Data Skrive and data from Sportradar.


Presented by: Jasmine McElroy, Zuri Hunter and Alexander Roberts
To leverage mobile technology to improve global sales efficiency while reducing sales force bureaucracy by improving access to commonly used tols for sales preparation and administrative activities.
To increase revenues derived from enhanved relationships between Sales Representatives


RT @xpaulbettsx: "Some days you get the bear, some days the bear creates an IBear in order to inject it into IForest, which came from IA ...
12/8/2011, 7:31:47 PM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @xpaulbettsx: "Some days you get the bear, some days the bear creates an IBear in order to inject it into IForest, which came from IA ...
12/8/2011, 7:31:47 PM
Favs: 0
Retweets: 0
link


Links to resources |
|
|
Compiling and running SnowballWhen you download Snowball (from here), it already has in place a make file that you can call to build it. But in any case, Snowball has a very simple structure, comprising the traditional tokeniser, syntax analyser and code generator modules, with two extra modules for space management and an internal merge sort, and a small driver module, all sharing a common header file. You will find them in the directory compiler/. Copy it out, and you can compile Snowball at once (Linux or Unix) withgcc -O -o Snowball compiler/*.cSnowball can then be called up with the following syntax, F1 [-o[utput] F2] [-s[yntax]] [-w[idechars]] [-u[tf8]] [-j[ava]] [-n[ame] C] [-ep[refix] S1] [-vp[refix] S2] [-i[nclude] D] [-r[untime] P]For example, ./Snowball danish/stem.sbl -o q/danish ./Snowball danish/stem.sbl -syntax ./Snowball danish/stem.sbl -output q/danish -ep danish_The first argument, F1, is the name of the Snowball file to be compiled. If the -java option is absent, it produces two outputs, an ANSI C module in F2.c and a corresponding header file in F2.h. If option -java is present, Java output is produced in F2.java. The -widechars, -utf8, -eprefix and -vprefix options belong with ANSI C generation; the -name option with Java generation. ANSI C generationIn the absence of the -eprefix and -vprefix options, the list of declared externals in the Snowball program, for example,externals ( stem_1 stem_2 moderate )gives rise to a header file containing, extern struct SN_env * create_env(void); extern void close_env(struct SN_env * z); extern int moderate(struct SN_env * z); extern int stem_2(struct SN_env * z); extern int stem_1(struct SN_env * z);If -eprefix is used, its string, S1, is prefixed to each external name, for example -eprefix Khotanese_would give rise to the header file, extern struct SN_env * Khotanese_create_env(void); extern void Khotanese_close_env(struct SN_env * z); extern int Khotanese_moderate(struct SN_env * z); extern int Khotanese_stem_2(struct SN_env * z); extern int Khotanese_stem_1(struct SN_env * z);If -vprefix is used, all Snowball strings, integers and booleans give rise to a #define line in the header file. For example -eprefix Khotanese_ -vprefix Khotanese_variablewould give rise the header file, extern struct SN_env * Khotanese_create_env(void); extern void Khotanese_close_env(struct SN_env * z); #define Khotanese_variable_ch (S[0]) #define Khotanese_variable_Y_found (B[0]) #define Khotanese_variable_p2 (I[1]) #define Khotanese_variable_p1 (I[0]) extern int Khotanese_stem(struct SN_env * z);The -widechars option affects interpretation of Snowball hex and decimal strings, as in stringdef m hex 'H1 H2 ...' stringdef m decimal 'D1 D2 ...'where H1, H2 ... are hex numbers and D1, D2 ... are decimal numbers. Without the -widechars option it is an error for these numbers to exceed 255. With the -widechars option it is only an error if they exceed 65535. So by default one byte characters are assumed, but -widechars makes the assumptions that characters are two bytes. Note that (a) the output from Snowball is the same in both cases, and (b) the -java option automatically sets the -widechars option. Within the API header file api.h, symbol is given a typedef of unsigned char, typedef unsigned char symbol;— and a sequence of characters representing a word to be stemmed is then held in a symbol array. To switch to a 16 bit representation of characters, just replace char by short here: typedef unsigned short symbol;The -utf8 option is an alternative to -widechars. Again, it allows characters in the range 0 to 65535 in stringdefs, but these characters are then encoded as 2 or 3 byte characters in the UTF-8 encoding scheme. The ANSI C program output by Snowball is similarly adjusted to handle characters that can occupy multiple bytes. (See section 12 of the Snowball manual.) The -runtime option is used to prepend a path to any #include lines in the generated code, and is useful when the runtime header files (i.e. those files in the runtime directory in the standard distribution) are not in the same location as the generated source files. It is used when building the libstemmer library, and may be useful for other projects. Java generationThe -java option automatically sets the -widechars option.To run Java, download the tarball, which will unpack into an appropriate directory structure. Other optionsIf -syntax is used the other options are ignored, and the syntax tree of the Snowball program is directed to stdout. This can be a handy way of checking that you have got the bracketing right in the program you have written.Any number of -include options may be present, for example, ./Snowball testfile -output test -ep danish_ \ -include /home/martin/Snowball/codesets \ -include extrasEach -include is followed by a directory name. With a chain of directories D1, D2 ... Dn, a Snowball get directive, get 'F'causes F to be searched for in the successive locations, F D1/F D2/F ... Dn/F— that is, the current directory, followed in turn by directories D1 to Dn. The Snowball APITo access Snowball from C, include the header api.h, and any headers generated from the Snowball scripts you wish to use. api.h declaresstruct SN_env { ... }; extern void SN_set_current(struct SN_env * z, int size, char * s);Continuing the previous example, you set up an environment to call the resources of the Khotanese module with struct SN_env * z; z = Khotanese_create_env();Snowball has the concept of a ‘current string’. This can be set up by, SN_set_current(z, i, b);This defines the current string as the i bytes of data starting at address b. The externals can then be called, Khotanese_moderate(z); ... Khotanese_stem_1(z);They give a 1 or 0 result, corresponding to the t or f result of the Snowball routine. And later, Khotanese_close_env(z);To release the space raised by z back to the system. You can do this for a number of Snowball modules at the same time: you will need a separate struct SN_env * z; for each module. The current string is given by the z->l bytes of data starting at z->p. The string is not zero-terminated, but you can zero terminate it yourself with z->p[z->l] = 0;(There is always room for this last zero byte.) For example, SN_set_current(z, strlen(s), s); Khotanese_stem_1(z); z->p[z->l] = 0; printf("Khotanese-1 stems '%s' to '%s'\n", s, z->p);The values of the other variables can be accessed via the #define settings that result from the -vprefix option, although this should not usually be necessary: printf("p1 is %d\n", z->Khotanese_variable_p1);The stemming scripts on this Web site use Snowball very simply. -vprefix is left unset, and -eprefix is set to the name of the script (usually the language the script is for). All the programs are tested through a common driver program. Getting startedThe complete apparatus of the libstemmer download plus the make files can obscure the essential simplicity of the Snowball system. Just to get a bit of confidence in using it, here is something you can try safely at home.First, get the compiler out of the snowball code download, and build it. We have seen above how you do this: gcc -O -o Snowball compiler/*.cThen copy the files stem_ISO_8859_1.sbl, voc.txt and output.txt from the page for the Hungarian stemmer, http://snowball.tartarus.org/algorithms/hungarian/stemmer.htmlto the same directory, renaming the snowball script as hungarian.sbl. Take the runtime/ directory out of the snowball code download, and put it in the current directory, renamed as q/, say. q/ contains four files, api.c, api.h, header.h, utilities.c. Now compile the snowball script, ./Snowball hungarian.sbl -o q/hungarian -ep H_ -utf8(Note the -utf8 option.) This put two more files into q/, hungarian.c and hungarian.h. Next put into q/ a driver program. You can download it from the link at the top of this page, but here it is, |
#include <stdio.h> #include <stdlib.h> /* for malloc, free */ #include <string.h> /* for memmove */ #include "api.h" #include "hungarian.h" /* This derives from the source file driver.template */ /* A simple driver for a single ANSI C generated Hungarian stemmer. Following compilation with gcc -o H_prog q/*.c The command line syntax is ./H_prog file [-o[utput] file] -h[elp]] The first argument gives the input file, which consists of a list of words to be stemmed, one per line. (Words must be in lower case.) If omitted, stdin is used. The output is sent to stdout by default, otherwise to the -output file. */ static void stem_file(struct SN_env * z, FILE * f_in, FILE * f_out) { #define INC 10 int lim = INC; symbol * b = (symbol *) malloc(lim * sizeof(symbol)); while(1) { int ch = getc(f_in); if (ch == EOF) { free(b); return; } { int i = 0; while(1) { if (ch == '\n' || ch == EOF) break; if (i == lim) { /* make b bigger */ symbol * q = (symbol *) malloc((lim + INC) * sizeof(symbol)); memmove(q, b, lim * sizeof(symbol)); free(b); b = q; lim = lim + INC; } b[i] = ch; i++; ch = getc(f_in); } SN_set_current(z, i, b); H_stem(z); { int j; for (j = 0; j < z->l; j++) fprintf(f_out, "%c", z->p[j]); fprintf(f_out, "\n"); } } } } static int eq(char * s1, char * s2) { int s1_len = strlen(s1); int s2_len = strlen(s2); return s1_len == s2_len && memcmp(s1, s2, s1_len) == 0; } static void show_options(int n) { printf("options are: file [-o[utput] file] [-h[elp]]\n"); exit(n); } int main(int argc, char * argv[]) { char * in = 0; char * out = 0; { char * s; int i = 1; while(1) { if (i >= argc) break; s = argv[i++]; if (s[0] == '-') { if (eq(s, "-output") || eq(s, "-o")) { if (i >= argc) { fprintf(stderr, "%s requires an argument\n", s); exit(1); } out = argv[i++]; } else if (eq(s, "-help") || eq(s, "-h")) { show_options(0); } else { fprintf(stderr, "%s unknown\n", s); show_options(1); } } else in = s; } } /* initialise the stemming process: */ { struct SN_env * z = H_create_env(); FILE * f_in; FILE * f_out; f_in = in == 0 ? stdin : fopen(in, "r"); if (f_in == 0) { fprintf(stderr, "file %s not found\n", in); exit(1); } f_out = out == 0 ? stdout : fopen(out, "w"); if (f_out == 0) { fprintf(stderr, "file %s cannot be opened\n", out); exit(1); } stem_file(z, f_in, f_out); H_close_env(z); } return 0; } |
|
Now compile the q/ sources to the Hungarian stemmer program H_prog, gcc -o H_prog q/*.cAnd H_prog will turn the vocabulary into the stemmed output, as you can check by doing, ./H_prog voc.txt -o TEMP.txt diff output.txt TEMP.txtIn summary therefore, gcc -O -o Snowball compiler/*.c ./Snowball hungarian.sbl -o q/hungarian -ep H_ -utf8 gcc -o H_prog q/*.c ./H_prog voc.txt -o TEMP.txt diff output.txt TEMP.txt(Not so hard.) Debugging snowball scriptsIn the rare event that your Snowball script does not run perfectly the first time:Remember that the option -syntax prints out the syntax tree. A question mark can be included in Snowball as a command, and it will generate a call debug(...). The defined debug in runtime/utilities.c (usually commented out) can then be used. It causes the current string to sent to stdout, with square brackets marking the slice and vertical bar the position of c. Curly brackets mark the end-limits of the string, which may be less than the whole string because of the action of setlimit. At present there is no way of reporting the value of an integer or boolean. If desperate, you can put debugging lines into the generated C program. This is not so hard, since running comments show the correspondence with the Snowball source. Compiler bugsIf you hit a snowball compiler bug, try to capture it in a small script before notifying us.Known problems in SnowballThe main one is that it is possible to ‘pull the rug from under your own feet’ in constructions like this:[ do something ] do something else ( C1 delete C2 ) or ( C3 )Suppose C1 gives t, the delete removes the slice established on the first line, and C2 gives f, so C3 is done with c set back to the value it had before C1 was obeyed — but this old value does not take account of the byte shift caused by the delete. This problem was forseen from the beginning when designing Snowball, and recognised as a minor issue because it is an unnatural thing to want to do. (C3 should not be an alternative to something which has deletion as an occasional side-effect.) It may be addressed in the future. |