{"id":24021149,"url":"https://github.com/zipcodecore/ntz-java","last_synced_at":"2025-04-15T21:16:53.789Z","repository":{"id":94665678,"uuid":"337114035","full_name":"ZipCodeCore/ntz-java","owner":"ZipCodeCore","description":"a personal, terminal based notetaker.","archived":false,"fork":false,"pushed_at":"2021-02-08T21:05:56.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T21:16:44.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZipCodeCore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-08T15:07:42.000Z","updated_at":"2022-02-03T15:02:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5c4f992-5534-4b60-b14a-863a4450e89d","html_url":"https://github.com/ZipCodeCore/ntz-java","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":"xt0fer/ntz-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2Fntz-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2Fntz-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2Fntz-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZipCodeCore%2Fntz-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZipCodeCore","download_url":"https://codeload.github.com/ZipCodeCore/ntz-java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249153951,"owners_count":21221330,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-08T12:39:28.186Z","updated_at":"2025-04-15T21:16:53.734Z","avatar_url":"https://github.com/ZipCodeCore.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ntz-java\n\nntz is a commandline notes taker. use HashMap to store all the things.\n\n## What is ntz?\n\n*How do you \"persist\" data from one running of a program to another??*\n\nThis lab shows a simple \"store it in a file\" solution. \nIt also encourages you to try to make this useful to you so that you might end up using your own code as a tool to keep yourself organized(!).\n\nNTZ is a command line note tool that doesn't involve terminal based editors, but does involve Java.\nYou've been provided with a very simple file backed data store called `FileMap`.\nIt acts like a Key/Value database, which can be stored in a file.\nIt has an internal `HashMap\u003cString,NoteList\u003e` and all it does is `load()` and `save()` itself to\na file named \"ntz.db\".\nIt's purpose is to show you a simple way to persist your Notez' data into a file.\nSee more about the ObjectInputStream/ObjectOutputStream classes.\n\nA `NoteList` is merely an ArrayList\u003cString\u003e. \nEach Item in the FileMap's hashmap should use the key String for the Category name, and then append a notes to the NoteList held as the map's value.\n\nThis lab requires you to figure out how to take things from the command line and manipulate a `database` to\nstore text notes.\nYou should work on it over the course of the week.\n\n## Why?\n\nKeeping track of a small list of things to remember or stuff that needs doing is a pain.\nRemembering its location, manually accessing it, formatting it and all of the clicking that entails,\nis something many find unpleasant.\n\nOther command line note tools out there are...clunky. \nThey require interacting with vim or nano, and manual formatting. \nYuck.\n\nntz takes command line arguments and builds tidy todo/remember lists using Java. \nThe result is a notes system that is easily manipulated with the command line \nusing ntz' interface.\n\n## What's it look like? - Usage\n\n### Showing notes\n\nTyping `ntz` with no arguments should display all your notes.\nIt should number them so you can perform forget/change on them.\n\n```\nntz\n1) \"hello!\"\n2) \"second note\"\n```\n\n### adding/forgetting and changing notes\n\n`ntz` has four commandline options.\n\n* [-r]emember\n* [-c] creates and/or appends to a category\n* [-f]orget a note\n* [-e]dit (replace) a note\n\n#### Remember\n\nAdds a note to the general category.\n\n```\nntz -r \"This is a note\"\n# which should be the same as \nntz -c \"General\" \"This is a note\"\n```\n\n#### Create/Append to Category\n\nAdds another note to a category, if the category doesn't exist,\nadds a new category and appends the note to it.\n```\nntz\n1) \"hello!\"\n2) \"second note\"\n\nntz -c \"Todo\" \"Buy Milk.\"\n\nntz\n1) \"hello!\"\n2) \"second note\"\n Todo\n1) \"Buy Milk.\"\n```\n\n#### Forget a note\n\nRemoves a note from a category\n\n```\nntz\n1) \"hello!\"\n2) \"second note\"\n\nntz -f 1\n\nntz\n1) \"second note\"\n```\n\n### Edit a note\n\nReplace a note with a new one.\n\n```\nntz\n1) \"hello!\"\n2) \"second note\"\n\nntz -e 2 \"replaced second note\"\n\nntz\n1) \"hello!\"\n2) \"replaced second note\"\n```\n\n## How to do this Lab\n\nYou need to be thinking in phases.\nPhase 1, and then 2 and then 3 and so on.\n\nPhases\n\n* Get the bare ntz command working.\n  * You should put a couple of notes into the general category (in code)\n  * built a method to print out the FileMap\n* Get the simple remember command working.\n  * pull the data from the command line\n  * call the method to add the note to the category\n* Build the category (-c) command functionality\n* Add delete note capability\n* Finish with the \"edit\" capability\n\nEach phase needs to be clear piece of work.\nYou have to make the code in the phase work.\nIt's probably by adding a method to the Notez class.\nThen you have to do a git commit and push.\nYou must decide on a few tests and write them.\nThen you have to do a git commit and push.\nOnce you have completed a phase you move onto the next one.\nAt the end of each phase the program must work well.\n\nThings you need to think about as you're doing each phase\n\n* How do you figure out what was passed to the program's input on the command line?\n* How do you *carefully* break that line into pieces you can handle.\n* How do you handle the \"command\" ( -r, -c, -f, -e) and it's arguments?\n  * How do you design a method in the Notez class to handle the command.\n\n## Database \"BackEnd\"\n\nYes, the backend (the FileMap) is a very crude database.\nIt is a HashMap\u003cString, Notelist\u003e and a NoteList is merely an ArrayList\u003cString\u003e.\nFileMap wraps (forwards) all the Map required methods to its internal HashMap.\nFileMap then implements two methods that save/load the hashmap to a file and back.\nYou might want to get ntz running and then replace the database with something else.\nFeel free to use another one.\nThese are all suggestions:\n\n* SQLite3\n* BerkeleyDB\n* jdbm2\n* BananaDB\n* REDIS\n* anything else your heart desires.\n\n## Installation (Once you have it written)\n\nThis is waving hands.\nNeed real instructions here.\nThe issues, which make this a little brittle or difficult, is often the relative paths within the shell script.\n\n1. Look at the `ntz.sh` file.\n2. It might work for you.\n3. Place it somewhere that's in your shell's $PATH. Either /bin, /usr/bin or ~/bin\n4. Add this line to your .bashrc or .zshrc in the alias section (which is probably in ~/) -\u003e alias ntz='ntz.sh'\n\nThat should do it. To make ntx executable in a shell, just `chmod +x ntz` and it'll probably do the trick.\n\n-kristofer","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzipcodecore%2Fntz-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzipcodecore%2Fntz-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzipcodecore%2Fntz-java/lists"}