1

I'm starting work on a new project and I need to know the feasibility of the end-result. I need a lot of things to happen automatically.

  1. Detect if a new file has been added to a folder
  2. Login to a website (like Strava or TrainingPeaks)
  3. Upload the file to my account on the website

Any advice on this front is appreciated. I really just need to know if this is possible and what I would need to make it happen.

1 Answer 1

2

To detect when a new file is created in or under a directory, use the inotify facility. See Can a bash script be hooked to a file? and How to run a command when a directory's contents are updated? for examples.

Logging in to a website is very dependent on how the website manages authentication. Uploading the file is generally simple once you're authenticated but there's no standard for what URL and parameters to use. So you need to figure that out site per site. See Automating tasks on a website on a headless server, Is there a way to use curl interactively? Or is there an interactive curl/wget shell?, Automating web requests using curl? for some examples.

1
  • +1 very nice sampling of good answers to these questions within our site! Commented Dec 27, 2013 at 2:34

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.