Git Product home page Git Product logo

chronolog's Introduction

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

chronolog's People

Contributors

jacobmiller22 avatar

Watchers

 avatar

chronolog's Issues

Create an installation script

There should be an installation script for the 3 main platforms. It should create the necessary application data directories for the user. There can be more discussion about what responsibilities it holds.

Api credentials should be stored in app configuration location

The credentials for APIs should be stored in the .chronolog location or the specified configuration output. Now that the configure command creates this, it is more pressing to move to this location rather than just the application root directory.

Separate module for handling user input.

There should be a separate module for the command line input functions outside of the cli module. These functions act as utility functions and should be organized accordingly due to the business logic that cli module handles. Another solution is to make chronolog the entrypoint to the application and use the cli module as utility.

Google Drive logging fails after new installation from pypi

Installing from pypi and after google authentication, there appears to be some unhandled exceptions.

(venv) jacobmiller22:chronolog-test/ $ python3 -m chronolog                                                                                           [19:07:13]
Using config file: /home/jacobmiller22/.chronolog/config.json
Using Google Drive as the log destination
Please visit this URL: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=445106395721-vgod49ld0oiacrvl4nfkmul4q7hjfmq0.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.file&state=oxl5sMI9Ki1v3P5BlswTw0zL57CMUS&access_type=offline
tcgetpgrp failed: Not a tty
Logging for 2022-11-13
Reading from standard input. Press Ctrl+D to finish.
test
Searching drive for log for group: 2022-11-13
Log not found, creating new log...
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/jacobmiller22/Projects/chronolog-test/venv/lib/python3.8/site-packages/chronolog/__main__.py", line 5, in <module>
    main()
  File "/home/jacobmiller22/Projects/chronolog-test/venv/lib/python3.8/site-packages/chronolog/cli.py", line 363, in main
    success = app.upload_log(date, log_contents)
  File "/home/jacobmiller22/Projects/chronolog-test/venv/lib/python3.8/site-packages/chronolog/chronolog.py", line 60, in upload_log
    self._logger.upload_log(date, contents)
  File "/home/jacobmiller22/Projects/chronolog-test/venv/lib/python3.8/site-packages/chronolog/api/google.py", line 292, in upload_log
    target_log_id = self.__create_file(ds=ds, title=group, parents=[self._config.get(
  File "/home/jacobmiller22/Projects/chronolog-test/venv/lib/python3.8/site-packages/chronolog/api/google.py", line 264, in __create_file
    file = ds.files().create(body=file_metadata, fields='id').execute()
  File "/home/jacobmiller22/Projects/chronolog-test/venv/lib/python3.8/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/home/jacobmiller22/Projects/chronolog-test/venv/lib/python3.8/site-packages/googleapiclient/http.py", line 938, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 404 when requesting https://www.googleapis.com/drive/v3/files?fields=id&alt=json returned "File not found: 1YtvM61V2z83PZshUdXMl9wQxHxC8t9UM.". Details: "[{'domain': 'global', 'reason': 'notFound', 'message': 'File not found: 1YtvM61V2z83PZshUdXMl9wQxHxC8t9UM.', 'locationType': 'parameter', 'location': 'fileId'}]">

Google Drive logs dates in a nonfriendly way when using a weekly logging frequency

When using the weekly frequency, the documents created for each week use the number corresponding to the week of the year we are currently in. This should be a bit more human friendly way. See the below screenshot. 12/20/2022 is in the 51st week of 2022.
image
Consider using a range or the date that the Monday of the week belongs to.

configure fails when entering a single directory path in Google Drive path configuration

See error details

1. google_drive
Valid choices are 1-1: 1
Enter the path to the Google Drive folder where the logs will be stored, including the name of the drive (My Drive, <shared_drive_name>, etc.) (default: My Drive/TEST/LOGS)
Enter a string: My Drive
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/jacobmiller22/Projects/chronolog-test/venv/lib/python3.8/site-packages/chronolog/__main__.py", line 5, in <module>
    main()
  File "/home/jacobmiller22/Projects/chronolog-test/venv/lib/python3.8/site-packages/chronolog/cli.py", line 349, in main
    configure(args)
  File "/home/jacobmiller22/Projects/chronolog-test/venv/lib/python3.8/site-packages/chronolog/cli.py", line 324, in configure
    config[destination]["is_shared_drive"] = query_yes_no(
  File "/home/jacobmiller22/Projects/chronolog-test/venv/lib/python3.8/site-packages/chronolog/cli.py", line 84, in query_yes_no
    raise ValueError("invalid default answer: '%s'" % default)
ValueError: invalid default answer: 'False'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.