Some time in our projects we need data in json files(mostly web projects). But collecting and managing data in json files is harder(At least this is what I feel) compared to excel. I had recently ran into a similar situation where I need some data. Data is going to be provided by a non-technical person/client. And there going to be several rounds of it. So I was looking for options what can be done here, where I found several online tools which could be used for same.
Until now we had done as of following code. We would create couples of more functions which would help us in managing our application. As discussed earlier we would now we creating different directories and files present inside .git directory along with directory itself. More or less we would something like following directory structure after doing wag init .git is the git directory itself, which contains: .git/objects/ : the object store, which we’ll introduce in the next section.
Last time we had created cmd_init(args) function. We add more functionality to cmd_init(args). This was our code till last time. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import sys import argparse argparser = argparse.ArgumentParser(description="Another Content Tracker") argsubparsers = argparser.add_subparsers(title="Commands", dest="command") argsubparsers.required = True argsp = argsubparsers.add_parser("init", help="Initialize a new, empty repository.") argsp.add_argument("path", metavar="directory", nargs="?", default=".", help="Where to create the repository.
Second Try We would be trying to create a mini git clone from this tutorial. I aspect this to go long. In general git is awesome source code manager which is wieldy use. So first we would be creating a lib file and executing file. Let’s create a file called wag which would have following code. 1 2 3 4 #!/usr/bin/env python3 import libwag libwag.main() Then we would create another file which would be libwag.
So I tried to follow wyag at here but I was not able to. This tutorial is great but I was not able follow it because may be I am not still not much clear with python and how it works. So after much thought I have decided that I would try to create my own blog post series where I would take learnings from wyag and try to do it in my way.