Giter Club home page Giter Club logo

twio's Introduction

twio.c

twio.c

A theoretical library organizer program, obfuscated to resemble Twilight Sparkle from MLP:FiM. Reads data from a text file containing book entries, and can organize each element based on author, title, or release date, in any order or combination. Has the capability for secondary and tertiary sorting, so if two books match in their primary category exactly, they will be sorted by their secondary and tertiary category (if provided). Outputs the data to stdout.

twi.c is functionally equiavalent to twio.c, but written in a human readable format without any obfuscations or excess formatting.

Compilation

Compilation is trivial with gcc:

gcc twio.c -o twio

All files only include the standard libraries.

Usage

twio.c and twi.c

twio [text file to read from] -[a|d|t] ...

The first argument is the path to the text file to sort. The program supports up to three more arguments which indicate the way to sort the data, but only one is required. Each argument is separate and preceeded with a - followed by either a, d, or t, representing author, date, or title respectively. The first argument is the primary classification, the second the secondary, and so on. Elements are organized in ascending order by default, but can be switched to descending order by making the appropriate letter captial. For example:

  • twio randomdata.txt -t sorts by title in ascending order
  • twio randomdata.txt -T sorts by title in descending order
  • twio randomdata.txt -a -T sort by author in ascending order, and if authors match sort by title in descending order

testdata_generator.c

testdata_generator

Creates a set of data conformant to twi.c and twio.c's expected input, the file randomdata.txt. For testing purposes, both the author name and book title are single letters to get more overlap for secondary/tertiary sorting, but this is trivial to modify. Both twi.c and twio.c expect the data to not be malformed, so each book entry must be formatted in the form title/author/date\n and each entry component cannot exceed 64 characters each.

twio's People

Contributors

redruin1 avatar

Watchers

 avatar

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.