Skip to content

Latest commit

 

History

History
85 lines (78 loc) · 2.03 KB

CONTRIBUTORS.md

File metadata and controls

85 lines (78 loc) · 2.03 KB

Script structure

# tree -I '__pycache__|env|build|jsontp.egg-info'
.
├── jsontp
│   ├── __init__.py
│   ├── __main__.py
│   ├── config.py
│   ├── utils.py
│   └── run.py
├── tests
│   ├── __init__.py
│   └── test_page_data_tree.py
├── data
│   ├── ranker_writer-ignore_me.json
│   └── ranker_writer_user_content-ignore_me.json
├── setup.py
├── LICENSE
├── README.md
├── UPDATES.txt
└── CONTRIBUTORS.md

Dependencies

pip -V		# 22.1.1
python -V	# 3.10.5
pytest -V	# 6.2.5

MyEditorSettings

" set nomodeline

tabs
	vim: ts=8 sw=8
spaces
	vim: ts=2 sw=2 expandtab

Coding process: https://youtu.be/DkBAIKMN7x0

MyTODO

  • use 2 spaces instead of 4
    • use tabs for UPPERCASE files (.md, ...)
  • remove or move to another file the entrypoint block
  • make it an API (package)
  • add tests
  • add documentations
  • update version at jsontp/__init__.py
  • rename project (package)

WhatTODO

  • nested json
  • json in the list
  • check for multiple keys
    • return multiple keys (iterable result)
    • unique multiple keys (not every single item in the list)
  • check for keys by value
  • access to the data in the list
    • add and get the index from tree
  • handle errors on searching for a non string key
  • fix errors on reading and writing to the json file without filename
    • no need to test for writing
    • raising an error FileNotFoundError for not valid input filepath
API
  • Flags
CLI
  • Input
    • json file
  • Key
    • search: str
    • filter tree by must have key (-fk)
      • multiple (-fk)
    • filter tree by must have value (-fv)
      • multiple (-fv)
    • result (config.py[Key]): print, return
  • Limit
    • print
    • return
  • Output
    • dump a value to the file (-o <output_filepath>)
    • append to the dump file
    • print: '*'