#!/usr/local/bin/python
#by D@CC
#on 7/2/2021  2021GJul02
#on 2024BFeb17

import sys                           # load the system module
marker = ':'*10 + 'textpak=>'     # hopefully unique separator

def pack(  ):
    if False:
        print("begin textpack.py")
        print(":",sys.argv)
        print("after sys.argv")
        print("name 0:",sys.argv[0])
    for i in range(1,len(sys.argv)):   # for all command-line arguments
        name=sys.argv[i]
        ch1=name[0:1]
        #print("ch1:",ch1)
        if ch1=="(":
            name=name[1:]
        #if end
        #echo name
        #print("name:"+name+":")
        input = open(name, 'r')      # open the next input file
        print( marker + name)          # write a separator line
        print( input.read(  ))        # and write the file's contents
        input.close()
    #for end
pack(  )  # pack files listed on cmdline
#Web Source:https://www.oreilly.com/library/view/programming-python-second/0596000855/ch04s05.html
#end def textpack_py.py
#/textpack_py.py