Skip to content
/ ss Public

A sorting and classification cli tool for books.

License

Notifications You must be signed in to change notification settings

ramnaq/ss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sorting Service (SS)

A sorting and classification service for books.

alt image

How to

The SS can be run with the following command:

$ python sorting_service.py <books.txt> [OPTIONAL <rules.txt>]

The first parameter is a file with a list of books. The books have to be registered line by line, following the pattern <title>,<authors>,<edition year> (without spaces between commas and the words). An example of this can be found in books.txt.

The optional parameter indicates the rules of sorting (e.g. title (ascending), author (descending)). The rules have to be registered line by line, following the pattern <book param numer> <descending flag>, where the numbers of the book parameters are: 1 (title), 2 (author), 3 (edition year); and <descending flag> is 1 when you want the order to be "descendent" (otherwise it is 0). Notice that an whitespace must be between the two numbers. An example of this can be found in sort.conf

To quick test the program, the following command can be run (using files from resources):

$ python sorting_service.py ../resources/books.txt ../resources/sort.conf2

Spec

Language: Python 3.7.1

About

A sorting and classification cli tool for books.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages