it's a decoder/encoder for the auspost barcodes. hooray
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

46 lines
1.6 KiB

/*
AusPostCode - A program for parsing and creating Australia Post barcodes.
Copyright (C) 2020 Lynnesbian
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
using System;
using CommandLine;
namespace AusPostCode {
internal class Program {
private static void Main(string[] args) {
// test code consisting of the following:
// - start bars
// - fcc of 0101 == 11 == standard customer barcode
// - sorting code of 2112011202120020 == 75152506
// - a filler bar of 3
// - a reed-solomon code of 001101103221 == 10826817
// - end bars
// const string testCode = "1301012112011202120020300110110322113";
// const string testCodeCustomer3 = "1320021211120120021201000001002300301302333333333333313133002021313";
const string testCodeCustomer3 = "1320021211120120021201003021130003120033203230023003313133002021313";
var barcode = new Barcode(testCodeCustomer3);
}
public class Options {
[Option('d', "decode", Required = false,
HelpText = "Decode the text passed in, turning it into human readable information.")]
public bool Decode { get; set; }
}
}
}