Giter Site home page Giter Site logo

Comments (5)

porunov avatar porunov commented on August 12, 2024

Yes, it is possible to upload other files rather than .mp4.
To support it you should remove an operator 'if' for mp4 in GDriveUploader script:

line 100 remove: && [ "$(echo -n $n | tail -c 4)" = ".mp4" ]
line 130 remove: if [ "$(echo -n $n | tail -c 4)" = ".mp4" ]; then
line 133 remove: fi

But I don't recommend to do this. When your camera is working it creates and removes temporary files (other than mp4). It will cause the problem that you will see unuseful files in your Google Drive folder.

You shouldn't put anything additional in the /home/hd1/record/. Camera is waiting for new folders in that folder, so when it see something in that folder it creates a folder with the same name in your Google Drive folder.

from xiaomi_gdrive.

Yury-MonZon avatar Yury-MonZon commented on August 12, 2024

What if I change the line [ "$(echo -n $n | tail -c 4)" = ".mp4" ] to [[ "$(echo -n $n | tail -c 4)" = ".mp4" ] || [ "$(echo -n $n | tail -c 4)" = ".log" ]]. I'm not a bash coder at all, please, correct me - I'm guesstimating with my C knowledge here. So will it work for *.log as well?

About folders stuff - can't I create /home/hd1/record/log folder and put all my logs in here, so they will be synchronised?

from xiaomi_gdrive.

porunov avatar porunov commented on August 12, 2024
  1. Yes. But without additional brackets. It must be like this:
    [ "$(echo -n $n | tail -c 4)" = ".mp4" ] || [ "$(echo -n $n | tail -c 4)" = ".log" ]
  2. Unfortunately, no. It won't work. It will upload or files in the folder 'log' and then continue to upload other folders. It won't return back to 'log' folder again.

It is better to create additional scripts to upload other stuff in parallel.

from xiaomi_gdrive.

Yury-MonZon avatar Yury-MonZon commented on August 12, 2024

Thanks!

What if my script is going to create a folder with every_time_new_random_name and log file inside it every time I need it? will your script detect it?

from xiaomi_gdrive.

porunov avatar porunov commented on August 12, 2024

It depends on the folder name. Every time your script creates a folder it have to use the name like:
2016Y10M22D18H_log

Where "2016Y10M22D18H" is the current year, month, day and hour. This folder will be uploaded when 19 hour starts.

from xiaomi_gdrive.

Related Issues (14)

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.