Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

ctools

Python scripts for modifying (key,value) text files

The C in CTools stands for "Clause files". These are text files that contain records. Each record consists of multiple lines, each line is a key,value pair. For example:

ARCHIVE: healthdata
NETID: abc12345
GROUP: healthdata
COUNT: 3561789

A space, and an optional colon (:), separates each key and value the line.

Individual records are separate by one or more blank lines.

Clause files can carry the same information as spreadsheets, but they have the advantage of being easier to edit from a text editor. In addtion, the script ''flatten'' can be used to convert a clause file to a CSV file, which can then be read by a standard spreadsheet app.

The Ctools are

flatten - convert a clause file to a text table, an HTML table, or a CSV file.
cgrep   - similar to grep; print those records which match the search parameter
cmerge  - merge two or more clause files on a specific key field
csort   - sort records in a clause file by the value of a specific key,
          or sort key,value pairs within a record by the value of the key.

About

Python scripts for modifying (key,value) text files

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages